@velas/account-rn-sdk
v0.15.7
Published
Velas Account SDK for React Native ===========================
Downloads
26
Keywords
Readme
Velas Account SDK for React Native
Requirements
- ...
Features
Installation and Usage
To install the package:
npm install --save @velas/account-rn-sdk
# OR
yarn add @velas/account-rn-sdk
How to use it:
import { init, auth } from '@velas/account-rn-sdk'
init(
{
velas_rates: config.RATES,
node_host: config.NODE_HOST,
account_host: config.BACKEND_HOST,
account_contract: config.ACCOUNT_CONTRACT,
account_payer_address: config.BACKEND_ACCOUNT,
}
)
createAccount = async (network = 'mainnet') => {
const { error, data } = await auth.createAccount(network)
if (error) return console.log(error)
console.log(`Velas Account created: ${JSON.stringify(data)}`)
}