Overview
You can whitelist an external wallet for your own account or one of your sub-accounts at any time, by having the wallet sign a challenge. The wallet is whitelisted at once, with no approval step. Any wallet that signs with its own key works, wherever it is held.The account needs the
manage-wallets capability.Step 1: Ask for a challenge
Request a challenge for the account and the wallet’s address from the Issue External Wallet Challenge endpoint:{account-id} is your own account or one of your sub-accounts.
The response carries the text the wallet signs:
Step 2: Sign the challenge with the wallet
The wallet signs the challenge exactly as returned, as a UTF-8 message withpersonal_sign (EIP-191).
With ethers:
personal_sign API.
A signature whose last byte is 0 or 1, or 27 or 28, is accepted, so the output of common wallet libraries works as is.
Step 3: Whitelist the wallet
Send the wallet, the challenge and the signature to the Whitelist External Wallet endpoint:capabilities decides what the wallet is for:
["fx"]: the wallet only receives FX payouts, and several accounts can have the same one.- Anything else, or no
capabilities: the wallet also earns the account’s rewards, and belongs to that account alone.