wealth-wallet-sdk
v0.1.5-dev.15
Published
Install
Downloads
78
Readme
Wealth Wallet Sdk
Install
yarn install
Import
import { WealthWallet } from 'wealth-wallet-sdk';
From version 0.1.5-dev.7 you will need to pass a callback funtion as third arguement to the initialize method. This function will be responsible to managing the state cleanup as the page reload won't happen anymore.
From version 0.1.5-dev.14 you will need to pass only 2 arguments in the fourth callback which is rpc url(provider) and userAddress and now in the openWallet function and in the sendTransaction function you have to pass appPublicKey instead of the refreshToken and token and we also add one event listner sessionExpired which is triggred when the session is expired. Note--> From nowOnwards we do not provide linkToken and token to the sdk and also not provide to the sample app.
wealthWallet.initialize(
"staging",
(payload) => {
// payload = {success: true, message: "Wallet has been initialized"}
// payload = {success: false, message: "Wallet initialization failed"}
},
() => {
// listener to recieve the app widget logout event
// add logic here to perform some action on wallet logout like loging out the user
},
( provider, userAddress) => {
console.log({ provider, userAddress });
}
);