/api/v1/add-to-contract-whitelistAdd an address to a token whitelist
Adds an address to a token's approved-destination list, returning a transaction proposal that the owning vault's signers approve before the change takes effect on-chain.
MANAGE_WORKSPACEA token whitelist is enforced on-chain by the token itself: while the whitelist
is on, the token cannot be sent to an address that is not on its list. Adding an
address is therefore a contract action rather than a saved setting, which is why
the response has the same shape as
POST /api/v1/call-contract: a psbt_id and a
psbt_base64 for the owning vault's signers to approve through
POST /api/v1/sign-psbt. The address becomes an approved
destination only once the vault's threshold is met and the transaction is
broadcast.
Whitelisting is per token, so an address approved for one token is not approved
for another. The Address Book is a separate, workspace-level list of named
addresses, and saving an address there with
POST /api/v1/add-whitelist-address does not
approve it for any token. Whitelist Management and
Managing whitelisted addresses
describe the same two layers as operators see them. Note the field names on this
endpoint: it takes workspace_uid and wallet_uid, where the token endpoints
take workspace_id and wallet_id.
When the last required approval arrives, the change is finalised and submitted to the Bitcoin network automatically. There is no separate confirmation step, and a broadcast transaction cannot be reversed. Check the address, character for character, before you collect approvals.
workspace_uidnumberrequiredwallet_uidstringrequiredcontract_uidnumberrequiredaddress_to_whiteliststringrequired#What happens next
The owning vault's signers approve the returned proposal with
POST /api/v1/sign-psbt, and the change is finalised and
submitted once the threshold is met. Follow it on
GET /api/v1/contract-calls, where the call_uid above
appears as UID, and read the resulting list with
GET /api/v1/get-workspace-whitelist.