Learn how to build on the decentralized web
Account Abstraction Wallet
SDK Functions
Wallet

Wallet functions

// Create wallet
const wallet = await pierwalletSDK.wallet.create({
  smartWalletName: WALLET_NAME,
});
// Deploy wallet to the blockchain
const walletDeployTx = await pierwalletSDK.wallet.deploy({
  wallet,
  accessCode: "nobankTestCodeToGetFundedDuringCreation",
});
await smartwallet.transactions.getTransactionConfirmation(walletDeployTx);
// Add Guardian
const addGuardianTransaction = await smartwallet.wallet._addGuardian({
  dumbWallet: storedWallet.dumbWallet,
  smartWalletAddress: storedWallet.smartWalletAddress,
  guardianAddress: guardianWallet.smartWalletAddress,
});
await smartwallet.transactions.getTransactionConfirmation(
  addGuardianTransaction
);
// Check if latest version
const { isLatestVersion } = await smartwallet.chain.wallet.getIsLatestVersion(
  storedWallet.smartWalletAddress
);
// Other wallet functions
pierwalletSDK.wallet.isSmartWallet();
pierwalletSDK.wallet.generateNewAccount();
pierwalletSDK.wallet.getAccountFromPrivateKey();
pierwalletSDK.wallet.isNameAvailable();
pierwalletSDK.wallet.getSmartWalletAddress();
pierwalletSDK.wallet.getSmartWalletName();
pierwalletSDK.wallet.getUnstoppableDomainAddress();
pierwalletSDK.wallet.getUnstoppableDomainName();
pierwalletSDK.wallet.getWalletInfoForName();
pierwalletSDK.wallet.getWalletInfoForAddress();
pierwalletSDK.wallet.getWalletFactoryInfo();
pierwalletSDK.wallet.upgradeWalletVersion();
pierwalletSDK.wallet.has2FA();
pierwalletSDK.wallet.getGuardianApprovalInfo();
pierwalletSDK.wallet.getProtegesBasedOnFriendsList();
pierwalletSDK.wallet.runMigrationIfRecentlyRecovered();
pierwalletSDK.wallet.referrals();