
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-native-wallet-core
Advanced tools
A React Native wrapper around the Trust Wallet Core wallet library for Android and iOS
A React Native wrapper around the Trust Wallet Core wallet library for Android and iOS.
For more information about the underlying library, please read the comprehensive documentation provided by Trust Wallet here.
npm install react-native-wallet-core
Currently the only currency supported with this wrapper is Ethereum. There will be more coming in the future.
import TrustWalletCore from "react-native-wallet-core";
// Create a new wallet
const { mnemonic, seed } = await TrustWalletCore.createWallet(128, "");
createWallet(strength, passphrase)
Creates a new wallet.
strength number - Strength of the secret seed. Possible options are 128 or 256.passphrase string (optional) - Used to scramble the seedmnemonic string - the recovery phrase of the walletseed string - hex seed of the wallet. Can also be used to import.const { mnemonic, seed } = await TrustWalletCore.createWallet(128, "");
importWalletFromMnemonic(mnemonic, passphrase)
Import a wallet from a mnemonic recovery phrase. This will also load the wallet into local memory so that it can be used for creating addresses and/or signing transactions.
mnemonic string - Recovery phrasepassphrase string (optional) - The passphrase used when creating the wallet (if applicable)mnemonic string - the recovery phrase of the walletseed string - hex seed of the wallet. Can also be used to import.const { mnemonic, seed } = await TrustWalletCore.importWalletFromMnemonic("ripple scissors kick mammal hire column oak again sun offer wealth tomorrow wagon turn fatal", "");
importWalletFromHexString(hexString, passphrase)
Import a wallet from a hexString seed. This will also load the wallet into local memory so that it can be used for creating addresses and/or signing transactions.
hexString string - The hex string seedpassphrase string (optional) - The passphrase used when creating the wallet (if applicable)mnemonic string - the recovery phrase of the walletseed string - hex seed of the wallet. Can also be used to import.const { mnemonic, seed } = await TrustWalletCore.importWalletFromHexString("<HEX_STRING>", "");
getAddressForCoin(coin)
Generate and retrieve the default address for a coin. The address is generated using the default derivation path of a coin.
coin string - The coin typeaddress string - The public key of the addressconst address = await TrustWalletCore.getAddressForCoin("ethereum");
deriveAddressForCoin(coin, derivationPath)
Generate an address using a custom derivation path.
coin string - The coin typederivationPath string - Derivation path to be used when generating the addressaddress string - The public key of the addressprivateKey string - The private key of the addressconst { address, privateKey } = await TrustWalletCore.deriveAddressForCoin("ethereum", "m/44'/60'/1'/0/0");
signTransactionForCoin(coin, input)
Generate and retrieve the default address for a coin. The address is generated using the default derivation path of a coin.
coin string - The coin typeinput object
toAddress string - Destination of the funds (Public Key).amount string - The amount to include in the transaction. Should be a hex string.privateKeyDerivationPath string (optional) - Provide a derivation path if you want to use an address that is NOT the default address.chainID string (optional) - Ethereum Network selector. Should be a hex string. (Default is 01)gasPrice string (optional) - Should be a hex string. (Default is d693a400)gasLimit string (optional) - Should be a hex string. (Default is 5208)nonce string (optional) - The count of the number of outgoing transactions. Should be a hex string. (Default is 00)r strings stringv stringencoded stringhashValue stringconst { r, s, v, encoded, hashValue } = await TrustWalletCore.signTransactionForCoin("ethereum", {
chainID: "0x01",
amount: "0x0348bca5a16000",
nonce: "0x00",
toAddress: "0xC37054b3b48C3317082E7ba872d7753D13da4986",
privateKeyDerivationPath: "m/44'/60'/1'/0/0", // optional - otherwise default address is used
});
cleanup()
Cleanup any previously loaded wallet from local memory.
await TrustWalletCore.cleanup();
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
A React Native wrapper around the Trust Wallet Core wallet library for Android and iOS
We found that react-native-wallet-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.