import_wallet()

async Client.import_wallet()

Import an existing external TON wallet into the account.

Usable by Users Bots
Parameters:
  • public_key (bytes) – Public key bytes of the wallet being imported.

  • proof (WalletOwnershipProof) – Cryptographic ownership proof of the wallet.

  • anchor_public_key (bytes, optional) – Anchor public key bytes, if applicable.

  • password (str | InputCheckPasswordSRP, optional) – Two-step verification 2FA password, if enabled on the account.

Returns:

WalletState – On success, the updated wallet state is returned.

Example

state = await app.import_wallet(public_key=b"...", proof=proof)
print(state.address)