import { Message } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace quickswap_pb_d_exports { export { AffiliateShare, AffiliateShareSchema, ChargedFee, ChargedFeeSchema, CreateQuickSwapRequest, CreateQuickSwapRequestSchema, CreateQuickSwapResponse, CreateQuickSwapResponseSchema, Deposit, DepositAddressState, DepositAddressStateSchema, DepositDisposition, DepositDispositionSchema, DepositInstructions, DepositInstructionsSchema, DepositSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, Execution, ExecutionProgress, ExecutionProgressSchema, ExecutionSchema, FeeKind, FeeKindSchema, GetQuickSwapRequest, GetQuickSwapRequestSchema, GetQuickSwapResponse, GetQuickSwapResponseSchema, MarketExecution, MarketExecutionSchema, Protection, ProtectionSchema, QuickSwap, QuickSwapQuote, QuickSwapQuoteSchema, QuickSwapReason, QuickSwapReasonSchema, QuickSwapSchema, QuickSwapService, QuickSwapStatus, QuickSwapStatusSchema, QuickSwapTerms, QuickSwapTermsSchema, QuoteBasis, QuoteBasisSchema, QuoteFee, QuoteFeeSchema, QuoteQuickSwapRequest, QuoteQuickSwapRequestSchema, QuoteQuickSwapResponse, QuoteQuickSwapResponseSchema, ReferralPricing, ReferralPricingSchema, RequestedFees, RequestedFeesSchema, Screening, ScreeningSchema, TokenAmount, TokenAmountSchema, TwapExecution, TwapExecutionSchema, Withdrawal, WithdrawalRole, WithdrawalRoleSchema, WithdrawalSchema, WithdrawalState, WithdrawalStateSchema, file_swap_quickswap_v1_quickswap }; } /** * Describes the file swap/quickswap/v1/quickswap.proto. */ declare const file_swap_quickswap_v1_quickswap: GenFile; /** * TokenAmount is an exact token amount in the token's smallest unit. * * @generated from message swap.quickswap.v1.TokenAmount */ type TokenAmount = Message<"swap.quickswap.v1.TokenAmount"> & { /** * Unsigned integer amount in the token's smallest unit (for example * satoshis or wei), as a decimal string without sign, exponent, separators or * leading zeros; at most 78 digits. * * @generated from field: string base_units = 1; */ baseUnits: string; /** * Token decimals: the display amount is base_units / 10^decimals. Required in * requests, where it must equal AssetChainVariant.source_decimals (the * token's on-chain decimals) in GET /v1/chain/deposit-withdraw/config of the * asset the amount is in: the source asset for a SOURCE_AMOUNT amount; the * destination asset for a DESTINATION_AMOUNT amount and for * Protection.min_amount_out. * * @generated from field: uint32 decimals = 2; */ decimals: number; }; /** * Describes the message swap.quickswap.v1.TokenAmount. * Use `create(TokenAmountSchema)` to create a new message. */ declare const TokenAmountSchema: GenMessage; /** * Protection bounds the worst execution the end user accepts. It is fixed when * the QuickSwap is created and is enforced on every execution, however long * after the quote the deposit arrives. * * @generated from message swap.quickswap.v1.Protection */ type Protection = Message<"swap.quickswap.v1.Protection"> & { /** * Exactly one bound. * * @generated from oneof swap.quickswap.v1.Protection.bound */ bound: { /** * Maximum shortfall from the quoted expected output in basis points * (1 bp = 0.01%), from 1 to 1000. Converted at creation into the quote's * min_amount_out and min_rate. * * @generated from field: uint32 max_slippage_bps = 1; */ value: number; case: "maxSlippageBps"; } | { /** * Positive minimum destination amount after fees for the quoted deposit * amount, in destination token units. Converted at creation into the * quote's min_rate. * * @generated from field: swap.quickswap.v1.TokenAmount min_amount_out = 2; */ value: TokenAmount; case: "minAmountOut"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message swap.quickswap.v1.Protection. * Use `create(ProtectionSchema)` to create a new message. */ declare const ProtectionSchema: GenMessage; /** * MarketExecution executes the credited deposit as soon as possible, in one or * more immediate orders, within the service's market execution window. * * @generated from message swap.quickswap.v1.MarketExecution */ type MarketExecution = Message<"swap.quickswap.v1.MarketExecution"> & {}; /** * Describes the message swap.quickswap.v1.MarketExecution. * Use `create(MarketExecutionSchema)` to create a new message. */ declare const MarketExecutionSchema: GenMessage; /** * TwapExecution spreads execution evenly over a duration, one slice per * slot. Slot k starts k slice intervals after execution starts. Each slice * trades what is left of the credited deposit over the slots left, and is * protected by the quote's min_rate on what it trades. A slice is sent only * within its slot: a slot missed is skipped, never sent late. On a two-leg * route, each slice's second leg converts that slice's intermediate funds * before the next slice. Intermediate funds below the smallest order the * second leg's market accepts do not end the TWAP: they are added to the * next slice's conversion, and what is still unconverted when execution * ends is refunded to refund_address (INTERMEDIATE_BELOW_MINIMUM). Only the * second leg's market closing ends a TWAP early. A TWAP needs a larger * deposit than a market execution, since every slice must be a valid order * (see QuickSwapQuote.min_deposit_amount). A bridge takes market execution * only. * * @generated from message swap.quickswap.v1.TwapExecution */ type TwapExecution = Message<"swap.quickswap.v1.TwapExecution"> & { /** * Total execution duration in milliseconds, from 60000 (1 minute) to * 86400000 (24 hours). The duration starts when execution starts, not when * the QuickSwap is created. * * @generated from field: uint64 duration_ms = 1; */ durationMs: bigint; /** * Interval between slices in milliseconds, from 10000 (10 seconds) up to * duration_ms. The slice count is duration_ms / slice_interval_ms, rounded * up. * * @generated from field: uint64 slice_interval_ms = 2; */ sliceIntervalMs: bigint; }; /** * Describes the message swap.quickswap.v1.TwapExecution. * Use `create(TwapExecutionSchema)` to create a new message. */ declare const TwapExecutionSchema: GenMessage; /** * Execution selects how the credited deposit is traded. * * @generated from message swap.quickswap.v1.Execution */ type Execution = Message<"swap.quickswap.v1.Execution"> & { /** * Exactly one strategy. * * @generated from oneof swap.quickswap.v1.Execution.strategy */ strategy: { /** * Execute immediately. * * @generated from field: swap.quickswap.v1.MarketExecution market = 1; */ value: MarketExecution; case: "market"; } | { /** * Execute in equal time slices. * * @generated from field: swap.quickswap.v1.TwapExecution twap = 2; */ value: TwapExecution; case: "twap"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message swap.quickswap.v1.Execution. * Use `create(ExecutionSchema)` to create a new message. */ declare const ExecutionSchema: GenMessage; /** * QuickSwapTerms are the economic terms of one QuickSwap. The same terms are * used to quote and to create, and are echoed unchanged on the QuickSwap. * Source and destination are either two assets, which are traded, or one asset * on two networks, a bridge: the deposit is credited and withdrawn to the * destination network without a trade. Any two zipped_asset_ids from the * config may be quoted; QuoteQuickSwap is authoritative for whether the route * is offered. * * @generated from message swap.quickswap.v1.QuickSwapTerms */ type QuickSwapTerms = Message<"swap.quickswap.v1.QuickSwapTerms"> & { /** * Source asset and network: an AssetChainVariant.zipped_asset_id from * GET /v1/chain/deposit-withdraw/config. The end user deposits this asset on * this network. * * @generated from field: uint32 source_zipped_asset_id = 1; */ sourceZippedAssetId: number; /** * Destination asset and network: an AssetChainVariant.zipped_asset_id from * GET /v1/chain/deposit-withdraw/config. The end user receives this asset on * this network. * * @generated from field: uint32 destination_zipped_asset_id = 2; */ destinationZippedAssetId: number; /** * Side of the swap that amount denominates. * * @generated from field: swap.quickswap.v1.QuoteBasis basis = 3; */ basis: QuoteBasis; /** * Positive amount in the token units of the route selected by basis: source * route for SOURCE_AMOUNT, destination route for DESTINATION_AMOUNT. * * @generated from field: swap.quickswap.v1.TokenAmount amount = 4; */ amount?: TokenAmount | undefined; /** * Worst execution the end user accepts. * * @generated from field: swap.quickswap.v1.Protection protection = 5; */ protection?: Protection | undefined; /** * Market or TWAP execution. A bridge trades nothing and takes market only; * TWAP on a bridge is ROUTE_UNSUPPORTED. * * @generated from field: swap.quickswap.v1.Execution execution = 6; */ execution?: Execution | undefined; }; /** * Describes the message swap.quickswap.v1.QuickSwapTerms. * Use `create(QuickSwapTermsSchema)` to create a new message. */ declare const QuickSwapTermsSchema: GenMessage; /** * QuoteFee is one fee component of a quote. Trading fees (SERVICE, BROKER, * AFFILIATE and REFERRAL) are charged when each leg settles, in the asset that leg * receives: the base asset on a buy, the quote asset on a sell. Each is * computed on its own from what the leg receives and rounded down when * charged. A bridge has no settlement; its fees are charged at payout, in * the destination asset. * * A quoted fee is an estimate, not a fixed amount. What is fixed is the * rate (bps): each trading fee charged is that rate applied to what the leg * actually receives once the deposit is credited, which can be hours or days * after the quote. The quoted amount is not a cap: the fee charged and the * output follow the actual deposit, execution prices and rounding, so they * can be higher or lower than quoted. * * @generated from message swap.quickswap.v1.QuoteFee */ type QuoteFee = Message<"swap.quickswap.v1.QuoteFee"> & { /** * Fee component. * * @generated from field: swap.quickswap.v1.FeeKind kind = 1; */ kind: FeeKind; /** * Asset and network the fee is charged in, as a zipped_asset_id. Zero for a * trading fee of the first leg of a two-leg route, which is charged in the * intermediate asset (intermediate_asset_id). * * @generated from field: uint32 zipped_asset_id = 2; */ zippedAssetId: number; /** * Fee in zipped_asset_id's token units; for a fee charged in the * intermediate asset, in the intermediate asset at its trading precision * (amount.decimals). An estimate for deposit_amount at the quoted prices, * with trading fees rounded up; the fee charged can be higher or lower. * * @generated from field: swap.quickswap.v1.TokenAmount amount = 3; */ amount?: TokenAmount | undefined; /** * Rate of a trading fee in basis points of what the leg receives; zero for * a network fee. The rate, not amount, is what is charged: bps of what the * leg actually receives. * * @generated from field: uint32 bps = 4; */ bps: number; /** * AFFILIATE only: public sub-account ID of the affiliate vault credited * with the fee; zero for every other kind, REFERRAL included. * * @generated from field: fixed64 account_id = 5; */ accountId: bigint; }; /** * Describes the message swap.quickswap.v1.QuoteFee. * Use `create(QuoteFeeSchema)` to create a new message. */ declare const QuoteFeeSchema: GenMessage; /** * ReferralPricing is the referral applied to a QuickSwap, in whole basis * points of what each leg receives. The end user pays the service fee plus * base_broker_bps less discount_bps; the broker fee charged is * base_broker_bps less discount_bps and commission_bps, and the partner is * credited commission_bps (FeeKind REFERRAL). The service fee is unchanged. * The rates depend on the route: bridging when nothing is traded, * stablecoin when every leg trades two stablecoins, normal otherwise. * * @generated from message swap.quickswap.v1.ReferralPricing */ type ReferralPricing = Message<"swap.quickswap.v1.ReferralPricing"> & { /** * Broker fee without the referral: the request's broker_bps. * * @generated from field: uint32 base_broker_bps = 1; */ baseBrokerBps: number; /** * Discount off the end user's fee. * * @generated from field: uint32 discount_bps = 2; */ discountBps: number; /** * Commission credited to the referral partner. * * @generated from field: uint32 commission_bps = 3; */ commissionBps: number; }; /** * Describes the message swap.quickswap.v1.ReferralPricing. * Use `create(ReferralPricingSchema)` to create a new message. */ declare const ReferralPricingSchema: GenMessage; /** * QuickSwapQuote is the priced view of a QuickSwap's terms. Prices, amounts * and fees are estimates at quoted_at; only the protection fields are * guarantees. A QuickSwap is priced when its deposit is credited, which can * be hours or days after the quote: the deposit must be detected before * DepositInstructions.funding_expires_at, and its confirmation, credit and * execution can finish later. Its actual output and fees can therefore * differ from the quote. * * The end user may deposit any amount from min_deposit_amount to * max_deposit_amount. min_amount_out applies only to a deposit of exactly * deposit_amount that fully converts; for any other deposit the guarantee is * min_rate on the converted part. * * The credit is the deposit less the deposit network fee. Every amount below * is in token units of its route. * * @generated from message swap.quickswap.v1.QuickSwapQuote */ type QuickSwapQuote = Message<"swap.quickswap.v1.QuickSwapQuote"> & { /** * Source amount the quote was computed for, in source token units. Equals * the request amount for SOURCE_AMOUNT; computed for DESTINATION_AMOUNT. * * @generated from field: swap.quickswap.v1.TokenAmount deposit_amount = 1; */ depositAmount?: TokenAmount | undefined; /** * Expected destination amount for deposit_amount at quoted_at, after * trading fees and both quoted network fees, in destination token units. An * estimate, not a guarantee: the delivered amount follows the actual * deposit, execution and fees, bounded below only by the protection. * * @generated from field: swap.quickswap.v1.TokenAmount expected_amount_out = 2; */ expectedAmountOut?: TokenAmount | undefined; /** * Guaranteed minimum delivered amount, in destination token units, at the * quoted network fees, for a deposit of exactly deposit_amount that fully * converts to the destination asset. For any other deposit, and for a * deposit only partly converted, the guarantee is min_rate on the converted * part. * * @generated from field: swap.quickswap.v1.TokenAmount min_amount_out = 3; */ minAmountOut?: TokenAmount | undefined; /** * Guaranteed minimum execution rate: destination display units per source * display unit, as a decimal string with at most 18 fractional digits, * rounded up when quoted. Guarantee: for the source amount converted all the * way to the destination asset, the destination output before the * withdrawal network fee is at least that amount × min_rate, rounded down to * destination token units. On a two-leg route, the source amount converted * is the first leg's input in proportion to the intermediate funds the * second leg converted. Source that is not traded is returned to * return_address, and intermediate funds that the second leg does not * convert are refunded in the intermediate asset to refund_address; those * parts are outside the destination guarantee. The amount delivered is the * output less the actual withdrawal network fee, which can differ from the * quote. * * @generated from field: string min_rate = 4; */ minRate: string; /** * Published minimum deposit, in source token units, compared with the * deposit before its network fee. A smaller deposit is returned to * return_address (DEPOSIT_BELOW_MINIMUM). It is never below the source * network's minimum * (AssetChainVariant.deposit_min_amount in the config), and differs from * ErrorDetail.min_deposit_amount, the smallest deposit that currently * quotes. For a TWAP it is the slice count times the smallest deposit one * slice takes, and at least a market execution's minimum. * * @generated from field: swap.quickswap.v1.TokenAmount min_deposit_amount = 5; */ minDepositAmount?: TokenAmount | undefined; /** * Largest deposit that is eligible to execute, in source token units, * compared with the deposit before its network fee. Fixed when the * QuickSwap is created. A larger deposit is returned to return_address * (DEPOSIT_ABOVE_MAXIMUM). Unset for a bridge, whose deposit no order book * bounds. * * @generated from field: swap.quickswap.v1.TokenAmount max_deposit_amount = 6; */ maxDepositAmount?: TokenAmount | undefined; /** * Unified asset ID of the intermediate asset of a two-leg route (for * example USDT for BTC to SOL): the AssetConfig.ledger_id from * GET /v1/chain/deposit-withdraw/config. Zero for a direct route or a * bridge. When non-zero, CreateQuickSwap requires a refund address for that * asset. The route is fixed at creation. * * @generated from field: uint32 intermediate_asset_id = 7; */ intermediateAssetId: number; /** * Estimated fee components for deposit_amount at quoted_at: each leg's * service, broker and affiliate or referral fees, in that order, legs in * route order (a bridge has one set, charged at payout), then network fees. * Affiliates are in ascending account_id order. Zero fees are omitted. The fees charged * are each rate applied to the actual execution and can differ from these * amounts; QuickSwap.charged_fees reports the broker and affiliate fees as * charged. * * @generated from field: repeated swap.quickswap.v1.QuoteFee fees = 8; */ fees: QuoteFee[]; /** * When the quote was priced. * * @generated from field: google.protobuf.Timestamp quoted_at = 9; */ quotedAt?: Timestamp | undefined; /** * End of the short quote validity, typically seconds to minutes after * quoted_at. Display the quote until expires_at. CreateQuickSwap prices the * terms again and never fails because a quote expired. After it the price * fields are stale; the protection of a created QuickSwap still applies. * Independent of the funding window and the execution deadline. * * @generated from field: google.protobuf.Timestamp expires_at = 10; */ expiresAt?: Timestamp | undefined; /** * The referral applied; set only when the request carried a * referral_code. A QuickSwap's quote keeps the referral fixed at creation: * later changes to the referral program or partner never change it. * * @generated from field: swap.quickswap.v1.ReferralPricing referral = 11; */ referral?: ReferralPricing | undefined; }; /** * Describes the message swap.quickswap.v1.QuickSwapQuote. * Use `create(QuickSwapQuoteSchema)` to create a new message. */ declare const QuickSwapQuoteSchema: GenMessage; /** * Screening is the risk screening of a QuickSwap. Deposits are screened on * arrival; the outcome shows in the status, its reason and each deposit's * disposition and reason. * * @generated from message swap.quickswap.v1.Screening */ type Screening = Message<"swap.quickswap.v1.Screening"> & { /** * Source wallet supplied in the request; empty when none was supplied. * Recorded and shown; not used to accept or reject a deposit. * * @generated from field: string source_wallet = 2; */ sourceWallet: string; }; /** * Describes the message swap.quickswap.v1.Screening. * Use `create(ScreeningSchema)` to create a new message. */ declare const ScreeningSchema: GenMessage; /** * DepositInstructions tell the end user where and until when to deposit. * * @generated from message swap.quickswap.v1.DepositInstructions */ type DepositInstructions = Message<"swap.quickswap.v1.DepositInstructions"> & { /** * Deposit address in the source network's native text form, without memo. * * @generated from field: string address = 1; */ address: string; /** * Destination tag or memo the deposit must carry; empty when the source * network uses none. A deposit without it cannot be attributed. * * @generated from field: string memo = 2; */ memo: string; /** * Asset and network to deposit; equal to terms.source_zipped_asset_id. * * @generated from field: uint32 zipped_asset_id = 3; */ zippedAssetId: number; /** * When the address was issued to this QuickSwap; the funding window starts * here. After ADDRESS_UNAVAILABLE it can be long after created_at. * * @generated from field: google.protobuf.Timestamp issued_at = 4; */ issuedAt?: Timestamp | undefined; /** * End of the funding window, fixed when the address is issued (currently 7 * days after issued_at). A deposit can execute only if Polyester detects it * before this time; detection time counts, not block time, and * confirmations may finish later. A deposit detected at or after this time * never executes. A deposit observed on a retired address is * MANUAL_RECOVERY and is not returned automatically; other late deposits * are RETURN_ONLY. For an unfunded address, address_retires_at equals this * time, so there is no separate scheduled return period. Send deposits well * before this time. Never changes. * * @generated from field: google.protobuf.Timestamp funding_expires_at = 5; */ fundingExpiresAt?: Timestamp | undefined; /** * After this time the deposit address is retired and funds sent to it may * not be recoverable. For an unfunded address it equals funding_expires_at. * After a deposit is accepted it is provisional, a lower bound, until * Polyester releases the deposit address, which can be shortly after the * QuickSwap becomes terminal; from then on it is at least 7 days after all * payouts finish. It only moves later, never earlier, and never before * funding_expires_at. * * @generated from field: google.protobuf.Timestamp address_retires_at = 6; */ addressRetiresAt?: Timestamp | undefined; /** * Current lifecycle state of the address. * * @generated from field: swap.quickswap.v1.DepositAddressState address_state = 7; */ addressState: DepositAddressState; /** * Recommended gas limit, in gas units, for native-coin deposits on EVM * networks: 250000. Polyester does not enforce this limit. On some networks, * depositing to an address that has never received funds requires far more * than 21000 gas. If the limit is too low, the transaction fails on chain * without depositing funds, and the network fee is still charged. Use at * least the recommended limit. Unused gas is not charged. Zero for token * deposits and non-EVM networks. * * @generated from field: uint64 min_native_gas_limit = 8; */ minNativeGasLimit: bigint; }; /** * Describes the message swap.quickswap.v1.DepositInstructions. * Use `create(DepositInstructionsSchema)` to create a new message. */ declare const DepositInstructionsSchema: GenMessage; /** * Deposit is one deposit detected on the QuickSwap's deposit address. * * @generated from message swap.quickswap.v1.Deposit */ type Deposit = Message<"swap.quickswap.v1.Deposit"> & { /** * Zero-based position in detection order; stable for the QuickSwap's life. * * @generated from field: uint32 index = 1; */ index: number; /** * Source-network transaction identifier in the network's native text form. * * @generated from field: string tx_hash = 2; */ txHash: string; /** * Output or log index of the deposit within tx_hash; zero is valid. * * @generated from field: uint64 tx_occurrence_index = 3; */ txOccurrenceIndex: bigint; /** * Asset and network actually received, as a zipped_asset_id. Zero until * Polyester has identified the deposit's asset, shortly after detection, * and when the asset is not a supported route. * * @generated from field: uint32 zipped_asset_id = 4; */ zippedAssetId: number; /** * Received amount, before the deposit network fee, in zipped_asset_id's * token units; unset while zipped_asset_id is zero. * * @generated from field: swap.quickswap.v1.TokenAmount amount = 5; */ amount?: TokenAmount | undefined; /** * What this deposit may do. * * @generated from field: swap.quickswap.v1.DepositDisposition disposition = 8; */ disposition: DepositDisposition; /** * Why the disposition is RETURN_ONLY, ON_HOLD or MANUAL_RECOVERY; * REASON_UNSPECIFIED otherwise, and for a deposit ON_HOLD for review * without a more specific reason. * * @generated from field: swap.quickswap.v1.QuickSwapReason reason = 9; */ reason: QuickSwapReason; /** * Current source-network confirmations; zero until the source network * reports any. Never decreases. * * @generated from field: uint32 confirmations = 10; */ confirmations: number; /** * Source-network confirmations required before credit; zero until known. * * @generated from field: uint32 required_confirmations = 11; */ requiredConfirmations: number; /** * When the deposit was first seen. Eligibility compares this time with * funding_expires_at. * * @generated from field: google.protobuf.Timestamp detected_at = 12; */ detectedAt?: Timestamp | undefined; /** * When the deposit was credited; unset until credited. Credit does not * decide eligibility: a credited deposit can still be EVALUATING, and one * then found ineligible, such as a late deposit, stays credited and is * returned (RETURN_ONLY). * * @generated from field: google.protobuf.Timestamp credited_at = 13; */ creditedAt?: Timestamp | undefined; /** * Public, URL-safe lifecycle flow identifier of this deposit, usable with * GET /v1/chain/flows/{flow_id}; empty until the flow exists. Lifecycle flow * amounts are 18-decimal unified units (amount_e18), not token base units. * * @generated from field: string flow_id = 14; */ flowId: string; }; /** * Describes the message swap.quickswap.v1.Deposit. * Use `create(DepositSchema)` to create a new message. */ declare const DepositSchema: GenMessage; /** * ExecutionProgress is the trading progress of a QuickSwap. * * @generated from message swap.quickswap.v1.ExecutionProgress */ type ExecutionProgress = Message<"swap.quickswap.v1.ExecutionProgress"> & { /** * Credited amount committed to execution, in source token units. * * @generated from field: swap.quickswap.v1.TokenAmount input_amount = 1; */ inputAmount?: TokenAmount | undefined; /** * Source amount traded so far, in source token units. On a two-leg route * this counts the first leg. Zero for a bridge, which trades nothing. * * @generated from field: swap.quickswap.v1.TokenAmount executed_input = 2; */ executedInput?: TokenAmount | undefined; /** * Destination amount acquired so far after service, broker and affiliate * fees and before withdrawal network fees, in destination token units. Zero for a * bridge: its destination withdrawal pays the credit less its fees. * * @generated from field: swap.quickswap.v1.TokenAmount output_amount = 3; */ outputAmount?: TokenAmount | undefined; /** * On a two-leg route, intermediate asset acquired but not yet converted, in * the refund route's token units; unset for a direct route and a bridge. * * @generated from field: swap.quickswap.v1.TokenAmount intermediate_remainder = 4; */ intermediateRemainder?: TokenAmount | undefined; /** * Completed slices: a market execution's one slice completes when * execution finishes; a TWAP slice completes once it has traded and is * over, so a slot that traded nothing or was skipped never completes. * Zero for a bridge. * * @generated from field: uint32 completed_slices = 5; */ completedSlices: number; /** * Planned slices: a market execution has one once it is planned; a TWAP * has its slice count, duration_ms over slice_interval_ms rounded up. Zero * until then, and for a bridge, which trades nothing. * * @generated from field: uint32 total_slices = 6; */ totalSlices: number; /** * When execution started. * * @generated from field: google.protobuf.Timestamp started_at = 7; */ startedAt?: Timestamp | undefined; /** * Execution deadline: started_at plus the TWAP duration, or plus the market * execution window. Funds not converted by then are refunded or returned. * Independent of the quote validity and the funding window. Unset until * the execution is planned, and for a bridge, which trades nothing. * * @generated from field: google.protobuf.Timestamp deadline = 8; */ deadline?: Timestamp | undefined; /** * When execution finished; unset while executing. * * @generated from field: google.protobuf.Timestamp finished_at = 9; */ finishedAt?: Timestamp | undefined; }; /** * Describes the message swap.quickswap.v1.ExecutionProgress. * Use `create(ExecutionProgressSchema)` to create a new message. */ declare const ExecutionProgressSchema: GenMessage; /** * Withdrawal is one outgoing payment. A QuickSwap can end with several, for * example a partial refund plus the destination payout; the best case is a * single destination withdrawal. * * @generated from message swap.quickswap.v1.Withdrawal */ type Withdrawal = Message<"swap.quickswap.v1.Withdrawal"> & { /** * Zero-based position in the withdrawals list. Not stable: a withdrawal's * position can change between reads, so do not use it as an identifier. * * @generated from field: uint32 index = 1; */ index: number; /** * Why this withdrawal pays its recipient. * * @generated from field: swap.quickswap.v1.WithdrawalRole role = 2; */ role: WithdrawalRole; /** * Deposit whose funds this withdrawal moves. * * @generated from field: uint32 deposit_index = 3; */ depositIndex: number; /** * Asset and network paid, as a zipped_asset_id. * * @generated from field: uint32 zipped_asset_id = 4; */ zippedAssetId: number; /** * Recipient address in the network's native text form. Empty on a * COMPLIANCE_TRANSFER, whose recipient Polyester does not record. * * @generated from field: string address = 5; */ address: string; /** * Recipient destination tag or memo; empty when the network uses none, * and on a COMPLIANCE_TRANSFER. * * @generated from field: string memo = 6; */ memo: string; /** * Amount delivered to address after the network fee, in zipped_asset_id's * token units; set once FINALIZED. Like tx_hash, it is the amount recorded * for this withdrawal and can be corrected for up to 24 hours after the * QuickSwap ends (terminal_at). Unset on the RETURN of a deposit returned * because its risk screen failed (SOURCE_SCREENING_FAILED): that return is * sent from the deposit address and reports no delivered amount. Unset on * a COMPLIANCE_TRANSFER too. * * @generated from field: swap.quickswap.v1.TokenAmount amount = 7; */ amount?: TokenAmount | undefined; /** * Actual network fee withheld from this withdrawal, in the same units; set * once FINALIZED. Can be corrected for up to 24 hours after the QuickSwap * ends, like amount. Unset on the RETURN of a deposit returned because its * risk screen failed, and on a COMPLIANCE_TRANSFER, like amount. * * @generated from field: swap.quickswap.v1.TokenAmount network_fee = 8; */ networkFee?: TokenAmount | undefined; /** * Withdrawal progress. * * @generated from field: swap.quickswap.v1.WithdrawalState state = 9; */ state: WithdrawalState; /** * Recipient-network transaction recorded for this withdrawal; empty until * the transaction is committed on the recipient network. It can be * corrected for up to 24 hours after the QuickSwap ends (terminal_at) and is * not updated after that. For the authoritative, latest state of the * transfer, read flow_id. * * @generated from field: string tx_hash = 10; */ txHash: string; /** * When the withdrawal was submitted; unset until submitted. * * @generated from field: google.protobuf.Timestamp submitted_at = 11; */ submittedAt?: Timestamp | undefined; /** * When the withdrawal became final; unset until FINALIZED. * * @generated from field: google.protobuf.Timestamp finalized_at = 12; */ finalizedAt?: Timestamp | undefined; /** * Public, URL-safe lifecycle flow identifier of this withdrawal, usable with * GET /v1/chain/flows/{flow_id}; empty until the flow exists. The flow is * the authoritative, latest state of the transfer, including a correction * made after tx_hash, amount and network_fee stop being updated. Lifecycle * flow amounts are 18-decimal unified units (amount_e18), not token base * units. For the RETURN of a deposit returned because its risk screen * failed, it is the deposit's flow (Deposit.flow_id), which ends REFUNDED * with the return as its transaction. For a COMPLIANCE_TRANSFER, it is the * deposit's flow too, which ends FAILED with reason * ZIPPER_COMPLIANCE_TRANSFERRED and the transfer as its transaction. * * @generated from field: string flow_id = 13; */ flowId: string; /** * Set only when state is NOT_SENT: the amount for which no withdrawal was * made because it was below the withdrawal minimum of its asset and * network. In zipped_asset_id's token units, rounded down to the token's * smallest unit. * * @generated from field: swap.quickswap.v1.TokenAmount unsent_amount = 14; */ unsentAmount?: TokenAmount | undefined; }; /** * Describes the message swap.quickswap.v1.Withdrawal. * Use `create(WithdrawalSchema)` to create a new message. */ declare const WithdrawalSchema: GenMessage; /** * QuickSwap is one broker-owned swap of an external deposit into external * withdrawals. The end user needs no account. * * @generated from message swap.quickswap.v1.QuickSwap */ type QuickSwap = Message<"swap.quickswap.v1.QuickSwap"> & { /** * Public QuickSwap identifier. * * @generated from field: fixed64 swap_id = 1; */ swapId: bigint; /** * The broker's idempotency key that created this QuickSwap. * * @generated from field: string idempotency_key = 2; */ idempotencyKey: string; /** * Current status. * * @generated from field: swap.quickswap.v1.QuickSwapStatus status = 3; */ status: QuickSwapStatus; /** * Why the status is notable (held, returning, delayed, terminal without * destination output); REASON_UNSPECIFIED otherwise. When a payout * completes but a refund or return was NOT_SENT, the status follows the * paid withdrawals (for example COMPLETED) and the reason is * REFUND_BELOW_MINIMUM. A FAILED withdrawal takes precedence: the status is * HELD and the reason WITHDRAWAL_FAILED. * * @generated from field: swap.quickswap.v1.QuickSwapReason reason = 4; */ reason: QuickSwapReason; /** * True when status is terminal; authoritative, including for status values * added later. Polling can stop at a terminal status. A terminal status * never changes. Shortly after it, address_retires_at can still move later, * and withdrawal details can be corrected as documented on Withdrawal; * another deposit reaching the address also shows as RETURN_ONLY, and * another deposit observed on an already retired address shows as * MANUAL_RECOVERY. Returns made directly for such deposits are not yet * reported in withdrawals; RETURN_ONLY does not confirm a completed return. * Read again if the end user reports such a deposit or needs the final * retirement time. * * @generated from field: bool is_terminal = 5; */ isTerminal: boolean; /** * Accepted economic terms. * * @generated from field: swap.quickswap.v1.QuickSwapTerms terms = 6; */ terms?: QuickSwapTerms | undefined; /** * Recipient of the swap output on the destination network. Addresses and * memos are in their network's canonical form (for example lowercase EVM * hex), which can differ in case or encoding from the create request; that * form is the one paid. * * @generated from field: string destination_address = 7; */ destinationAddress: string; /** * Destination tag or memo for destination_address; empty when none. * * @generated from field: string destination_memo = 8; */ destinationMemo: string; /** * Recipient of returned source funds on the source network. * * @generated from field: string return_address = 9; */ returnAddress: string; /** * Destination tag or memo for return_address; empty when none. * * @generated from field: string return_memo = 10; */ returnMemo: string; /** * Refund route (asset and network) of the intermediate asset; zero when * none was supplied. * * @generated from field: uint32 refund_zipped_asset_id = 11; */ refundZippedAssetId: number; /** * Recipient of refunded intermediate asset; empty when none was supplied. * * @generated from field: string refund_address = 12; */ refundAddress: string; /** * Destination tag or memo for refund_address; empty when none. * * @generated from field: string refund_memo = 13; */ refundMemo: string; /** * Quote and protection fixed at creation. Not refreshed on retries. Its * amounts and fees stay estimates: the QuickSwap is priced when its deposit * is credited, and execution, withdrawals and charged_fees report the * actual output and fees. * * @generated from field: swap.quickswap.v1.QuickSwapQuote quote = 14; */ quote?: QuickSwapQuote | undefined; /** * Where and until when to deposit; absent while ALLOCATING and on a * QuickSwap that never got an address (EXPIRED with * DEPOSIT_ADDRESS_CONFLICT). * * @generated from field: swap.quickswap.v1.DepositInstructions deposit_instructions = 15; */ depositInstructions?: DepositInstructions | undefined; /** * Risk screening. * * @generated from field: swap.quickswap.v1.Screening screening = 16; */ screening?: Screening | undefined; /** * Detected deposits, oldest first, at most 50. * * @generated from field: repeated swap.quickswap.v1.Deposit deposits = 17; */ deposits: Deposit[]; /** * True when more than 50 deposits were detected; only the first 50 are * listed. * * @generated from field: bool deposits_truncated = 18; */ depositsTruncated: boolean; /** * Execution progress; absent before execution starts. * * @generated from field: swap.quickswap.v1.ExecutionProgress execution = 20; */ execution?: ExecutionProgress | undefined; /** * Withdrawals, oldest first, at most 50. * * @generated from field: repeated swap.quickswap.v1.Withdrawal withdrawals = 21; */ withdrawals: Withdrawal[]; /** * True when more than 50 withdrawals exist; only the first 50 are listed. * * @generated from field: bool withdrawals_truncated = 22; */ withdrawalsTruncated: boolean; /** * When the QuickSwap was created. * * @generated from field: google.protobuf.Timestamp created_at = 23; */ createdAt?: Timestamp | undefined; /** * When the QuickSwap last changed. * * @generated from field: google.protobuf.Timestamp updated_at = 24; */ updatedAt?: Timestamp | undefined; /** * When status became terminal; unset while not terminal. * * @generated from field: google.protobuf.Timestamp terminal_at = 25; */ terminalAt?: Timestamp | undefined; /** * Monotonic state version: a snapshot with a lower version is older. Zero * while ALLOCATING; 1 once the deposit address is issued (AWAITING_DEPOSIT) * or allocation ends without one (EXPIRED with DEPOSIT_ADDRESS_CONFLICT); * every later change increments it. * * @generated from field: uint64 version = 26; */ version: bigint; /** * Fee schedule version fixed at creation. Every execution or bridge payout * of this QuickSwap is charged that version's service fees, whatever later * versions change. * * @generated from field: uint64 fee_schedule_version = 28; */ feeScheduleVersion: bigint; /** * Broker and affiliate fees as requested, fixed at creation. With a * referral (quote.referral), the broker fee charged is broker_bps less the * referral's discount and commission. * * @generated from field: swap.quickswap.v1.RequestedFees fees = 29; */ fees?: RequestedFees | undefined; /** * Broker and affiliate fees charged so far, as settled: one entry per fee * kind, credited vault and asset, in kind, then account_id, then asset_id * order. Grows while the QuickSwap executes or pays out a bridge. Each is * the requested rate applied to the actual execution, so it can differ * from the quote's fee lines. * * @generated from field: repeated swap.quickswap.v1.ChargedFee charged_fees = 30; */ chargedFees: ChargedFee[]; }; /** * Describes the message swap.quickswap.v1.QuickSwap. * Use `create(QuickSwapSchema)` to create a new message. */ declare const QuickSwapSchema: GenMessage; /** * RequestedFees are the broker and affiliate fees a QuickSwap request set, * charged on top of the service fee. * * @generated from message swap.quickswap.v1.RequestedFees */ type RequestedFees = Message<"swap.quickswap.v1.RequestedFees"> & { /** * Broker fee in basis points of what each leg receives, credited to the * broker's default vault. * * @generated from field: uint32 broker_bps = 1; */ brokerBps: number; /** * Affiliate fees, in ascending account_id order. * * @generated from field: repeated swap.quickswap.v1.AffiliateShare affiliates = 2; */ affiliates: AffiliateShare[]; }; /** * Describes the message swap.quickswap.v1.RequestedFees. * Use `create(RequestedFeesSchema)` to create a new message. */ declare const RequestedFeesSchema: GenMessage; /** * ChargedFee is what one vault has been credited with for a QuickSwap in * one asset, from settled fills and bridge payouts. * * @generated from message swap.quickswap.v1.ChargedFee */ type ChargedFee = Message<"swap.quickswap.v1.ChargedFee"> & { /** * BROKER, AFFILIATE or REFERRAL. * * @generated from field: swap.quickswap.v1.FeeKind kind = 1; */ kind: FeeKind; /** * Public sub-account ID of the credited vault: the default vault for * BROKER, the affiliate vault for AFFILIATE; zero for REFERRAL. * * @generated from field: fixed64 account_id = 2; */ accountId: bigint; /** * Asset credited, as an AssetConfig.ledger_id from * GET /v1/chain/deposit-withdraw/config. * * @generated from field: uint32 asset_id = 3; */ assetId: number; /** * Amount credited, in base units of 18 decimals. * * @generated from field: swap.quickswap.v1.TokenAmount amount = 4; */ amount?: TokenAmount | undefined; }; /** * Describes the message swap.quickswap.v1.ChargedFee. * Use `create(ChargedFeeSchema)` to create a new message. */ declare const ChargedFeeSchema: GenMessage; /** * QuoteQuickSwapRequest prices terms, with the broker and affiliate fees, * without reserving anything. * * @generated from message swap.quickswap.v1.QuoteQuickSwapRequest */ type QuoteQuickSwapRequest = Message<"swap.quickswap.v1.QuoteQuickSwapRequest"> & { /** * Terms to price. * * @generated from field: swap.quickswap.v1.QuickSwapTerms terms = 1; */ terms?: QuickSwapTerms | undefined; /** * Broker fee in basis points of what each leg receives, charged on top of * the service fee and credited to the broker's default vault; 0 for none. * broker_bps and the affiliates' bps total at most 300. Fees outside these * rules fail with FEES_INVALID. * * @generated from field: uint32 broker_bps = 2; */ brokerBps: number; /** * Affiliate fees, each charged on top and credited to its affiliate vault: * at most three distinct vaults. * * @generated from field: repeated swap.quickswap.v1.AffiliateShare affiliates = 3; */ affiliates: AffiliateShare[]; /** * Optional referral partner code, as CreateQuickSwapRequest.referral_code: * at most 64 bytes. * * @generated from field: string referral_code = 4; */ referralCode: string; }; /** * Describes the message swap.quickswap.v1.QuoteQuickSwapRequest. * Use `create(QuoteQuickSwapRequestSchema)` to create a new message. */ declare const QuoteQuickSwapRequestSchema: GenMessage; /** * QuoteQuickSwapResponse is an indicative quote. * * @generated from message swap.quickswap.v1.QuoteQuickSwapResponse */ type QuoteQuickSwapResponse = Message<"swap.quickswap.v1.QuoteQuickSwapResponse"> & { /** * Indicative quote, including whether the route needs a refund address. * Its amounts and fees are estimates. Creating a QuickSwap prices the terms * again. * * @generated from field: swap.quickswap.v1.QuickSwapQuote quote = 1; */ quote?: QuickSwapQuote | undefined; }; /** * Describes the message swap.quickswap.v1.QuoteQuickSwapResponse. * Use `create(QuoteQuickSwapResponseSchema)` to create a new message. */ declare const QuoteQuickSwapResponseSchema: GenMessage; /** * AffiliateShare credits one affiliate vault, a sub-account the broker owns, * with a fee charged on top of the service and broker fees. * * @generated from message swap.quickswap.v1.AffiliateShare */ type AffiliateShare = Message<"swap.quickswap.v1.AffiliateShare"> & { /** * Public sub-account ID of an active affiliate vault of the broker * (QuickSwapBrokerService.CreateAffiliateVault). Create the vault first: an * unknown, disabled or other broker's vault, or the default vault, fails * with AFFILIATE_VAULT_UNKNOWN. * * @generated from field: fixed64 account_id = 1; */ accountId: bigint; /** * Fee in basis points of what each leg receives, from 1 to 300. * * @generated from field: uint32 bps = 2; */ bps: number; }; /** * Describes the message swap.quickswap.v1.AffiliateShare. * Use `create(AffiliateShareSchema)` to create a new message. */ declare const AffiliateShareSchema: GenMessage; /** * CreateQuickSwapRequest creates, or returns, the QuickSwap for one * idempotency key. * * @generated from message swap.quickswap.v1.CreateQuickSwapRequest */ type CreateQuickSwapRequest = Message<"swap.quickswap.v1.CreateQuickSwapRequest"> & { /** * Broker-chosen idempotency key, 1 to 128 characters of letters, digits, * '.', '_', ':' or '-'. Scoped to the authenticated broker and retained * permanently. The same key with the same request returns the same QuickSwap * and deposit address; with a different request it fails with * IDEMPOTENCY_CONFLICT. Requests are compared after every valid address and * memo is put in its network's canonical form, so the same address in * another case or encoding is the same request; affiliate order is * ignored; every other field, the fees included, must be equal. * * @generated from field: string idempotency_key = 1; */ idempotencyKey: string; /** * Economic terms. * * @generated from field: swap.quickswap.v1.QuickSwapTerms terms = 2; */ terms?: QuickSwapTerms | undefined; /** * Recipient of the swap output on the destination network, in its native * text form without memo: 1-256 UTF-8 bytes. * * @generated from field: string destination_address = 3; */ destinationAddress: string; /** * Destination tag or memo for destination_address. Required when the * destination network requires one, optional when supported, and empty when * unsupported. See ChainConfig.memo_requirement. At most 128 UTF-8 bytes. * * @generated from field: string destination_memo = 4; */ destinationMemo: string; /** * Recipient of returned source funds on the source network, in its native * text form without memo: 1-256 UTF-8 bytes. Deposits that are not * accepted, and source funds that are not traded, go here; never to an * observed sender. * * @generated from field: string return_address = 5; */ returnAddress: string; /** * Destination tag or memo for return_address. Required when the source * network requires one, optional when supported, and empty when unsupported. * See ChainConfig.memo_requirement. At most 128 UTF-8 bytes. * * @generated from field: string return_memo = 6; */ returnMemo: string; /** * Refund route for the intermediate asset of a two-leg route: an * AssetChainVariant.zipped_asset_id of the asset whose AssetConfig.ledger_id * is the quote's intermediate_asset_id in GET * /v1/chain/deposit-withdraw/config, for example USDT on Ethereum. Required * with refund_address when the route has an intermediate asset; optional * and unused otherwise. * * @generated from field: uint32 refund_zipped_asset_id = 7; */ refundZippedAssetId: number; /** * Recipient of refunded intermediate asset on the refund route's network, * in its native text form without memo. At most 256 UTF-8 bytes. * * @generated from field: string refund_address = 8; */ refundAddress: string; /** * Destination tag or memo for refund_address. Required when the refund * network requires one, optional when supported, and empty when unsupported. * See ChainConfig.memo_requirement. At most 128 UTF-8 bytes. * * @generated from field: string refund_memo = 9; */ refundMemo: string; /** * Optional source wallet the end user will deposit from, for brokers that * know it in advance. It must be a valid address on the source network, at * most 256 UTF-8 bytes, and is shown on the QuickSwap. * * @generated from field: string source_wallet = 10; */ sourceWallet: string; /** * Affiliate fees, each charged on top and credited to its affiliate vault: * at most three distinct vaults. Fixed at creation with broker_bps. * * @generated from field: repeated swap.quickswap.v1.AffiliateShare affiliates = 11; */ affiliates: AffiliateShare[]; /** * Broker fee in basis points of what each leg receives, charged on top of * the service fee and credited to the broker's default vault; 0 for none. * broker_bps and the affiliates' bps total at most 300. Fees outside these * rules fail with FEES_INVALID. * * @generated from field: uint32 broker_bps = 12; */ brokerBps: number; /** * Optional referral partner code from a referral link, case-insensitive, * at most 64 bytes; empty for none. Only a broker with a referral program may send one * (REFERRAL_NOT_SUPPORTED otherwise), never with affiliates (FEES_INVALID). * It must be a valid code (REFERRAL_CODE_INVALID) that is a partner's * current code (REFERRAL_CODE_UNKNOWN), and the partner must be active * (REFERRAL_PARTNER_INACTIVE). The program's rates * for the route are applied (quote.referral) and fixed at creation. It is * part of the request: the same idempotency_key with another code, or with * and without one, is IDEMPOTENCY_CONFLICT. * * @generated from field: string referral_code = 13; */ referralCode: string; }; /** * Describes the message swap.quickswap.v1.CreateQuickSwapRequest. * Use `create(CreateQuickSwapRequestSchema)` to create a new message. */ declare const CreateQuickSwapRequestSchema: GenMessage; /** * CreateQuickSwapResponse returns the QuickSwap bound to the idempotency key. * * @generated from message swap.quickswap.v1.CreateQuickSwapResponse */ type CreateQuickSwapResponse = Message<"swap.quickswap.v1.CreateQuickSwapResponse"> & { /** * The QuickSwap, normally AWAITING_DEPOSIT with deposit_instructions. A * retry returns its current state with the original quote and address. * * @generated from field: swap.quickswap.v1.QuickSwap quick_swap = 1; */ quickSwap?: QuickSwap | undefined; }; /** * Describes the message swap.quickswap.v1.CreateQuickSwapResponse. * Use `create(CreateQuickSwapResponseSchema)` to create a new message. */ declare const CreateQuickSwapResponseSchema: GenMessage; /** * GetQuickSwapRequest selects one of the broker's QuickSwaps. * * @generated from message swap.quickswap.v1.GetQuickSwapRequest */ type GetQuickSwapRequest = Message<"swap.quickswap.v1.GetQuickSwapRequest"> & { /** * Exactly one selector. * * @generated from oneof swap.quickswap.v1.GetQuickSwapRequest.selector */ selector: { /** * Public QuickSwap identifier. * * @generated from field: fixed64 swap_id = 1; */ value: bigint; case: "swapId"; } | { /** * Idempotency key used to create it; resolves a QuickSwap whose create * outcome was unknown. * * @generated from field: string idempotency_key = 2; */ value: string; case: "idempotencyKey"; } | { case: undefined; value?: undefined; }; }; /** * Describes the message swap.quickswap.v1.GetQuickSwapRequest. * Use `create(GetQuickSwapRequestSchema)` to create a new message. */ declare const GetQuickSwapRequestSchema: GenMessage; /** * GetQuickSwapResponse returns one QuickSwap. * * @generated from message swap.quickswap.v1.GetQuickSwapResponse */ type GetQuickSwapResponse = Message<"swap.quickswap.v1.GetQuickSwapResponse"> & { /** * Current state. * * @generated from field: swap.quickswap.v1.QuickSwap quick_swap = 1; */ quickSwap?: QuickSwap | undefined; }; /** * Describes the message swap.quickswap.v1.GetQuickSwapResponse. * Use `create(GetQuickSwapResponseSchema)` to create a new message. */ declare const GetQuickSwapResponseSchema: GenMessage; /** * ErrorDetail is attached to QuickSwap errors. ConnectRPC clients receive it * as an error detail of type swap.quickswap.v1.ErrorDetail. REST clients * receive an application/problem+json body {type, title, status, detail, * code, swapId, minDepositAmount, maxDepositAmount} whose code is the * ErrorCode name, or the status name (for example INVALID_ARGUMENT) when no * ErrorCode applies; swapId and the limits appear only when set. * * @generated from message swap.quickswap.v1.ErrorDetail */ type ErrorDetail = Message<"swap.quickswap.v1.ErrorDetail"> & { /** * Stable error code. * * @generated from field: swap.quickswap.v1.ErrorCode code = 1; */ code: ErrorCode; /** * QuickSwap bound to the request's idempotency key, when one exists: for * example the original QuickSwap on IDEMPOTENCY_CONFLICT, or the QuickSwap * whose deposit address could not be allocated. * * @generated from field: fixed64 swap_id = 2; */ swapId: bigint; /** * AMOUNT_OUT_OF_RANGE only: the smallest deposit that currently quotes on * the route with the requested protection, in source token units, whatever * the request's basis. It moves with prices and network fees; show it as * guidance, not a guarantee. A deposit below QuickSwapQuote.min_deposit_amount * is returned to return_address (DEPOSIT_BELOW_MINIMUM). Unset for other * codes and when no deposit currently quotes. * * @generated from field: swap.quickswap.v1.TokenAmount min_deposit_amount = 3; */ minDepositAmount?: TokenAmount | undefined; /** * AMOUNT_OUT_OF_RANGE only: the largest deposit that quotes, in source token * units. Unset for other codes, when no deposit currently quotes, and for a * bridge, whose deposit no order book bounds. * * @generated from field: swap.quickswap.v1.TokenAmount max_deposit_amount = 4; */ maxDepositAmount?: TokenAmount | undefined; }; /** * Describes the message swap.quickswap.v1.ErrorDetail. * Use `create(ErrorDetailSchema)` to create a new message. */ declare const ErrorDetailSchema: GenMessage; /** * QuoteBasis states which side of the swap the request amount denominates. * * @generated from enum swap.quickswap.v1.QuoteBasis */ declare enum QuoteBasis { /** * No basis selected; rejected. * * @generated from enum value: BASIS_UNSPECIFIED = 0; */ BASIS_UNSPECIFIED = 0, /** * amount is the source amount the end user intends to deposit, in source * token units. * * @generated from enum value: SOURCE_AMOUNT = 1; */ SOURCE_AMOUNT = 1, /** * amount is the destination amount the end user wants to receive after fees, * in destination token units. The quote reports the deposit amount needed at * the quoted price. The delivered amount still follows the actual deposit * and execution, bounded below by the protection. * * @generated from enum value: DESTINATION_AMOUNT = 2; */ DESTINATION_AMOUNT = 2 } /** * Describes the enum swap.quickswap.v1.QuoteBasis. */ declare const QuoteBasisSchema: GenEnum; /** * FeeKind identifies one component of a QuickSwap's fees. * * @generated from enum swap.quickswap.v1.FeeKind */ declare enum FeeKind { /** * No kind; never returned. * * @generated from enum value: FEE_UNSPECIFIED = 0; */ FEE_UNSPECIFIED = 0, /** * Service fee of one trading leg: the leg's pair fee in basis points of * what the leg receives. A two-leg route has one per leg. On a bridge, the * one bridge fee in basis points of the credited amount, charged at payout. * * @generated from enum value: SERVICE = 1; */ SERVICE = 1, /** * Broker fee of one trading leg, the request's broker_bps of what the leg * receives, credited to the broker's default vault. A two-leg route has one * per leg; a bridge has one, on the credited amount, charged at payout. * * @generated from enum value: BROKER = 2; */ BROKER = 2, /** * Affiliate fee of one trading leg, one affiliate's bps of what the leg * receives, credited to that affiliate vault. Each affiliate has one per * leg; on a bridge one, on the credited amount, charged at payout. * * @generated from enum value: AFFILIATE = 3; */ AFFILIATE = 3, /** * Network fee withheld from the deposit before it is credited. A quote * shows an estimate; the fee withheld is the network's fee when the * deposit arrives. * * @generated from enum value: DEPOSIT_NETWORK = 4; */ DEPOSIT_NETWORK = 4, /** * Estimated network fee for a withdrawal. The actual fee is charged at * withdrawal time and reported on the withdrawal. * * @generated from enum value: WITHDRAWAL_NETWORK = 5; */ WITHDRAWAL_NETWORK = 5, /** * Referral commission of one trading leg: the referral partner's * commission_bps (ReferralPricing) of what the leg receives, credited to * the partner. It comes out of the broker fee and adds nothing to what the * end user pays. Only a request with a referral_code has one; it never * appears with AFFILIATE fees. On a bridge one, on the credited amount, * charged at payout. * * @generated from enum value: REFERRAL = 6; */ REFERRAL = 6 } /** * Describes the enum swap.quickswap.v1.FeeKind. */ declare const FeeKindSchema: GenEnum; /** * DepositAddressState is the lifecycle state of a QuickSwap deposit address. * * @generated from enum swap.quickswap.v1.DepositAddressState */ declare enum DepositAddressState { /** * No address yet. * * @generated from enum value: ADDRESS_UNSPECIFIED = 0; */ ADDRESS_UNSPECIFIED = 0, /** * The address accepts the first eligible deposit. * * @generated from enum value: ACTIVE = 1; */ ACTIVE = 1, /** * Entered on the first confirmed deposit. Any further deposit is returned * or held and never executes. Ends at address_retires_at. An address that * expires unfunded goes from ACTIVE straight to RETIRED. * * @generated from enum value: REFUND_MODE = 2; */ REFUND_MODE = 2, /** * The address is retired. A deposit sent to it is not processed * automatically; it is handled only through support-assisted recovery, and * recovery is not guaranteed. * * @generated from enum value: RETIRED = 3; */ RETIRED = 3 } /** * Describes the enum swap.quickswap.v1.DepositAddressState. */ declare const DepositAddressStateSchema: GenEnum; /** * DepositDisposition is what a detected deposit is allowed to do. * * @generated from enum swap.quickswap.v1.DepositDisposition */ declare enum DepositDisposition { /** * Not yet decided. * * @generated from enum value: DISPOSITION_UNSPECIFIED = 0; */ DISPOSITION_UNSPECIFIED = 0, /** * Detected; eligibility is being evaluated. A deposit can already be * credited (credited_at) while it is evaluated. * * @generated from enum value: EVALUATING = 1; */ EVALUATING = 1, /** * The eligible deposit that confirmed first. It consumed the QuickSwap and * is the only deposit that can execute. * * @generated from enum value: ELIGIBLE = 2; */ ELIGIBLE = 2, /** * Not accepted: it is returned to return_address and never executes. A * deposit found ineligible after it was credited, such as a late deposit * (LATE_DEPOSIT), one below min_deposit_amount (DEPOSIT_BELOW_MINIMUM) or * above max_deposit_amount (DEPOSIT_ABOVE_MAXIMUM), or one of the wrong * asset or network (WRONG_ASSET), keeps credited_at and is returned from its * credit. * * @generated from enum value: RETURN_ONLY = 3; */ RETURN_ONLY = 3, /** * Held for review; it neither executes nor returns until released. A * deposit blocked by its risk screen (SOURCE_SCREENING_BLOCKED) keeps this * disposition after Zipper's compliance team transferred its funds out * (QuickSwap CLOSED). * * @generated from enum value: ON_HOLD = 4; */ ON_HOLD = 4, /** * Observed on an address that was already retired (DEPOSIT_ADDRESS_RETIRED). * It never executes and is not returned automatically. It is handled only * through support-assisted recovery, and it is potentially unrecoverable. * The broker contacts Polyester broker support with the swap_id. * * @generated from enum value: MANUAL_RECOVERY = 5; */ MANUAL_RECOVERY = 5 } /** * Describes the enum swap.quickswap.v1.DepositDisposition. */ declare const DepositDispositionSchema: GenEnum; /** * QuickSwapReason explains a notable status or deposit disposition. * * @generated from enum swap.quickswap.v1.QuickSwapReason */ declare enum QuickSwapReason { /** * No notable reason. On a HELD QuickSwap or an ON_HOLD deposit: held for * review without a more specific reason; the broker contacts Polyester * broker support with the swap_id. * * @generated from enum value: REASON_UNSPECIFIED = 0; */ REASON_UNSPECIFIED = 0, /** * The deposit's risk screen failed with a return verdict; the deposit is * not accepted and is returned to return_address. * * @generated from enum value: SOURCE_SCREENING_FAILED = 1; */ SOURCE_SCREENING_FAILED = 1, /** * The deposit arrived and is safe, but processing capacity is temporarily * unavailable. Processing resumes automatically when capacity frees up; no * action is needed. * * @generated from enum value: CAPACITY_UNAVAILABLE = 4; */ CAPACITY_UNAVAILABLE = 4, /** * Execution could not meet the protection; untraded funds are refunded or * returned. When no protected order could be placed for the deposit, nothing * is traded: the deposit is returned to return_address, and the QuickSwap * shows RETURNING and RETURNED with this reason. * * @generated from enum value: PROTECTION_NOT_MET = 7; */ PROTECTION_NOT_MET = 7, /** * The execution deadline passed before all input executed; untraded funds * are refunded or returned. Shown while EXECUTING once the deadline ended * trading, and on the payout statuses that follow. * * @generated from enum value: EXECUTION_DEADLINE_REACHED = 8; */ EXECUTION_DEADLINE_REACHED = 8, /** * The deposit was first seen after funding_expires_at. * * @generated from enum value: LATE_DEPOSIT = 9; */ LATE_DEPOSIT = 9, /** * The deposit is below the published min_deposit_amount, or its credit after * the deposit network fee is below the smallest order the route's market * accepts. It is not executed: it is returned to return_address, and the * QuickSwap shows RETURNING and RETURNED with this reason. A deposit that * cannot be returned on the network it was received on is held (HELD with * this reason); the broker contacts Polyester broker support with the * swap_id. * * @generated from enum value: DEPOSIT_BELOW_MINIMUM = 11; */ DEPOSIT_BELOW_MINIMUM = 11, /** * The deposit is above max_deposit_amount, or above the largest order the * route's market accepts. It is not executed: it is returned to * return_address, and the QuickSwap shows RETURNING and RETURNED with this * reason. * * @generated from enum value: DEPOSIT_ABOVE_MAXIMUM = 12; */ DEPOSIT_ABOVE_MAXIMUM = 12, /** * The deposit is not the quoted source asset or network. It is not * executed: it is returned to return_address on the network and in the * asset it was received in, and the QuickSwap shows RETURNING and RETURNED * with this reason. A deposit that cannot be returned there, such as one * received on a network where return_address is not valid, is held (HELD * with this reason); the broker contacts Polyester broker support with the * swap_id. * * @generated from enum value: WRONG_ASSET = 13; */ WRONG_ASSET = 13, /** * The funding window ended without an eligible deposit. * * @generated from enum value: FUNDING_WINDOW_ENDED = 15; */ FUNDING_WINDOW_ENDED = 15, /** * A withdrawal cannot be completed and is held for review. The broker * contacts Polyester broker support with the swap_id. * * @generated from enum value: WITHDRAWAL_FAILED = 16; */ WITHDRAWAL_FAILED = 16, /** * A processing step is being confirmed. Processing resumes automatically; no * action is needed. * * @generated from enum value: OUTCOME_RECONCILING = 17; */ OUTCOME_RECONCILING = 17, /** * Polyester's deposit screening blocked the deposit. It is held for * compliance review (HELD); it is never executed or returned automatically. * The broker contacts Polyester broker support with the swap_id. If * Zipper's compliance team later transfers the funds out to an address of * its choosing, not necessarily the user's, the QuickSwap ends CLOSED with * this reason; the funds were not returned to return_address. * * @generated from enum value: SOURCE_SCREENING_BLOCKED = 20; */ SOURCE_SCREENING_BLOCKED = 20, /** * Refund not possible: an amount left to refund or return was below the * withdrawal minimum of its asset and network, so no withdrawal was made * for it. Its withdrawal is NOT_SENT with the amount in unsent_amount. * Other withdrawals are unaffected. * * @generated from enum value: REFUND_BELOW_MINIMUM = 21; */ REFUND_BELOW_MINIMUM = 21, /** * The QuickSwap could not be issued a deposit address and never gets one: * it is EXPIRED without deposit_instructions, and nothing can be deposited * to it. Create a new QuickSwap with a new idempotency key, and report the * swap_id to Polyester broker support. * * @generated from enum value: DEPOSIT_ADDRESS_CONFLICT = 22; */ DEPOSIT_ADDRESS_CONFLICT = 22, /** * The address already accepted its one eligible deposit; this deposit is * returned to return_address and never executes. * * @generated from enum value: DEPOSIT_ADDRESS_ALREADY_USED = 23; */ DEPOSIT_ADDRESS_ALREADY_USED = 23, /** * The address was retired when this deposit was observed. The deposit is * MANUAL_RECOVERY: it never executes, is not returned automatically, and is * potentially unrecoverable. * * @generated from enum value: DEPOSIT_ADDRESS_RETIRED = 24; */ DEPOSIT_ADDRESS_RETIRED = 24, /** * The address had not been issued when this deposit was observed; it never executes. * * @generated from enum value: DEPOSIT_ADDRESS_NOT_ISSUED = 25; */ DEPOSIT_ADDRESS_NOT_ISSUED = 25, /** * On a two-leg route, intermediate funds were below the smallest order the * second leg's market accepts, so they could not be converted to the * destination asset; they are refunded to refund_address. Shown on the * payout statuses that follow. * * @generated from enum value: INTERMEDIATE_BELOW_MINIMUM = 26; */ INTERMEDIATE_BELOW_MINIMUM = 26, /** * A market on the route was halted, restricted or delisted when the deposit * was credited and did not reopen within a bounded wait after the deposit * was credited, the same for market and TWAP execution. Nothing was traded: * the deposit is returned to return_address, and the QuickSwap shows * RETURNING and RETURNED with this reason. * * @generated from enum value: MARKET_CLOSED = 27; */ MARKET_CLOSED = 27 } /** * Describes the enum swap.quickswap.v1.QuickSwapReason. */ declare const QuickSwapReasonSchema: GenEnum; /** * WithdrawalRole is why a withdrawal pays its recipient. * * @generated from enum swap.quickswap.v1.WithdrawalRole */ declare enum WithdrawalRole { /** * No role; never returned. * * @generated from enum value: ROLE_UNSPECIFIED = 0; */ ROLE_UNSPECIFIED = 0, /** * Swap output to destination_address on the destination network. * * @generated from enum value: DESTINATION = 1; */ DESTINATION = 1, /** * Untraded intermediate asset of a two-leg route, including a partial * refund, to refund_address on the refund route's network. * * @generated from enum value: REFUND = 2; */ REFUND = 2, /** * Source funds that were not accepted or not traded, to return_address on * the network and in the asset they were received in: the source network, * or for a wrong asset the network it was sent on. * * @generated from enum value: RETURN = 3; */ RETURN = 3, /** * A deposit blocked by its risk screen (SOURCE_SCREENING_BLOCKED) that * Zipper's compliance team transferred out on the network it was received * on, to an address of its choosing, not necessarily the user's. Not a * return or a refund: Polyester records neither the recipient nor the * amount, so address, memo, amount and network_fee are unset; tx_hash is * the transfer, and flow_id the deposit's flow. * * @generated from enum value: COMPLIANCE_TRANSFER = 4; */ COMPLIANCE_TRANSFER = 4 } /** * Describes the enum swap.quickswap.v1.WithdrawalRole. */ declare const WithdrawalRoleSchema: GenEnum; /** * WithdrawalState is the progress of one withdrawal. FINALIZED and NOT_SENT * are final: they never change. A FAILED withdrawal never changes either, but * it does not end the QuickSwap: while any withdrawal is FAILED, the * QuickSwap is HELD with reason WITHDRAWAL_FAILED and the funds stay * attributed to it until support resolves it. * * @generated from enum swap.quickswap.v1.WithdrawalState */ declare enum WithdrawalState { /** * No state; never returned. * * @generated from enum value: WITHDRAWAL_UNSPECIFIED = 0; */ WITHDRAWAL_UNSPECIFIED = 0, /** * Approved and waiting to be submitted. * * @generated from enum value: QUEUED = 1; */ QUEUED = 1, /** * Submitted to the recipient's network; not yet final. * * @generated from enum value: SUBMITTED = 2; */ SUBMITTED = 2, /** * Final on the recipient's network. * * @generated from enum value: FINALIZED = 3; */ FINALIZED = 3, /** * Definitively failed. The QuickSwap is HELD (WITHDRAWAL_FAILED); the * broker contacts Polyester broker support with the swap_id. * * @generated from enum value: FAILED = 4; */ FAILED = 4, /** * Final: no transaction was or will be made for this withdrawal, because * its amount was below the withdrawal minimum of its asset and network * (REFUND_BELOW_MINIMUM); unsent_amount is that amount. * * @generated from enum value: NOT_SENT = 5; */ NOT_SENT = 5 } /** * Describes the enum swap.quickswap.v1.WithdrawalState. */ declare const WithdrawalStateSchema: GenEnum; /** * QuickSwapStatus is the current state of a QuickSwap. While funds progress, * the status names the earliest gate still outstanding; gates that complete * concurrently are not reported separately. * * Flow: ALLOCATING → AWAITING_DEPOSIT → (WAITING_FOR_CAPACITY | * PREPARING_DEPOSIT | CONFIRMING) → CREDITED → EXECUTING (skipped for a * bridge) → PAYING_OUT | REFUNDING | RETURNING → a terminal status. A * QuickSwap that cannot be issued a deposit address goes from ALLOCATING * straight to EXPIRED (DEPOSIT_ADDRESS_CONFLICT). HELD can be entered from * any non-terminal status and is not terminal; a QuickSwap HELD with * SOURCE_SCREENING_BLOCKED can end CLOSED. The terminal statuses are * COMPLETED, REFUNDED, RETURNED, EXPIRED and CLOSED; a terminal status never * changes. Accept status values added later; is_terminal is authoritative. * * @generated from enum swap.quickswap.v1.QuickSwapStatus */ declare enum QuickSwapStatus { /** * No status; never returned. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * The quote is fixed and the deposit address is being allocated. After * ADDRESS_UNAVAILABLE, allocation continues automatically until an address * frees up; the wait has no fixed bound. * * @generated from enum value: ALLOCATING = 2; */ ALLOCATING = 2, /** * Quote and deposit address allocated; waiting for the first eligible * deposit before funding_expires_at. * * @generated from enum value: AWAITING_DEPOSIT = 3; */ AWAITING_DEPOSIT = 3, /** * An eligible deposit arrived and is safe; waiting for processing capacity. * Processing resumes automatically when capacity frees up; the wait has no * fixed bound. * * @generated from enum value: WAITING_FOR_CAPACITY = 4; */ WAITING_FOR_CAPACITY = 4, /** * The deposit is being prepared for credit. Retries keep this status. * * @generated from enum value: PREPARING_DEPOSIT = 5; */ PREPARING_DEPOSIT = 5, /** * Waiting for source confirmations and deposit validation before credit. * * @generated from enum value: CONFIRMING = 6; */ CONFIRMING = 6, /** * The deposit is credited; execution is starting. * * @generated from enum value: CREDITED = 7; */ CREDITED = 7, /** * The credited deposit is being traded. * * @generated from enum value: EXECUTING = 8; */ EXECUTING = 8, /** * Execution finished with destination output; withdrawals, including any * partial refund or return, are in progress. * * @generated from enum value: PAYING_OUT = 9; */ PAYING_OUT = 9, /** * A two-leg route produced no destination output; the intermediate asset is * being refunded to refund_address. * * @generated from enum value: REFUNDING = 10; */ REFUNDING = 10, /** * Nothing was traded or the deposit was not accepted; the source funds are * being returned to return_address. * * @generated from enum value: RETURNING = 11; */ RETURNING = 11, /** * Funds are held for review. Not terminal: review resumes the QuickSwap or * returns the funds, or, for SOURCE_SCREENING_BLOCKED, the QuickSwap can * end CLOSED. reason says why when a specific reason applies, else * it is REASON_UNSPECIFIED. The broker contacts Polyester broker support * with the swap_id. * * @generated from enum value: HELD = 12; */ HELD = 12, /** * Terminal: every withdrawal is final (FINALIZED or NOT_SENT) and at least * one is a DESTINATION withdrawal. A DESTINATION withdrawal is never * NOT_SENT. * * @generated from enum value: COMPLETED = 13; */ COMPLETED = 13, /** * Terminal: every withdrawal is final, none is DESTINATION, and at least one * is REFUND (FINALIZED or NOT_SENT). * * @generated from enum value: REFUNDED = 14; */ REFUNDED = 14, /** * Terminal: every withdrawal is final and all are RETURN (FINALIZED or * NOT_SENT). * * @generated from enum value: RETURNED = 15; */ RETURNED = 15, /** * Terminal: the funding window ended without an eligible deposit * (FUNDING_WINDOW_ENDED), or the QuickSwap never got a deposit address * (DEPOSIT_ADDRESS_CONFLICT). * * @generated from enum value: EXPIRED = 16; */ EXPIRED = 16, /** * Terminal: the deposit was blocked by its risk screen * (SOURCE_SCREENING_BLOCKED), and Zipper's compliance team transferred the * funds out on the deposit's network to an address of its choosing, not * necessarily the user's. Nothing was returned to return_address or * refunded. Its one withdrawal is that COMPLIANCE_TRANSFER, FINALIZED. * * @generated from enum value: CLOSED = 17; */ CLOSED = 17 } /** * Describes the enum swap.quickswap.v1.QuickSwapStatus. */ declare const QuickSwapStatusSchema: GenEnum; /** * ErrorCode is the stable machine-readable QuickSwap error code. * * @generated from enum swap.quickswap.v1.ErrorCode */ declare enum ErrorCode { /** * No code. * * @generated from enum value: ERROR_UNSPECIFIED = 0; */ ERROR_UNSPECIFIED = 0, /** * The source and destination route is not offered, or a bridge was * requested with TWAP execution. * * @generated from enum value: ROUTE_UNSUPPORTED = 1; */ ROUTE_UNSUPPORTED = 1, /** * The amount is outside the route's current limits. The error carries the * limits (min_deposit_amount, max_deposit_amount) when known. * * @generated from enum value: AMOUNT_OUT_OF_RANGE = 2; */ AMOUNT_OUT_OF_RANGE = 2, /** * An amount's decimals do not match its route's token decimals. * * @generated from enum value: DECIMALS_MISMATCH = 3; */ DECIMALS_MISMATCH = 3, /** * destination_address or destination_memo is not valid on the destination * network. * * @generated from enum value: DESTINATION_ADDRESS_INVALID = 4; */ DESTINATION_ADDRESS_INVALID = 4, /** * return_address or return_memo is not valid on the source network. * * @generated from enum value: RETURN_ADDRESS_INVALID = 5; */ RETURN_ADDRESS_INVALID = 5, /** * The route has an intermediate asset and no refund address was supplied. * * @generated from enum value: REFUND_ADDRESS_REQUIRED = 6; */ REFUND_ADDRESS_REQUIRED = 6, /** * refund_zipped_asset_id is not a withdraw route of the intermediate asset, * or refund_address or refund_memo is not valid on its network. * * @generated from enum value: REFUND_ADDRESS_INVALID = 7; */ REFUND_ADDRESS_INVALID = 7, /** * source_wallet is not valid on the source network. * * @generated from enum value: SOURCE_WALLET_INVALID = 8; */ SOURCE_WALLET_INVALID = 8, /** * No price is currently available for the route; retry later. * * @generated from enum value: QUOTE_UNAVAILABLE = 11; */ QUOTE_UNAVAILABLE = 11, /** * The protection cannot be met at the current price: a min_amount_out above * the expected output, or an order book that cannot fill the protected * execution at the quoted prices. * * @generated from enum value: PROTECTION_UNACHIEVABLE = 12; */ PROTECTION_UNACHIEVABLE = 12, /** * No deposit address is available right now. The QuickSwap (swap_id in the * error) is kept, and its address is allocated automatically when one frees * up. Follow it with GetQuickSwap or by repeating the request unchanged. Its * quote stays the one priced at creation, and its funding window starts * when the address is issued (issued_at). * * @generated from enum value: ADDRESS_UNAVAILABLE = 13; */ ADDRESS_UNAVAILABLE = 13, /** * The idempotency key was already used with a different request. * * @generated from enum value: IDEMPOTENCY_CONFLICT = 14; */ IDEMPOTENCY_CONFLICT = 14, /** * No QuickSwap of this broker matches the selector; on * QuickSwapReferralService, no QuickSwap the caller referred. * * @generated from enum value: SWAP_NOT_FOUND = 15; */ SWAP_NOT_FOUND = 15, /** * The broker is disabled: quotes and creates are refused. Reads and * QuickSwaps already created continue. * * @generated from enum value: BROKER_DISABLED = 18; */ BROKER_DISABLED = 18, /** * A broker limit was reached: the unfunded QuickSwaps held at once, the * QuickSwaps created per hour, the request rate of the API key, or the * affiliate vaults the broker may create. Nothing is bound to the key. A * funded or expired QuickSwap frees an unfunded slot; when the response * carries a Retry-After header, retry after that many seconds. * * @generated from enum value: BROKER_LIMIT = 19; */ BROKER_LIMIT = 19, /** * An affiliate names a vault that is not an active affiliate vault of the * broker: unknown, not yet created, disabled, another broker's, or the * default vault. Nothing is bound to the key; create or enable the vault * and repeat the request. * * @generated from enum value: AFFILIATE_VAULT_UNKNOWN = 20; */ AFFILIATE_VAULT_UNKNOWN = 20, /** * No broker with this name has the caller as its key or member. * * @generated from enum value: BROKER_NOT_FOUND = 21; */ BROKER_NOT_FOUND = 21, /** * The caller's role, or a broker API key, may not perform the action. * * @generated from enum value: ACTION_DENIED = 22; */ ACTION_DENIED = 22, /** * The action needs a fresh step-up proof of the acting member in the * X-Auth-Step-Up header, and none was sent or it was already used or * expired. Complete an MFA challenge for fresh step-up and repeat the * request with the new proof. * * @generated from enum value: STEP_UP_REQUIRED = 23; */ STEP_UP_REQUIRED = 23, /** * The broker has no affiliate vault with this ID. * * @generated from enum value: VAULT_NOT_FOUND = 24; */ VAULT_NOT_FOUND = 24, /** * The broker has no API key with this ID, or it no longer works. * * @generated from enum value: KEY_NOT_FOUND = 25; */ KEY_NOT_FOUND = 25, /** * The broker would have more than two working API keys. Revoke one first. * * @generated from enum value: KEY_LIMIT = 26; */ KEY_LIMIT = 26, /** * The key is the broker's last key that works without an expiry; create * another key first. * * @generated from enum value: LAST_KEY = 27; */ LAST_KEY = 27, /** * The person is not a member of the broker and has no pending invite, or * the account does not exist. * * @generated from enum value: MEMBER_NOT_FOUND = 28; */ MEMBER_NOT_FOUND = 28, /** * The person is already a member of the broker. * * @generated from enum value: ALREADY_MEMBER = 29; */ ALREADY_MEMBER = 29, /** * The Owner cannot be removed or given another role; transfer ownership * instead. * * @generated from enum value: OWNER_IMMUTABLE = 30; */ OWNER_IMMUTABLE = 30, /** * No pending invite with this ID is addressed to the caller. * * @generated from enum value: INVITE_NOT_FOUND = 31; */ INVITE_NOT_FOUND = 31, /** * The fees are not valid: more than three affiliates, an affiliate without * a valid account_id or with bps outside 1 to 300, a vault named twice, or * broker_bps and the affiliates' bps totalling more than 300. * * @generated from enum value: FEES_INVALID = 32; */ FEES_INVALID = 32, /** * The broker stats cannot be read: a QuickSwap in the window, named by * ErrorDetail.swap_id, is missing a record they need. Contact Polyester * broker support with the swap_id. * * @generated from enum value: STATS_INCOMPLETE = 33; */ STATS_INCOMPLETE = 33, /** * The QuickSwap (swap_id in the error) cannot be issued a deposit address * and never gets one, so nothing can be deposited to it; it is EXPIRED with * reason DEPOSIT_ADDRESS_CONFLICT. Create a new QuickSwap with a new * idempotency key, and report the swap_id to Polyester broker support. * * @generated from enum value: ADDRESS_CONFLICT = 34; */ ADDRESS_CONFLICT = 34, /** * The referral code is another partner's current code. * * @generated from enum value: REFERRAL_CODE_TAKEN = 35; */ REFERRAL_CODE_TAKEN = 35, /** * The referral code is reserved: a brand or broker name, or a code a * partner used before. Codes are never reused. * * @generated from enum value: REFERRAL_CODE_RESERVED = 36; */ REFERRAL_CODE_RESERVED = 36, /** * The referral code is not 4 to 16 letters, digits and hyphens, starting * and ending with a letter or digit, without two hyphens in a row. * * @generated from enum value: REFERRAL_CODE_INVALID = 37; */ REFERRAL_CODE_INVALID = 37, /** * The caller has not enrolled as a referral partner. * * @generated from enum value: REFERRAL_PARTNER_NOT_FOUND = 38; */ REFERRAL_PARTNER_NOT_FOUND = 38, /** * The caller is already a referral partner with another earnings * sub-account or display name. * * @generated from enum value: REFERRAL_PARTNER_EXISTS = 39; */ REFERRAL_PARTNER_EXISTS = 39, /** * The earnings sub-account is not an active sub-account of the caller, or * another referral partner already uses it. * * @generated from enum value: EARNINGS_ACCOUNT_INVALID = 40; */ EARNINGS_ACCOUNT_INVALID = 40, /** * The referral partner is disabled; its code cannot be changed. * * @generated from enum value: REFERRAL_PARTNER_DISABLED = 41; */ REFERRAL_PARTNER_DISABLED = 41, /** * The referral partner has used all its referral codes: a partner holds at * most 10 codes over its lifetime, the one it enrolled with included, and * each change retires a code for good. Its current code stays. * * @generated from enum value: REFERRAL_CODE_LIMIT = 42; */ REFERRAL_CODE_LIMIT = 42, /** * The request has a referral_code, but the broker has no referral program. * Repeat it without the code. * * @generated from enum value: REFERRAL_NOT_SUPPORTED = 43; */ REFERRAL_NOT_SUPPORTED = 43, /** * The referral_code is not a referral partner's current code: unknown, or * replaced by the partner. Repeat the request without the code. * * @generated from enum value: REFERRAL_CODE_UNKNOWN = 44; */ REFERRAL_CODE_UNKNOWN = 44, /** * The referral_code's partner is not active: not yet approved, disabled, or * without an account its commission can be credited to. Repeat the * request without the code. * * @generated from enum value: REFERRAL_PARTNER_INACTIVE = 45; */ REFERRAL_PARTNER_INACTIVE = 45, /** * No payout run of the broker's vaults has this ID. * * @generated from enum value: PAYOUT_NOT_FOUND = 46; */ PAYOUT_NOT_FOUND = 46 } /** * Describes the enum swap.quickswap.v1.ErrorCode. */ declare const ErrorCodeSchema: GenEnum; /** * QuickSwapService is the broker-only QuickSwap API, served over ConnectRPC * and REST. Every RPC requires the broker's API key, sent as a bearer token * in the Authorization header; the broker is derived from it, never from the * request. End users need no account. Brokers see only their * own QuickSwaps. * * The broker API key is a server credential. Call this API from the broker's * backend, never from a browser or mobile app. The broker's members create, * rotate and revoke keys with QuickSwapBrokerService, and a key may rotate * itself. * * A QuickSwap's status advances as the deposit and execution progress; poll * GetQuickSwap to follow it, at most once every 5 seconds per QuickSwap while * it is not terminal. Polling can stop once is_terminal is true. * * REST errors are application/problem+json (see ErrorDetail) with these HTTP * statuses: 400 for INVALID_ARGUMENT and FAILED_PRECONDITION, 401 for * UNAUTHENTICATED, 403 for PERMISSION_DENIED, 404 for NOT_FOUND, 409 for * IDEMPOTENCY_CONFLICT, 413 when a request body is too large, 429 for * RESOURCE_EXHAUSTED (with a Retry-After header when the request rate was * exceeded), 500 for an internal error, 503 for UNAVAILABLE and 504 for * DEADLINE_EXCEEDED. * * @generated from service swap.quickswap.v1.QuickSwapService */ declare const QuickSwapService: GenService<{ /** * QuoteQuickSwap prices terms without creating a QuickSwap or reserving a * deposit address. The quote's output and fees are estimates: the fees * charged are their rates applied to the actual execution once the * deposit is credited. The quote states whether the route needs a refund * address. * * Errors: * - INVALID_ARGUMENT: malformed request, AMOUNT_OUT_OF_RANGE, * DECIMALS_MISMATCH or FEES_INVALID. * - FAILED_PRECONDITION: ROUTE_UNSUPPORTED, PROTECTION_UNACHIEVABLE or * AFFILIATE_VAULT_UNKNOWN. * - UNAVAILABLE: QUOTE_UNAVAILABLE; retry later. * - PERMISSION_DENIED: BROKER_DISABLED. * - RESOURCE_EXHAUSTED: BROKER_LIMIT, the quote request rate of the key. * - UNAUTHENTICATED: missing or invalid broker API key. * * @generated from rpc swap.quickswap.v1.QuickSwapService.QuoteQuickSwap */ quoteQuickSwap: { methodKind: "unary"; input: typeof QuoteQuickSwapRequestSchema; output: typeof QuoteQuickSwapResponseSchema; }; /** * CreateQuickSwap creates the QuickSwap for idempotency_key, prices it and * allocates its deposit address. It is idempotent per broker and key: a * repeated or concurrent request with the same body returns the same * QuickSwap, quote and address, so every unknown outcome is resolved by * repeating the request unchanged. * * Errors: * - INVALID_ARGUMENT: malformed request, AMOUNT_OUT_OF_RANGE, * DECIMALS_MISMATCH, DESTINATION_ADDRESS_INVALID, RETURN_ADDRESS_INVALID, * REFUND_ADDRESS_INVALID, SOURCE_WALLET_INVALID or FEES_INVALID. * - FAILED_PRECONDITION: ROUTE_UNSUPPORTED, PROTECTION_UNACHIEVABLE, * REFUND_ADDRESS_REQUIRED or AFFILIATE_VAULT_UNKNOWN; nothing is bound to * the key. * - ALREADY_EXISTS: IDEMPOTENCY_CONFLICT; the original QuickSwap stands. * - UNAVAILABLE: ADDRESS_UNAVAILABLE; the QuickSwap is kept and gets its * address automatically; follow it with GetQuickSwap or the same request. * - ABORTED: ADDRESS_CONFLICT; the QuickSwap never gets an address and is * EXPIRED (DEPOSIT_ADDRESS_CONFLICT); every repeat returns this error; * create a new one with a new idempotency key. * - UNAVAILABLE, DEADLINE_EXCEEDED: unknown outcome or QUOTE_UNAVAILABLE; * retry the same request. * - PERMISSION_DENIED: BROKER_DISABLED; nothing is bound to the key. * - RESOURCE_EXHAUSTED: BROKER_LIMIT; nothing is bound to the key. * - UNAUTHENTICATED: missing or invalid broker API key. * * @generated from rpc swap.quickswap.v1.QuickSwapService.CreateQuickSwap */ createQuickSwap: { methodKind: "unary"; input: typeof CreateQuickSwapRequestSchema; output: typeof CreateQuickSwapResponseSchema; }; /** * GetQuickSwap returns the current state of one QuickSwap by swap_id or by * idempotency key. * * Errors: * - INVALID_ARGUMENT: malformed selector. * - NOT_FOUND: SWAP_NOT_FOUND. * - RESOURCE_EXHAUSTED: BROKER_LIMIT, the read request rate of the key. * - UNAUTHENTICATED: missing or invalid broker API key. * * @generated from rpc swap.quickswap.v1.QuickSwapService.GetQuickSwap */ getQuickSwap: { methodKind: "unary"; input: typeof GetQuickSwapRequestSchema; output: typeof GetQuickSwapResponseSchema; }; }>; //#endregion export { AffiliateShare, AffiliateShareSchema, ChargedFee, ChargedFeeSchema, CreateQuickSwapRequest, CreateQuickSwapRequestSchema, CreateQuickSwapResponse, CreateQuickSwapResponseSchema, Deposit, DepositAddressState, DepositAddressStateSchema, DepositDisposition, DepositDispositionSchema, DepositInstructions, DepositInstructionsSchema, DepositSchema, ErrorCode, ErrorCodeSchema, ErrorDetail, ErrorDetailSchema, Execution, ExecutionProgress, ExecutionProgressSchema, ExecutionSchema, FeeKind, FeeKindSchema, GetQuickSwapRequest, GetQuickSwapRequestSchema, GetQuickSwapResponse, GetQuickSwapResponseSchema, MarketExecution, MarketExecutionSchema, Protection, ProtectionSchema, QuickSwap, QuickSwapQuote, QuickSwapQuoteSchema, QuickSwapReason, QuickSwapReasonSchema, QuickSwapSchema, QuickSwapService, QuickSwapStatus, QuickSwapStatusSchema, QuickSwapTerms, QuickSwapTermsSchema, QuoteBasis, QuoteBasisSchema, QuoteFee, QuoteFeeSchema, QuoteQuickSwapRequest, QuoteQuickSwapRequestSchema, QuoteQuickSwapResponse, QuoteQuickSwapResponseSchema, ReferralPricing, ReferralPricingSchema, RequestedFees, RequestedFeesSchema, Screening, ScreeningSchema, TokenAmount, TokenAmountSchema, TwapExecution, TwapExecutionSchema, Withdrawal, WithdrawalRole, WithdrawalRoleSchema, WithdrawalSchema, WithdrawalState, WithdrawalStateSchema, file_swap_quickswap_v1_quickswap, quickswap_pb_d_exports }; //# sourceMappingURL=quickswap_pb.d.ts.map