Contracts

Drain native balance to a destination address (works on suspended wallets)

Drain the wallet's entire native-token balance to a destination address. Works on suspended wallets — the safety valve, so a project whose allowance runs out can still recover its on-chain funds. Project lifecycle must still allow control-plane writes. Header X-Confirm-Drain: <signer_id> required. Optional Idempotency-Key is request-fingerprinted; mismatched replays return 409 carrying the stored call's status/call_error/tx_hash, and a matched replay of a drain that failed before broadcast re-executes under the same call_id. Cost: chain gas at-cost + $0.000005 signing fee.

post/contracts/v1/signers/{signer_id}/drain

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/contracts/v1/signers/{signer_id}/drain
  • Auth: HTTP bearer

Path parameters

signer_idstring required

Headers

X-Confirm-Drainstring required
Idempotency-Keystring

Request body

destination_addressstring required

Response

Drain transaction submitted

call_idstring required
tx_hashstring required
status'pending' | 'failed' required

Example response

{
  "call_id": "ccall_0123456789abcdef01234567"
}

Changes

No recorded changes to this operation across all 1 revision of this API.