Run this command:
npm install @particle-network/rn-wallet
click here to get the demo source code
is same with Connect Service
is same with Connect Service
const chainInfo = Ethereum;
const env = Env.Dev;
const dappMetaData = new DappMetaData('75ac08814504606fc06126541ace9df6',
'Particle Connect',
'https://connect.particle.network/icons/512.png',
'https://connect.particle.network',
'Particle Wallet', "", "");
particleConnect.init(chainInfo, env, dappMetaData);
{% hint style="info" %}
Starting from version 0.14.0, WalletConnectV2 is supported.
const walletMetaData = {
walletConnectProjectId: '75ac08814504606fc06126541ace9df6',
name: 'Particle Connect',
icon: 'https://connect.particle.network/icons/512.png',
url: 'https://connect.particle.network',
description: 'Particle Wallet',
};
particleWallet.initWallet(walletMetaData);
{% endhint %}
const display = WalletDisplay.Token;
particleWallet.navigatorWallet(display);
const tokenAddress = TestAccountSolana.tokenContractAddress;
particleWallet.navigatorTokenReceive(tokenAddress);
const tokenAddress = TestAccountSolana.tokenContractAddress;
const toAddress = TestAccountSolana.receiverAddress;
const amount = "1000000000";
particleWallet.navigatorTokenSend(tokenAddress, toAddress, amount);
const tokenAddress = TestAccountSolana.tokenContractAddress;
particleWallet.navigatorTokenTransactionRecords(tokenAddress);
const mint = TestAccountEVM.nftContractAddress;
const receiverAddress = TestAccountEVM.receiverAddress;
const tokenId = TestAccountEVM.nftTokenId;
particleWallet.navigatorNFTSend(receiverAddress, mint, tokenId);
const mint = TestAccountEVM.nftContractAddress;
const tokenId = TestAccountEVM.nftTokenId;
particleWallet.navigatorNFTDetails(mint, tokenId);
const disabled = true;
particleWallet.setPayDisabled(disabled);
const result = await particleWallet.getPayDisabled();
console.log(result);
const disabled = true;
particleWallet.setSwapDisabled(disabled);
const result = await particleWallet.getSwapDisabled();
console.log(result);
// support no parameters
particleWallet.navigatorBuyCrypto();
// also support pass public address, crypto symbol and so on.
const config = new BuyCryptoConfig("0xa0869E99886e1b6737A4364F2cf9Bb454FD637E4", "BNB", "USD", 1000, OpenBuyNetwork.BinanceSmartChain);
particleWallet.navigatorBuyCrypto(config);
const fromTokenAddress = "";
const toTokenAddress = "";
const amount = "";
particleWallet.navigatorSwap(fromTokenAddress, toTokenAddress, amount);
const result = await particleWallet.navigatorLoginList();
console.log(result)
const chainInfos = [Ethereum, Polygon];
particleWallet.setSupportChain(chainInfos);
WalletType walletType = WalletType.particle;
String publicAddress = "";
String result = await ParticleWallet.switchWallet(walletType, publicAddress);
print("result:$result");
const isShow = true;
particleWallet.setShowTestNetwork(isShow);
const isShow = true;
particleWallet.setShowManageWallet(isShow);
setDisplayTokenAddresses = async () => {
const tokenAddresses = ["", ""];
particleWallet.setDisplayTokenAddresses(tokenAddresses);
};
setDisplayNFTContractAddresses = async () => {
const nftContractAddresses = ["", ""];
particleWallet.setDisplayNFTContractAddresses(nftContractAddresses);
};
setPriorityTokenAddresses = async () => {
const tokenAddresses = ["", ""];
particleWallet.setPriorityTokenAddresses(tokenAddresses);
};
setPriorityNFTContractAddresses = async () => {
const nftContractAddresses = ["", ""];
particleWallet.setPriorityNFTContractAddresses(nftContractAddresses);
};
setShowLanguageSetting = async () => {
particleWallet.setShowLanguageSetting(false);
};
setShowAppearanceSetting = async () => {
particleWallet.setShowAppearanceSetting(false);
};
setSupportAddToken = async () => {
particleWallet.setSupportAddToken(false);
};
setSupportWalletConnect = async () => {
particleWallet.setSupportWalletConnect(false);
};
// show or hide smart account setting in setting page
setShowSmartAccountSetting = async () => {
particleWallet.setShowSmartAccountSetting(false);
};