@polyester/sdk 0.26.0 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @polyester/sdk
2
2
 
3
+ ## 0.26.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix UserOperations accepted then rejected by the bundler by using per-operation paymaster stubs and `pm_getPaymasterData`. ([#160](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/160))
8
+
9
+ - Restore paymaster gas estimate buffering (+20%, 50k floor), while preserving stub-provided limits during preparation. ([#160](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/160))
10
+
3
11
  ## 0.26.0
4
12
 
5
13
  ### Minor Changes
@@ -11,7 +11,7 @@ type TimestampInit = {
11
11
  };
12
12
  declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
13
13
  readonly symbolId: v.NumberSchema<undefined>;
14
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
14
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
15
15
  readonly tsSec: v.BigintSchema<undefined>;
16
16
  readonly open: v.BigintSchema<undefined>;
17
17
  readonly high: v.BigintSchema<undefined>;
@@ -22,7 +22,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
22
22
  readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
23
23
  }, undefined>, v.TransformAction<{
24
24
  symbolId: number;
25
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
25
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
26
26
  tsSec: bigint;
27
27
  open: bigint;
28
28
  high: bigint;
@@ -33,7 +33,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
33
33
  isClosed: boolean;
34
34
  }, {
35
35
  symbolId: number;
36
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
36
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
37
37
  time: number;
38
38
  open: string;
39
39
  high: string;
@@ -46,7 +46,7 @@ declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<read
46
46
  declare const createCandleRowIntSchema: typeof createCandleRowSchema;
47
47
  declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
48
48
  readonly symbolId: v.NumberSchema<undefined>;
49
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
49
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
50
50
  readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
51
51
  readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
52
52
  readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
@@ -63,7 +63,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
63
63
  readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
64
64
  }, undefined>, v.TransformAction<{
65
65
  symbolId: number;
66
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
66
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
67
67
  tsSec: bigint[];
68
68
  open: bigint[];
69
69
  high: bigint[];
@@ -80,7 +80,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
80
80
  nextPageToken: string;
81
81
  }, {
82
82
  symbolId: number;
83
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
83
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
84
84
  time: number[];
85
85
  open: string[];
86
86
  high: string[];
@@ -100,7 +100,7 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
100
100
  }>]>;
101
101
  declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
102
102
  readonly symbolId: v.NumberSchema<undefined>;
103
- readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">>]>;
103
+ readonly timeframe: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
104
104
  readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
105
105
  readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
106
106
  readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
@@ -117,7 +117,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
117
117
  readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
118
118
  }, undefined>, v.TransformAction<{
119
119
  symbolId: number;
120
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
120
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
121
121
  tsSec: bigint[];
122
122
  open: bigint[];
123
123
  high: bigint[];
@@ -134,7 +134,7 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
134
134
  nextPageToken: string;
135
135
  }, {
136
136
  symbolId: number;
137
- timeframe: DecodedEnum<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo">;
137
+ timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
138
138
  tsSec: number[];
139
139
  open: string[];
140
140
  high: string[];
@@ -158,7 +158,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
158
158
  type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
159
159
  declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
160
160
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
161
- readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1h" | "1w" | "1m" | "1s" | "5m" | "15m" | "30m" | "4h" | "12h" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
161
+ readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
162
162
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 10000, undefined>]>, undefined>;
163
163
  readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
164
164
  readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
@@ -13,8 +13,8 @@ type TimestampInit = {
13
13
  };
14
14
  declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
15
15
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
16
- readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1h" | "1m" | "1s" | "5m", HeatmapInterval>]>;
17
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50, HeatmapDepth>]>;
16
+ readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
17
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50, HeatmapDepth>]>;
18
18
  readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
19
19
  readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
20
20
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
@@ -122,7 +122,7 @@ declare function convertHeatmapDeltaBucket(bucket: OrderbookHeatmapDeltaBucketRa
122
122
  type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;
123
123
  declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
124
124
  readonly symbolId: v.NumberSchema<undefined>;
125
- readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
125
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
126
126
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
127
127
  readonly isFinal: v.BooleanSchema<undefined>;
128
128
  readonly bids: v.OptionalSchema<v.ObjectSchema<{
@@ -142,7 +142,7 @@ declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
142
142
  type OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;
143
143
  declare function convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales): {
144
144
  symbolId: number;
145
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
145
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
146
146
  tsSec: number;
147
147
  isFinal: boolean;
148
148
  bids: {
@@ -226,8 +226,8 @@ declare function convertHeatmapDeltaChain(chain: OrderbookHeatmapDeltaChainRaw,
226
226
  type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
227
227
  declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
228
228
  readonly symbolId: v.NumberSchema<undefined>;
229
- readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
230
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50>]>;
229
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
230
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50>]>;
231
231
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
232
232
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
233
233
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -267,7 +267,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
267
267
  readonly quantityMode: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"close" | "peak">>]>;
268
268
  readonly liveBucket: v.OptionalSchema<v.ObjectSchema<{
269
269
  readonly symbolId: v.NumberSchema<undefined>;
270
- readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
270
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
271
271
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
272
272
  readonly isFinal: v.BooleanSchema<undefined>;
273
273
  readonly bids: v.OptionalSchema<v.ObjectSchema<{
@@ -286,8 +286,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
286
286
  }, undefined>, undefined>;
287
287
  }, undefined>, v.TransformAction<{
288
288
  symbolId: number;
289
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
290
- depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50;
289
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
290
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50;
291
291
  chain?: {
292
292
  baseKeyframe?: {
293
293
  tsSec: number;
@@ -327,7 +327,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
327
327
  quantityMode: DecodedEnum<"close" | "peak">;
328
328
  liveBucket?: {
329
329
  symbolId: number;
330
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
330
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
331
331
  tsSec: number;
332
332
  isFinal: boolean;
333
333
  bids?: {
@@ -346,8 +346,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
346
346
  } | undefined;
347
347
  }, {
348
348
  symbolId: number;
349
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
350
- depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50;
349
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
350
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50;
351
351
  chain: {
352
352
  baseKeyframe: {
353
353
  tsSec: number;
@@ -387,7 +387,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
387
387
  quantityMode: DecodedEnum<"close" | "peak">;
388
388
  liveBucket: {
389
389
  symbolId: number;
390
- interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
390
+ interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
391
391
  tsSec: number;
392
392
  isFinal: boolean;
393
393
  bids: {
@@ -7,7 +7,7 @@ declare const LifecycleAssetIdsSchema: v.ObjectSchema<{
7
7
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
8
8
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9
9
  }, undefined>;
10
- declare const LifecycleFlowStateEnumSchema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "failed" | "dropped" | "refunded">]>;
10
+ declare const LifecycleFlowStateEnumSchema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "dropped" | "refunded">]>;
11
11
  declare const LifecycleZipperReasonSchema: v.ObjectSchema<{
12
12
  readonly code: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
13
13
  readonly reasonId: v.StringSchema<undefined>;
@@ -17,7 +17,7 @@ declare const ListLifecycleFlowsInputSchema: v.SchemaWithPipe<readonly [v.Strict
17
17
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 500, undefined>]>, 100>;
18
18
  readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["newest", "oldest"], undefined>, "newest">, v.TransformAction<"newest" | "oldest", Sort.NEWEST | Sort.OLDEST>]>;
19
19
  readonly flowKind: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["deposit", "withdraw", "transfer"], undefined>, undefined>, v.TransformAction<"deposit" | "withdraw" | "transfer" | undefined, FlowKind>]>;
20
- readonly flowState: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["pending_source", "pending_polyester_chain", "pending_ledger", "completed", "failed", "dropped", "refunded"], undefined>, undefined>, v.TransformAction<"pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "failed" | "dropped" | "refunded" | undefined, FlowState>]>;
20
+ readonly flowState: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["pending_source", "pending_polyester_chain", "pending_ledger", "completed", "failed", "dropped", "refunded"], undefined>, undefined>, v.TransformAction<"failed" | "pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "dropped" | "refunded" | undefined, FlowState>]>;
21
21
  readonly txRef: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "txHash is required.">, v.CheckAction<string, "txHash must be a valid EVM hash or chain-native transaction id.">, v.TransformAction<string, string>]>, undefined>;
22
22
  readonly scope: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["all", "open", "terminal"], undefined>, "all">, v.TransformAction<"open" | "all" | "terminal", ListScope.LIST_ALL | ListScope.LIST_OPEN_ONLY | ListScope.LIST_TERMINAL_ONLY>]>;
23
23
  readonly accountSelector: v.OptionalSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"kind", [v.StrictObjectSchema<{
@@ -209,7 +209,7 @@ declare const LifecycleFlowStepActivitySchema: v.SchemaWithPipe<readonly [v.Obje
209
209
  }>]>;
210
210
  declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
211
211
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
212
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
212
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
213
213
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
214
214
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
215
215
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -346,7 +346,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
346
346
  }>]>, undefined>, readonly []>;
347
347
  }, undefined>, v.TransformAction<{
348
348
  sequence: number;
349
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
349
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
350
350
  assetIds?: {
351
351
  zippedAssetId: number;
352
352
  unifiedAssetId: number;
@@ -407,7 +407,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
407
407
  })[];
408
408
  }, Omit<{
409
409
  sequence: number;
410
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
410
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
411
411
  assetIds?: {
412
412
  zippedAssetId: number;
413
413
  unifiedAssetId: number;
@@ -471,7 +471,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
471
471
  }>]>;
472
472
  declare const LifecycleFlowTimelineItemSchema: v.ObjectSchema<{
473
473
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
474
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
474
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
475
475
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "current" | "planned">]>;
476
476
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
477
477
  }, undefined>;
@@ -491,7 +491,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
491
491
  readonly smartAccountAddress: v.StringSchema<undefined>;
492
492
  readonly flowId: v.StringSchema<undefined>;
493
493
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
494
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
494
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
495
495
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
496
496
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
497
497
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -571,7 +571,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
571
571
  }, undefined>, undefined>;
572
572
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
573
573
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
574
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
574
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
575
575
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "current" | "planned">]>;
576
576
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
577
577
  }, undefined>, undefined>, readonly []>;
@@ -581,7 +581,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
581
581
  smartAccountAddress: string;
582
582
  flowId: string;
583
583
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
584
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
584
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
585
585
  assetIds?: {
586
586
  zippedAssetId: number;
587
587
  unifiedAssetId: number;
@@ -633,7 +633,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
633
633
  } | undefined;
634
634
  progressTimeline: {
635
635
  sequence: number;
636
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
636
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
637
637
  status: "unspecified" | "completed" | "current" | "planned";
638
638
  expectedDurationMs: number;
639
639
  }[];
@@ -643,7 +643,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
643
643
  smartAccountAddress: string;
644
644
  flowId: string;
645
645
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
646
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
646
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
647
647
  assetIds?: {
648
648
  zippedAssetId: number;
649
649
  unifiedAssetId: number;
@@ -695,7 +695,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
695
695
  } | undefined;
696
696
  progressTimeline: {
697
697
  sequence: number;
698
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
698
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
699
699
  status: "unspecified" | "completed" | "current" | "planned";
700
700
  expectedDurationMs: number;
701
701
  }[];
@@ -709,7 +709,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
709
709
  readonly smartAccountAddress: v.StringSchema<undefined>;
710
710
  readonly flowId: v.StringSchema<undefined>;
711
711
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
712
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
712
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
713
713
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
714
714
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
715
715
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -789,7 +789,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
789
789
  }, undefined>, undefined>;
790
790
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
791
791
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
792
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
792
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
793
793
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "current" | "planned">]>;
794
794
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
795
795
  }, undefined>, undefined>, readonly []>;
@@ -799,7 +799,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
799
799
  smartAccountAddress: string;
800
800
  flowId: string;
801
801
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
802
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
802
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
803
803
  assetIds?: {
804
804
  zippedAssetId: number;
805
805
  unifiedAssetId: number;
@@ -851,7 +851,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
851
851
  } | undefined;
852
852
  progressTimeline: {
853
853
  sequence: number;
854
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
854
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
855
855
  status: "unspecified" | "completed" | "current" | "planned";
856
856
  expectedDurationMs: number;
857
857
  }[];
@@ -861,7 +861,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
861
861
  smartAccountAddress: string;
862
862
  flowId: string;
863
863
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
864
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
864
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
865
865
  assetIds?: {
866
866
  zippedAssetId: number;
867
867
  unifiedAssetId: number;
@@ -913,7 +913,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
913
913
  } | undefined;
914
914
  progressTimeline: {
915
915
  sequence: number;
916
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
916
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
917
917
  status: "unspecified" | "completed" | "current" | "planned";
918
918
  expectedDurationMs: number;
919
919
  }[];
@@ -923,7 +923,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
923
923
  }>]>, undefined>;
924
924
  readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
925
925
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
926
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
926
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
927
927
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
928
928
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
929
929
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1060,7 +1060,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
1060
1060
  }>]>, undefined>, readonly []>;
1061
1061
  }, undefined>, v.TransformAction<{
1062
1062
  sequence: number;
1063
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1063
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1064
1064
  assetIds?: {
1065
1065
  zippedAssetId: number;
1066
1066
  unifiedAssetId: number;
@@ -1121,7 +1121,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
1121
1121
  })[];
1122
1122
  }, Omit<{
1123
1123
  sequence: number;
1124
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1124
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1125
1125
  assetIds?: {
1126
1126
  zippedAssetId: number;
1127
1127
  unifiedAssetId: number;
@@ -1191,7 +1191,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1191
1191
  readonly smartAccountAddress: v.StringSchema<undefined>;
1192
1192
  readonly flowId: v.StringSchema<undefined>;
1193
1193
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
1194
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1194
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1195
1195
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1196
1196
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1197
1197
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1271,7 +1271,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1271
1271
  }, undefined>, undefined>;
1272
1272
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1273
1273
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1274
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1274
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1275
1275
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "current" | "planned">]>;
1276
1276
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
1277
1277
  }, undefined>, undefined>, readonly []>;
@@ -1281,7 +1281,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1281
1281
  smartAccountAddress: string;
1282
1282
  flowId: string;
1283
1283
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1284
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1284
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1285
1285
  assetIds?: {
1286
1286
  zippedAssetId: number;
1287
1287
  unifiedAssetId: number;
@@ -1333,7 +1333,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1333
1333
  } | undefined;
1334
1334
  progressTimeline: {
1335
1335
  sequence: number;
1336
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1336
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1337
1337
  status: "unspecified" | "completed" | "current" | "planned";
1338
1338
  expectedDurationMs: number;
1339
1339
  }[];
@@ -1343,7 +1343,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1343
1343
  smartAccountAddress: string;
1344
1344
  flowId: string;
1345
1345
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1346
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1346
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1347
1347
  assetIds?: {
1348
1348
  zippedAssetId: number;
1349
1349
  unifiedAssetId: number;
@@ -1395,7 +1395,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1395
1395
  } | undefined;
1396
1396
  progressTimeline: {
1397
1397
  sequence: number;
1398
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1398
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1399
1399
  status: "unspecified" | "completed" | "current" | "planned";
1400
1400
  expectedDurationMs: number;
1401
1401
  }[];
@@ -1412,7 +1412,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1412
1412
  readonly smartAccountAddress: v.StringSchema<undefined>;
1413
1413
  readonly flowId: v.StringSchema<undefined>;
1414
1414
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
1415
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1415
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1416
1416
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1417
1417
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1418
1418
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1492,7 +1492,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1492
1492
  }, undefined>, undefined>;
1493
1493
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1494
1494
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1495
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1495
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1496
1496
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "current" | "planned">]>;
1497
1497
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
1498
1498
  }, undefined>, undefined>, readonly []>;
@@ -1502,7 +1502,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1502
1502
  smartAccountAddress: string;
1503
1503
  flowId: string;
1504
1504
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1505
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1505
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1506
1506
  assetIds?: {
1507
1507
  zippedAssetId: number;
1508
1508
  unifiedAssetId: number;
@@ -1554,7 +1554,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1554
1554
  } | undefined;
1555
1555
  progressTimeline: {
1556
1556
  sequence: number;
1557
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1557
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1558
1558
  status: "unspecified" | "completed" | "current" | "planned";
1559
1559
  expectedDurationMs: number;
1560
1560
  }[];
@@ -1564,7 +1564,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1564
1564
  smartAccountAddress: string;
1565
1565
  flowId: string;
1566
1566
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1567
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1567
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1568
1568
  assetIds?: {
1569
1569
  zippedAssetId: number;
1570
1570
  unifiedAssetId: number;
@@ -1616,7 +1616,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1616
1616
  } | undefined;
1617
1617
  progressTimeline: {
1618
1618
  sequence: number;
1619
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1619
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1620
1620
  status: "unspecified" | "completed" | "current" | "planned";
1621
1621
  expectedDurationMs: number;
1622
1622
  }[];
@@ -1626,7 +1626,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1626
1626
  }>]>, undefined>;
1627
1627
  readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
1628
1628
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1629
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1629
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1630
1630
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1631
1631
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1632
1632
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1763,7 +1763,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1763
1763
  }>]>, undefined>, readonly []>;
1764
1764
  }, undefined>, v.TransformAction<{
1765
1765
  sequence: number;
1766
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1766
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1767
1767
  assetIds?: {
1768
1768
  zippedAssetId: number;
1769
1769
  unifiedAssetId: number;
@@ -1824,7 +1824,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1824
1824
  })[];
1825
1825
  }, Omit<{
1826
1826
  sequence: number;
1827
- step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1827
+ step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1828
1828
  assetIds?: {
1829
1829
  zippedAssetId: number;
1830
1830
  unifiedAssetId: number;
@@ -1899,7 +1899,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1899
1899
  readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
1900
1900
  readonly sourceDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1901
1901
  readonly destinationDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1902
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1902
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1903
1903
  readonly isOpen: v.BooleanSchema<undefined>;
1904
1904
  readonly isTerminal: v.BooleanSchema<undefined>;
1905
1905
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
@@ -1933,7 +1933,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1933
1933
  txOccurrenceIndex?: number | undefined;
1934
1934
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1935
1935
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1936
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1936
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1937
1937
  isOpen: boolean;
1938
1938
  isTerminal: boolean;
1939
1939
  assetIds?: {
@@ -1961,7 +1961,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1961
1961
  txOccurrenceIndex?: number | undefined;
1962
1962
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1963
1963
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1964
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1964
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1965
1965
  isOpen: boolean;
1966
1966
  isTerminal: boolean;
1967
1967
  assetIds?: {
@@ -1994,7 +1994,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
1994
1994
  readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
1995
1995
  readonly sourceDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1996
1996
  readonly destinationDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1997
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1997
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1998
1998
  readonly isOpen: v.BooleanSchema<undefined>;
1999
1999
  readonly isTerminal: v.BooleanSchema<undefined>;
2000
2000
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
@@ -2028,7 +2028,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2028
2028
  txOccurrenceIndex?: number | undefined;
2029
2029
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2030
2030
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2031
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2031
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2032
2032
  isOpen: boolean;
2033
2033
  isTerminal: boolean;
2034
2034
  assetIds?: {
@@ -2056,7 +2056,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2056
2056
  txOccurrenceIndex?: number | undefined;
2057
2057
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2058
2058
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2059
- currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2059
+ currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2060
2060
  isOpen: boolean;
2061
2061
  isTerminal: boolean;
2062
2062
  assetIds?: {
@@ -30,7 +30,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
30
30
  readonly bestAskTicks: v.BigintSchema<undefined>;
31
31
  readonly bestAskQtyScaled: v.BigintSchema<undefined>;
32
32
  readonly sparklines: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
33
- readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1h" | "24h" | "1w" | "1m">]>;
33
+ readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "1m" | "1h" | "1w" | "24h">]>;
34
34
  readonly closeTicks: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
35
35
  }, undefined>, undefined>, readonly []>;
36
36
  readonly indexPriceTicks: v.BigintSchema<undefined>;
@@ -50,7 +50,7 @@ declare function createMarketOverviewSchema(scales: SdkScales): v.SchemaWithPipe
50
50
  bestAskTicks: bigint;
51
51
  bestAskQtyScaled: bigint;
52
52
  sparklines: {
53
- interval: "unspecified" | "1h" | "24h" | "1w" | "1m";
53
+ interval: "unspecified" | "1m" | "1h" | "1w" | "24h";
54
54
  closeTicks: bigint[];
55
55
  }[];
56
56
  indexPriceTicks: bigint;
@@ -80,7 +80,7 @@ declare const ListMarketOverviewInputSchema: v.SchemaWithPipe<readonly [v.Strict
80
80
  readonly orderBy: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["change_24h_bps", "volume_24h_usd", "last_price", "date_added"], undefined>, "volume_24h_usd">, v.TransformAction<"change_24h_bps" | "volume_24h_usd" | "last_price" | "date_added", MarketOrderBy.ORDER_BY_CHANGE_24H_BPS | MarketOrderBy.ORDER_BY_VOLUME_24H_USD | MarketOrderBy.ORDER_BY_LAST_PRICE | MarketOrderBy.ORDER_BY_DATE_ADDED>]>;
81
81
  readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["asc", "desc"], undefined>, "desc">, v.TransformAction<"asc" | "desc", SortDirection.SORT_ASC | SortDirection.SORT_DESC>]>;
82
82
  readonly includeSparklines: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
83
- readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1h" | "24h" | "1w" | "1m")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
83
+ readonly sparklineIntervals: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["1h", "24h", "1w", "1m"], undefined>, undefined>, readonly ["24h"]>, v.TransformAction<("1m" | "1h" | "1w" | "24h")[], (SparklineInterval.SPARKLINE_1H | SparklineInterval.SPARKLINE_24H | SparklineInterval.SPARKLINE_1W | SparklineInterval.SPARKLINE_1M)[]>]>;
84
84
  }, undefined>, v.TransformAction<{
85
85
  symbolIds: number[];
86
86
  limit: number;
@@ -10,7 +10,7 @@ declare const GetOrderbookInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
10
10
  depth: number;
11
11
  }, {
12
12
  symbolId: number;
13
- depth: 1 | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50;
13
+ depth: 1 | 10 | 5 | 20 | 200 | 500 | 1000 | 100 | 50;
14
14
  protoDepth: Depth;
15
15
  }>]>;
16
16
  type GetOrderbookInput = v.InferInput<typeof GetOrderbookInputSchema>;
@@ -257,7 +257,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
257
257
  attachedRisk: {
258
258
  takeProfit: {
259
259
  state: {
260
- status: "unspecified" | "completed" | "failed" | "created" | "canceled" | "not_configured" | "armed" | "running" | "paused";
260
+ status: "unspecified" | "failed" | "created" | "completed" | "canceled" | "not_configured" | "armed" | "running" | "paused";
261
261
  armedTs: number | undefined;
262
262
  armedTsNs: string | undefined;
263
263
  terminalTs: number | undefined;
@@ -276,7 +276,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
276
276
  } | undefined;
277
277
  stopLoss: {
278
278
  state: {
279
- status: "unspecified" | "completed" | "failed" | "created" | "canceled" | "not_configured" | "armed" | "running" | "paused";
279
+ status: "unspecified" | "failed" | "created" | "completed" | "canceled" | "not_configured" | "armed" | "running" | "paused";
280
280
  armedTs: number | undefined;
281
281
  armedTsNs: string | undefined;
282
282
  terminalTs: number | undefined;
@@ -295,7 +295,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
295
295
  } | undefined;
296
296
  trailingStop: {
297
297
  state: {
298
- status: "unspecified" | "completed" | "failed" | "created" | "canceled" | "not_configured" | "armed" | "running" | "paused";
298
+ status: "unspecified" | "failed" | "created" | "completed" | "canceled" | "not_configured" | "armed" | "running" | "paused";
299
299
  armedTs: number | undefined;
300
300
  armedTsNs: string | undefined;
301
301
  terminalTs: number | undefined;
@@ -625,7 +625,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
625
625
  attachedRisk: {
626
626
  takeProfit: {
627
627
  state: {
628
- status: "unspecified" | "completed" | "failed" | "created" | "canceled" | "not_configured" | "armed" | "running" | "paused";
628
+ status: "unspecified" | "failed" | "created" | "completed" | "canceled" | "not_configured" | "armed" | "running" | "paused";
629
629
  armedTs: number | undefined;
630
630
  armedTsNs: string | undefined;
631
631
  terminalTs: number | undefined;
@@ -644,7 +644,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
644
644
  } | undefined;
645
645
  stopLoss: {
646
646
  state: {
647
- status: "unspecified" | "completed" | "failed" | "created" | "canceled" | "not_configured" | "armed" | "running" | "paused";
647
+ status: "unspecified" | "failed" | "created" | "completed" | "canceled" | "not_configured" | "armed" | "running" | "paused";
648
648
  armedTs: number | undefined;
649
649
  armedTsNs: string | undefined;
650
650
  terminalTs: number | undefined;
@@ -663,7 +663,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
663
663
  } | undefined;
664
664
  trailingStop: {
665
665
  state: {
666
- status: "unspecified" | "completed" | "failed" | "created" | "canceled" | "not_configured" | "armed" | "running" | "paused";
666
+ status: "unspecified" | "failed" | "created" | "completed" | "canceled" | "not_configured" | "armed" | "running" | "paused";
667
667
  armedTs: number | undefined;
668
668
  armedTsNs: string | undefined;
669
669
  terminalTs: number | undefined;
@@ -276,8 +276,8 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
276
276
  seconds: bigint;
277
277
  nanos: number;
278
278
  } | undefined, number | undefined>]>;
279
- readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "member" | "policy" | "invite" | "security">]>;
280
- readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "enabled" | "disabled" | "failed" | "created" | "updated" | "deleted" | "removed" | "role_set" | "received" | "replied" | "revoked" | "blocked" | "hold_placed" | "hold_released">]>;
279
+ readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "policy" | "member" | "invite" | "security">]>;
280
+ readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "enabled" | "disabled" | "revoked" | "failed" | "created" | "updated" | "deleted" | "removed" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
281
281
  readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "web" | "mobile" | "api">]>;
282
282
  readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
283
283
  readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -845,7 +845,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
845
845
  declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
846
846
  readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
847
847
  readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
848
- readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
848
+ readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
849
849
  readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder" | undefined, TriggerType>]>;
850
850
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
851
851
  readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
29
29
  type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
30
30
  declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
31
31
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
32
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
32
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
33
33
  readonly tsNs: v.BigintSchema<undefined>;
34
34
  }, undefined>, v.TransformAction<{
35
35
  triggerId: string;
36
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
36
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
37
37
  tsNs: bigint;
38
38
  }, {
39
39
  ts: number;
40
40
  tsNs: string;
41
41
  triggerId: string;
42
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
42
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
43
43
  }>]>;
44
44
  type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
45
45
  declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
46
46
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
47
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
47
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
48
48
  readonly tsNs: v.BigintSchema<undefined>;
49
49
  }, undefined>, v.TransformAction<{
50
50
  triggerId: string;
51
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
51
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
52
52
  tsNs: bigint;
53
53
  }, {
54
54
  ts: number;
55
55
  tsNs: string;
56
56
  triggerId: string;
57
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
57
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
58
58
  }>]>;
59
59
  type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
60
60
  declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
61
61
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
62
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
62
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
63
63
  readonly tsNs: v.BigintSchema<undefined>;
64
64
  }, undefined>, v.TransformAction<{
65
65
  triggerId: string;
66
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
66
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
67
67
  tsNs: bigint;
68
68
  }, {
69
69
  ts: number;
70
70
  tsNs: string;
71
71
  triggerId: string;
72
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
72
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
73
73
  }>]>;
74
74
  type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
75
75
  declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
76
76
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
77
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
77
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
78
78
  readonly tsNs: v.BigintSchema<undefined>;
79
79
  }, undefined>, v.TransformAction<{
80
80
  triggerId: string;
81
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
81
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
82
82
  tsNs: bigint;
83
83
  }, {
84
84
  ts: number;
85
85
  tsNs: string;
86
86
  triggerId: string;
87
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
87
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
88
88
  }>]>;
89
89
  type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
90
90
  type StopDetailsOutput = {
@@ -556,7 +556,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
556
556
  triggerId: string;
557
557
  subaccountId: string;
558
558
  symbolId: number;
559
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
559
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
560
560
  parentOrderId: string | undefined;
561
561
  qty: string;
562
562
  feeAsset: "unspecified" | "quote" | "base";
@@ -712,7 +712,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
712
712
  triggerId: string;
713
713
  subaccountId: string;
714
714
  symbolId: number;
715
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
715
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
716
716
  parentOrderId: string | undefined;
717
717
  qty: string;
718
718
  feeAsset: "unspecified" | "quote" | "base";
@@ -868,7 +868,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
868
868
  triggerId: string;
869
869
  subaccountId: string;
870
870
  symbolId: number;
871
- status: "unspecified" | "completed" | "failed" | "cancelled" | "created" | "armed" | "running" | "paused";
871
+ status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
872
872
  parentOrderId: string | undefined;
873
873
  qty: string;
874
874
  feeAsset: "unspecified" | "quote" | "base";
@@ -1,6 +1,5 @@
1
1
  import { PolyesterEnvironment } from "../environment.js";
2
2
  import { Address, LocalAccount, PublicClient } from "viem";
3
- import { UserOperation } from "viem/account-abstraction";
4
3
  import { toSafeSmartAccount } from "permissionless/accounts";
5
4
  //#region src/smart-account/smart-account.d.ts
6
5
  type SafeSmartAccountInstance = Awaited<ReturnType<typeof toSafeSmartAccount>>;
@@ -1552,7 +1551,7 @@ declare function createPolyesterSmartAccountClient(account: SafeSmartAccountInst
1552
1551
  message: import("viem").SignableMessage;
1553
1552
  }) => Promise<import("viem").Hex>;
1554
1553
  signTypedData: <const typedData extends import("viem").TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<import("viem").Hex>;
1555
- signUserOperation: (parameters: import("viem").UnionPartialBy<UserOperation, "sender"> & {
1554
+ signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem").UserOperation, "sender"> & {
1556
1555
  chainId?: number | undefined;
1557
1556
  }) => Promise<import("viem").Hex>;
1558
1557
  userOperation?: {
@@ -3081,7 +3080,7 @@ declare function createPolyesterSmartAccountClient(account: SafeSmartAccountInst
3081
3080
  message: import("viem").SignableMessage;
3082
3081
  }) => Promise<import("viem").Hex>;
3083
3082
  signTypedData: <const typedData extends import("viem").TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<import("viem").Hex>;
3084
- signUserOperation: (parameters: import("viem").UnionPartialBy<UserOperation, "sender"> & {
3083
+ signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem").UserOperation, "sender"> & {
3085
3084
  chainId?: number | undefined;
3086
3085
  }) => Promise<import("viem").Hex>;
3087
3086
  userOperation?: {
@@ -4614,7 +4613,7 @@ declare function buildPolyesterSmartAccountClient(account: SafeSmartAccountInsta
4614
4613
  message: import("viem").SignableMessage;
4615
4614
  }) => Promise<import("viem").Hex>;
4616
4615
  signTypedData: <const typedData extends import("viem").TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<import("viem").Hex>;
4617
- signUserOperation: (parameters: import("viem").UnionPartialBy<UserOperation, "sender"> & {
4616
+ signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem").UserOperation, "sender"> & {
4618
4617
  chainId?: number | undefined;
4619
4618
  }) => Promise<import("viem").Hex>;
4620
4619
  userOperation?: {
@@ -6143,7 +6142,7 @@ declare function buildPolyesterSmartAccountClient(account: SafeSmartAccountInsta
6143
6142
  message: import("viem").SignableMessage;
6144
6143
  }) => Promise<import("viem").Hex>;
6145
6144
  signTypedData: <const typedData extends import("viem").TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<import("viem").Hex>;
6146
- signUserOperation: (parameters: import("viem").UnionPartialBy<UserOperation, "sender"> & {
6145
+ signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem").UserOperation, "sender"> & {
6147
6146
  chainId?: number | undefined;
6148
6147
  }) => Promise<import("viem").Hex>;
6149
6148
  userOperation?: {
@@ -6160,8 +6159,8 @@ declare function buildPolyesterSmartAccountClient(account: SafeSmartAccountInsta
6160
6159
  type: "smart";
6161
6160
  }), undefined, undefined>;
6162
6161
  /**
6163
- * Warms the network path for an upcoming submission: primes the gas-price and
6164
- * paymaster-stub caches and opens connections to the RPC endpoint. Never
6162
+ * Warms the network path for an upcoming submission: primes the gas-price
6163
+ * cache and opens connections to the RPC endpoint. Never
6165
6164
  * throws; the nonce is intentionally not cached — fetching it here is
6166
6165
  * connection warm-up only.
6167
6166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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4D8B,UAAC;IAGvD,6BAAC;;EAOP,aAAA;IAAgB;;EAO+B,mBAAA,4BAAA,qCAAA,uBAAA;;;;;;;;;;IA4C9D;;;IAMF,gBAAD,8BAAA,yBAAA,uBAAA,4BAAA;;;;;;;;;;;;;;;;;;iBA2He,gCAClB,QAAQ,8BACT;KAQS;UAEK;;;;;EAKb;;;;;;;EAOA,WAAW,OAAO,6BAA6B;;iBAG7B,2BAClB,QAAQ,6BACR,YAAY,WAAW,sDACvB,UAAS,oCACV,QAAQ,QAAQ,WAAW;UAqDb;;EAEb;;EAEA,UAAU;;;;;;;;;;iBAWQ,qCAClB,QAAQ,6BACR,qBACA,UAAS,8CACV,QAAQ,QAAQ,WAAW"}
@@ -1,6 +1,6 @@
1
1
  import { predictSafeAddress } from "../account-signer/predict-safe-address.js";
2
2
  import { createPublicClient, http, withTimeout } from "viem";
3
- import { estimateUserOperationGas, formatUserOperationRequest, prepareUserOperation } from "viem/account-abstraction";
3
+ import { estimateUserOperationGas, prepareUserOperation } from "viem/account-abstraction";
4
4
  import { createSmartAccountClient } from "permissionless";
5
5
  import { getUserOperationStatus } from "permissionless/actions/pimlico";
6
6
  import { toSafeSmartAccount } from "permissionless/accounts";
@@ -84,27 +84,12 @@ function buildPolyesterSmartAccountClient(account, environment, options) {
84
84
  });
85
85
  const gasPrice = cachedForTtl(() => paymaster.getUserOperationGasPrice(), gasPriceCacheTtlMs);
86
86
  const getGasPrice = gasPrice.get;
87
- const stubData = cachedForTtl(() => paymaster.getPaymasterStubData({
88
- chainId: environment.chain.id,
89
- entryPointAddress: environment.accountAbstraction.entryPoint.address,
90
- sender: account.address,
91
- nonce: 0n,
92
- callData: "0x",
93
- maxFeePerGas: 0n,
94
- maxPriorityFeePerGas: 0n
95
- }), Number.POSITIVE_INFINITY);
96
- const getStubData = stubData.get;
97
87
  const client = createSmartAccountClient({
98
88
  account,
99
89
  chain: environment.chain,
100
90
  paymaster: {
101
- getPaymasterStubData: (_parameters) => getStubData(),
102
- getPaymasterData: async (parameters) => {
103
- return paymaster.sponsorUserOperation({
104
- userOperation: formatUserOperationRequest(parameters),
105
- paymasterContext: parameters.context
106
- });
107
- }
91
+ getPaymasterStubData: (parameters) => paymaster.getPaymasterStubData(parameters),
92
+ getPaymasterData: (parameters) => paymaster.getPaymasterData(parameters)
108
93
  },
109
94
  bundlerTransport: http(environment.accountAbstraction.bundlerUrl),
110
95
  pollingInterval: pollingIntervalMs,
@@ -119,10 +104,9 @@ function buildPolyesterSmartAccountClient(account, environment, options) {
119
104
  }
120
105
  }
121
106
  });
122
- smartAccountClientPrimers.set(client, () => Promise.allSettled([getGasPrice(), getStubData()]));
107
+ smartAccountClientPrimers.set(client, () => Promise.allSettled([getGasPrice()]));
123
108
  smartAccountClientCacheResets.set(client, () => {
124
109
  gasPrice.clear();
125
- stubData.clear();
126
110
  });
127
111
  return client;
128
112
  }
@@ -153,20 +137,21 @@ function addUserOperationGasBuffer(gas) {
153
137
  return gas + (percentBuffer > USER_OPERATION_MIN_GAS_BUFFER ? percentBuffer : USER_OPERATION_MIN_GAS_BUFFER);
154
138
  }
155
139
  /**
156
- * Pads account gas limits (+20%, 50k floor) before sponsorship. Paymaster
157
- * limits are left alone: the paymaster sets and signs its own.
140
+ * Pads account and paymaster gas limits (+20%, 50k floor) before getPaymasterData.
158
141
  */
159
142
  function bufferPolyesterUserOperationGas(gas) {
160
143
  return {
161
144
  ...gas,
162
145
  ...typeof gas.callGasLimit === "bigint" ? { callGasLimit: addUserOperationGasBuffer(gas.callGasLimit) } : {},
163
146
  ...typeof gas.preVerificationGas === "bigint" ? { preVerificationGas: addUserOperationGasBuffer(gas.preVerificationGas) } : {},
164
- ...typeof gas.verificationGasLimit === "bigint" ? { verificationGasLimit: addUserOperationGasBuffer(gas.verificationGasLimit) } : {}
147
+ ...typeof gas.verificationGasLimit === "bigint" ? { verificationGasLimit: addUserOperationGasBuffer(gas.verificationGasLimit) } : {},
148
+ ...typeof gas.paymasterPostOpGasLimit === "bigint" ? { paymasterPostOpGasLimit: addUserOperationGasBuffer(gas.paymasterPostOpGasLimit) } : {},
149
+ ...typeof gas.paymasterVerificationGasLimit === "bigint" ? { paymasterVerificationGasLimit: addUserOperationGasBuffer(gas.paymasterVerificationGasLimit) } : {}
165
150
  };
166
151
  }
167
152
  /**
168
- * Warms the network path for an upcoming submission: primes the gas-price and
169
- * paymaster-stub caches and opens connections to the RPC endpoint. Never
153
+ * Warms the network path for an upcoming submission: primes the gas-price
154
+ * cache and opens connections to the RPC endpoint. Never
170
155
  * throws; the nonce is intentionally not cached — fetching it here is
171
156
  * connection warm-up only.
172
157
  */
@@ -1 +1 @@
1
- {"version":3,"file":"smart-account.js","names":[],"sources":["../../src/smart-account/smart-account.ts"],"sourcesContent":["import type { Address, LocalAccount, PublicClient } from \"viem\";\nimport { createPublicClient, http, withTimeout } from \"viem\";\nimport type {\n EstimateUserOperationGasParameters,\n GetPaymasterDataParameters,\n GetPaymasterStubDataParameters,\n UserOperation,\n} from \"viem/account-abstraction\";\nimport {\n estimateUserOperationGas,\n formatUserOperationRequest,\n prepareUserOperation,\n} from \"viem/account-abstraction\";\nimport { createSmartAccountClient } from \"permissionless\";\nimport { getUserOperationStatus } from \"permissionless/actions/pimlico\";\nimport { toSafeSmartAccount } from \"permissionless/accounts\";\nimport { createPimlicoClient } from \"permissionless/clients/pimlico\";\nimport type { PolyesterEnvironment } from \"../environment.js\";\nimport { predictSafeAddress } from \"../account-signer/predict-safe-address.js\";\n\nexport type SafeSmartAccountInstance = Awaited<ReturnType<typeof toSafeSmartAccount>>;\nexport type PolyesterSmartAccountClient = ReturnType<typeof buildPolyesterSmartAccountClient>;\n\nconst smartAccountEnvironmentFingerprints = new WeakMap<SafeSmartAccountInstance, string>();\nconst smartAccountClientPrimers = new WeakMap<object, () => Promise<unknown>>();\nconst smartAccountClientCacheResets = new WeakMap<object, () => void>();\nconst smartAccountClients = new WeakMap<\n SafeSmartAccountInstance,\n Map<string, PolyesterSmartAccountClient>\n>();\nconst USER_OPERATION_GAS_PRICE_TTL_MS = 60_000;\nconst USER_OPERATION_GAS_BUFFER_BPS = 2_000n;\nconst USER_OPERATION_MIN_GAS_BUFFER = 50_000n;\nconst USER_OPERATION_RECEIPT_POLLING_INTERVAL_MS = 250;\n/**\n * While the bundler reports `not_found`, the chain is checked for a receipt\n * on every Nth poll (once per second at the default interval). `not_found` is\n * not definitive — a bundler restart forgets ops whose bundle is still\n * pending — so polling continues until the deadline.\n */\nconst NOT_FOUND_RECEIPT_CHECK_EVERY = 4;\n\nexport interface CreateSmartAccountParams {\n environment: PolyesterEnvironment;\n owner: LocalAccount;\n saltNonce?: bigint;\n publicClient?: PublicClient;\n}\n\nexport interface PredictPolyesterSmartAccountAddressParams {\n environment: PolyesterEnvironment;\n ownerAddress: Address;\n saltNonce?: bigint;\n}\n\nexport function predictPolyesterSmartAccountAddress({\n environment,\n ownerAddress,\n saltNonce = 0n,\n}: PredictPolyesterSmartAccountAddressParams): Address {\n const {\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n } = environment.accountAbstraction.safe;\n\n return predictSafeAddress({\n owners: [ownerAddress],\n saltNonce,\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n });\n}\n\n/**\n * Creates a Polyester smart account instance.\n */\nexport async function createPolyesterSmartAccount({\n environment,\n owner,\n saltNonce,\n publicClient,\n}: CreateSmartAccountParams): Promise<SafeSmartAccountInstance> {\n const client =\n publicClient ??\n createPublicClient({\n chain: environment.chain,\n transport: http(environment.rpcUrl),\n });\n\n if (client.chain?.id && client.chain.id !== environment.chain.id) {\n throw new Error(\"Smart account public client chain does not match environment.\");\n }\n\n const account = await toSafeSmartAccount({\n client,\n owners: [owner],\n saltNonce,\n entryPoint: environment.accountAbstraction.entryPoint,\n ...environment.accountAbstraction.safe,\n });\n smartAccountEnvironmentFingerprints.set(account, environment.fingerprint);\n return account;\n}\n\nexport interface PolyesterSmartAccountClientOptions {\n /** How long a fetched gas price is reused, in milliseconds. Defaults to 60s. */\n gasPriceCacheTtlMs?: number;\n /** How often to poll for UserOperation inclusion, in milliseconds. Defaults to 250ms. */\n pollingIntervalMs?: number;\n}\n\n/**\n * Creates a viem client bound to a Polyester smart account. Memoized per\n * (account, environment, options): repeat calls return the same client, so\n * the gas price cache and warmed connections survive across submissions.\n */\nexport function createPolyesterSmartAccountClient(\n account: SafeSmartAccountInstance,\n params: {\n environment: PolyesterEnvironment;\n options?: PolyesterSmartAccountClientOptions;\n },\n) {\n const { environment, options } = params;\n const accountEnvironmentFingerprint = smartAccountEnvironmentFingerprints.get(account);\n if (\n accountEnvironmentFingerprint &&\n accountEnvironmentFingerprint !== environment.fingerprint\n ) {\n throw new Error(\"Smart account environment does not match client environment.\");\n }\n let clients = smartAccountClients.get(account);\n if (!clients) smartAccountClients.set(account, (clients = new Map()));\n const key = JSON.stringify([\n environment.fingerprint,\n options?.gasPriceCacheTtlMs ?? USER_OPERATION_GAS_PRICE_TTL_MS,\n options?.pollingIntervalMs ?? USER_OPERATION_RECEIPT_POLLING_INTERVAL_MS,\n ]);\n let client = clients.get(key);\n if (!client) {\n client = buildPolyesterSmartAccountClient(account, environment, options);\n clients.set(key, client);\n }\n return client;\n}\n\nfunction buildPolyesterSmartAccountClient(\n account: SafeSmartAccountInstance,\n environment: PolyesterEnvironment,\n options: PolyesterSmartAccountClientOptions | undefined,\n) {\n const {\n gasPriceCacheTtlMs = USER_OPERATION_GAS_PRICE_TTL_MS,\n pollingIntervalMs = USER_OPERATION_RECEIPT_POLLING_INTERVAL_MS,\n } = options ?? {};\n\n const paymaster = createPimlicoClient({\n chain: environment.chain,\n transport: http(environment.accountAbstraction.paymasterUrl),\n entryPoint: environment.accountAbstraction.entryPoint,\n });\n\n const gasPrice = cachedForTtl(() => paymaster.getUserOperationGasPrice(), gasPriceCacheTtlMs);\n const getGasPrice = gasPrice.get;\n // The stub is a per-paymaster constant (address + dummy signature): fetched\n // once, primed by warm-up, and only dropped when a submission fails.\n // `paymasterContext` is not forwarded to it; no Polyester paymaster\n // policy keys off context, and the sponsor call below does forward it.\n const stubData = cachedForTtl(\n () =>\n paymaster.getPaymasterStubData({\n chainId: environment.chain.id,\n entryPointAddress: environment.accountAbstraction.entryPoint.address,\n sender: account.address,\n nonce: 0n,\n callData: \"0x\",\n maxFeePerGas: 0n,\n maxPriorityFeePerGas: 0n,\n }),\n Number.POSITIVE_INFINITY,\n );\n const getStubData = stubData.get;\n\n const client = createSmartAccountClient({\n account,\n chain: environment.chain,\n paymaster: {\n getPaymasterStubData: (_parameters: GetPaymasterStubDataParameters) => getStubData(),\n // `pm_sponsorUserOperation` replaces `pm_getPaymasterData`: it signs\n // over the (already buffered) account gas limits it receives and\n // sets its own paymaster limits. Nothing may adjust gas afterwards.\n getPaymasterData: async (parameters: GetPaymasterDataParameters) => {\n // viem hands over every original parameter (`calls`, `chainId`,\n // ...); the paymaster rejects unknown keys, so keep only\n // UserOperation fields.\n return paymaster.sponsorUserOperation({\n userOperation: formatUserOperationRequest(\n parameters as unknown as UserOperation<\"0.7\">,\n ) as unknown as UserOperation<\"0.7\">,\n paymasterContext: parameters.context,\n });\n },\n },\n bundlerTransport: http(environment.accountAbstraction.bundlerUrl),\n pollingInterval: pollingIntervalMs,\n userOperation: {\n estimateFeesPerGas: async () => (await getGasPrice()).fast,\n // Single prepare pass: viem resolves gas estimation via\n // `getAction(client, estimateUserOperationGas, ...)`, so handing\n // `prepareUserOperation` a client whose estimate action buffers the\n // result makes the buffered limits flow into the sponsor call\n // before signing — the sponsorship signature commits to them.\n prepareUserOperation: (prepareClient, prepareParameters) => {\n const bufferingClient = {\n ...prepareClient,\n estimateUserOperationGas: async (\n estimateParameters: EstimateUserOperationGasParameters,\n ) =>\n bufferPolyesterUserOperationGas(\n await estimateUserOperationGas(prepareClient, estimateParameters),\n ),\n };\n return prepareUserOperation(\n bufferingClient as typeof prepareClient,\n prepareParameters as Parameters<typeof prepareUserOperation>[1],\n );\n },\n },\n });\n smartAccountClientPrimers.set(client, () => Promise.allSettled([getGasPrice(), getStubData()]));\n smartAccountClientCacheResets.set(client, () => {\n gasPrice.clear();\n stubData.clear();\n });\n return client;\n}\n\n/** Memoizes a promise-returning fetch for `ttlMs`; a rejected fetch is not cached. */\nfunction cachedForTtl<T>(\n fetch: () => Promise<T>,\n ttlMs: number,\n): { get: () => Promise<T>; clear: () => void } {\n let cached: { fetchedAt: number; result: Promise<T> } | undefined;\n return {\n get: () => {\n if (!cached || Date.now() - cached.fetchedAt >= ttlMs) {\n const entry = { fetchedAt: Date.now(), result: fetch() };\n cached = entry;\n entry.result.catch(() => {\n if (cached === entry) cached = undefined;\n });\n }\n return cached.result;\n },\n clear: () => {\n cached = undefined;\n },\n };\n}\n\nfunction addUserOperationGasBuffer(gas: bigint): bigint {\n const percentBuffer = (gas * USER_OPERATION_GAS_BUFFER_BPS) / 10_000n;\n return (\n gas +\n (percentBuffer > USER_OPERATION_MIN_GAS_BUFFER\n ? percentBuffer\n : USER_OPERATION_MIN_GAS_BUFFER)\n );\n}\n\n/**\n * Pads account gas limits (+20%, 50k floor) before sponsorship. Paymaster\n * limits are left alone: the paymaster sets and signs its own.\n */\nfunction bufferPolyesterUserOperationGas<\n T extends { callGasLimit?: bigint; preVerificationGas?: bigint; verificationGasLimit?: bigint },\n>(gas: T): T {\n return {\n ...gas,\n ...(typeof gas.callGasLimit === \"bigint\"\n ? { callGasLimit: addUserOperationGasBuffer(gas.callGasLimit) }\n : {}),\n ...(typeof gas.preVerificationGas === \"bigint\"\n ? { preVerificationGas: addUserOperationGasBuffer(gas.preVerificationGas) }\n : {}),\n ...(typeof gas.verificationGasLimit === \"bigint\"\n ? { verificationGasLimit: addUserOperationGasBuffer(gas.verificationGasLimit) }\n : {}),\n };\n}\n\n/**\n * Warms the network path for an upcoming submission: primes the gas-price and\n * paymaster-stub caches and opens connections to the RPC endpoint. Never\n * throws; the nonce is intentionally not cached — fetching it here is\n * connection warm-up only.\n */\nexport async function warmPolyesterSmartAccountClient(\n client: PolyesterSmartAccountClient,\n): Promise<void> {\n await Promise.allSettled([\n smartAccountClientPrimers.get(client)?.(),\n client.account.getNonce(),\n client.account.isDeployed(),\n ]);\n}\n\nexport type PolyesterUserOperationPhase = \"prepare\" | \"sign\" | \"send\" | \"receipt\";\n\nexport interface SendPolyesterUserOperationOptions {\n /**\n * Fires once per submission, immediately before the wallet is asked to\n * sign the fully prepared operation — the prepare→sign boundary.\n */\n onWalletSignatureRequested?: () => void;\n /**\n * Reports how long each submission phase took. `prepare` covers nonce,\n * fees and sponsorship; `sign` the wallet signature; `send`\n * `eth_sendUserOperation`. Pass the same callback to\n * {@link waitForPolyesterUserOperationReceipt} to get `receipt`.\n */\n onPhase?: (phase: PolyesterUserOperationPhase, ms: number) => void;\n}\n\nexport async function sendPolyesterUserOperation(\n client: PolyesterSmartAccountClient,\n parameters: Parameters<PolyesterSmartAccountClient[\"sendUserOperation\"]>[0],\n options: SendPolyesterUserOperationOptions = {},\n): Promise<Awaited<ReturnType<PolyesterSmartAccountClient[\"sendUserOperation\"]>>> {\n const { onWalletSignatureRequested, onPhase } = options;\n const account =\n (parameters as { account?: SafeSmartAccountInstance }).account ?? client.account;\n let phaseStartedAt = Date.now();\n const endPhase = (phase: PolyesterUserOperationPhase) => {\n const now = Date.now();\n reportPhase(onPhase, phase, now - phaseStartedAt);\n phaseStartedAt = now;\n };\n let signed = false;\n try {\n const hash = await client.sendUserOperation({\n ...parameters,\n account: {\n ...account,\n signUserOperation: async (\n userOperation: Parameters<SafeSmartAccountInstance[\"signUserOperation\"]>[0],\n ) => {\n endPhase(\"prepare\");\n onWalletSignatureRequested?.();\n const signature = await account.signUserOperation(userOperation);\n signed = true;\n endPhase(\"sign\");\n return signature;\n },\n },\n } as Parameters<PolyesterSmartAccountClient[\"sendUserOperation\"]>[0]);\n endPhase(\"send\");\n return hash;\n } catch (error) {\n // Only a failure after signing (i.e. from `eth_sendUserOperation`) can\n // mean the bundler rejected the cached gas price or stub. Earlier\n // failures — a cancelled wallet prompt above all — keep both caches so\n // the retry stays cheap.\n if (signed) smartAccountClientCacheResets.get(client)?.();\n throw error;\n }\n}\n\n/** Observers must never affect the result: a throwing `onPhase` is swallowed. */\nfunction reportPhase(\n onPhase: SendPolyesterUserOperationOptions[\"onPhase\"],\n phase: PolyesterUserOperationPhase,\n ms: number,\n): void {\n try {\n onPhase?.(phase, ms);\n } catch {\n // ignore\n }\n}\n\nexport interface WaitForPolyesterUserOperationReceiptOptions {\n /** Overall deadline in milliseconds. Defaults to viem's 120s. */\n timeoutMs?: number;\n /** Receives `(\"receipt\", ms)` once the receipt is available. */\n onPhase?: SendPolyesterUserOperationOptions[\"onPhase\"];\n}\n\n/**\n * Waits for a UserOperation to land. Polls the bundler's cheap\n * `pimlico_getUserOperationStatus` at the client's polling interval, checking\n * immediately, and only fetches the receipt once the bundler reports it has\n * been mined. Status lives in bundler memory, so `not_found` (e.g. after a\n * bundler restart) also checks the chain for a receipt until the deadline.\n * `timeoutMs` bounds every request, not just the gaps between them.\n */\nexport async function waitForPolyesterUserOperationReceipt(\n client: PolyesterSmartAccountClient,\n hash: `0x${string}`,\n options: WaitForPolyesterUserOperationReceiptOptions = {},\n): Promise<Awaited<ReturnType<PolyesterSmartAccountClient[\"waitForUserOperationReceipt\"]>>> {\n const { timeoutMs = 120_000, onPhase } = options;\n const startedAt = Date.now();\n const deadline = startedAt + timeoutMs;\n const timedOut = () => new Error(`Timed out waiting for UserOperation ${hash}.`);\n const untilDeadline = <T>(fn: () => Promise<T>): Promise<T> => {\n const timeout = deadline - Date.now();\n if (timeout <= 0) return Promise.reject(timedOut());\n return withTimeout(fn, { timeout, errorInstance: timedOut() });\n };\n const statusClient = client as unknown as Parameters<typeof getUserOperationStatus>[0];\n\n let consecutiveNotFound = 0;\n for (;;) {\n const { status } = await untilDeadline(() =>\n getUserOperationStatus(statusClient, { hash }),\n );\n if (status === \"included\" || status === \"reverted\") {\n const receipt = await untilDeadline(() =>\n client.waitForUserOperationReceipt({ hash, timeout: deadline - Date.now() }),\n );\n reportPhase(onPhase, \"receipt\", Date.now() - startedAt);\n return receipt;\n }\n if (status === \"failed\") {\n throw new Error(\n `UserOperation ${hash} was bundled but the bundle transaction reverted; it was not executed.`,\n );\n }\n if (status === \"rejected\") {\n // Re-simulation failures are often fee-too-low: drop cached prices.\n smartAccountClientCacheResets.get(client)?.();\n throw new Error(`UserOperation ${hash} was rejected by the bundler.`);\n }\n if (status === \"not_found\") {\n if (consecutiveNotFound++ % NOT_FOUND_RECEIPT_CHECK_EVERY === 0) {\n const receipt = await untilDeadline(() =>\n client.getUserOperationReceipt({ hash }),\n ).catch((error: Error) => {\n if (error.name === \"UserOperationReceiptNotFoundError\") return undefined;\n throw error;\n });\n if (receipt) {\n reportPhase(onPhase, \"receipt\", Date.now() - startedAt);\n return receipt;\n }\n }\n } else {\n consecutiveNotFound = 0;\n }\n const remaining = deadline - Date.now();\n if (remaining <= 0) throw timedOut();\n await new Promise((resolve) =>\n setTimeout(resolve, Math.min(client.pollingInterval, remaining)),\n );\n }\n}\n"],"mappings":";;;;;;;;AAuBA,MAAM,sDAAsC,IAAI,QAA0C;AAC1F,MAAM,4CAA4B,IAAI,QAAwC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AK,IAAI,IAAI,SAAS;GACtD,OAAO;EACX;EACA,IAAI,WAAW,UACX,MAAM,IAAI,MACN,iBAAiB,KAAK,uEAC1B;EAEJ,IAAI,WAAW,YAAY;GAEvB,8BAA8B,IAAI,MAAM,CAAC,GAAG;GAC5C,MAAM,IAAI,MAAM,iBAAiB,KAAK,8BAA8B;EACxE;EACA,IAAI,WAAW,aACP;OAAA,wBAAwB,kCAAkC,GAAG;IAC7D,MAAM,UAAU,MAAM,oBAClB,OAAO,wBAAwB,EAAE,KAAK,CAAC,CAC3C,CAAC,CAAC,OAAO,UAAiB;KACtB,IAAI,MAAM,SAAS,qCAAqC,OAAO,KAAA;KAC/D,MAAM;IACV,CAAC;IACD,IAAI,SAAS;KACT,YAAY,SAAS,WAAW,KAAK,IAAI,IAAI,SAAS;KACtD,OAAO;IACX;GACJ;SAEA,sBAAsB;EAE1B,MAAM,YAAY,WAAW,KAAK,IAAI;EACtC,IAAI,aAAa,GAAG,MAAM,SAAS;EACnC,MAAM,IAAI,SAAS,YACf,WAAW,SAAS,KAAK,IAAI,OAAO,iBAAiB,SAAS,CAAC,CACnE;CACJ;AACJ"}
1
+ {"version":3,"file":"smart-account.js","names":[],"sources":["../../src/smart-account/smart-account.ts"],"sourcesContent":["import type { Address, LocalAccount, PublicClient } from \"viem\";\nimport { createPublicClient, http, withTimeout } from \"viem\";\nimport type { EstimateUserOperationGasParameters } from \"viem/account-abstraction\";\nimport { estimateUserOperationGas, prepareUserOperation } from \"viem/account-abstraction\";\nimport { createSmartAccountClient } from \"permissionless\";\nimport { getUserOperationStatus } from \"permissionless/actions/pimlico\";\nimport { toSafeSmartAccount } from \"permissionless/accounts\";\nimport { createPimlicoClient } from \"permissionless/clients/pimlico\";\nimport type { PolyesterEnvironment } from \"../environment.js\";\nimport { predictSafeAddress } from \"../account-signer/predict-safe-address.js\";\n\nexport type SafeSmartAccountInstance = Awaited<ReturnType<typeof toSafeSmartAccount>>;\nexport type PolyesterSmartAccountClient = ReturnType<typeof buildPolyesterSmartAccountClient>;\n\nconst smartAccountEnvironmentFingerprints = new WeakMap<SafeSmartAccountInstance, string>();\nconst smartAccountClientPrimers = new WeakMap<object, () => Promise<unknown>>();\nconst smartAccountClientCacheResets = new WeakMap<object, () => void>();\nconst smartAccountClients = new WeakMap<\n SafeSmartAccountInstance,\n Map<string, PolyesterSmartAccountClient>\n>();\nconst USER_OPERATION_GAS_PRICE_TTL_MS = 60_000;\nconst USER_OPERATION_GAS_BUFFER_BPS = 2_000n;\nconst USER_OPERATION_MIN_GAS_BUFFER = 50_000n;\nconst USER_OPERATION_RECEIPT_POLLING_INTERVAL_MS = 250;\n/**\n * While the bundler reports `not_found`, the chain is checked for a receipt\n * on every Nth poll (once per second at the default interval). `not_found` is\n * not definitive — a bundler restart forgets ops whose bundle is still\n * pending — so polling continues until the deadline.\n */\nconst NOT_FOUND_RECEIPT_CHECK_EVERY = 4;\n\nexport interface CreateSmartAccountParams {\n environment: PolyesterEnvironment;\n owner: LocalAccount;\n saltNonce?: bigint;\n publicClient?: PublicClient;\n}\n\nexport interface PredictPolyesterSmartAccountAddressParams {\n environment: PolyesterEnvironment;\n ownerAddress: Address;\n saltNonce?: bigint;\n}\n\nexport function predictPolyesterSmartAccountAddress({\n environment,\n ownerAddress,\n saltNonce = 0n,\n}: PredictPolyesterSmartAccountAddressParams): Address {\n const {\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n } = environment.accountAbstraction.safe;\n\n return predictSafeAddress({\n owners: [ownerAddress],\n saltNonce,\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n });\n}\n\n/**\n * Creates a Polyester smart account instance.\n */\nexport async function createPolyesterSmartAccount({\n environment,\n owner,\n saltNonce,\n publicClient,\n}: CreateSmartAccountParams): Promise<SafeSmartAccountInstance> {\n const client =\n publicClient ??\n createPublicClient({\n chain: environment.chain,\n transport: http(environment.rpcUrl),\n });\n\n if (client.chain?.id && client.chain.id !== environment.chain.id) {\n throw new Error(\"Smart account public client chain does not match environment.\");\n }\n\n const account = await toSafeSmartAccount({\n client,\n owners: [owner],\n saltNonce,\n entryPoint: environment.accountAbstraction.entryPoint,\n ...environment.accountAbstraction.safe,\n });\n smartAccountEnvironmentFingerprints.set(account, environment.fingerprint);\n return account;\n}\n\nexport interface PolyesterSmartAccountClientOptions {\n /** How long a fetched gas price is reused, in milliseconds. Defaults to 60s. */\n gasPriceCacheTtlMs?: number;\n /** How often to poll for UserOperation inclusion, in milliseconds. Defaults to 250ms. */\n pollingIntervalMs?: number;\n}\n\n/**\n * Creates a viem client bound to a Polyester smart account. Memoized per\n * (account, environment, options): repeat calls return the same client, so\n * the gas price cache and warmed connections survive across submissions.\n */\nexport function createPolyesterSmartAccountClient(\n account: SafeSmartAccountInstance,\n params: {\n environment: PolyesterEnvironment;\n options?: PolyesterSmartAccountClientOptions;\n },\n) {\n const { environment, options } = params;\n const accountEnvironmentFingerprint = smartAccountEnvironmentFingerprints.get(account);\n if (\n accountEnvironmentFingerprint &&\n accountEnvironmentFingerprint !== environment.fingerprint\n ) {\n throw new Error(\"Smart account environment does not match client environment.\");\n }\n let clients = smartAccountClients.get(account);\n if (!clients) smartAccountClients.set(account, (clients = new Map()));\n const key = JSON.stringify([\n environment.fingerprint,\n options?.gasPriceCacheTtlMs ?? USER_OPERATION_GAS_PRICE_TTL_MS,\n options?.pollingIntervalMs ?? USER_OPERATION_RECEIPT_POLLING_INTERVAL_MS,\n ]);\n let client = clients.get(key);\n if (!client) {\n client = buildPolyesterSmartAccountClient(account, environment, options);\n clients.set(key, client);\n }\n return client;\n}\n\nfunction buildPolyesterSmartAccountClient(\n account: SafeSmartAccountInstance,\n environment: PolyesterEnvironment,\n options: PolyesterSmartAccountClientOptions | undefined,\n) {\n const {\n gasPriceCacheTtlMs = USER_OPERATION_GAS_PRICE_TTL_MS,\n pollingIntervalMs = USER_OPERATION_RECEIPT_POLLING_INTERVAL_MS,\n } = options ?? {};\n\n const paymaster = createPimlicoClient({\n chain: environment.chain,\n transport: http(environment.accountAbstraction.paymasterUrl),\n entryPoint: environment.accountAbstraction.entryPoint,\n });\n\n const gasPrice = cachedForTtl(() => paymaster.getUserOperationGasPrice(), gasPriceCacheTtlMs);\n const getGasPrice = gasPrice.get;\n\n const client = createSmartAccountClient({\n account,\n chain: environment.chain,\n paymaster: {\n getPaymasterStubData: (parameters) => paymaster.getPaymasterStubData(parameters),\n getPaymasterData: (parameters) => paymaster.getPaymasterData(parameters),\n },\n bundlerTransport: http(environment.accountAbstraction.bundlerUrl),\n pollingInterval: pollingIntervalMs,\n userOperation: {\n estimateFeesPerGas: async () => (await getGasPrice()).fast,\n // Single prepare pass: viem resolves gas estimation via\n // `getAction(client, estimateUserOperationGas, ...)`, so handing\n // `prepareUserOperation` a client whose estimate action buffers the\n // result makes the buffered limits flow into getPaymasterData\n // before signing — the sponsorship signature commits to them.\n prepareUserOperation: (prepareClient, prepareParameters) => {\n const bufferingClient = {\n ...prepareClient,\n estimateUserOperationGas: async (\n estimateParameters: EstimateUserOperationGasParameters,\n ) =>\n bufferPolyesterUserOperationGas(\n await estimateUserOperationGas(prepareClient, estimateParameters),\n ),\n };\n return prepareUserOperation(\n bufferingClient as typeof prepareClient,\n prepareParameters as Parameters<typeof prepareUserOperation>[1],\n );\n },\n },\n });\n smartAccountClientPrimers.set(client, () => Promise.allSettled([getGasPrice()]));\n smartAccountClientCacheResets.set(client, () => {\n gasPrice.clear();\n });\n return client;\n}\n\n/** Memoizes a promise-returning fetch for `ttlMs`; a rejected fetch is not cached. */\nfunction cachedForTtl<T>(\n fetch: () => Promise<T>,\n ttlMs: number,\n): { get: () => Promise<T>; clear: () => void } {\n let cached: { fetchedAt: number; result: Promise<T> } | undefined;\n return {\n get: () => {\n if (!cached || Date.now() - cached.fetchedAt >= ttlMs) {\n const entry = { fetchedAt: Date.now(), result: fetch() };\n cached = entry;\n entry.result.catch(() => {\n if (cached === entry) cached = undefined;\n });\n }\n return cached.result;\n },\n clear: () => {\n cached = undefined;\n },\n };\n}\n\nfunction addUserOperationGasBuffer(gas: bigint): bigint {\n const percentBuffer = (gas * USER_OPERATION_GAS_BUFFER_BPS) / 10_000n;\n return (\n gas +\n (percentBuffer > USER_OPERATION_MIN_GAS_BUFFER\n ? percentBuffer\n : USER_OPERATION_MIN_GAS_BUFFER)\n );\n}\n\n/**\n * Pads account and paymaster gas limits (+20%, 50k floor) before getPaymasterData.\n */\nfunction bufferPolyesterUserOperationGas<\n T extends {\n callGasLimit?: bigint;\n preVerificationGas?: bigint;\n verificationGasLimit?: bigint;\n paymasterPostOpGasLimit?: bigint;\n paymasterVerificationGasLimit?: bigint;\n },\n>(gas: T): T {\n return {\n ...gas,\n ...(typeof gas.callGasLimit === \"bigint\"\n ? { callGasLimit: addUserOperationGasBuffer(gas.callGasLimit) }\n : {}),\n ...(typeof gas.preVerificationGas === \"bigint\"\n ? { preVerificationGas: addUserOperationGasBuffer(gas.preVerificationGas) }\n : {}),\n ...(typeof gas.verificationGasLimit === \"bigint\"\n ? { verificationGasLimit: addUserOperationGasBuffer(gas.verificationGasLimit) }\n : {}),\n ...(typeof gas.paymasterPostOpGasLimit === \"bigint\"\n ? { paymasterPostOpGasLimit: addUserOperationGasBuffer(gas.paymasterPostOpGasLimit) }\n : {}),\n ...(typeof gas.paymasterVerificationGasLimit === \"bigint\"\n ? {\n paymasterVerificationGasLimit: addUserOperationGasBuffer(\n gas.paymasterVerificationGasLimit,\n ),\n }\n : {}),\n };\n}\n\n/**\n * Warms the network path for an upcoming submission: primes the gas-price\n * cache and opens connections to the RPC endpoint. Never\n * throws; the nonce is intentionally not cached — fetching it here is\n * connection warm-up only.\n */\nexport async function warmPolyesterSmartAccountClient(\n client: PolyesterSmartAccountClient,\n): Promise<void> {\n await Promise.allSettled([\n smartAccountClientPrimers.get(client)?.(),\n client.account.getNonce(),\n client.account.isDeployed(),\n ]);\n}\n\nexport type PolyesterUserOperationPhase = \"prepare\" | \"sign\" | \"send\" | \"receipt\";\n\nexport interface SendPolyesterUserOperationOptions {\n /**\n * Fires once per submission, immediately before the wallet is asked to\n * sign the fully prepared operation — the prepare→sign boundary.\n */\n onWalletSignatureRequested?: () => void;\n /**\n * Reports how long each submission phase took. `prepare` covers nonce,\n * fees and sponsorship; `sign` the wallet signature; `send`\n * `eth_sendUserOperation`. Pass the same callback to\n * {@link waitForPolyesterUserOperationReceipt} to get `receipt`.\n */\n onPhase?: (phase: PolyesterUserOperationPhase, ms: number) => void;\n}\n\nexport async function sendPolyesterUserOperation(\n client: PolyesterSmartAccountClient,\n parameters: Parameters<PolyesterSmartAccountClient[\"sendUserOperation\"]>[0],\n options: SendPolyesterUserOperationOptions = {},\n): Promise<Awaited<ReturnType<PolyesterSmartAccountClient[\"sendUserOperation\"]>>> {\n const { onWalletSignatureRequested, onPhase } = options;\n const account =\n (parameters as { account?: SafeSmartAccountInstance }).account ?? client.account;\n let phaseStartedAt = Date.now();\n const endPhase = (phase: PolyesterUserOperationPhase) => {\n const now = Date.now();\n reportPhase(onPhase, phase, now - phaseStartedAt);\n phaseStartedAt = now;\n };\n let signed = false;\n try {\n const hash = await client.sendUserOperation({\n ...parameters,\n account: {\n ...account,\n signUserOperation: async (\n userOperation: Parameters<SafeSmartAccountInstance[\"signUserOperation\"]>[0],\n ) => {\n endPhase(\"prepare\");\n onWalletSignatureRequested?.();\n const signature = await account.signUserOperation(userOperation);\n signed = true;\n endPhase(\"sign\");\n return signature;\n },\n },\n } as Parameters<PolyesterSmartAccountClient[\"sendUserOperation\"]>[0]);\n endPhase(\"send\");\n return hash;\n } catch (error) {\n // Only a failure after signing (i.e. from `eth_sendUserOperation`) can\n // mean the bundler rejected the cached gas price. Earlier\n // failures — a cancelled wallet prompt above all — keep the cache so\n // the retry stays cheap.\n if (signed) smartAccountClientCacheResets.get(client)?.();\n throw error;\n }\n}\n\n/** Observers must never affect the result: a throwing `onPhase` is swallowed. */\nfunction reportPhase(\n onPhase: SendPolyesterUserOperationOptions[\"onPhase\"],\n phase: PolyesterUserOperationPhase,\n ms: number,\n): void {\n try {\n onPhase?.(phase, ms);\n } catch {\n // ignore\n }\n}\n\nexport interface WaitForPolyesterUserOperationReceiptOptions {\n /** Overall deadline in milliseconds. Defaults to viem's 120s. */\n timeoutMs?: number;\n /** Receives `(\"receipt\", ms)` once the receipt is available. */\n onPhase?: SendPolyesterUserOperationOptions[\"onPhase\"];\n}\n\n/**\n * Waits for a UserOperation to land. Polls the bundler's cheap\n * `pimlico_getUserOperationStatus` at the client's polling interval, checking\n * immediately, and only fetches the receipt once the bundler reports it has\n * been mined. Status lives in bundler memory, so `not_found` (e.g. after a\n * bundler restart) also checks the chain for a receipt until the deadline.\n * `timeoutMs` bounds every request, not just the gaps between them.\n */\nexport async function waitForPolyesterUserOperationReceipt(\n client: PolyesterSmartAccountClient,\n hash: `0x${string}`,\n options: WaitForPolyesterUserOperationReceiptOptions = {},\n): Promise<Awaited<ReturnType<PolyesterSmartAccountClient[\"waitForUserOperationReceipt\"]>>> {\n const { timeoutMs = 120_000, onPhase } = options;\n const startedAt = Date.now();\n const deadline = startedAt + timeoutMs;\n const timedOut = () => new Error(`Timed out waiting for UserOperation ${hash}.`);\n const untilDeadline = <T>(fn: () => Promise<T>): Promise<T> => {\n const timeout = deadline - Date.now();\n if (timeout <= 0) return Promise.reject(timedOut());\n return withTimeout(fn, { timeout, errorInstance: timedOut() });\n };\n const statusClient = client as unknown as Parameters<typeof getUserOperationStatus>[0];\n\n let consecutiveNotFound = 0;\n for (;;) {\n const { status } = await untilDeadline(() =>\n getUserOperationStatus(statusClient, { hash }),\n );\n if (status === \"included\" || status === \"reverted\") {\n const receipt = await untilDeadline(() =>\n client.waitForUserOperationReceipt({ hash, timeout: deadline - Date.now() }),\n );\n reportPhase(onPhase, \"receipt\", Date.now() - startedAt);\n return receipt;\n }\n if (status === \"failed\") {\n throw new Error(\n `UserOperation ${hash} was bundled but the bundle transaction reverted; it was not executed.`,\n );\n }\n if (status === \"rejected\") {\n // Re-simulation failures are often fee-too-low: drop cached prices.\n smartAccountClientCacheResets.get(client)?.();\n throw new Error(`UserOperation ${hash} was rejected by the bundler.`);\n }\n if (status === \"not_found\") {\n if (consecutiveNotFound++ % NOT_FOUND_RECEIPT_CHECK_EVERY === 0) {\n const receipt = await untilDeadline(() =>\n client.getUserOperationReceipt({ hash }),\n ).catch((error: Error) => {\n if (error.name === \"UserOperationReceiptNotFoundError\") return undefined;\n throw error;\n });\n if (receipt) {\n reportPhase(onPhase, \"receipt\", Date.now() - startedAt);\n return receipt;\n }\n }\n } else {\n consecutiveNotFound = 0;\n }\n const remaining = deadline - Date.now();\n if (remaining <= 0) throw timedOut();\n await new Promise((resolve) =>\n setTimeout(resolve, Math.min(client.pollingInterval, remaining)),\n );\n }\n}\n"],"mappings":";;;;;;;;AAcA,MAAM,sDAAsC,IAAI,QAA0C;AAC1F,MAAM,4CAA4B,IAAI,QAAwC;AAC9E,MAAM,gDAAgC,IAAI,QAA4B;AACtE,MAAM,sCAAsB,IAAI,QAG9B;AACF,MAAM,kCAAkC;AACxC,MAAM,gCAAgC;AACtC,MAAM,gCAAgC;AACtC,MAAM,6CAA6C;;;;;;;AAOnD,MAAM,gCAAgC;AAetC,SAAgB,oCAAoC,EAChD,aACA,cACA,YAAY,MACuC;CACnD,MAAM,EACF,yBACA,sBACA,wBACA,uBACA,qBACA,YAAY,mBAAmB;CAEnC,OAAO,mBAAmB;EACtB,QAAQ,CAAC,YAAY;EACrB;EACA;EACA;EACA;EACA;EACA;CACJ,CAAC;AACL;;;;AAKA,eAAsB,4BAA4B,EAC9C,aACA,OACA,WACA,gBAC4D;CAC5D,MAAM,SACF,gBACA,mBAAmB;EACf,OAAO,YAAY;EACnB,WAAW,KAAK,YAAY,MAAM;CACtC,CAAC;CAEL,IAAI,OAAO,OAAO,MAAM,OAAO,MAAM,OAAO,YAAY,MAAM,IAC1D,MAAM,IAAI,MAAM,+DA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2
2
  "name": "@polyester/sdk",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK providing access to APIs on Polyester Exchange.",
6
6
  "homepage": "https://github.com/Fabric-Labs/polyester-sdk-typescript#readme",