@anywalletkit/protocol-swap2-stargate 0.0.0-stage → 0.1.0

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.
Files changed (121) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +502 -2
  3. package/dist/abi.cjs +91 -0
  4. package/dist/abi.cjs.map +1 -0
  5. package/dist/abi.d.cts +810 -0
  6. package/dist/abi.d.ts +810 -0
  7. package/dist/abi.js +13 -0
  8. package/dist/abi.js.map +1 -0
  9. package/dist/amounts.cjs +73 -0
  10. package/dist/amounts.cjs.map +1 -0
  11. package/dist/amounts.d.cts +21 -0
  12. package/dist/amounts.d.ts +21 -0
  13. package/dist/amounts.js +15 -0
  14. package/dist/amounts.js.map +1 -0
  15. package/dist/bus-Cdw8iwOv.d.cts +59 -0
  16. package/dist/bus-vAWqTAkq.d.ts +59 -0
  17. package/dist/bus.cjs +237 -0
  18. package/dist/bus.cjs.map +1 -0
  19. package/dist/bus.d.cts +4 -0
  20. package/dist/bus.d.ts +4 -0
  21. package/dist/bus.js +22 -0
  22. package/dist/bus.js.map +1 -0
  23. package/dist/chunk-3NTMZUAU.js +128 -0
  24. package/dist/chunk-3NTMZUAU.js.map +1 -0
  25. package/dist/chunk-4HU46QF2.js +256 -0
  26. package/dist/chunk-4HU46QF2.js.map +1 -0
  27. package/dist/chunk-4IDDRIE2.js +125 -0
  28. package/dist/chunk-4IDDRIE2.js.map +1 -0
  29. package/dist/chunk-EANM3EI3.js +71 -0
  30. package/dist/chunk-EANM3EI3.js.map +1 -0
  31. package/dist/chunk-ERC6LKMN.js +87 -0
  32. package/dist/chunk-ERC6LKMN.js.map +1 -0
  33. package/dist/chunk-FLAXDJPE.js +24 -0
  34. package/dist/chunk-FLAXDJPE.js.map +1 -0
  35. package/dist/chunk-N54YIG6T.js +33 -0
  36. package/dist/chunk-N54YIG6T.js.map +1 -0
  37. package/dist/chunk-OUGUX3JK.js +53 -0
  38. package/dist/chunk-OUGUX3JK.js.map +1 -0
  39. package/dist/chunk-PJXDMVW3.js +909 -0
  40. package/dist/chunk-PJXDMVW3.js.map +1 -0
  41. package/dist/chunk-QNVTQEOV.js +72 -0
  42. package/dist/chunk-QNVTQEOV.js.map +1 -0
  43. package/dist/chunk-UDJL7BUP.js +249 -0
  44. package/dist/chunk-UDJL7BUP.js.map +1 -0
  45. package/dist/chunk-YHHV3XHY.js +139 -0
  46. package/dist/chunk-YHHV3XHY.js.map +1 -0
  47. package/dist/compose-dex.cjs +148 -0
  48. package/dist/compose-dex.cjs.map +1 -0
  49. package/dist/compose-dex.d.cts +113 -0
  50. package/dist/compose-dex.d.ts +113 -0
  51. package/dist/compose-dex.js +25 -0
  52. package/dist/compose-dex.js.map +1 -0
  53. package/dist/compose-route.cjs +1019 -0
  54. package/dist/compose-route.cjs.map +1 -0
  55. package/dist/compose-route.d.cts +93 -0
  56. package/dist/compose-route.d.ts +93 -0
  57. package/dist/compose-route.js +45 -0
  58. package/dist/compose-route.js.map +1 -0
  59. package/dist/compose.cjs +287 -0
  60. package/dist/compose.cjs.map +1 -0
  61. package/dist/compose.d.cts +293 -0
  62. package/dist/compose.d.ts +293 -0
  63. package/dist/compose.js +30 -0
  64. package/dist/compose.js.map +1 -0
  65. package/dist/deployments.cjs +350 -0
  66. package/dist/deployments.cjs.map +1 -0
  67. package/dist/deployments.d.cts +12 -0
  68. package/dist/deployments.d.ts +12 -0
  69. package/dist/deployments.js +11 -0
  70. package/dist/deployments.js.map +1 -0
  71. package/dist/index.cjs +1862 -0
  72. package/dist/index.cjs.map +1 -0
  73. package/dist/index.d.cts +23 -0
  74. package/dist/index.d.ts +23 -0
  75. package/dist/index.js +46 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/native-drop.cjs +117 -0
  78. package/dist/native-drop.cjs.map +1 -0
  79. package/dist/native-drop.d.cts +13 -0
  80. package/dist/native-drop.d.ts +13 -0
  81. package/dist/native-drop.js +11 -0
  82. package/dist/native-drop.js.map +1 -0
  83. package/dist/pins.cjs +1618 -0
  84. package/dist/pins.cjs.map +1 -0
  85. package/dist/pins.d.cts +39 -0
  86. package/dist/pins.d.ts +39 -0
  87. package/dist/pins.js +21 -0
  88. package/dist/pins.js.map +1 -0
  89. package/dist/protocol.cjs +1851 -0
  90. package/dist/protocol.cjs.map +1 -0
  91. package/dist/protocol.d.cts +24 -0
  92. package/dist/protocol.d.ts +24 -0
  93. package/dist/protocol.js +18 -0
  94. package/dist/protocol.js.map +1 -0
  95. package/dist/provider.cjs +1833 -0
  96. package/dist/provider.cjs.map +1 -0
  97. package/dist/provider.d.cts +30 -0
  98. package/dist/provider.d.ts +30 -0
  99. package/dist/provider.js +17 -0
  100. package/dist/provider.js.map +1 -0
  101. package/dist/quote-r1bA8XbO.d.cts +102 -0
  102. package/dist/quote-t7UJSxbU.d.ts +102 -0
  103. package/dist/quote.cjs +618 -0
  104. package/dist/quote.cjs.map +1 -0
  105. package/dist/quote.d.cts +3 -0
  106. package/dist/quote.d.ts +3 -0
  107. package/dist/quote.js +16 -0
  108. package/dist/quote.js.map +1 -0
  109. package/dist/registry.cjs +100 -0
  110. package/dist/registry.cjs.map +1 -0
  111. package/dist/registry.d.cts +42 -0
  112. package/dist/registry.d.ts +42 -0
  113. package/dist/registry.js +8 -0
  114. package/dist/registry.js.map +1 -0
  115. package/dist/tracking.cjs +1143 -0
  116. package/dist/tracking.cjs.map +1 -0
  117. package/dist/tracking.d.cts +57 -0
  118. package/dist/tracking.d.ts +57 -0
  119. package/dist/tracking.js +23 -0
  120. package/dist/tracking.js.map +1 -0
  121. package/package.json +134 -3
@@ -0,0 +1,293 @@
1
+ import { Hex, Address, TransactionReceipt } from 'viem';
2
+ import { S as StargateIntent } from './bus-Cdw8iwOv.cjs';
3
+ import { StargateTaxiProof } from './tracking.cjs';
4
+ export { s as stargateComposeOptions } from './quote-r1bA8XbO.cjs';
5
+ import './registry.cjs';
6
+ import '@anywalletkit/protocol-swap2-core/types';
7
+
8
+ declare const COMPOSE_ABI: readonly [{
9
+ readonly name: "composeQueue";
10
+ readonly type: "function";
11
+ readonly stateMutability: "view";
12
+ readonly inputs: readonly [{
13
+ readonly type: "address";
14
+ readonly name: "from";
15
+ }, {
16
+ readonly type: "address";
17
+ readonly name: "to";
18
+ }, {
19
+ readonly type: "bytes32";
20
+ readonly name: "guid";
21
+ }, {
22
+ readonly type: "uint16";
23
+ readonly name: "index";
24
+ }];
25
+ readonly outputs: readonly [{
26
+ readonly type: "bytes32";
27
+ }];
28
+ }, {
29
+ readonly name: "lzCompose";
30
+ readonly type: "function";
31
+ readonly stateMutability: "payable";
32
+ readonly inputs: readonly [{
33
+ readonly type: "address";
34
+ readonly name: "from";
35
+ }, {
36
+ readonly type: "address";
37
+ readonly name: "to";
38
+ }, {
39
+ readonly type: "bytes32";
40
+ readonly name: "guid";
41
+ }, {
42
+ readonly type: "uint16";
43
+ readonly name: "index";
44
+ }, {
45
+ readonly type: "bytes";
46
+ readonly name: "message";
47
+ }, {
48
+ readonly type: "bytes";
49
+ readonly name: "extraData";
50
+ }];
51
+ readonly outputs: readonly [];
52
+ }, {
53
+ readonly name: "ComposeSent";
54
+ readonly type: "event";
55
+ readonly inputs: readonly [{
56
+ readonly type: "address";
57
+ readonly name: "from";
58
+ }, {
59
+ readonly type: "address";
60
+ readonly name: "to";
61
+ }, {
62
+ readonly type: "bytes32";
63
+ readonly name: "guid";
64
+ }, {
65
+ readonly type: "uint16";
66
+ readonly name: "index";
67
+ }, {
68
+ readonly type: "bytes";
69
+ readonly name: "message";
70
+ }];
71
+ }, {
72
+ readonly name: "ComposeDelivered";
73
+ readonly type: "event";
74
+ readonly inputs: readonly [{
75
+ readonly type: "address";
76
+ readonly name: "from";
77
+ }, {
78
+ readonly type: "address";
79
+ readonly name: "to";
80
+ }, {
81
+ readonly type: "bytes32";
82
+ readonly name: "guid";
83
+ }, {
84
+ readonly type: "uint16";
85
+ readonly name: "index";
86
+ }];
87
+ }];
88
+ declare const LIFI_COMPOSE_ABI: readonly [{
89
+ readonly name: "executor";
90
+ readonly type: "function";
91
+ readonly stateMutability: "view";
92
+ readonly inputs: readonly [];
93
+ readonly outputs: readonly [{
94
+ readonly type: "address";
95
+ }];
96
+ }, {
97
+ readonly name: "endpointV2";
98
+ readonly type: "function";
99
+ readonly stateMutability: "view";
100
+ readonly inputs: readonly [];
101
+ readonly outputs: readonly [{
102
+ readonly type: "address";
103
+ }];
104
+ }, {
105
+ readonly name: "tokenMessaging";
106
+ readonly type: "function";
107
+ readonly stateMutability: "view";
108
+ readonly inputs: readonly [];
109
+ readonly outputs: readonly [{
110
+ readonly type: "address";
111
+ }];
112
+ }, {
113
+ readonly name: "recoverGas";
114
+ readonly type: "function";
115
+ readonly stateMutability: "view";
116
+ readonly inputs: readonly [];
117
+ readonly outputs: readonly [{
118
+ readonly type: "uint256";
119
+ }];
120
+ }, {
121
+ readonly name: "LiFiTransferCompleted";
122
+ readonly type: "event";
123
+ readonly inputs: readonly [{
124
+ readonly type: "bytes32";
125
+ readonly name: "transactionId";
126
+ readonly indexed: true;
127
+ }, {
128
+ readonly type: "address";
129
+ readonly name: "receivingAssetId";
130
+ }, {
131
+ readonly type: "address";
132
+ readonly name: "receiver";
133
+ }, {
134
+ readonly type: "uint256";
135
+ readonly name: "amount";
136
+ }, {
137
+ readonly type: "uint256";
138
+ readonly name: "timestamp";
139
+ }];
140
+ }, {
141
+ readonly name: "LiFiTransferRecovered";
142
+ readonly type: "event";
143
+ readonly inputs: readonly [{
144
+ readonly type: "bytes32";
145
+ readonly name: "transactionId";
146
+ readonly indexed: true;
147
+ }, {
148
+ readonly type: "address";
149
+ readonly name: "receivingAssetId";
150
+ }, {
151
+ readonly type: "address";
152
+ readonly name: "receiver";
153
+ }, {
154
+ readonly type: "uint256";
155
+ readonly name: "amount";
156
+ }, {
157
+ readonly type: "uint256";
158
+ readonly name: "timestamp";
159
+ }];
160
+ }, {
161
+ readonly name: "AssetSwapped";
162
+ readonly type: "event";
163
+ readonly inputs: readonly [{
164
+ readonly type: "bytes32";
165
+ readonly name: "transactionId";
166
+ }, {
167
+ readonly type: "address";
168
+ readonly name: "dex";
169
+ }, {
170
+ readonly type: "address";
171
+ readonly name: "fromAssetId";
172
+ }, {
173
+ readonly type: "address";
174
+ readonly name: "toAssetId";
175
+ }, {
176
+ readonly type: "uint256";
177
+ readonly name: "fromAmount";
178
+ }, {
179
+ readonly type: "uint256";
180
+ readonly name: "toAmount";
181
+ }, {
182
+ readonly type: "uint256";
183
+ readonly name: "timestamp";
184
+ }];
185
+ }, {
186
+ readonly name: "Transfer";
187
+ readonly type: "event";
188
+ readonly inputs: readonly [{
189
+ readonly type: "address";
190
+ readonly name: "from";
191
+ readonly indexed: true;
192
+ }, {
193
+ readonly type: "address";
194
+ readonly name: "to";
195
+ readonly indexed: true;
196
+ }, {
197
+ readonly type: "uint256";
198
+ readonly name: "value";
199
+ }];
200
+ }];
201
+ declare const LIFI_COMPOSE_PAYLOAD: readonly [{
202
+ readonly type: "bytes32";
203
+ readonly name: "transactionId";
204
+ }, {
205
+ readonly type: "tuple[]";
206
+ readonly components: readonly [{
207
+ readonly type: "address";
208
+ readonly name: "callTo";
209
+ }, {
210
+ readonly type: "address";
211
+ readonly name: "approveTo";
212
+ }, {
213
+ readonly type: "address";
214
+ readonly name: "sendingAssetId";
215
+ }, {
216
+ readonly type: "address";
217
+ readonly name: "receivingAssetId";
218
+ }, {
219
+ readonly type: "uint256";
220
+ readonly name: "fromAmount";
221
+ }, {
222
+ readonly type: "bytes";
223
+ readonly name: "callData";
224
+ }, {
225
+ readonly type: "bool";
226
+ readonly name: "requiresDeposit";
227
+ }];
228
+ readonly name: "swaps";
229
+ }, {
230
+ readonly type: "address";
231
+ readonly name: "receiver";
232
+ }];
233
+ /** Observational pins only; these addresses are NOT a call/spender allowlist. */
234
+ declare const LIFI_ETHEREUM_COMPOSER: Readonly<{
235
+ chain: "eip155:1";
236
+ receiver: Address;
237
+ executor: Address;
238
+ receiverCodeHash: Hex;
239
+ executorCodeHash: Hex;
240
+ }>;
241
+ interface StargateComposeExpectation {
242
+ /** Bridge recipient must be the pinned composer; sender is the actual OFTSent actor. */
243
+ bridge: StargateIntent;
244
+ composeFrom: Address;
245
+ composeMsg: Hex;
246
+ recipient: Address;
247
+ finalToken: Address;
248
+ minimum: bigint;
249
+ }
250
+ interface LifiStargateComposeProof {
251
+ readonly bridge: StargateTaxiProof;
252
+ readonly transactionId: Hex;
253
+ readonly message: Hex;
254
+ readonly messageHash: Hex;
255
+ readonly recipient: Address;
256
+ readonly finalToken: Address;
257
+ readonly minimum: bigint;
258
+ readonly swap: {
259
+ readonly callTo: Address;
260
+ readonly fromAmount: bigint;
261
+ };
262
+ /** True only for routes this SDK encoded and checked before signing (`compose-route`); historical proofs are evidence only. */
263
+ readonly executionSupported: boolean;
264
+ }
265
+
266
+ /** Zero is absent; ONE is consumed (unlike cleared inboundPayloadHash for lzReceive). */
267
+ declare function stargateComposeQueueState(messageHash: Hex, queue: Hex): "absent" | "consumed" | "pending" | "mismatch";
268
+ /**
269
+ * Read-only single-swap LI.FI adapter. Receipts/code must first be obtained from
270
+ * canonical finalized blocks on their respective chains. Consistency is checked
271
+ * here; untrusted JSON supplied by a remote server is not independent RPC evidence.
272
+ */
273
+ declare function proveLifiStargateCompose(expected: StargateComposeExpectation, source: TransactionReceipt, delivery: TransactionReceipt, code: {
274
+ receiver: Hex;
275
+ executor: Hex;
276
+ }): LifiStargateComposeProof;
277
+ type StargateComposeOutcome = {
278
+ state: "unverified";
279
+ } | {
280
+ state: "completed";
281
+ token: Address;
282
+ amount: bigint;
283
+ transactionHash: Hex;
284
+ } | {
285
+ state: "intermediate-refunded";
286
+ token: Address;
287
+ amount: bigint;
288
+ transactionHash: Hex;
289
+ };
290
+ /** Final token payment is separate from successful Endpoint compose delivery. */
291
+ declare function lifiStargateComposeOutcome(p: LifiStargateComposeProof, receipt: TransactionReceipt): StargateComposeOutcome;
292
+
293
+ export { COMPOSE_ABI, LIFI_COMPOSE_ABI, LIFI_COMPOSE_PAYLOAD, LIFI_ETHEREUM_COMPOSER, type LifiStargateComposeProof, type StargateComposeExpectation, type StargateComposeOutcome, lifiStargateComposeOutcome, proveLifiStargateCompose, stargateComposeQueueState };
@@ -0,0 +1,293 @@
1
+ import { Hex, Address, TransactionReceipt } from 'viem';
2
+ import { S as StargateIntent } from './bus-vAWqTAkq.js';
3
+ import { StargateTaxiProof } from './tracking.js';
4
+ export { s as stargateComposeOptions } from './quote-t7UJSxbU.js';
5
+ import './registry.js';
6
+ import '@anywalletkit/protocol-swap2-core/types';
7
+
8
+ declare const COMPOSE_ABI: readonly [{
9
+ readonly name: "composeQueue";
10
+ readonly type: "function";
11
+ readonly stateMutability: "view";
12
+ readonly inputs: readonly [{
13
+ readonly type: "address";
14
+ readonly name: "from";
15
+ }, {
16
+ readonly type: "address";
17
+ readonly name: "to";
18
+ }, {
19
+ readonly type: "bytes32";
20
+ readonly name: "guid";
21
+ }, {
22
+ readonly type: "uint16";
23
+ readonly name: "index";
24
+ }];
25
+ readonly outputs: readonly [{
26
+ readonly type: "bytes32";
27
+ }];
28
+ }, {
29
+ readonly name: "lzCompose";
30
+ readonly type: "function";
31
+ readonly stateMutability: "payable";
32
+ readonly inputs: readonly [{
33
+ readonly type: "address";
34
+ readonly name: "from";
35
+ }, {
36
+ readonly type: "address";
37
+ readonly name: "to";
38
+ }, {
39
+ readonly type: "bytes32";
40
+ readonly name: "guid";
41
+ }, {
42
+ readonly type: "uint16";
43
+ readonly name: "index";
44
+ }, {
45
+ readonly type: "bytes";
46
+ readonly name: "message";
47
+ }, {
48
+ readonly type: "bytes";
49
+ readonly name: "extraData";
50
+ }];
51
+ readonly outputs: readonly [];
52
+ }, {
53
+ readonly name: "ComposeSent";
54
+ readonly type: "event";
55
+ readonly inputs: readonly [{
56
+ readonly type: "address";
57
+ readonly name: "from";
58
+ }, {
59
+ readonly type: "address";
60
+ readonly name: "to";
61
+ }, {
62
+ readonly type: "bytes32";
63
+ readonly name: "guid";
64
+ }, {
65
+ readonly type: "uint16";
66
+ readonly name: "index";
67
+ }, {
68
+ readonly type: "bytes";
69
+ readonly name: "message";
70
+ }];
71
+ }, {
72
+ readonly name: "ComposeDelivered";
73
+ readonly type: "event";
74
+ readonly inputs: readonly [{
75
+ readonly type: "address";
76
+ readonly name: "from";
77
+ }, {
78
+ readonly type: "address";
79
+ readonly name: "to";
80
+ }, {
81
+ readonly type: "bytes32";
82
+ readonly name: "guid";
83
+ }, {
84
+ readonly type: "uint16";
85
+ readonly name: "index";
86
+ }];
87
+ }];
88
+ declare const LIFI_COMPOSE_ABI: readonly [{
89
+ readonly name: "executor";
90
+ readonly type: "function";
91
+ readonly stateMutability: "view";
92
+ readonly inputs: readonly [];
93
+ readonly outputs: readonly [{
94
+ readonly type: "address";
95
+ }];
96
+ }, {
97
+ readonly name: "endpointV2";
98
+ readonly type: "function";
99
+ readonly stateMutability: "view";
100
+ readonly inputs: readonly [];
101
+ readonly outputs: readonly [{
102
+ readonly type: "address";
103
+ }];
104
+ }, {
105
+ readonly name: "tokenMessaging";
106
+ readonly type: "function";
107
+ readonly stateMutability: "view";
108
+ readonly inputs: readonly [];
109
+ readonly outputs: readonly [{
110
+ readonly type: "address";
111
+ }];
112
+ }, {
113
+ readonly name: "recoverGas";
114
+ readonly type: "function";
115
+ readonly stateMutability: "view";
116
+ readonly inputs: readonly [];
117
+ readonly outputs: readonly [{
118
+ readonly type: "uint256";
119
+ }];
120
+ }, {
121
+ readonly name: "LiFiTransferCompleted";
122
+ readonly type: "event";
123
+ readonly inputs: readonly [{
124
+ readonly type: "bytes32";
125
+ readonly name: "transactionId";
126
+ readonly indexed: true;
127
+ }, {
128
+ readonly type: "address";
129
+ readonly name: "receivingAssetId";
130
+ }, {
131
+ readonly type: "address";
132
+ readonly name: "receiver";
133
+ }, {
134
+ readonly type: "uint256";
135
+ readonly name: "amount";
136
+ }, {
137
+ readonly type: "uint256";
138
+ readonly name: "timestamp";
139
+ }];
140
+ }, {
141
+ readonly name: "LiFiTransferRecovered";
142
+ readonly type: "event";
143
+ readonly inputs: readonly [{
144
+ readonly type: "bytes32";
145
+ readonly name: "transactionId";
146
+ readonly indexed: true;
147
+ }, {
148
+ readonly type: "address";
149
+ readonly name: "receivingAssetId";
150
+ }, {
151
+ readonly type: "address";
152
+ readonly name: "receiver";
153
+ }, {
154
+ readonly type: "uint256";
155
+ readonly name: "amount";
156
+ }, {
157
+ readonly type: "uint256";
158
+ readonly name: "timestamp";
159
+ }];
160
+ }, {
161
+ readonly name: "AssetSwapped";
162
+ readonly type: "event";
163
+ readonly inputs: readonly [{
164
+ readonly type: "bytes32";
165
+ readonly name: "transactionId";
166
+ }, {
167
+ readonly type: "address";
168
+ readonly name: "dex";
169
+ }, {
170
+ readonly type: "address";
171
+ readonly name: "fromAssetId";
172
+ }, {
173
+ readonly type: "address";
174
+ readonly name: "toAssetId";
175
+ }, {
176
+ readonly type: "uint256";
177
+ readonly name: "fromAmount";
178
+ }, {
179
+ readonly type: "uint256";
180
+ readonly name: "toAmount";
181
+ }, {
182
+ readonly type: "uint256";
183
+ readonly name: "timestamp";
184
+ }];
185
+ }, {
186
+ readonly name: "Transfer";
187
+ readonly type: "event";
188
+ readonly inputs: readonly [{
189
+ readonly type: "address";
190
+ readonly name: "from";
191
+ readonly indexed: true;
192
+ }, {
193
+ readonly type: "address";
194
+ readonly name: "to";
195
+ readonly indexed: true;
196
+ }, {
197
+ readonly type: "uint256";
198
+ readonly name: "value";
199
+ }];
200
+ }];
201
+ declare const LIFI_COMPOSE_PAYLOAD: readonly [{
202
+ readonly type: "bytes32";
203
+ readonly name: "transactionId";
204
+ }, {
205
+ readonly type: "tuple[]";
206
+ readonly components: readonly [{
207
+ readonly type: "address";
208
+ readonly name: "callTo";
209
+ }, {
210
+ readonly type: "address";
211
+ readonly name: "approveTo";
212
+ }, {
213
+ readonly type: "address";
214
+ readonly name: "sendingAssetId";
215
+ }, {
216
+ readonly type: "address";
217
+ readonly name: "receivingAssetId";
218
+ }, {
219
+ readonly type: "uint256";
220
+ readonly name: "fromAmount";
221
+ }, {
222
+ readonly type: "bytes";
223
+ readonly name: "callData";
224
+ }, {
225
+ readonly type: "bool";
226
+ readonly name: "requiresDeposit";
227
+ }];
228
+ readonly name: "swaps";
229
+ }, {
230
+ readonly type: "address";
231
+ readonly name: "receiver";
232
+ }];
233
+ /** Observational pins only; these addresses are NOT a call/spender allowlist. */
234
+ declare const LIFI_ETHEREUM_COMPOSER: Readonly<{
235
+ chain: "eip155:1";
236
+ receiver: Address;
237
+ executor: Address;
238
+ receiverCodeHash: Hex;
239
+ executorCodeHash: Hex;
240
+ }>;
241
+ interface StargateComposeExpectation {
242
+ /** Bridge recipient must be the pinned composer; sender is the actual OFTSent actor. */
243
+ bridge: StargateIntent;
244
+ composeFrom: Address;
245
+ composeMsg: Hex;
246
+ recipient: Address;
247
+ finalToken: Address;
248
+ minimum: bigint;
249
+ }
250
+ interface LifiStargateComposeProof {
251
+ readonly bridge: StargateTaxiProof;
252
+ readonly transactionId: Hex;
253
+ readonly message: Hex;
254
+ readonly messageHash: Hex;
255
+ readonly recipient: Address;
256
+ readonly finalToken: Address;
257
+ readonly minimum: bigint;
258
+ readonly swap: {
259
+ readonly callTo: Address;
260
+ readonly fromAmount: bigint;
261
+ };
262
+ /** True only for routes this SDK encoded and checked before signing (`compose-route`); historical proofs are evidence only. */
263
+ readonly executionSupported: boolean;
264
+ }
265
+
266
+ /** Zero is absent; ONE is consumed (unlike cleared inboundPayloadHash for lzReceive). */
267
+ declare function stargateComposeQueueState(messageHash: Hex, queue: Hex): "absent" | "consumed" | "pending" | "mismatch";
268
+ /**
269
+ * Read-only single-swap LI.FI adapter. Receipts/code must first be obtained from
270
+ * canonical finalized blocks on their respective chains. Consistency is checked
271
+ * here; untrusted JSON supplied by a remote server is not independent RPC evidence.
272
+ */
273
+ declare function proveLifiStargateCompose(expected: StargateComposeExpectation, source: TransactionReceipt, delivery: TransactionReceipt, code: {
274
+ receiver: Hex;
275
+ executor: Hex;
276
+ }): LifiStargateComposeProof;
277
+ type StargateComposeOutcome = {
278
+ state: "unverified";
279
+ } | {
280
+ state: "completed";
281
+ token: Address;
282
+ amount: bigint;
283
+ transactionHash: Hex;
284
+ } | {
285
+ state: "intermediate-refunded";
286
+ token: Address;
287
+ amount: bigint;
288
+ transactionHash: Hex;
289
+ };
290
+ /** Final token payment is separate from successful Endpoint compose delivery. */
291
+ declare function lifiStargateComposeOutcome(p: LifiStargateComposeProof, receipt: TransactionReceipt): StargateComposeOutcome;
292
+
293
+ export { COMPOSE_ABI, LIFI_COMPOSE_ABI, LIFI_COMPOSE_PAYLOAD, LIFI_ETHEREUM_COMPOSER, type LifiStargateComposeProof, type StargateComposeExpectation, type StargateComposeOutcome, lifiStargateComposeOutcome, proveLifiStargateCompose, stargateComposeQueueState };
@@ -0,0 +1,30 @@
1
+ import {
2
+ COMPOSE_ABI,
3
+ LIFI_COMPOSE_ABI,
4
+ LIFI_COMPOSE_PAYLOAD,
5
+ LIFI_ETHEREUM_COMPOSER,
6
+ lifiStargateComposeOutcome,
7
+ proveLifiStargateCompose,
8
+ stargateComposeQueueState
9
+ } from "./chunk-PJXDMVW3.js";
10
+ import "./chunk-N54YIG6T.js";
11
+ import {
12
+ stargateComposeOptions
13
+ } from "./chunk-3NTMZUAU.js";
14
+ import "./chunk-4IDDRIE2.js";
15
+ import "./chunk-ERC6LKMN.js";
16
+ import "./chunk-EANM3EI3.js";
17
+ import "./chunk-4HU46QF2.js";
18
+ import "./chunk-QNVTQEOV.js";
19
+ import "./chunk-OUGUX3JK.js";
20
+ export {
21
+ COMPOSE_ABI,
22
+ LIFI_COMPOSE_ABI,
23
+ LIFI_COMPOSE_PAYLOAD,
24
+ LIFI_ETHEREUM_COMPOSER,
25
+ lifiStargateComposeOutcome,
26
+ proveLifiStargateCompose,
27
+ stargateComposeOptions,
28
+ stargateComposeQueueState
29
+ };
30
+ //# sourceMappingURL=compose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}