Naphthalene Possum Management

    onyx-contracts

    0.1.0 • Public • Published

    Onyx contracts

    Smart contracts utilities for the Onyx app and server.

    Installation

    yarn add onyx-contracts

    Usage

    import createContracts from 'onyx-contracts'
     
    const contracts = createContracts('TESTNET') // 'MAINNET' by default when not provided

    The contracts Object contains the following properties:

    • ens
      • getResolverAddress: (nameHash: string) => Promise<string>
      • getHashAddress: (contractAddress: string, nameHash: string) => Promise<string>
      • resolveHash: (nameHash: string) => Promise<string>
      • resolveName: (ensName: string) => Promise<string>
    • staking
      • hasStake: (contractAddress: string, walletAddress: string) => Promise<boolean>
      • requiredStake: (contractAddress: string) => Promise<number>
    • getStakingContractAddress: () => Promise<string>
    • getRequiredStake: () => Promise<number>
    • walletHasStake: (walletAddress: string) => Promise<boolean>

    License

    MIT.
    See LICENSE file.

    Keywords

    none

    Install

    npm i onyx-contracts

    DownloadsWeekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    13.5 kB

    Total Files

    13

    Last publish

    Collaborators

    • sarahwiley
    • mosic
    • aclarke
    • howleysv
    • diogoperillo
    • paul_lecam