1.18.0 • Published 2 years ago

@epsproxy/epsjs v1.18.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

EPS js Library

This package is the integration helper for EPS app that implement EPS Contract ABI.

How to install

Install the package with the following command

npm install --save @epsproxy/epsjs

After installation is complete, you can use the library like below.

import { EpsHelper } from '@epsproxy/epsjs'

const contractAddress = "0x0000000000000000"
const provider = Web3.givenProvider

// init
const epsHelper = await EpsHelper.init(contractAddress, provider)

// call method
const status = await epsHelper.getRole(userAddress)
console.log({ status })

React Helper

To use with a React application, add the provider from the lib.

import { EpsProvider } from '@epsproxy/epsjs'

<EpsProvider contractAddress={contractAddress} provider={provider}>
    <App/>
</EpsProvider>

In your app use the context API to access the method

import { useEps } from '@epsproxy/epsjs'

// init
const {
    helper,
} = useEps();

// call method
const status = await helper.getRole(userAddress)
console.log({ status })
1.18.0

2 years ago

1.17.0

2 years ago

1.15.0

2 years ago

1.14.0

2 years ago

1.13.0

2 years ago

1.12.0

2 years ago

1.11.0

2 years ago

1.10.0

2 years ago

1.9.0

2 years ago

1.8.0

2 years ago

1.6.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago