chain.withdraw.v1.WithdrawService
ValidateWithdrawDestination
Validate an external-chain withdraw destination for an authenticated caller without creating, signing, or reserving a withdraw.
Method
POST
Path
chain.withdraw.v1.WithdrawService/ValidateWithdrawDestination
Service
chain.withdraw.v1.WithdrawService
Visibility
Authentication
Session token or API key
MFA Requirement
Not required
POST
chain.withdraw.v1.WithdrawService/ValidateWithdrawDestination Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/chain.withdraw.v1.WithdrawService/ValidateWithdrawDestination' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"destinationAddress": "0x3333333333333333333333333333333333333333",
"destinationChainId": "1"
}'Responses
{
"canonicalDestinationAddress": "value",
"code": "VALID",
"message": "value",
"valid": false
}Request
chain.withdraw.v1.ValidateWithdrawDestinationRequestResponse
chain.withdraw.v1.ValidateWithdrawDestinationResponse destinationChainId string (uint64)
External destination chain identifier.
destinationAddress string
Destination address to validate for destination_chain_id.
valid boolean
Whether the destination may be used for a withdraw.
code enum
Public validation outcome code.
VALID INVALID_ADDRESS UNSUPPORTED_CHAIN POLYESTER_SMART_ACCOUNT TOKEN_CONTRACT DENYLISTED_ADDRESS
message string
User-safe explanation of the validation outcome.
canonicalDestinationAddress string
Canonical destination address when valid. Empty when valid is false.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| account-shard-unavailable | 503 | unavailable | Account Shard Unavailable | The account shard cannot currently accept fund movement. |
| amount-below-minimum | 400 | invalid_argument | Amount Below Minimum | The withdraw amount is below the configured minimum including fees. |
| amount-exceeds-route-precision | 400 | invalid_argument | Amount Exceeds Route Precision | The withdraw amount has more decimal places than the destination network's token supports. |
| amount-exceeds-supply | 400 | invalid_argument | Amount Exceeds Supply | The withdraw amount exceeds the available zipped-asset supply. |
| api-key-binding-invalid | 403 | permission_denied | API Key Binding Invalid | API-key authorization binding verification failed. |
| api-key-binding-public-key-mismatch | 403 | permission_denied | API Key Binding Public Key Mismatch | The API-key authorization binding does not match the configured public key. |
| api-key-binding-scope-mismatch | 403 | permission_denied | API Key Binding Scope Mismatch | The API-key authorization binding does not cover the requested scope. |
| api-key-not-found | 403 | permission_denied | API Key Not Found | The API key could not be resolved. |
| auth-authentication-required | 401 | unauthenticated | Authentication Required | Authentication is required. |
| auth-session-kind-not-allowed | 403 | permission_denied | Interactive Session Required | This operation accepts only an interactive session; API keys are refused. |
| capital-view-unavailable | 503 | unavailable | Capital View Unavailable | The authoritative capital view is not ready. |
| chain-metadata-unavailable | 503 | unavailable | Chain Metadata Unavailable | Required chain or contract metadata is unavailable. |
| conflict | 409 | aborted | Conflict | The request conflicts with existing state. |
| destination-validation-unavailable | 503 | unavailable | Destination Validation Unavailable | Destination validation is temporarily unavailable. |
| external-destination-not-whitelisted | 403 | permission_denied | External Destination Not Whitelisted | The external destination is not whitelisted. |
| failed-precondition | 400 | failed_precondition | Failed Precondition | A required withdraw precondition was not satisfied. |
| fee-unavailable | 503 | unavailable | Fee Unavailable | Required network fee data is unavailable. |
| funds-lock-conflict | 409 | aborted | Funds Lock Conflict | The funds lock conflicts with an existing or finalized reservation. |
| idempotency-conflict | 409 | already_exists | Idempotency Conflict | The idempotency key was reused with different request data. |
| insufficient-funds | 400 | failed_precondition | Insufficient Funds | The source account does not have enough available Trading balance. |
| internal-error | 500 | internal | Internal Error | The withdraw failed because of an unexpected server error. |
| internal-recipient-not-whitelisted | 403 | permission_denied | Internal Recipient Not Whitelisted | The internal funding recipient is not whitelisted. |
| invalid-action | 400 | invalid_argument | Invalid Withdraw Action | The withdraw action is invalid for this endpoint. |
| invalid-amount | 400 | invalid_argument | Invalid Amount | The withdraw amount is invalid. |
| invalid-auto-withdraw-schedule | 400 | invalid_argument | Invalid Auto-Withdraw Schedule | The auto-withdraw schedule is invalid for its cadence. |
| invalid-destination-address | 400 | invalid_argument | Invalid Destination Address | The destination address is invalid. |
| invalid-destination-chain | 400 | invalid_argument | Invalid Destination Chain | The destination chain is invalid. |
| invalid-request | 400 | invalid_argument | Invalid Request | The request payload or one of its fields is invalid. |
| invalid-subaccount-id | 400 | invalid_argument | Invalid Subaccount | The selected subaccount identifier is invalid. |
| not-found | 404 | not_found | Not Found | The requested resource was not found. |
| permission-denied | 403 | permission_denied | Permission Denied | The caller is not permitted to perform this withdraw operation. |
| rate-limit-exceeded | 429 | resource_exhausted | Rate Limit Exceeded | The withdraw admission rate limit was exceeded. |
| service-unavailable | 503 | unavailable | Service Unavailable | A required service is temporarily unavailable. |
| signature-required | 400 | invalid_argument | Signature Required | A payload signature is required. |
| signature-scheme-unsupported | 400 | invalid_argument | Signature Scheme Unsupported | The signature scheme is unsupported. |
| signer-wallet-invalid | 400 | invalid_argument | Invalid Signer Wallet | The signer wallet is invalid. |
| source-smart-account-unavailable | 400 | failed_precondition | Source Smart Account Unavailable | The source smart-account address is unavailable. |
| step-up-unavailable | 503 | unavailable | Step-Up Unavailable | Fresh step-up verification is temporarily unavailable. |
| subaccount-not-found | 404 | not_found | Subaccount Not Found | The selected subaccount does not exist. |
| supply-unavailable | 503 | unavailable | Supply Unavailable | Required zipped-asset supply data is unavailable. |
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication is required. |
| unsupported-asset | 400 | invalid_argument | Unsupported Asset | The requested asset or withdraw route is not supported. |
| unsupported-ledger | 400 | invalid_argument | Unsupported Ledger | The requested ledger is not supported for withdrawals. |
| wallet-binding-invalid | 403 | permission_denied | Wallet Binding Invalid | Wallet authorization binding verification failed. |
| wallet-binding-scope-mismatch | 403 | permission_denied | Wallet Binding Scope Mismatch | The wallet authorization binding does not cover the requested scope. |
| wallet-binding-signer-mismatch | 403 | permission_denied | Wallet Binding Signer Mismatch | The wallet authorization binding does not match the signer. |