import { U128 } from "../../../polyester/type/v1/u128_pb.js"; import { Message } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; declare namespace withdraw_pb_d_exports { export { CreateTradingWithdrawRequest, CreateTradingWithdrawRequestSchema, CreateTradingWithdrawResponse, CreateTradingWithdrawResponseSchema, CreateWalletTradingWithdrawRequest, CreateWalletTradingWithdrawRequestSchema, CreateWalletTradingWithdrawResponse, CreateWalletTradingWithdrawResponseSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, TradingWithdrawAction, TradingWithdrawActionSchema, TradingWithdrawIntentPayload, TradingWithdrawIntentPayloadSchema, ValidateWithdrawDestinationRequest, ValidateWithdrawDestinationRequestSchema, ValidateWithdrawDestinationResponse, ValidateWithdrawDestinationResponseSchema, WithdrawDestinationValidationCode, WithdrawDestinationValidationCodeSchema, WithdrawService, file_chain_withdraw_v1_withdraw }; } /** * Describes the file chain/withdraw/v1/withdraw.proto. */ declare const file_chain_withdraw_v1_withdraw: GenFile; /** * CreateTradingWithdrawResponse returns the accepted durable intent identifier * for the withdraw lifecycle. * * @generated from message chain.withdraw.v1.CreateTradingWithdrawResponse */ type CreateTradingWithdrawResponse = Message<"chain.withdraw.v1.CreateTradingWithdrawResponse"> & { /** * Stable server-owned intent identifier for the accepted withdraw lifecycle. * Clients use this id to follow later progress for the same withdraw flow. * * @generated from field: string intent_id = 1; */ intentId: string; }; /** * Describes the message chain.withdraw.v1.CreateTradingWithdrawResponse. * Use `create(CreateTradingWithdrawResponseSchema)` to create a new message. */ declare const CreateTradingWithdrawResponseSchema: GenMessage; /** * CreateWalletTradingWithdrawResponse returns the accepted durable intent * identifier for a wallet-authorized withdraw lifecycle. * * @generated from message chain.withdraw.v1.CreateWalletTradingWithdrawResponse */ type CreateWalletTradingWithdrawResponse = Message<"chain.withdraw.v1.CreateWalletTradingWithdrawResponse"> & { /** * Stable server-owned intent identifier for the accepted withdraw lifecycle. * Clients use this id to follow later progress for the same withdraw flow. * * @generated from field: string intent_id = 1; */ intentId: string; }; /** * Describes the message chain.withdraw.v1.CreateWalletTradingWithdrawResponse. * Use `create(CreateWalletTradingWithdrawResponseSchema)` to create a new message. */ declare const CreateWalletTradingWithdrawResponseSchema: GenMessage; /** * ErrorDetail is attached to ConnectRPC errors for structured error handling. * * @generated from message chain.withdraw.v1.ErrorDetail */ type ErrorDetail = Message<"chain.withdraw.v1.ErrorDetail"> & { /** * Stable error code matching the REST problem+json code field. * * @generated from field: chain.withdraw.v1.ErrorCode code = 1; */ code: ErrorCode; }; /** * Describes the message chain.withdraw.v1.ErrorDetail. * Use `create(ErrorDetailSchema)` to create a new message. */ declare const ErrorDetailSchema: GenMessage; /** * TradingWithdrawIntentPayload is the client-signed typed withdraw request. * Account scope and backend intent ids are derived server-side. * * @generated from message chain.withdraw.v1.TradingWithdrawIntentPayload */ type TradingWithdrawIntentPayload = Message<"chain.withdraw.v1.TradingWithdrawIntentPayload"> & { /** * Destination for funds leaving Trading. * * @generated from field: chain.withdraw.v1.TradingWithdrawAction action = 1; */ action: TradingWithdrawAction; /** * Unified asset identifier from Polyester asset metadata. amount_e18 is * denominated in this asset at canonical 18-decimal scale. * * @generated from field: uint32 asset_id = 2; */ assetId: number; /** * External network id for TO_EXTERNAL_CHAIN. Omit for TO_FUNDING. * * @generated from field: uint64 destination_chain_id = 3; */ destinationChainId: bigint; /** * Withdraw amount in canonical 18-decimal unified asset units. * For example, 0.5 is encoded as 500000000000000000. * * @generated from field: polyester.type.v1.U128 amount_e18 = 4; */ amountE18?: U128 | undefined; /** * Unix timestamp in seconds after which this signed user authorization is no * longer accepted by the API. This is separate from the server-owned * execution deadline used later for on-chain submission. * * @generated from field: uint64 deadline_ts_sec = 5; */ deadlineTsSec: bigint; /** * Client-generated unsigned 128-bit nonce bound to the signed request. This * is an identifier, not a decimal amount. * * @generated from field: polyester.type.v1.U128 nonce = 6; */ nonce?: U128 | undefined; /** * Destination address. For TO_EXTERNAL_CHAIN this is an address on * destination_chain_id and is validated according to that network. For * TO_FUNDING, omit it to move funds to the selected account's Funding account * or provide another Polyester funding address for a Trading-to-Funding * transfer. * * @generated from field: string destination_address = 7; */ destinationAddress: string; /** * Client-chosen idempotency key. Reusing the same key with the same payload * returns the existing withdraw; reusing it with different payload fails. * * @generated from field: string idempotency_key = 8; */ idempotencyKey: string; }; /** * Describes the message chain.withdraw.v1.TradingWithdrawIntentPayload. * Use `create(TradingWithdrawIntentPayloadSchema)` to create a new message. */ declare const TradingWithdrawIntentPayloadSchema: GenMessage; /** * CreateTradingWithdrawRequest creates or returns one durable backend-authorized * Trading withdraw intent from typed protobuf fields and an API-key signature. * * @generated from message chain.withdraw.v1.CreateTradingWithdrawRequest */ type CreateTradingWithdrawRequest = Message<"chain.withdraw.v1.CreateTradingWithdrawRequest"> & { /** * Client-signed withdraw details. * * @generated from field: chain.withdraw.v1.TradingWithdrawIntentPayload payload = 1; */ payload?: TradingWithdrawIntentPayload | undefined; /** * User/API signature over deterministic TradingWithdrawIntentPayload bytes. * * @generated from field: bytes payload_signature = 2; */ payloadSignature: Uint8Array; }; /** * Describes the message chain.withdraw.v1.CreateTradingWithdrawRequest. * Use `create(CreateTradingWithdrawRequestSchema)` to create a new message. */ declare const CreateTradingWithdrawRequestSchema: GenMessage; /** * CreateWalletTradingWithdrawRequest creates or returns one durable Trading * withdraw intent from typed frontend fields plus a wallet personal_sign signature. * * @generated from message chain.withdraw.v1.CreateWalletTradingWithdrawRequest */ type CreateWalletTradingWithdrawRequest = Message<"chain.withdraw.v1.CreateWalletTradingWithdrawRequest"> & { /** * Client-signed withdraw details. * * @generated from field: chain.withdraw.v1.TradingWithdrawIntentPayload payload = 1; */ payload?: TradingWithdrawIntentPayload | undefined; /** * Optional public subaccount id. Omit to withdraw from the JWT root account. * * @generated from field: uint64 subaccount_id = 2; */ subaccountId: bigint; /** * Wallet address that produced payload_signature. * * @generated from field: string signer_wallet = 3; */ signerWallet: string; /** * Wallet EIP-191 personal_sign signature over the canonical withdraw authorization message. * * @generated from field: bytes payload_signature = 4; */ payloadSignature: Uint8Array; }; /** * Describes the message chain.withdraw.v1.CreateWalletTradingWithdrawRequest. * Use `create(CreateWalletTradingWithdrawRequestSchema)` to create a new message. */ declare const CreateWalletTradingWithdrawRequestSchema: GenMessage; /** * ValidateWithdrawDestinationRequest checks one external-chain * destination for an authenticated caller without creating a withdraw. * * @generated from message chain.withdraw.v1.ValidateWithdrawDestinationRequest */ type ValidateWithdrawDestinationRequest = Message<"chain.withdraw.v1.ValidateWithdrawDestinationRequest"> & { /** * External destination chain identifier. * * @generated from field: uint64 destination_chain_id = 1; */ destinationChainId: bigint; /** * Destination address to validate for destination_chain_id. * * @generated from field: string destination_address = 2; */ destinationAddress: string; }; /** * Describes the message chain.withdraw.v1.ValidateWithdrawDestinationRequest. * Use `create(ValidateWithdrawDestinationRequestSchema)` to create a new message. */ declare const ValidateWithdrawDestinationRequestSchema: GenMessage; /** * ValidateWithdrawDestinationResponse returns a user-safe validation * result without exposing internal denylist details. * * @generated from message chain.withdraw.v1.ValidateWithdrawDestinationResponse */ type ValidateWithdrawDestinationResponse = Message<"chain.withdraw.v1.ValidateWithdrawDestinationResponse"> & { /** * Whether the destination may be used for a withdraw. * * @generated from field: bool valid = 1; */ valid: boolean; /** * Public validation outcome code. * * @generated from field: chain.withdraw.v1.WithdrawDestinationValidationCode code = 2; */ code: WithdrawDestinationValidationCode; /** * User-safe explanation of the validation outcome. * * @generated from field: string message = 3; */ message: string; /** * Canonical destination address when valid. Empty when valid is false. * * @generated from field: string canonical_destination_address = 4; */ canonicalDestinationAddress: string; }; /** * Describes the message chain.withdraw.v1.ValidateWithdrawDestinationResponse. * Use `create(ValidateWithdrawDestinationResponseSchema)` to create a new message. */ declare const ValidateWithdrawDestinationResponseSchema: GenMessage; /** * ErrorCode identifies stable, machine-readable Withdraw API errors. * Values mirror the REST problem+json code field. * * @generated from enum chain.withdraw.v1.ErrorCode */ declare enum ErrorCode { /** * No domain error code was provided. * * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * The source account does not have enough available Trading balance. * * @generated from enum value: ERROR_CODE_INSUFFICIENT_FUNDS = 1; */ INSUFFICIENT_FUNDS = 1, /** * Request payload or one of its fields is invalid. * * @generated from enum value: ERROR_CODE_INVALID_REQUEST = 2; */ INVALID_REQUEST = 2, /** * Caller is not authenticated. * * @generated from enum value: ERROR_CODE_UNAUTHENTICATED = 3; */ UNAUTHENTICATED = 3, /** * Caller is not permitted to perform the withdraw operation. * * @generated from enum value: ERROR_CODE_PERMISSION_DENIED = 4; */ PERMISSION_DENIED = 4, /** * Request exceeded the applicable admission rate limit. * * @generated from enum value: ERROR_CODE_RATE_LIMIT_EXCEEDED = 5; */ RATE_LIMIT_EXCEEDED = 5, /** * A required dependency is temporarily unavailable. * * @generated from enum value: ERROR_CODE_SERVICE_UNAVAILABLE = 6; */ SERVICE_UNAVAILABLE = 6, /** * The request failed because of an unexpected server error. * * @generated from enum value: ERROR_CODE_INTERNAL_ERROR = 7; */ INTERNAL_ERROR = 7, /** * The selected subaccount identifier is invalid. * * @generated from enum value: ERROR_CODE_INVALID_SUBACCOUNT_ID = 8; */ INVALID_SUBACCOUNT_ID = 8, /** * The selected subaccount does not exist. * * @generated from enum value: ERROR_CODE_SUBACCOUNT_NOT_FOUND = 9; */ SUBACCOUNT_NOT_FOUND = 9, /** * The requested withdraw action is invalid for this endpoint. * * @generated from enum value: ERROR_CODE_INVALID_ACTION = 10; */ INVALID_ACTION = 10, /** * The requested ledger is not supported for withdrawals. * * @generated from enum value: ERROR_CODE_UNSUPPORTED_LEDGER = 11; */ UNSUPPORTED_LEDGER = 11, /** * The requested asset or withdraw route is not supported. * * @generated from enum value: ERROR_CODE_UNSUPPORTED_ASSET = 12; */ UNSUPPORTED_ASSET = 12, /** * The withdraw amount is invalid. * * @generated from enum value: ERROR_CODE_INVALID_AMOUNT = 13; */ INVALID_AMOUNT = 13, /** * The destination chain is invalid. * * @generated from enum value: ERROR_CODE_INVALID_DESTINATION_CHAIN = 14; */ INVALID_DESTINATION_CHAIN = 14, /** * The destination address is invalid. * * @generated from enum value: ERROR_CODE_INVALID_DESTINATION_ADDRESS = 15; */ INVALID_DESTINATION_ADDRESS = 15, /** * The external destination is not whitelisted. * * @generated from enum value: ERROR_CODE_EXTERNAL_DESTINATION_NOT_WHITELISTED = 16; */ EXTERNAL_DESTINATION_NOT_WHITELISTED = 16, /** * The internal funding recipient is not whitelisted. * * @generated from enum value: ERROR_CODE_INTERNAL_RECIPIENT_NOT_WHITELISTED = 17; */ INTERNAL_RECIPIENT_NOT_WHITELISTED = 17, /** * The withdraw amount is below the configured minimum including fees. * * @generated from enum value: ERROR_CODE_AMOUNT_BELOW_MINIMUM = 18; */ AMOUNT_BELOW_MINIMUM = 18, /** * The withdraw amount exceeds the available zipped-asset supply. * * @generated from enum value: ERROR_CODE_AMOUNT_EXCEEDS_SUPPLY = 19; */ AMOUNT_EXCEEDS_SUPPLY = 19, /** * The source smart-account address is unavailable. * * @generated from enum value: ERROR_CODE_SOURCE_SMART_ACCOUNT_UNAVAILABLE = 20; */ SOURCE_SMART_ACCOUNT_UNAVAILABLE = 20, /** * The required payload signature is missing. * * @generated from enum value: ERROR_CODE_SIGNATURE_REQUIRED = 21; */ SIGNATURE_REQUIRED = 21, /** * The requested signature scheme is unsupported. * * @generated from enum value: ERROR_CODE_SIGNATURE_SCHEME_UNSUPPORTED = 22; */ SIGNATURE_SCHEME_UNSUPPORTED = 22, /** * The wallet supplied as signer is invalid. * * @generated from enum value: ERROR_CODE_SIGNER_WALLET_INVALID = 23; */ SIGNER_WALLET_INVALID = 23, /** * Wallet authorization binding verification failed. * * @generated from enum value: ERROR_CODE_WALLET_BINDING_INVALID = 24; */ WALLET_BINDING_INVALID = 24, /** * Wallet authorization binding does not cover the requested scope. * * @generated from enum value: ERROR_CODE_WALLET_BINDING_SCOPE_MISMATCH = 25; */ WALLET_BINDING_SCOPE_MISMATCH = 25, /** * Wallet authorization binding does not match the signer. * * @generated from enum value: ERROR_CODE_WALLET_BINDING_SIGNER_MISMATCH = 26; */ WALLET_BINDING_SIGNER_MISMATCH = 26, /** * The API key could not be resolved. * * @generated from enum value: ERROR_CODE_API_KEY_NOT_FOUND = 27; */ API_KEY_NOT_FOUND = 27, /** * API-key authorization binding verification failed. * * @generated from enum value: ERROR_CODE_API_KEY_BINDING_INVALID = 28; */ API_KEY_BINDING_INVALID = 28, /** * API-key authorization binding does not cover the requested scope. * * @generated from enum value: ERROR_CODE_API_KEY_BINDING_SCOPE_MISMATCH = 29; */ API_KEY_BINDING_SCOPE_MISMATCH = 29, /** * API-key authorization binding does not match the configured public key. * * @generated from enum value: ERROR_CODE_API_KEY_BINDING_PUBLIC_KEY_MISMATCH = 30; */ API_KEY_BINDING_PUBLIC_KEY_MISMATCH = 30, /** * The idempotency key was reused with different request data. * * @generated from enum value: ERROR_CODE_IDEMPOTENCY_CONFLICT = 31; */ IDEMPOTENCY_CONFLICT = 31, /** * The funds lock conflicts with an existing or finalized reservation. * * @generated from enum value: ERROR_CODE_FUNDS_LOCK_CONFLICT = 32; */ FUNDS_LOCK_CONFLICT = 32, /** * The authoritative capital view is not ready or is stale. * * @generated from enum value: ERROR_CODE_CAPITAL_VIEW_UNAVAILABLE = 33; */ CAPITAL_VIEW_UNAVAILABLE = 33, /** * Required chain or contract metadata is unavailable. * * @generated from enum value: ERROR_CODE_CHAIN_METADATA_UNAVAILABLE = 34; */ CHAIN_METADATA_UNAVAILABLE = 34, /** * Required network fee data is unavailable. * * @generated from enum value: ERROR_CODE_FEE_UNAVAILABLE = 35; */ FEE_UNAVAILABLE = 35, /** * Required zipped-asset supply data is unavailable. * * @generated from enum value: ERROR_CODE_SUPPLY_UNAVAILABLE = 36; */ SUPPLY_UNAVAILABLE = 36, /** * Fresh step-up verification is temporarily unavailable. * * @generated from enum value: ERROR_CODE_STEP_UP_UNAVAILABLE = 37; */ STEP_UP_UNAVAILABLE = 37, /** * Destination validation is temporarily unavailable. * * @generated from enum value: ERROR_CODE_DESTINATION_VALIDATION_UNAVAILABLE = 38; */ DESTINATION_VALIDATION_UNAVAILABLE = 38, /** * The account shard cannot currently accept fund movement. * * @generated from enum value: ERROR_CODE_ACCOUNT_SHARD_UNAVAILABLE = 39; */ ACCOUNT_SHARD_UNAVAILABLE = 39, /** * A required precondition was not satisfied. * * @generated from enum value: ERROR_CODE_FAILED_PRECONDITION = 40; */ FAILED_PRECONDITION = 40, /** * The requested resource was not found. * * @generated from enum value: ERROR_CODE_NOT_FOUND = 41; */ NOT_FOUND = 41, /** * The request conflicts with existing state. * * @generated from enum value: ERROR_CODE_CONFLICT = 42; */ CONFLICT = 42 } /** * Describes the enum chain.withdraw.v1.ErrorCode. */ declare const ErrorCodeSchema: GenEnum; /** * TradingWithdrawAction identifies where funds should move from Trading. * * @generated from enum chain.withdraw.v1.TradingWithdrawAction */ declare enum TradingWithdrawAction { /** * @generated from enum value: ACTION_UNSPECIFIED = 0; */ ACTION_UNSPECIFIED = 0, /** * @generated from enum value: TO_FUNDING = 1; */ TO_FUNDING = 1, /** * @generated from enum value: TO_EXTERNAL_CHAIN = 2; */ TO_EXTERNAL_CHAIN = 2 } /** * Describes the enum chain.withdraw.v1.TradingWithdrawAction. */ declare const TradingWithdrawActionSchema: GenEnum; /** * WithdrawDestinationValidationCode identifies the public outcome of an * external-chain destination validation. * * @generated from enum chain.withdraw.v1.WithdrawDestinationValidationCode */ declare enum WithdrawDestinationValidationCode { /** * No validation outcome was produced. * * @generated from enum value: RESULT_UNSPECIFIED = 0; */ RESULT_UNSPECIFIED = 0, /** * The destination is valid and may be used for a withdraw. * * @generated from enum value: VALID = 1; */ VALID = 1, /** * The address is not valid for the selected destination chain. * * @generated from enum value: INVALID_ADDRESS = 2; */ INVALID_ADDRESS = 2, /** * The selected destination chain is not supported for withdraws. * * @generated from enum value: UNSUPPORTED_CHAIN = 3; */ UNSUPPORTED_CHAIN = 3, /** * The destination is a Polyester smart account and cannot be used for an * external-chain withdraw. * * @generated from enum value: POLYESTER_SMART_ACCOUNT = 4; */ POLYESTER_SMART_ACCOUNT = 4, /** * The destination is a token contract and cannot receive withdrawals. * * @generated from enum value: TOKEN_CONTRACT = 5; */ TOKEN_CONTRACT = 5, /** * The destination is blocked by Polyester's user-safety denylist. * * @generated from enum value: DENYLISTED_ADDRESS = 6; */ DENYLISTED_ADDRESS = 6 } /** * Describes the enum chain.withdraw.v1.WithdrawDestinationValidationCode. */ declare const WithdrawDestinationValidationCodeSchema: GenEnum; /** * WithdrawService manages authenticated chain-facing withdraw request intake. * * @generated from service chain.withdraw.v1.WithdrawService */ declare const WithdrawService: GenService<{ /** * Validate an external-chain withdraw destination for an authenticated * caller without creating, signing, or reserving a withdraw. * * @generated from rpc chain.withdraw.v1.WithdrawService.ValidateWithdrawDestination */ validateWithdrawDestination: { methodKind: "unary"; input: typeof ValidateWithdrawDestinationRequestSchema; output: typeof ValidateWithdrawDestinationResponseSchema; }; /** * Create or return one durable withdraw from Trading. * * @generated from rpc chain.withdraw.v1.WithdrawService.CreateTradingWithdraw */ createTradingWithdraw: { methodKind: "unary"; input: typeof CreateTradingWithdrawRequestSchema; output: typeof CreateTradingWithdrawResponseSchema; }; /** * Create or return one wallet/JWT withdraw from Trading. * Root-owner Trading to Funding and root-owner withdrawals to explicitly * whitelisted external destinations accept recent MFA. Other external, * cross-owner, and delegated movements require a fresh single-use step-up. * * @generated from rpc chain.withdraw.v1.WithdrawService.CreateWalletTradingWithdraw */ createWalletTradingWithdraw: { methodKind: "unary"; input: typeof CreateWalletTradingWithdrawRequestSchema; output: typeof CreateWalletTradingWithdrawResponseSchema; }; }>; //#endregion export { CreateTradingWithdrawRequest, CreateTradingWithdrawRequestSchema, CreateTradingWithdrawResponse, CreateTradingWithdrawResponseSchema, CreateWalletTradingWithdrawRequest, CreateWalletTradingWithdrawRequestSchema, CreateWalletTradingWithdrawResponse, CreateWalletTradingWithdrawResponseSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, TradingWithdrawAction, TradingWithdrawActionSchema, TradingWithdrawIntentPayload, TradingWithdrawIntentPayloadSchema, ValidateWithdrawDestinationRequest, ValidateWithdrawDestinationRequestSchema, ValidateWithdrawDestinationResponse, ValidateWithdrawDestinationResponseSchema, WithdrawDestinationValidationCode, WithdrawDestinationValidationCodeSchema, WithdrawService, file_chain_withdraw_v1_withdraw, withdraw_pb_d_exports }; //# sourceMappingURL=withdraw_pb.d.ts.map