$ cnpm install dappkits-rn-mobile-wallet-sdk
Mobile Wallet SDK for React Native
npm install dappkits-rn-mobile-wallet-sdk
createLocalWallet(recoveryPhrase, /* walletType */)
: Create local wallet with recovery phrase (12 human-readable words). walletType: 目前沒用到
getLocalWallet(walletId)
: (待修改成 getLocalWalletWithWalletId(walletId)
) Get local wallet (Wallet
) with wallet id. Return null
if given id is not exists.
2.5. (待加)getLocalWalletWithIndex(index)
: Get local wallet (Wallet
) with index.
getLocalWalletList()
: Get all local wallet as an array of Wallet
object.
updateLocalWallentName(index, newName)
: Update wallet name with wallet index.
deleteLocalWallet(index)
: Delete wallet from db with wallet index.
getLocalWalletAmount()
: Get total amount of local wallets, retrun in int
.
setCurrentWalletIndex(index)
: Set current wallet index.
getCurrentWalletIndex()
: Get current wallet index.
ethSignTx(toAccount, toAmount, txData, gasPrice, gasAmount, chainId)
: Sign ethereum tx.
ethSignRawTx(tx)
: Sign ethereum raw tx.
ethSendSignedTx(tx)
: Send eth signed tx.
ethSign(message)
: Sign eth message.
ethSendTransaction(txData, callback)
: Send tx with callback function.
tronSendTrx(toAccount, amount, fromAccount)
: Send trx.
tronSendTRC10Token(toAccount, amount, tokenID, decimals)
: Send trc 10 token.
tronSendTRC20Token(toAccount, toAmount, tokenAddress, decimals)
: Send trc 20 token.
tronFreezeTrx(amount, duration, resource, receiverAddress)
: Freeze trx.
tronUnfreezeTrx(resource, ownerAddress, receiverAddress)
: Unfreeze trx.
getTronAccountResources()
: Get tron resources of this wallet.
Copyright 2014 - 2016 © taobao.org |