importWallet
Imports a wallet from one chain into another
This function imports a wallet from one chain (e.g. BSC, MATIC or ETHEREUM) into another
signer.importWallet({
walletId: '71dec640-4eb8-4321-adb8-b79461573fc4',
to: 'MATIC',
})
​

Signature

signer.importWallet(request: ImportWalletRequest): Promise<SignerResult>

Returns

Promise<SignerResult>

Parameters

importWalletRequest
True
The import request you want to execute. For more info on how this request should look like, see importWalletRequest.

Example

const signer = venlyConnect.createSigner();
​
signer.importWallet({
walletId: '71dec640-4eb8-4321-adb8-b79461573fc4',
to: 'MATIC',
}).then((signerResult) => {
if (signerResult.success) {
console.log(`Wallet 71dec640-4eb8-4321-adb8-b79461573fc4 has successfully been imported into ${signerResult.result.chain} and has id ${signerResult.result.id}`);
} else {
console.warn(`Something went wrong while importing the wallet`);
}
}).catch((reason) => {
console.log(error);
});
​
Copy link
On this page
Signature
Returns
Parameters
Example