0.1.13 • Published 5 years ago

dappkits-rn-mobile-wallet-sdk v0.1.13

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

Mobile Wallet SDK

Mobile Wallet SDK for React Native

Installation

npm install dappkits-rn-mobile-wallet-sdk

API

Wallet Manager

  1. createLocalWallet(recoveryPhrase, /* walletType */): Create local wallet with recovery phrase (12 human-readable words). walletType: 目前沒用到

  2. 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.

  1. getLocalWalletList(): Get all local wallet as an array of Wallet object.

  2. updateLocalWallentName(index, newName): Update wallet name with wallet index.

  3. deleteLocalWallet(index): Delete wallet from db with wallet index.

  4. getLocalWalletAmount(): Get total amount of local wallets, retrun in int.

  5. setCurrentWalletIndex(index): Set current wallet index.

  6. getCurrentWalletIndex(): Get current wallet index.

Wallet

  1. ethSignTx(toAccount, toAmount, txData, gasPrice, gasAmount, chainId): Sign ethereum tx.

  2. ethSignRawTx(tx): Sign ethereum raw tx.

  3. ethSendSignedTx(tx): Send eth signed tx.

  4. ethSign(message): Sign eth message.

  5. ethSendTransaction(txData, callback): Send tx with callback function.

  6. tronSendTrx(toAccount, amount, fromAccount): Send trx.

  7. tronSendTRC10Token(toAccount, amount, tokenID, decimals): Send trc 10 token.

  8. tronSendTRC20Token(toAccount, toAmount, tokenAddress, decimals): Send trc 20 token.

  9. tronFreezeTrx(amount, duration, resource, receiverAddress): Freeze trx.

  10. tronUnfreezeTrx(resource, ownerAddress, receiverAddress): Unfreeze trx.

  11. getTronAccountResources(): Get tron resources of this wallet.

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago