import { AutoWithdrawCadence, AutoWithdrawWeekday } from "../../gen/chain/withdraw/v1/auto_withdraw_pb.js"; import { DecodedEnum } from "../../utils/types.js"; import { U128Value } from "../../utils/u128.js"; import { AutoWithdrawHoldReason, AutoWithdrawPauseReason, AutoWithdrawRunReason, AutoWithdrawStepReason, AutoWithdrawWeekday as AutoWithdrawWeekday$1 } from "./auto-withdraw.codecs.js"; import * as v from "valibot"; //#region src/services/auto-withdraw/auto-withdraw.schemas.d.ts declare const AccountScopedInputSchema: v.StrictObjectSchema<{ readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>; type AutoWithdrawScopedInput = v.InferInput; /** * A rule's UTC run slot. Each cadence takes only its own fields; any other field is rejected. * `minuteOfDay` is minutes after 00:00 UTC (0–1439), `minuteOfHour` 0–59, `dayOfMonth` 1–31 * (a shorter month runs on its last day), and `anchorDate` is a UTC date in a week a biweekly * rule runs. */ declare const AutoWithdrawScheduleInputSchema: v.SchemaWithPipe; readonly minuteOfHour: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"daily", undefined>; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"weekly", undefined>; readonly weekday: v.PicklistSchema; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"biweekly", undefined>; readonly weekday: v.PicklistSchema; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; readonly anchorDate: v.SchemaWithPipe, v.TrimAction, v.IsoDateAction, v.CheckAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"monthly", undefined>; readonly dayOfMonth: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>], undefined>, v.TransformAction<{ cadence: "hourly"; minuteOfHour: number; } | { cadence: "daily"; minuteOfDay: number; } | { cadence: "weekly"; weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; minuteOfDay: number; } | { cadence: "biweekly"; weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; minuteOfDay: number; anchorDate: string; } | { cadence: "monthly"; dayOfMonth: number; minuteOfDay: number; }, { cadence: AutoWithdrawCadence.DAILY | AutoWithdrawCadence.WEEKLY | AutoWithdrawCadence.HOURLY | AutoWithdrawCadence.BIWEEKLY | AutoWithdrawCadence.MONTHLY; weekday: AutoWithdrawWeekday.MONDAY | AutoWithdrawWeekday.TUESDAY | AutoWithdrawWeekday.WEDNESDAY | AutoWithdrawWeekday.THURSDAY | AutoWithdrawWeekday.FRIDAY | AutoWithdrawWeekday.SATURDAY | AutoWithdrawWeekday.SUNDAY | undefined; minuteOfDay: number | undefined; minuteOfHour: number | undefined; dayOfMonth: number | undefined; anchorDate: string | undefined; }>]>; type AutoWithdrawScheduleInput = v.InferInput; /** * One asset paid in kind to one whitelisted external-chain address. `minAmount` and * `maxAmount` are decimal asset amounts (up to 18 decimals); a run pays the balance up to * `maxAmount` once it reaches `minAmount`. */ declare const AutoWithdrawDestinationInputSchema: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly destinationChainId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly destinationAddress: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly minAmount: v.StringSchema; readonly maxAmount: v.StringSchema; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: number; destinationAddress: string; minAmount: string; maxAmount: string; }, { destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }>]>; type AutoWithdrawDestinationInput = v.InferInput; declare const SetAutoWithdrawRuleInputSchema: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; readonly schedule: v.SchemaWithPipe; readonly minuteOfHour: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"daily", undefined>; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"weekly", undefined>; readonly weekday: v.PicklistSchema; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"biweekly", undefined>; readonly weekday: v.PicklistSchema; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; readonly anchorDate: v.SchemaWithPipe, v.TrimAction, v.IsoDateAction, v.CheckAction]>; }, undefined>, v.StrictObjectSchema<{ readonly cadence: v.LiteralSchema<"monthly", undefined>; readonly dayOfMonth: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; readonly minuteOfDay: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; }, undefined>], undefined>, v.TransformAction<{ cadence: "hourly"; minuteOfHour: number; } | { cadence: "daily"; minuteOfDay: number; } | { cadence: "weekly"; weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; minuteOfDay: number; } | { cadence: "biweekly"; weekday: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"; minuteOfDay: number; anchorDate: string; } | { cadence: "monthly"; dayOfMonth: number; minuteOfDay: number; }, { cadence: AutoWithdrawCadence.DAILY | AutoWithdrawCadence.WEEKLY | AutoWithdrawCadence.HOURLY | AutoWithdrawCadence.BIWEEKLY | AutoWithdrawCadence.MONTHLY; weekday: AutoWithdrawWeekday.MONDAY | AutoWithdrawWeekday.TUESDAY | AutoWithdrawWeekday.WEDNESDAY | AutoWithdrawWeekday.THURSDAY | AutoWithdrawWeekday.FRIDAY | AutoWithdrawWeekday.SATURDAY | AutoWithdrawWeekday.SUNDAY | undefined; minuteOfDay: number | undefined; minuteOfHour: number | undefined; dayOfMonth: number | undefined; anchorDate: string | undefined; }>]>; readonly destinations: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly destinationChainId: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly destinationAddress: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly minAmount: v.StringSchema; readonly maxAmount: v.StringSchema; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: number; destinationAddress: string; minAmount: string; maxAmount: string; }, { destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }>]>, undefined>, v.MinLengthAction<{ destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }[], 1, "At least one destination is required.">, v.MaxLengthAction<{ destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }[], 32, "At most 32 destinations are allowed.">, v.CheckAction<{ destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }[], "At most one destination per asset is allowed.">]>; /** Least USD value one payout pays, as a decimal; omit or null for no USD minimum. */ readonly minUsdValue: v.OptionalSchema, undefined>, undefined>; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.TransformAction<{ expectedVersion: number; schedule: { cadence: AutoWithdrawCadence.DAILY | AutoWithdrawCadence.WEEKLY | AutoWithdrawCadence.HOURLY | AutoWithdrawCadence.BIWEEKLY | AutoWithdrawCadence.MONTHLY; weekday: AutoWithdrawWeekday.MONDAY | AutoWithdrawWeekday.TUESDAY | AutoWithdrawWeekday.WEDNESDAY | AutoWithdrawWeekday.THURSDAY | AutoWithdrawWeekday.FRIDAY | AutoWithdrawWeekday.SATURDAY | AutoWithdrawWeekday.SUNDAY | undefined; minuteOfDay: number | undefined; minuteOfHour: number | undefined; dayOfMonth: number | undefined; anchorDate: string | undefined; }; destinations: { destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }[]; minUsdValue?: string | null | undefined; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; minUsdValueE18: U128Value | undefined; expectedVersion: number; schedule: { cadence: AutoWithdrawCadence.DAILY | AutoWithdrawCadence.WEEKLY | AutoWithdrawCadence.HOURLY | AutoWithdrawCadence.BIWEEKLY | AutoWithdrawCadence.MONTHLY; weekday: AutoWithdrawWeekday.MONDAY | AutoWithdrawWeekday.TUESDAY | AutoWithdrawWeekday.WEDNESDAY | AutoWithdrawWeekday.THURSDAY | AutoWithdrawWeekday.FRIDAY | AutoWithdrawWeekday.SATURDAY | AutoWithdrawWeekday.SUNDAY | undefined; minuteOfDay: number | undefined; minuteOfHour: number | undefined; dayOfMonth: number | undefined; anchorDate: string | undefined; }; destinations: { destinationChainId: bigint; minAmountE18: U128Value; maxAmountE18: U128Value; assetId: number; destinationAddress: string; }[]; }>]>; type SetAutoWithdrawRuleInput = v.InferInput; declare const SetAutoWithdrawRuleEnabledInputSchema: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>; /** `false` pauses the rule; `true` resumes it. */ readonly enabled: v.BooleanSchema; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.TransformAction<{ expectedVersion: number; enabled: boolean; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; expectedVersion: number; enabled: boolean; }>]>; type SetAutoWithdrawRuleEnabledInput = v.InferInput; /** `limit` is 0 through 100; 0 or omitted uses the server default of 20. */ declare const ListAutoWithdrawRunsInputSchema: v.SchemaWithPipe, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, 0>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, "">; readonly account: v.OptionalSchema, v.StrictObjectSchema<{ readonly subaccountId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; }, undefined>], undefined>, undefined>; }, undefined>, v.TransformAction<{ limit: number; pageToken: string; account?: "active" | "main" | { subaccountId: string; } | undefined; }, { subaccountId: bigint | undefined; limit: number; pageToken: string; }>]>; type ListAutoWithdrawRunsInput = v.InferInput; type ScheduleShape = { cadence: "hourly"; minuteOfHour: number; } | { cadence: "daily"; minuteOfDay: number; } | { cadence: "weekly"; weekday: Weekday; minuteOfDay: number; } | { cadence: "biweekly"; weekday: Weekday; minuteOfDay: number; anchorDate: string; } | { cadence: "monthly"; dayOfMonth: number; minuteOfDay: number; }; /** A decoded schedule. A cadence this SDK build does not know decodes as `"unspecified"`. */ type AutoWithdrawSchedule = ScheduleShape> | { cadence: "unspecified"; }; declare const AutoWithdrawDestinationSchema: v.SchemaWithPipe; readonly destinationChainId: v.BigintSchema; readonly destinationAddress: v.StringSchema; readonly minAmountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly maxAmountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly minFloorE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; minAmountE18?: { hi: bigint; lo: bigint; } | undefined; maxAmountE18?: { hi: bigint; lo: bigint; } | undefined; minFloorE18?: { hi: bigint; lo: bigint; } | undefined; }, { destinationChainId: number; minAmount: string; maxAmount: string; minFloor: string | null; assetId: number; destinationAddress: string; }>]>; /** * `minFloor` is the least one payout to the destination can pay now (the route's withdrawal * minimum, above its current network fee); a new rule's `minAmount` must be at least this * floor. It follows the network fee, and is null when the route or fee is unknown: show no * floor then, not zero. */ type AutoWithdrawDestination = v.InferOutput; declare const AutoWithdrawPauseSchema: v.ObjectSchema<{ readonly assetId: v.NumberSchema; readonly reason: v.SchemaWithPipe, v.TransformAction]>; readonly pausedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; }, undefined>; type AutoWithdrawPause = v.InferOutput; declare const AutoWithdrawRuleSchema: v.SchemaWithPipe, v.TransformAction]>, 0n>; readonly version: v.NumberSchema; readonly enabled: v.BooleanSchema; readonly schedule: v.OptionalSchema, 0>; readonly weekday: v.OptionalSchema, 0>; readonly minuteOfDay: v.OptionalSchema, 0>; readonly minuteOfHour: v.OptionalSchema, 0>; readonly dayOfMonth: v.OptionalSchema, 0>; readonly anchorDate: v.OptionalSchema, "">; }, undefined>, v.TransformAction<{ cadence: number; weekday: number; minuteOfDay: number; minuteOfHour: number; dayOfMonth: number; anchorDate: string; }, AutoWithdrawSchedule>]>, undefined>; readonly destinations: v.ArraySchema; readonly destinationChainId: v.BigintSchema; readonly destinationAddress: v.StringSchema; readonly minAmountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly maxAmountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly minFloorE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; minAmountE18?: { hi: bigint; lo: bigint; } | undefined; maxAmountE18?: { hi: bigint; lo: bigint; } | undefined; minFloorE18?: { hi: bigint; lo: bigint; } | undefined; }, { destinationChainId: number; minAmount: string; maxAmount: string; minFloor: string | null; assetId: number; destinationAddress: string; }>]>, undefined>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly pause: v.OptionalSchema; readonly reason: v.SchemaWithPipe, v.TransformAction]>; readonly pausedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; }, undefined>, undefined>; readonly minUsdValueE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly createdByAccountId: v.OptionalSchema, v.TransformAction]>, 0n>; }, undefined>, v.TransformAction<{ subaccountId: string; version: number; enabled: boolean; schedule?: AutoWithdrawSchedule | undefined; destinations: { destinationChainId: number; minAmount: string; maxAmount: string; minFloor: string | null; assetId: number; destinationAddress: string; }[]; createdAt: number; pause?: { assetId: number; reason: AutoWithdrawPauseReason; pausedAt: number; } | undefined; minUsdValueE18?: { hi: bigint; lo: bigint; } | undefined; createdByAccountId: string; }, { schedule: AutoWithdrawSchedule; pause: { assetId: number; reason: AutoWithdrawPauseReason; pausedAt: number; } | null; minUsdValue: string | null; subaccountId: string; version: number; enabled: boolean; destinations: { destinationChainId: number; minAmount: string; maxAmount: string; minFloor: string | null; assetId: number; destinationAddress: string; }[]; createdAt: number; createdByAccountId: string; }>]>; /** * One version of an account's rule. `subaccountId` is the public subaccount ID, `""` for the * root account; `createdByAccountId` is the public account ID of whoever created the version. * Times are epoch milliseconds. `minUsdValue` is null when the rule has no USD minimum. A paused * version (`enabled: false`) keeps its schedule and destinations. `pause` is set when the rule * paused itself; resuming it or setting a new rule clears it. The rule runs only while * `enabled` is true and `pause` is null. */ type AutoWithdrawRule = v.InferOutput; declare const AutoWithdrawStepSchema: v.SchemaWithPipe; readonly destinationChainId: v.BigintSchema; readonly destinationAddress: v.StringSchema; readonly availableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly amountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly valueUsdE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly networkFeeE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly state: v.SchemaWithPipe, v.TransformAction]>; readonly reason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly intentId: v.OptionalSchema, "">; readonly txHash: v.OptionalSchema, "">; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; availableE18?: { hi: bigint; lo: bigint; } | undefined; amountE18?: { hi: bigint; lo: bigint; } | undefined; valueUsdE18?: { hi: bigint; lo: bigint; } | undefined; networkFeeE18?: { hi: bigint; lo: bigint; } | undefined; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; intentId: string; txHash: string; }, { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }>]>; /** * One asset's payout in a run. `available`, `amount` and `valueUsd` are decimal strings; * `valueUsd` is null when the rule has no USD minimum or no price was available. `networkFee` * is the fee charged on the withdrawal: once completed it was taken out of `amount`; once * rejected or failed it is the fee kept, not refunded. It is null until the step is final, when * the step never reached the withdrawal, or when the fee was not reported. */ type AutoWithdrawStep = v.InferOutput; declare const AutoWithdrawRunSchema: v.SchemaWithPipe, v.TransformAction]>; readonly ruleVersion: v.NumberSchema; readonly scheduledFor: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly state: v.SchemaWithPipe, v.TransformAction]>; readonly reason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly steps: v.ArraySchema; readonly destinationChainId: v.BigintSchema; readonly destinationAddress: v.StringSchema; readonly availableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly amountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly valueUsdE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly networkFeeE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly state: v.SchemaWithPipe, v.TransformAction]>; readonly reason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly intentId: v.OptionalSchema, "">; readonly txHash: v.OptionalSchema, "">; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; availableE18?: { hi: bigint; lo: bigint; } | undefined; amountE18?: { hi: bigint; lo: bigint; } | undefined; valueUsdE18?: { hi: bigint; lo: bigint; } | undefined; networkFeeE18?: { hi: bigint; lo: bigint; } | undefined; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; intentId: string; txHash: string; }, { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }>]>, undefined>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly finishedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; }, undefined>, v.TransformAction<{ runSeq: string; ruleVersion: number; scheduledFor: number; state: "unspecified" | "failed" | "completed" | "planned" | "paying" | "partially_failed" | "skipped"; reason: AutoWithdrawRunReason | null; steps: { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }[]; createdAt: number; finishedAt?: number | undefined; }, { finishedAt: number | null; runSeq: string; ruleVersion: number; scheduledFor: number; state: "unspecified" | "failed" | "completed" | "planned" | "paying" | "partially_failed" | "skipped"; reason: AutoWithdrawRunReason | null; steps: { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }[]; createdAt: number; }>]>; /** One scheduled run. Times are epoch milliseconds; `finishedAt` is null while in progress. */ type AutoWithdrawRun = v.InferOutput; declare const ListAutoWithdrawRunsResultSchema: v.ObjectSchema<{ readonly runs: v.ArraySchema, v.TransformAction]>; readonly ruleVersion: v.NumberSchema; readonly scheduledFor: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly state: v.SchemaWithPipe, v.TransformAction]>; readonly reason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly steps: v.ArraySchema; readonly destinationChainId: v.BigintSchema; readonly destinationAddress: v.StringSchema; readonly availableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly amountE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly valueUsdE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly networkFeeE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly state: v.SchemaWithPipe, v.TransformAction]>; readonly reason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly intentId: v.OptionalSchema, "">; readonly txHash: v.OptionalSchema, "">; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; availableE18?: { hi: bigint; lo: bigint; } | undefined; amountE18?: { hi: bigint; lo: bigint; } | undefined; valueUsdE18?: { hi: bigint; lo: bigint; } | undefined; networkFeeE18?: { hi: bigint; lo: bigint; } | undefined; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; intentId: string; txHash: string; }, { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }>]>, undefined>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly finishedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; }, undefined>, v.TransformAction<{ runSeq: string; ruleVersion: number; scheduledFor: number; state: "unspecified" | "failed" | "completed" | "planned" | "paying" | "partially_failed" | "skipped"; reason: AutoWithdrawRunReason | null; steps: { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }[]; createdAt: number; finishedAt?: number | undefined; }, { finishedAt: number | null; runSeq: string; ruleVersion: number; scheduledFor: number; state: "unspecified" | "failed" | "completed" | "planned" | "paying" | "partially_failed" | "skipped"; reason: AutoWithdrawRunReason | null; steps: { destinationChainId: number; available: string; amount: string; valueUsd: string | null; networkFee: string | null; intentId: string | null; txHash: string | null; assetId: number; destinationAddress: string; state: "unspecified" | "failed" | "completed" | "pending" | "skipped" | "submitting" | "submitted"; reason: AutoWithdrawStepReason | null; }[]; createdAt: number; }>]>, undefined>; readonly nextPageToken: v.OptionalSchema, "">; }, undefined>; /** One page of runs, newest first. An empty `nextPageToken` means no more runs. */ type ListAutoWithdrawRunsResult = v.InferOutput; declare const AutoWithdrawPreviewAssetSchema: v.SchemaWithPipe; readonly destinationChainId: v.OptionalSchema, 0n>; readonly destinationAddress: v.OptionalSchema, "">; readonly availableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly payableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly heldBackE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly holdReason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly minimumE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly valueUsdE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly pricedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly networkFeeE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly networkFeeSampledAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly payableFrom: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; availableE18?: { hi: bigint; lo: bigint; } | undefined; payableE18?: { hi: bigint; lo: bigint; } | undefined; heldBackE18?: { hi: bigint; lo: bigint; } | undefined; holdReason: AutoWithdrawHoldReason | null; minimumE18?: { hi: bigint; lo: bigint; } | undefined; valueUsdE18?: { hi: bigint; lo: bigint; } | undefined; pricedAt?: number | undefined; networkFeeE18?: { hi: bigint; lo: bigint; } | undefined; networkFeeSampledAt?: number | undefined; payableFrom?: number | undefined; }, { assetId: number; destinationChainId: number | null; destinationAddress: string | null; available: string; payable: string; heldBack: string; holdReason: AutoWithdrawHoldReason | null; minimum: string | null; valueUsd: string | null; pricedAt: number | null; networkFee: string | null; networkFeeSampledAt: number | null; payableFrom: number | null; }>]>; /** * What the next run would do with one asset, sized from the balance now. Amounts are decimal * strings; `heldBack` is `available` minus `payable`, and `holdReason` says why it stays (null * when the whole balance pays). `destinationChainId` and `destinationAddress` are null for an * asset the rule pays nowhere. `minimum`, `valueUsd`, `networkFee` and their times are null * when unknown, never zero. `payableFrom` is set only while a broker vault's destination cools * down. Times are epoch milliseconds. */ type AutoWithdrawPreviewAsset = v.InferOutput; declare const AutoWithdrawPreviewSchema: v.SchemaWithPipe, v.TransformAction]>; readonly nextRunAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly ruleVersion: v.OptionalSchema, 0>; readonly pause: v.OptionalSchema; readonly reason: v.SchemaWithPipe, v.TransformAction]>; readonly pausedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; }, undefined>, undefined>; readonly minUsdValueE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly assets: v.ArraySchema; readonly destinationChainId: v.OptionalSchema, 0n>; readonly destinationAddress: v.OptionalSchema, "">; readonly availableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly payableE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly heldBackE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly holdReason: v.SchemaWithPipe, "">, v.TransformAction]>; readonly minimumE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly valueUsdE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly pricedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly networkFeeE18: v.OptionalSchema; readonly lo: v.BigintSchema; }, undefined>, undefined>; readonly networkFeeSampledAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly payableFrom: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; }, undefined>, v.TransformAction<{ assetId: number; destinationChainId: bigint; destinationAddress: string; availableE18?: { hi: bigint; lo: bigint; } | undefined; payableE18?: { hi: bigint; lo: bigint; } | undefined; heldBackE18?: { hi: bigint; lo: bigint; } | undefined; holdReason: AutoWithdrawHoldReason | null; minimumE18?: { hi: bigint; lo: bigint; } | undefined; valueUsdE18?: { hi: bigint; lo: bigint; } | undefined; pricedAt?: number | undefined; networkFeeE18?: { hi: bigint; lo: bigint; } | undefined; networkFeeSampledAt?: number | undefined; payableFrom?: number | undefined; }, { assetId: number; destinationChainId: number | null; destinationAddress: string | null; available: string; payable: string; heldBack: string; holdReason: AutoWithdrawHoldReason | null; minimum: string | null; valueUsd: string | null; pricedAt: number | null; networkFee: string | null; networkFeeSampledAt: number | null; payableFrom: number | null; }>]>, undefined>; readonly computedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; }, undefined>, v.TransformAction<{ status: "unspecified" | "paused" | "will_pay" | "rolls_over" | "no_destination" | "no_rule"; nextRunAt?: number | undefined; ruleVersion: number; pause?: { assetId: number; reason: AutoWithdrawPauseReason; pausedAt: number; } | undefined; minUsdValueE18?: { hi: bigint; lo: bigint; } | undefined; assets: { assetId: number; destinationChainId: number | null; destinationAddress: string | null; available: string; payable: string; heldBack: string; holdReason: AutoWithdrawHoldReason | null; minimum: string | null; valueUsd: string | null; pricedAt: number | null; networkFee: string | null; networkFeeSampledAt: number | null; payableFrom: number | null; }[]; computedAt: number; }, { nextRunAt: number | null; pause: { assetId: number; reason: AutoWithdrawPauseReason; pausedAt: number; } | null; minUsdValue: string | null; status: "unspecified" | "paused" | "will_pay" | "rolls_over" | "no_destination" | "no_rule"; ruleVersion: number; assets: { assetId: number; destinationChainId: number | null; destinationAddress: string | null; available: string; payable: string; heldBack: string; holdReason: AutoWithdrawHoldReason | null; minimum: string | null; valueUsd: string | null; pricedAt: number | null; networkFee: string | null; networkFeeSampledAt: number | null; payableFrom: number | null; }[]; computedAt: number; }>]>; /** * The account's next run as it would go now; balances, prices and fees can change before * `nextRunAt`. `nextRunAt` is null without a rule or while it is paused; `ruleVersion` is 0 * without a rule. `pause` is set only when the rule paused itself. `minUsdValue` is null when * there is no USD minimum. Times are epoch milliseconds. */ type AutoWithdrawPreview = v.InferOutput; //#endregion export { AutoWithdrawDestination, AutoWithdrawDestinationInput, AutoWithdrawPause, AutoWithdrawPreview, AutoWithdrawPreviewAsset, AutoWithdrawPreviewSchema, AutoWithdrawRule, AutoWithdrawRuleSchema, AutoWithdrawRun, AutoWithdrawSchedule, AutoWithdrawScheduleInput, AutoWithdrawScheduleInputSchema, AutoWithdrawScopedInput, AutoWithdrawStep, ListAutoWithdrawRunsInput, ListAutoWithdrawRunsInputSchema, ListAutoWithdrawRunsResult, ListAutoWithdrawRunsResultSchema, SetAutoWithdrawRuleEnabledInput, SetAutoWithdrawRuleEnabledInputSchema, SetAutoWithdrawRuleInput, SetAutoWithdrawRuleInputSchema }; //# sourceMappingURL=auto-withdraw.schemas.d.ts.map