onyx-contracts
Smart contracts utilities for Onyx
Last updated 3 years ago by paul_lecam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install onyx-contracts 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.1.0                                ...           latest (3 years ago)

1 Versions

  • 0.1.0                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |