@relayprotocol/relay-sdk 5.2.2 → 5.2.3

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.
@@ -1,5 +1,27 @@
1
1
  import type { Execute } from '../types/Execute.js';
2
+ /**
3
+ * Returns true when the step sequence can be collapsed into a single atomic
4
+ * batch transaction.
5
+ *
6
+ * Supported shapes:
7
+ * [approve, swap | deposit] // standard 2-step flow
8
+ * [approve, approve, swap | deposit] // zero-reset flow (e.g. USDT on Ethereum)
9
+ * [approve, ..., approve, swap | deposit] // N leading approvals + terminal
10
+ *
11
+ * Every item in every step must be incomplete — any already-executed item
12
+ * means we're in the middle of a partial run and should not re-batch.
13
+ */
2
14
  export declare function canBatchTransactions(steps: Execute['steps']): boolean;
15
+ /**
16
+ * Flattens N approval steps + terminal (swap|deposit) step into a single
17
+ * batched step whose items will be submitted together via EIP-5792
18
+ * `wallet_sendCalls`.
19
+ *
20
+ * The first item stays `incomplete` so the executeSteps iterator picks it as
21
+ * the active step item; all subsequent items are pre-marked `complete` so the
22
+ * iterator doesn't try to execute them again as separate transactions after
23
+ * the batch lands.
24
+ */
3
25
  export declare function prepareBatchTransaction(steps: Execute['steps']): {
4
26
  id: any;
5
27
  action: string;
@@ -1 +1 @@
1
- {"version":3,"file":"prepareBatchTransaction.d.ts","sourceRoot":"","sources":["../../../src/utils/prepareBatchTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,WAiB3D;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB9D"}
1
+ {"version":3,"file":"prepareBatchTransaction.d.ts","sourceRoot":"","sources":["../../../src/utils/prepareBatchTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,WAmB3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB9D"}
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "5.2.2";
1
+ export declare const SDK_VERSION = "5.2.3";
2
2
  //# sourceMappingURL=version.d.ts.map