import { U128 } from "../../../polyester/type/v1/u128_pb.js"; import { Message } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace auto_withdraw_pb_d_exports { export { AutoWithdrawCadence, AutoWithdrawCadenceSchema, AutoWithdrawDestination, AutoWithdrawDestinationSchema, AutoWithdrawPause, AutoWithdrawPauseSchema, AutoWithdrawPreviewAsset, AutoWithdrawPreviewAssetSchema, AutoWithdrawPreviewStatus, AutoWithdrawPreviewStatusSchema, AutoWithdrawRule, AutoWithdrawRuleSchema, AutoWithdrawRun, AutoWithdrawRunSchema, AutoWithdrawRunState, AutoWithdrawRunStateSchema, AutoWithdrawSchedule, AutoWithdrawScheduleSchema, AutoWithdrawService, AutoWithdrawStep, AutoWithdrawStepSchema, AutoWithdrawStepState, AutoWithdrawStepStateSchema, AutoWithdrawWeekday, AutoWithdrawWeekdaySchema, GetAutoWithdrawRuleRequest, GetAutoWithdrawRuleRequestSchema, GetAutoWithdrawRuleResponse, GetAutoWithdrawRuleResponseSchema, ListAutoWithdrawRunsRequest, ListAutoWithdrawRunsRequestSchema, ListAutoWithdrawRunsResponse, ListAutoWithdrawRunsResponseSchema, PreviewAutoWithdrawRunRequest, PreviewAutoWithdrawRunRequestSchema, PreviewAutoWithdrawRunResponse, PreviewAutoWithdrawRunResponseSchema, SetAutoWithdrawRuleEnabledRequest, SetAutoWithdrawRuleEnabledRequestSchema, SetAutoWithdrawRuleEnabledResponse, SetAutoWithdrawRuleEnabledResponseSchema, SetAutoWithdrawRuleRequest, SetAutoWithdrawRuleRequestSchema, SetAutoWithdrawRuleResponse, SetAutoWithdrawRuleResponseSchema, file_chain_withdraw_v1_auto_withdraw }; } /** * Describes the file chain/withdraw/v1/auto_withdraw.proto. */ declare const file_chain_withdraw_v1_auto_withdraw: GenFile; /** * AutoWithdrawSchedule is a rule's UTC run slot. Only the fields of its * cadence may be set; the others must be zero or empty. * * @generated from message chain.withdraw.v1.AutoWithdrawSchedule */ type AutoWithdrawSchedule = Message<"chain.withdraw.v1.AutoWithdrawSchedule"> & { /** * How often the rule runs. * * @generated from field: chain.withdraw.v1.AutoWithdrawCadence cadence = 1; */ cadence: AutoWithdrawCadence; /** * Run day of a weekly or biweekly rule. * * @generated from field: chain.withdraw.v1.AutoWithdrawWeekday weekday = 2; */ weekday: AutoWithdrawWeekday; /** * Minute after 00:00 UTC the run starts, 0 to 1439, for every cadence but * HOURLY; must be 0 for an hourly rule. * * @generated from field: uint32 minute_of_day = 3; */ minuteOfDay: number; /** * Minute past every hour an HOURLY rule is checked, 0 to 59. * * @generated from field: uint32 minute_of_hour = 4; */ minuteOfHour: number; /** * Run day of a MONTHLY rule, 1 to 31; see MONTHLY for shorter months. * * @generated from field: uint32 day_of_month = 5; */ dayOfMonth: number; /** * A UTC date (YYYY-MM-DD) in a week a BIWEEKLY rule runs; weeks start on * Monday. Responses return the Monday that starts that week. * * @generated from field: string anchor_date = 6; */ anchorDate: string; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawSchedule. * Use `create(AutoWithdrawScheduleSchema)` to create a new message. */ declare const AutoWithdrawScheduleSchema: GenMessage; /** * AutoWithdrawDestination pays one asset, in kind, to one external-chain * address. * * @generated from message chain.withdraw.v1.AutoWithdrawDestination */ type AutoWithdrawDestination = Message<"chain.withdraw.v1.AutoWithdrawDestination"> & { /** * Ledger asset paid. At most one destination per asset. * * @generated from field: uint32 asset_id = 1; */ assetId: number; /** * External destination chain identifier. * * @generated from field: uint64 destination_chain_id = 2; */ destinationChainId: bigint; /** * Destination address on destination_chain_id. It must be on the * account's external withdraw whitelist when the rule is written and * whenever a run pays it. Responses carry its canonical form. * * @generated from field: string destination_address = 3; */ destinationAddress: string; /** * A run pays this asset only when the payable amount reaches this * minimum, in 18-decimal asset units, and the rule's min_usd_value_e18; * otherwise the balance stays on the account for a later run. Must be at * least min_floor_e18 when the rule is set. * * @generated from field: polyester.type.v1.U128 min_amount_e18 = 4; */ minAmountE18?: U128 | undefined; /** * The most one run pays this asset, in 18-decimal asset units; at least * min_amount_e18. A larger balance pays this ceiling and the rest stays on * the account. * * @generated from field: polyester.type.v1.U128 max_amount_e18 = 5; */ maxAmountE18?: U128 | undefined; /** * Returned in responses only; ignored in requests. The least amount one * payout to this destination can pay now, in 18-decimal asset units: the * route's withdrawal minimum, and more than its current network fee. It * follows the network fee, so it can change between reads. A run pays at * least this floor and min_amount_e18, and a new rule needs a * min_amount_e18 of at least the floor. Unset when the route or its network * fee is not known now; a new rule for that destination is then refused * with FEE_UNAVAILABLE or a route code. * * @generated from field: polyester.type.v1.U128 min_floor_e18 = 6; */ minFloorE18?: U128 | undefined; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawDestination. * Use `create(AutoWithdrawDestinationSchema)` to create a new message. */ declare const AutoWithdrawDestinationSchema: GenMessage; /** * AutoWithdrawPause reports why a rule stopped running on its own. * * @generated from message chain.withdraw.v1.AutoWithdrawPause */ type AutoWithdrawPause = Message<"chain.withdraw.v1.AutoWithdrawPause"> & { /** * Asset whose payout paused the rule; zero when no payout did. * * @generated from field: uint32 asset_id = 1; */ assetId: number; /** * Machine-readable reason: destination_not_whitelisted when the * destination left the account's external withdraw whitelist, * destination_invalid when it is no longer a valid destination, or * authority_revoked when the person who set the rule may no longer change * it or withdraw from the account. On a broker vault the rule pauses with * authority_revoked as soon as its author's broker role changes in any * way: removed, demoted, or promoted (for example Finance to Owner), and * also when the author is removed and added back. An Owner or Finance * member resumes it with a fresh step-up. * * @generated from field: string reason = 2; */ reason: string; /** * When the rule was paused. * * @generated from field: google.protobuf.Timestamp paused_at = 3; */ pausedAt?: Timestamp | undefined; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawPause. * Use `create(AutoWithdrawPauseSchema)` to create a new message. */ declare const AutoWithdrawPauseSchema: GenMessage; /** * AutoWithdrawRule is one version of an account's auto-withdraw rule. Each * change, pause or resume creates the next version; only the latest version * runs, and a run in progress keeps the version it started with but pays * nothing further once that version is no longer the latest. * * @generated from message chain.withdraw.v1.AutoWithdrawRule */ type AutoWithdrawRule = Message<"chain.withdraw.v1.AutoWithdrawRule"> & { /** * Public subaccount ID the rule belongs to; zero for the root account. * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; /** * Rule version, starting at 1. * * @generated from field: uint32 version = 2; */ version: number; /** * Whether the rule runs. A paused version (enabled false) keeps its * schedule and destinations, so it resumes to the same destinations. The * rule runs only while enabled and without a pause. * * @generated from field: bool enabled = 3; */ enabled: boolean; /** * When the rule runs. * * @generated from field: chain.withdraw.v1.AutoWithdrawSchedule schedule = 4; */ schedule?: AutoWithdrawSchedule | undefined; /** * One destination per paid asset, ordered by asset_id. Empty only on a * version that was disabled before pausing kept destinations. * * @generated from field: repeated chain.withdraw.v1.AutoWithdrawDestination destinations = 5; */ destinations: AutoWithdrawDestination[]; /** * When this version was created. * * @generated from field: google.protobuf.Timestamp created_at = 6; */ createdAt?: Timestamp | undefined; /** * Set when the rule paused itself; resuming it or setting a new rule * clears it. * * @generated from field: chain.withdraw.v1.AutoWithdrawPause pause = 7; */ pause?: AutoWithdrawPause | undefined; /** * Least USD value one payout of the rule pays, in 18-decimal USD units; * zero means no USD minimum. * * @generated from field: polyester.type.v1.U128 min_usd_value_e18 = 8; */ minUsdValueE18?: U128 | undefined; /** * Public account ID of the person who created this version. * * @generated from field: fixed64 created_by_account_id = 9; */ createdByAccountId: bigint; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawRule. * Use `create(AutoWithdrawRuleSchema)` to create a new message. */ declare const AutoWithdrawRuleSchema: GenMessage; /** * SetAutoWithdrawRuleRequest creates or replaces the rule of the root * account or one subaccount. * * @generated from message chain.withdraw.v1.SetAutoWithdrawRuleRequest */ type SetAutoWithdrawRuleRequest = Message<"chain.withdraw.v1.SetAutoWithdrawRuleRequest"> & { /** * Public subaccount ID; omit for the root account. * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; /** * The version the change replaces: 0 when the account has no rule yet, * otherwise its latest version. A mismatch is rejected so concurrent * changes never overwrite each other. * * @generated from field: uint32 expected_version = 2; */ expectedVersion: number; /** * When the rule runs. * * @generated from field: chain.withdraw.v1.AutoWithdrawSchedule schedule = 3; */ schedule?: AutoWithdrawSchedule | undefined; /** * Destinations, one per asset, 1 to 32. * * @generated from field: repeated chain.withdraw.v1.AutoWithdrawDestination destinations = 4; */ destinations: AutoWithdrawDestination[]; /** * Least USD value one payout pays, in 18-decimal USD units; unset or zero * for no USD minimum. Each run values each asset's payable amount at the * current index price. A smaller amount stays on the account for a later * run, and the asset is skipped with reason price_unavailable when no * current price is available. A payout never goes below its destination's * min_amount_e18 or the route's withdrawal minimum. * * @generated from field: polyester.type.v1.U128 min_usd_value_e18 = 5; */ minUsdValueE18?: U128 | undefined; }; /** * Describes the message chain.withdraw.v1.SetAutoWithdrawRuleRequest. * Use `create(SetAutoWithdrawRuleRequestSchema)` to create a new message. */ declare const SetAutoWithdrawRuleRequestSchema: GenMessage; /** * SetAutoWithdrawRuleResponse returns the new rule version. * * @generated from message chain.withdraw.v1.SetAutoWithdrawRuleResponse */ type SetAutoWithdrawRuleResponse = Message<"chain.withdraw.v1.SetAutoWithdrawRuleResponse"> & { /** * The created version. * * @generated from field: chain.withdraw.v1.AutoWithdrawRule rule = 1; */ rule?: AutoWithdrawRule | undefined; }; /** * Describes the message chain.withdraw.v1.SetAutoWithdrawRuleResponse. * Use `create(SetAutoWithdrawRuleResponseSchema)` to create a new message. */ declare const SetAutoWithdrawRuleResponseSchema: GenMessage; /** * SetAutoWithdrawRuleEnabledRequest pauses or resumes the rule of the root * account or one subaccount, keeping its schedule and destinations. * * @generated from message chain.withdraw.v1.SetAutoWithdrawRuleEnabledRequest */ type SetAutoWithdrawRuleEnabledRequest = Message<"chain.withdraw.v1.SetAutoWithdrawRuleEnabledRequest"> & { /** * Public subaccount ID; omit for the root account. * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; /** * The account's latest rule version. A mismatch is rejected so concurrent * changes never overwrite each other. * * @generated from field: uint32 expected_version = 2; */ expectedVersion: number; /** * false pauses the rule; true resumes it. * * @generated from field: bool enabled = 3; */ enabled: boolean; }; /** * Describes the message chain.withdraw.v1.SetAutoWithdrawRuleEnabledRequest. * Use `create(SetAutoWithdrawRuleEnabledRequestSchema)` to create a new message. */ declare const SetAutoWithdrawRuleEnabledRequestSchema: GenMessage; /** * SetAutoWithdrawRuleEnabledResponse returns the rule's latest version. * * @generated from message chain.withdraw.v1.SetAutoWithdrawRuleEnabledResponse */ type SetAutoWithdrawRuleEnabledResponse = Message<"chain.withdraw.v1.SetAutoWithdrawRuleEnabledResponse"> & { /** * The created version, or the latest version unchanged when the rule was * already in the requested state. * * @generated from field: chain.withdraw.v1.AutoWithdrawRule rule = 1; */ rule?: AutoWithdrawRule | undefined; }; /** * Describes the message chain.withdraw.v1.SetAutoWithdrawRuleEnabledResponse. * Use `create(SetAutoWithdrawRuleEnabledResponseSchema)` to create a new message. */ declare const SetAutoWithdrawRuleEnabledResponseSchema: GenMessage; /** * GetAutoWithdrawRuleRequest reads the latest rule version. * * @generated from message chain.withdraw.v1.GetAutoWithdrawRuleRequest */ type GetAutoWithdrawRuleRequest = Message<"chain.withdraw.v1.GetAutoWithdrawRuleRequest"> & { /** * Public subaccount ID; omit for the root account. * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; }; /** * Describes the message chain.withdraw.v1.GetAutoWithdrawRuleRequest. * Use `create(GetAutoWithdrawRuleRequestSchema)` to create a new message. */ declare const GetAutoWithdrawRuleRequestSchema: GenMessage; /** * GetAutoWithdrawRuleResponse returns the latest rule version. * * @generated from message chain.withdraw.v1.GetAutoWithdrawRuleResponse */ type GetAutoWithdrawRuleResponse = Message<"chain.withdraw.v1.GetAutoWithdrawRuleResponse"> & { /** * The latest version; unset when the account never had a rule. * * @generated from field: chain.withdraw.v1.AutoWithdrawRule rule = 1; */ rule?: AutoWithdrawRule | undefined; }; /** * Describes the message chain.withdraw.v1.GetAutoWithdrawRuleResponse. * Use `create(GetAutoWithdrawRuleResponseSchema)` to create a new message. */ declare const GetAutoWithdrawRuleResponseSchema: GenMessage; /** * AutoWithdrawStep is one asset's payout in a run. * * @generated from message chain.withdraw.v1.AutoWithdrawStep */ type AutoWithdrawStep = Message<"chain.withdraw.v1.AutoWithdrawStep"> & { /** * Ledger asset paid. * * @generated from field: uint32 asset_id = 1; */ assetId: number; /** * External destination chain identifier. * * @generated from field: uint64 destination_chain_id = 2; */ destinationChainId: bigint; /** * Canonical destination address. * * @generated from field: string destination_address = 3; */ destinationAddress: string; /** * The account's available balance of the asset when the run started, in * 18-decimal asset units. * * @generated from field: polyester.type.v1.U128 available_e18 = 4; */ availableE18?: U128 | undefined; /** * What the step pays, in 18-decimal asset units: the available balance * up to the ceiling, rounded down to whole on-chain units. Zero when * skipped. The remainder stays on the account. * * @generated from field: polyester.type.v1.U128 amount_e18 = 5; */ amountE18?: U128 | undefined; /** * Where the payout stands. * * @generated from field: chain.withdraw.v1.AutoWithdrawStepState state = 6; */ state: AutoWithdrawStepState; /** * Machine-readable reason for a skipped or failed step, such as * below_minimum, price_unavailable (the rule has a USD minimum and no * current price valued the asset; the funds stay for a later run), * rule_superseded, destination_not_whitelisted, destination_cooling_down * (a broker vault's destination added to its external withdraw whitelist * less than 24 hours ago; the funds stay for a later run), * authority_revoked, gateway_capacity_insufficient (the funds stay for a * later run), withdrawal_released or withdrawal_failed; empty otherwise. * * @generated from field: string reason = 7; */ reason: string; /** * Withdraw intent identifier once the withdrawal is accepted; follows the * same lifecycle as a user withdrawal. * * @generated from field: string intent_id = 8; */ intentId: string; /** * Destination-network transaction hash once the withdrawal completed. * * @generated from field: string tx_hash = 9; */ txHash: string; /** * USD value of the payable amount when the run started, in 18-decimal USD * units, checked against the rule's min_usd_value_e18. Unset when the rule * has no USD minimum or no current price was available. * * @generated from field: polyester.type.v1.U128 value_usd_e18 = 10; */ valueUsdE18?: U128 | undefined; /** * The network fee charged on the withdrawal, in 18-decimal asset units. * Once it completed: taken out of amount_e18, so the destination received * amount_e18 minus this fee. Once Zipper rejected it or its execution * failed: the fee Zipper kept, which is not refunded. Unset until the step * is final, when it was skipped or failed before it reached Zipper, and * when the fee was not reported. * * @generated from field: polyester.type.v1.U128 network_fee_e18 = 11; */ networkFeeE18?: U128 | undefined; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawStep. * Use `create(AutoWithdrawStepSchema)` to create a new message. */ declare const AutoWithdrawStepSchema: GenMessage; /** * AutoWithdrawRun is one scheduled run of an account's rule. * * @generated from message chain.withdraw.v1.AutoWithdrawRun */ type AutoWithdrawRun = Message<"chain.withdraw.v1.AutoWithdrawRun"> & { /** * The account's run number, increasing by one per run. * * @generated from field: uint64 run_seq = 1; */ runSeq: bigint; /** * The rule version the run executes. * * @generated from field: uint32 rule_version = 2; */ ruleVersion: number; /** * The scheduled slot the run belongs to. * * @generated from field: google.protobuf.Timestamp scheduled_for = 3; */ scheduledFor?: Timestamp | undefined; /** * Where the run stands. * * @generated from field: chain.withdraw.v1.AutoWithdrawRunState state = 4; */ state: AutoWithdrawRunState; /** * Machine-readable reason for a skipped run: nothing_to_pay, * price_unavailable (an asset was not paid because no current price valued * it) or rule_superseded; empty otherwise. * * @generated from field: string reason = 5; */ reason: string; /** * One step per destination of the rule version, ordered by asset_id. * Empty while the run is planned. * * @generated from field: repeated chain.withdraw.v1.AutoWithdrawStep steps = 6; */ steps: AutoWithdrawStep[]; /** * When the run started. * * @generated from field: google.protobuf.Timestamp created_at = 7; */ createdAt?: Timestamp | undefined; /** * When the run ended; unset while it is in progress. * * @generated from field: google.protobuf.Timestamp finished_at = 8; */ finishedAt?: Timestamp | undefined; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawRun. * Use `create(AutoWithdrawRunSchema)` to create a new message. */ declare const AutoWithdrawRunSchema: GenMessage; /** * ListAutoWithdrawRunsRequest pages through an account's runs, newest first. * * @generated from message chain.withdraw.v1.ListAutoWithdrawRunsRequest */ type ListAutoWithdrawRunsRequest = Message<"chain.withdraw.v1.ListAutoWithdrawRunsRequest"> & { /** * Public subaccount ID; omit for the root account. * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; /** * Maximum number of runs to return: 0 means 20, at most 100. * * @generated from field: uint32 limit = 2; */ limit: number; /** * Opaque, exclusive, keyset-backed cursor from a previous response, * bound to the caller's account or subaccount and the newest-first * run_seq order. Empty for the first page. * * @generated from field: string page_token = 3; */ pageToken: string; }; /** * Describes the message chain.withdraw.v1.ListAutoWithdrawRunsRequest. * Use `create(ListAutoWithdrawRunsRequestSchema)` to create a new message. */ declare const ListAutoWithdrawRunsRequestSchema: GenMessage; /** * ListAutoWithdrawRunsResponse returns one page of runs, newest first. * * @generated from message chain.withdraw.v1.ListAutoWithdrawRunsResponse */ type ListAutoWithdrawRunsResponse = Message<"chain.withdraw.v1.ListAutoWithdrawRunsResponse"> & { /** * Runs ordered by run_seq, newest first. * * @generated from field: repeated chain.withdraw.v1.AutoWithdrawRun runs = 1; */ runs: AutoWithdrawRun[]; /** * Cursor for the next page. Empty when no more results exist. * * @generated from field: string next_page_token = 2; */ nextPageToken: string; }; /** * Describes the message chain.withdraw.v1.ListAutoWithdrawRunsResponse. * Use `create(ListAutoWithdrawRunsResponseSchema)` to create a new message. */ declare const ListAutoWithdrawRunsResponseSchema: GenMessage; /** * PreviewAutoWithdrawRunRequest previews the next run of the rule of the * root account or one subaccount. * * @generated from message chain.withdraw.v1.PreviewAutoWithdrawRunRequest */ type PreviewAutoWithdrawRunRequest = Message<"chain.withdraw.v1.PreviewAutoWithdrawRunRequest"> & { /** * Public subaccount ID; omit for the root account. * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; }; /** * Describes the message chain.withdraw.v1.PreviewAutoWithdrawRunRequest. * Use `create(PreviewAutoWithdrawRunRequestSchema)` to create a new message. */ declare const PreviewAutoWithdrawRunRequestSchema: GenMessage; /** * AutoWithdrawPreviewAsset is what the next run would do with one asset, * sized from the account's balance now. * * @generated from message chain.withdraw.v1.AutoWithdrawPreviewAsset */ type AutoWithdrawPreviewAsset = Message<"chain.withdraw.v1.AutoWithdrawPreviewAsset"> & { /** * Ledger asset. * * @generated from field: uint32 asset_id = 1; */ assetId: number; /** * External destination chain identifier; zero when the rule has no * destination for the asset. * * @generated from field: uint64 destination_chain_id = 2; */ destinationChainId: bigint; /** * Canonical destination address; empty when the rule has no destination * for the asset. * * @generated from field: string destination_address = 3; */ destinationAddress: string; /** * The account's available balance of the asset now, in 18-decimal asset * units. * * @generated from field: polyester.type.v1.U128 available_e18 = 4; */ availableE18?: U128 | undefined; /** * What the run would pay, in 18-decimal asset units: the available balance * up to max_amount_e18, rounded down to whole on-chain units, or zero when * it holds. The network fee is taken out of it on the way. * * @generated from field: polyester.type.v1.U128 payable_e18 = 5; */ payableE18?: U128 | undefined; /** * What would stay on the account, in 18-decimal asset units: * available_e18 minus payable_e18. * * @generated from field: polyester.type.v1.U128 held_back_e18 = 6; */ heldBackE18?: U128 | undefined; /** * Why held_back_e18 stays, or why nothing pays: below_minimum (below * minimum_e18 or the rule's min_usd_value_e18), price_unavailable (the * rule has a USD minimum and no current price values the asset), * no_destination (the rule pays no destination for the asset), * destination_cooling_down (a broker vault pays a destination only once * it has been on the vault's external withdraw whitelist for 24 hours; * see payable_from), above_max (the balance above max_amount_e18 stays) * or dust (less than one whole on-chain unit stays); empty when the whole * balance pays. * * @generated from field: string hold_reason = 7; */ holdReason: string; /** * The least one payout of the asset pays, in 18-decimal asset units: the * destination's min_amount_e18, or its min_floor_e18 when that is higher * and known now. Unset when the rule has no destination for the asset. * * @generated from field: polyester.type.v1.U128 minimum_e18 = 8; */ minimumE18?: U128 | undefined; /** * USD value, in 18-decimal USD units, of what the asset pays before its * minimums (the available balance up to max_amount_e18, rounded down to * whole on-chain units), at the current price as of priced_at. A rule with * a USD minimum compares this value with it. Unset when no current price * values the asset or the rule has no destination for it. * * @generated from field: polyester.type.v1.U128 value_usd_e18 = 9; */ valueUsdE18?: U128 | undefined; /** * When the price behind value_usd_e18 was observed; unset with it. * * @generated from field: google.protobuf.Timestamp priced_at = 10; */ pricedAt?: Timestamp | undefined; /** * The network fee a payout to the destination is expected to be charged * now, in 18-decimal asset units: the route's latest sampled network fee, * the same figure min_floor_e18 stays above. It is taken out of the * payout, so the destination receives about payable_e18 minus this fee. * Unset when the rule has no destination for the asset or the fee is not * known now. * * @generated from field: polyester.type.v1.U128 network_fee_e18 = 11; */ networkFeeE18?: U128 | undefined; /** * When network_fee_e18 was sampled; unset with it. * * @generated from field: google.protobuf.Timestamp network_fee_sampled_at = 12; */ networkFeeSampledAt?: Timestamp | undefined; /** * Set only on a broker vault while the destination is cooling down: when * it can be paid, 24 hours after it was added to the vault's external * withdraw whitelist. Unset with hold_reason destination_cooling_down * when that time is not known yet. * * @generated from field: google.protobuf.Timestamp payable_from = 13; */ payableFrom?: Timestamp | undefined; }; /** * Describes the message chain.withdraw.v1.AutoWithdrawPreviewAsset. * Use `create(AutoWithdrawPreviewAssetSchema)` to create a new message. */ declare const AutoWithdrawPreviewAssetSchema: GenMessage; /** * PreviewAutoWithdrawRunResponse previews the next run. * * @generated from message chain.withdraw.v1.PreviewAutoWithdrawRunResponse */ type PreviewAutoWithdrawRunResponse = Message<"chain.withdraw.v1.PreviewAutoWithdrawRunResponse"> & { /** * Whether the next run would pay. * * @generated from field: chain.withdraw.v1.AutoWithdrawPreviewStatus status = 1; */ status: AutoWithdrawPreviewStatus; /** * When the next run starts: its UTC slot, or, while a due slot waits for * the scheduler, that slot. For an hourly rule, the next hourly check. * Unset when the account has no rule or the rule is paused. * * @generated from field: google.protobuf.Timestamp next_run_at = 2; */ nextRunAt?: Timestamp | undefined; /** * The latest rule version; zero when the account has no rule. * * @generated from field: uint32 rule_version = 3; */ ruleVersion: number; /** * Set when the rule paused itself; a rule paused by a person has none. * * @generated from field: chain.withdraw.v1.AutoWithdrawPause pause = 4; */ pause?: AutoWithdrawPause | undefined; /** * The rule's least USD value of one payout, in 18-decimal USD units; zero * means no USD minimum. Unset when the account has no rule. * * @generated from field: polyester.type.v1.U128 min_usd_value_e18 = 5; */ minUsdValueE18?: U128 | undefined; /** * One entry per destination of the rule, then per other asset with a * positive balance, ordered by asset_id. Empty when the account has no * rule or the rule is paused. * * @generated from field: repeated chain.withdraw.v1.AutoWithdrawPreviewAsset assets = 6; */ assets: AutoWithdrawPreviewAsset[]; /** * When the balances, prices and fees the preview used were read. * * @generated from field: google.protobuf.Timestamp computed_at = 7; */ computedAt?: Timestamp | undefined; }; /** * Describes the message chain.withdraw.v1.PreviewAutoWithdrawRunResponse. * Use `create(PreviewAutoWithdrawRunResponseSchema)` to create a new message. */ declare const PreviewAutoWithdrawRunResponseSchema: GenMessage; /** * AutoWithdrawCadence is how often an auto-withdraw rule runs. Every slot * is a UTC time, with no daylight-saving shift. * * @generated from enum chain.withdraw.v1.AutoWithdrawCadence */ declare enum AutoWithdrawCadence { /** * Not set; rejected. * * @generated from enum value: CADENCE_UNSPECIFIED = 0; */ CADENCE_UNSPECIFIED = 0, /** * Once a day at minute_of_day UTC. * * @generated from enum value: DAILY = 1; */ DAILY = 1, /** * Once a week on weekday at minute_of_day UTC. * * @generated from enum value: WEEKLY = 2; */ WEEKLY = 2, /** * Checked every hour at minute_of_hour UTC; pays only an asset whose * payable amount has reached its minimums, so a payout follows within the * hour of the balance reaching them. An hour with nothing to pay records * no run. * * @generated from enum value: HOURLY = 3; */ HOURLY = 3, /** * Every two weeks on weekday at minute_of_day UTC: in the week of * anchor_date and every second week before or after it. * * @generated from enum value: BIWEEKLY = 4; */ BIWEEKLY = 4, /** * Once a month on day_of_month at minute_of_day UTC. A month without that * day runs on its last day: day 31 runs on April 30 and on February 28 or * 29, and days 29 and 30 run on the last day of February. * * @generated from enum value: MONTHLY = 5; */ MONTHLY = 5 } /** * Describes the enum chain.withdraw.v1.AutoWithdrawCadence. */ declare const AutoWithdrawCadenceSchema: GenEnum; /** * AutoWithdrawWeekday is the run day of a weekly or biweekly rule. * * @generated from enum chain.withdraw.v1.AutoWithdrawWeekday */ declare enum AutoWithdrawWeekday { /** * Not set; required for a weekly or biweekly rule and must be unset for * any other cadence. * * @generated from enum value: WEEKDAY_UNSPECIFIED = 0; */ WEEKDAY_UNSPECIFIED = 0, /** * Monday. * * @generated from enum value: MONDAY = 1; */ MONDAY = 1, /** * Tuesday. * * @generated from enum value: TUESDAY = 2; */ TUESDAY = 2, /** * Wednesday. * * @generated from enum value: WEDNESDAY = 3; */ WEDNESDAY = 3, /** * Thursday. * * @generated from enum value: THURSDAY = 4; */ THURSDAY = 4, /** * Friday. * * @generated from enum value: FRIDAY = 5; */ FRIDAY = 5, /** * Saturday. * * @generated from enum value: SATURDAY = 6; */ SATURDAY = 6, /** * Sunday. * * @generated from enum value: SUNDAY = 7; */ SUNDAY = 7 } /** * Describes the enum chain.withdraw.v1.AutoWithdrawWeekday. */ declare const AutoWithdrawWeekdaySchema: GenEnum; /** * AutoWithdrawRunState is where one auto-withdraw run stands. * * @generated from enum chain.withdraw.v1.AutoWithdrawRunState */ declare enum AutoWithdrawRunState { /** * Never returned. * * @generated from enum value: RUN_STATE_UNSPECIFIED = 0; */ RUN_STATE_UNSPECIFIED = 0, /** * The run is reading the account's balances. * * @generated from enum value: RUN_PLANNED = 1; */ RUN_PLANNED = 1, /** * The run's payouts are in progress. * * @generated from enum value: RUN_PAYING = 2; */ RUN_PAYING = 2, /** * Every payout completed or was skipped, and at least one paid. * * @generated from enum value: RUN_COMPLETED = 3; */ RUN_COMPLETED = 3, /** * Some payouts failed. Each failed step says where its funds are * (STEP_FAILED). * * @generated from enum value: RUN_PARTIALLY_FAILED = 4; */ RUN_PARTIALLY_FAILED = 4, /** * Every attempted payout failed. Each failed step says where its funds are * (STEP_FAILED). * * @generated from enum value: RUN_FAILED = 5; */ RUN_FAILED = 5, /** * Nothing was paid: every asset was below its minimum, no current price * valued it, or the rule was no longer current. * * @generated from enum value: RUN_SKIPPED = 6; */ RUN_SKIPPED = 6 } /** * Describes the enum chain.withdraw.v1.AutoWithdrawRunState. */ declare const AutoWithdrawRunStateSchema: GenEnum; /** * AutoWithdrawStepState is where one asset's payout of a run stands. * * @generated from enum chain.withdraw.v1.AutoWithdrawStepState */ declare enum AutoWithdrawStepState { /** * Never returned. * * @generated from enum value: STEP_STATE_UNSPECIFIED = 0; */ STEP_STATE_UNSPECIFIED = 0, /** * Planned; not yet requested. * * @generated from enum value: STEP_PENDING = 1; */ STEP_PENDING = 1, /** * Being requested. * * @generated from enum value: STEP_SUBMITTING = 2; */ STEP_SUBMITTING = 2, /** * Withdrawal accepted; waiting for it to complete on chain. * * @generated from enum value: STEP_SUBMITTED = 3; */ STEP_SUBMITTED = 3, /** * The withdrawal completed on chain. * * @generated from enum value: STEP_COMPLETED = 4; */ STEP_COMPLETED = 4, /** * The withdrawal failed. Where its funds are depends on when it failed, * which its withdrawal flow shows: * - before it left the account: they stay on the account; * - rejected by Zipper (flow REFUNDED, reason ZIPPER_VALIDATION_REJECTED or * ZIPPER_EXECUTION_REJECTED): amount_e18 less network_fee_e18 is * refunded, as zTokens, to the account's smart account wallet, not to * the account's balance, and the network fee is not refunded; * - its execution failed after its destination transaction was sent (flow * FAILED, reason ZIPPER_WITHDRAW_EXECUTION_FAILED): Zipper reviews it and * settles it outside Polyester Chain; nothing is returned to the account. * * @generated from enum value: STEP_FAILED = 5; */ STEP_FAILED = 5, /** * Nothing was paid for this asset in this run. * * @generated from enum value: STEP_SKIPPED = 6; */ STEP_SKIPPED = 6 } /** * Describes the enum chain.withdraw.v1.AutoWithdrawStepState. */ declare const AutoWithdrawStepStateSchema: GenEnum; /** * AutoWithdrawPreviewStatus is whether the next run would pay, judged from * the account's balances now. * * @generated from enum chain.withdraw.v1.AutoWithdrawPreviewStatus */ declare enum AutoWithdrawPreviewStatus { /** * Never returned. * * @generated from enum value: PREVIEW_STATUS_UNSPECIFIED = 0; */ PREVIEW_STATUS_UNSPECIFIED = 0, /** * At least one asset would pay. * * @generated from enum value: WILL_PAY = 1; */ WILL_PAY = 1, /** * Nothing would pay: every asset with a destination is below its minimum * or the rule's USD minimum, has no current price for that minimum, or * pays a broker vault's destination that is still cooling down. The * balance stays on the account for a later run. * * @generated from enum value: ROLLS_OVER = 2; */ ROLLS_OVER = 2, /** * Nothing would pay, and every positive balance is in an asset the rule * has no destination for. * * @generated from enum value: NO_DESTINATION = 3; */ NO_DESTINATION = 3, /** * The rule is paused, by a person or by itself (see pause); no run starts * until it is resumed. * * @generated from enum value: PAUSED = 4; */ PAUSED = 4, /** * The account has no rule. * * @generated from enum value: NO_RULE = 5; */ NO_RULE = 5 } /** * Describes the enum chain.withdraw.v1.AutoWithdrawPreviewStatus. */ declare const AutoWithdrawPreviewStatusSchema: GenEnum; /** * AutoWithdrawService manages scheduled in-kind auto-withdraw rules for a * root account or subaccount. A rule pays each asset's balance out on an * hourly, daily, weekly, biweekly or monthly UTC slot, through the normal * withdraw path, only to destinations on the account's external withdraw * whitelist. Changing or * resuming a rule requires a person with withdraw rights and a fresh * single-use MFA step-up, and pausing it requires such a person without a * step-up; API keys can read rules, runs and previews but never change * them. An API key reads only when its policy grants READ_AUTO_WITHDRAW (or * MANAGE_AUTO_WITHDRAW), and only its own account: a root-account key reads * the root account, and a subaccount key reads its subaccount. * * @generated from service chain.withdraw.v1.AutoWithdrawService */ declare const AutoWithdrawService: GenService<{ /** * Create the account's rule, or replace its latest version with a new * one. Requires a session login with withdraw rights on the account and * a fresh single-use step-up; every destination must be on the account's * external withdraw whitelist. * * A refused destination answers a typed code whose ErrorDetail.field_path * names the field, such as destinations[0].min_amount_e18: * EXTERNAL_DESTINATION_NOT_WHITELISTED, DESTINATION_INVALID (not a valid * address on its chain), ROUTE_UNSUPPORTED (no enabled withdrawal route * pays the asset to that chain) or MIN_AMOUNT_BELOW_FLOOR (its * ErrorDetail.min_floor_e18 is the floor). A stale expected_version * answers VERSION_CONFLICT. * * @generated from rpc chain.withdraw.v1.AutoWithdrawService.SetAutoWithdrawRule */ setAutoWithdrawRule: { methodKind: "unary"; input: typeof SetAutoWithdrawRuleRequestSchema; output: typeof SetAutoWithdrawRuleResponseSchema; }; /** * Pause or resume the account's rule, keeping its schedule and * destinations. Requires a session login with withdraw rights on the * account. Pausing needs no step-up. Resuming needs a fresh single-use * step-up, checks again that every destination is still a valid * destination on the account's external withdraw whitelist, and clears a * pause the rule set itself; a refused destination answers the typed codes * of SetAutoWithdrawRule, and the rule stays paused. A rule already in the * requested state is returned unchanged. A stale expected_version answers * VERSION_CONFLICT. * * @generated from rpc chain.withdraw.v1.AutoWithdrawService.SetAutoWithdrawRuleEnabled */ setAutoWithdrawRuleEnabled: { methodKind: "unary"; input: typeof SetAutoWithdrawRuleEnabledRequestSchema; output: typeof SetAutoWithdrawRuleEnabledResponseSchema; }; /** * Read the account's latest rule version. * * An API key needs READ_AUTO_WITHDRAW in its policy and reads only its own * account. Both refusals answer PERMISSION_DENIED: a key whose policy lacks * the action gets "api key policy does not allow READ_AUTO_WITHDRAW", and a * key that names an account other than its own, such as a root-account key * naming a subaccount, gets "api key target scope mismatch". * * @generated from rpc chain.withdraw.v1.AutoWithdrawService.GetAutoWithdrawRule */ getAutoWithdrawRule: { methodKind: "unary"; input: typeof GetAutoWithdrawRuleRequestSchema; output: typeof GetAutoWithdrawRuleResponseSchema; }; /** * List the account's auto-withdraw runs with their payouts, newest first. * * An API key needs READ_AUTO_WITHDRAW in its policy and reads only its own * account. Both refusals answer PERMISSION_DENIED: a key whose policy lacks * the action gets "api key policy does not allow READ_AUTO_WITHDRAW", and a * key that names an account other than its own, such as a root-account key * naming a subaccount, gets "api key target scope mismatch". * * @generated from rpc chain.withdraw.v1.AutoWithdrawService.ListAutoWithdrawRuns */ listAutoWithdrawRuns: { methodKind: "unary"; input: typeof ListAutoWithdrawRunsRequestSchema; output: typeof ListAutoWithdrawRunsResponseSchema; }; /** * Preview the account's next auto-withdraw run from its balances now: * when it starts, whether it would pay, and per asset what it would pay, * what would stay and why, its USD value and the expected network fee. It * plans exactly as the run does; balances, prices and fees can change * before the run starts. A price that is not current leaves the value * unset instead of failing the read. When prices cannot be read at all, * the values stay unset too, unless the rule has a USD minimum: prices * then decide what pays, so the read answers UNAVAILABLE and can be * retried. * * An API key needs READ_AUTO_WITHDRAW in its policy and reads only its own * account. Both refusals answer PERMISSION_DENIED: a key whose policy lacks * the action gets "api key policy does not allow READ_AUTO_WITHDRAW", and a * key that names an account other than its own, such as a root-account key * naming a subaccount, gets "api key target scope mismatch". * * @generated from rpc chain.withdraw.v1.AutoWithdrawService.PreviewAutoWithdrawRun */ previewAutoWithdrawRun: { methodKind: "unary"; input: typeof PreviewAutoWithdrawRunRequestSchema; output: typeof PreviewAutoWithdrawRunResponseSchema; }; }>; //#endregion export { AutoWithdrawCadence, AutoWithdrawCadenceSchema, AutoWithdrawDestination, AutoWithdrawDestinationSchema, AutoWithdrawPause, AutoWithdrawPauseSchema, AutoWithdrawPreviewAsset, AutoWithdrawPreviewAssetSchema, AutoWithdrawPreviewStatus, AutoWithdrawPreviewStatusSchema, AutoWithdrawRule, AutoWithdrawRuleSchema, AutoWithdrawRun, AutoWithdrawRunSchema, AutoWithdrawRunState, AutoWithdrawRunStateSchema, AutoWithdrawSchedule, AutoWithdrawScheduleSchema, AutoWithdrawService, AutoWithdrawStep, AutoWithdrawStepSchema, AutoWithdrawStepState, AutoWithdrawStepStateSchema, AutoWithdrawWeekday, AutoWithdrawWeekdaySchema, GetAutoWithdrawRuleRequest, GetAutoWithdrawRuleRequestSchema, GetAutoWithdrawRuleResponse, GetAutoWithdrawRuleResponseSchema, ListAutoWithdrawRunsRequest, ListAutoWithdrawRunsRequestSchema, ListAutoWithdrawRunsResponse, ListAutoWithdrawRunsResponseSchema, PreviewAutoWithdrawRunRequest, PreviewAutoWithdrawRunRequestSchema, PreviewAutoWithdrawRunResponse, PreviewAutoWithdrawRunResponseSchema, SetAutoWithdrawRuleEnabledRequest, SetAutoWithdrawRuleEnabledRequestSchema, SetAutoWithdrawRuleEnabledResponse, SetAutoWithdrawRuleEnabledResponseSchema, SetAutoWithdrawRuleRequest, SetAutoWithdrawRuleRequestSchema, SetAutoWithdrawRuleResponse, SetAutoWithdrawRuleResponseSchema, auto_withdraw_pb_d_exports, file_chain_withdraw_v1_auto_withdraw }; //# sourceMappingURL=auto_withdraw_pb.d.ts.map