Onchain Actions

private/register_withdraw_address

Changed on

Returns the Ethereum withdraw address that forwards a withdrawal of a forwarded token to a recipient on its home chain, and records it so the forwarder watches it. Takes the wallet, the destination chain id (a key of the route file's withdraw_forwarding section; Solana is 101, devnet 103) and the recipient. On an EVM chain the recipient must be the account wallet; on Solana it must be a base58 wallet address, which is screened. Repeated calls return the same address; new registrations are rate limited per rolling window. Withdraw to the returned address with private/withdraw. Session keys without unbounded Admin scope must first add it with private/update_whitelisted_recipients.

post/private/register_withdraw_address

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    API key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature

Request body

RegisterWithdrawAddressParams required
chain_id, integer required

Destination chain: a key of the route file's withdraw_forwarding section. Solana is 101 (devnet 103); every other chain is EVM.

recipient, string required

Destination address. On an EVM chain it must be wallet. On Solana, a base58 wallet address (not a token or program-derived account).

wallet, string required

The account wallet.

Response

Success

RegisterWithdrawAddressResult required
chain_id, integer required
recipient, string required

0x bytes32 the factory forwards to.

recipient_display, string required

recipient normalised: checksummed on EVM, base58 on Solana.

routes, ForwardedToken[] required

The tokens this address forwards.

withdraw_address, string required

Withdraw a forwarded token to this Ethereum address to send it on to recipient on chain_id.

Changes

    • info

      the endpoint scheme security DeriveWallet AND DeriveTimestamp AND DeriveSignature was added to the API

    • info

      added the media type application/json for the response with the status