Import an existing private key to create a new WaaS wallet account.

Usage

import { importWaasPrivateKey } from '@dynamic-labs-sdk/client/waas';

const importPrivateKey = async (privateKey) => {
  await importWaasPrivateKey({
    chain: 'EVM', // or other chains like 'SOL'
    privateKey,
    thresholdSignatureScheme, // default is TWO_OF_TWO, but you can choose other `ThresholdSignatureScheme` like TWO_OF_THREE or THREE_OF_FIVE
  });
};

Error Handling

  • If you didn’t add the WaaS extension for the specified chain, it will throw a NoWalletProviderFoundError.