@chainflip/sdk 1.2.2 → 1.3.0-alpha.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/dist/swap.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, a as Chain, A as Asset, I as InternalAsset, b as AssetOfChain, T as TransactionOptions, c as ChainAssetMap, d as ChainMap } from './contracts-NCUAyhz5.mjs';
3
- export { f as Assets, g as ChainflipIds, h as ChainflipNetworks, e as Chains, i as getChainflipId } from './contracts-NCUAyhz5.mjs';
2
+ import { C as ChainflipNetwork, a as Chain, A as Asset, I as InternalAsset, b as AssetOfChain, T as TransactionOptions, c as ChainAssetMap, d as ChainMap } from './contracts-lJ2ktbkk.mjs';
3
+ export { f as Assets, g as ChainflipIds, h as ChainflipNetworks, e as Chains, i as getChainflipId } from './contracts-lJ2ktbkk.mjs';
4
4
  import { z } from 'zod';
5
5
 
6
6
  declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[z.ZodObject<{
@@ -9,20 +9,20 @@ declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[
9
9
  destChain: z.ZodLiteral<"Ethereum">;
10
10
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
11
11
  srcAsset: z.ZodLiteral<"FLIP">;
12
- destAsset: z.ZodUnion<[z.ZodLiteral<"USDC">, z.ZodLiteral<"ETH">]>;
12
+ destAsset: z.ZodUnion<[z.ZodLiteral<"USDC">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDT">]>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  amount: string;
15
15
  srcChain: "Ethereum";
16
16
  srcAsset: "FLIP";
17
17
  destChain: "Ethereum";
18
- destAsset: "USDC" | "ETH";
18
+ destAsset: "USDC" | "ETH" | "USDT";
19
19
  destAddress: `0x${string}`;
20
20
  }, {
21
21
  amount: string;
22
22
  srcChain: "Ethereum";
23
23
  srcAsset: "FLIP";
24
24
  destChain: "Ethereum";
25
- destAsset: "USDC" | "ETH";
25
+ destAsset: "USDC" | "ETH" | "USDT";
26
26
  destAddress: string;
27
27
  }>, z.ZodObject<{
28
28
  amount: z.ZodString;
@@ -30,20 +30,41 @@ declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[
30
30
  destChain: z.ZodLiteral<"Ethereum">;
31
31
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
32
32
  srcAsset: z.ZodLiteral<"USDC">;
33
- destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">]>;
33
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDT">]>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  amount: string;
36
36
  srcChain: "Ethereum";
37
37
  srcAsset: "USDC";
38
38
  destChain: "Ethereum";
39
- destAsset: "FLIP" | "ETH";
39
+ destAsset: "FLIP" | "ETH" | "USDT";
40
40
  destAddress: `0x${string}`;
41
41
  }, {
42
42
  amount: string;
43
43
  srcChain: "Ethereum";
44
44
  srcAsset: "USDC";
45
45
  destChain: "Ethereum";
46
- destAsset: "FLIP" | "ETH";
46
+ destAsset: "FLIP" | "ETH" | "USDT";
47
+ destAddress: string;
48
+ }>, z.ZodObject<{
49
+ amount: z.ZodString;
50
+ srcChain: z.ZodLiteral<"Ethereum">;
51
+ destChain: z.ZodLiteral<"Ethereum">;
52
+ destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
53
+ srcAsset: z.ZodLiteral<"USDT">;
54
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDC">]>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ amount: string;
57
+ srcChain: "Ethereum";
58
+ srcAsset: "USDT";
59
+ destChain: "Ethereum";
60
+ destAsset: "FLIP" | "USDC" | "ETH";
61
+ destAddress: `0x${string}`;
62
+ }, {
63
+ amount: string;
64
+ srcChain: "Ethereum";
65
+ srcAsset: "USDT";
66
+ destChain: "Ethereum";
67
+ destAsset: "FLIP" | "USDC" | "ETH";
47
68
  destAddress: string;
48
69
  }>, z.ZodObject<{
49
70
  amount: z.ZodString;
@@ -51,18 +72,18 @@ declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[
51
72
  destChain: z.ZodLiteral<"Polkadot">;
52
73
  destAsset: z.ZodLiteral<"DOT">;
53
74
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, string | null, string>, string, string>, string, string>;
54
- srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">]>;
75
+ srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">, z.ZodLiteral<"USDT">]>;
55
76
  }, "strip", z.ZodTypeAny, {
56
77
  amount: string;
57
78
  srcChain: "Ethereum";
58
- srcAsset: "FLIP" | "USDC";
79
+ srcAsset: "FLIP" | "USDC" | "USDT";
59
80
  destChain: "Polkadot";
60
81
  destAsset: "DOT";
61
82
  destAddress: string;
62
83
  }, {
63
84
  amount: string;
64
85
  srcChain: "Ethereum";
65
- srcAsset: "FLIP" | "USDC";
86
+ srcAsset: "FLIP" | "USDC" | "USDT";
66
87
  destChain: "Polkadot";
67
88
  destAsset: "DOT";
68
89
  destAddress: string;
@@ -72,18 +93,18 @@ declare const tokenSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion<[
72
93
  destChain: z.ZodLiteral<"Bitcoin">;
73
94
  destAsset: z.ZodLiteral<"BTC">;
74
95
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string> | z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>, string, string>;
75
- srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">]>;
96
+ srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">, z.ZodLiteral<"USDT">]>;
76
97
  }, "strip", z.ZodTypeAny, {
77
98
  amount: string;
78
99
  srcChain: "Ethereum";
79
- srcAsset: "FLIP" | "USDC";
100
+ srcAsset: "FLIP" | "USDC" | "USDT";
80
101
  destChain: "Bitcoin";
81
102
  destAsset: "BTC";
82
103
  destAddress: string;
83
104
  }, {
84
105
  amount: string;
85
106
  srcChain: "Ethereum";
86
- srcAsset: "FLIP" | "USDC";
107
+ srcAsset: "FLIP" | "USDC" | "USDT";
87
108
  destChain: "Bitcoin";
88
109
  destAsset: "BTC";
89
110
  destAddress: string;
@@ -93,7 +114,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
93
114
  srcChain: z.ZodLiteral<"Ethereum">;
94
115
  srcAsset: z.ZodLiteral<"ETH">;
95
116
  destChain: z.ZodLiteral<"Ethereum">;
96
- destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">]>;
117
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">, z.ZodLiteral<"USDT">]>;
97
118
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
98
119
  ccmMetadata: z.ZodObject<{
99
120
  gasBudget: z.ZodString;
@@ -110,7 +131,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
110
131
  srcChain: "Ethereum";
111
132
  srcAsset: "ETH";
112
133
  destChain: "Ethereum";
113
- destAsset: "FLIP" | "USDC";
134
+ destAsset: "FLIP" | "USDC" | "USDT";
114
135
  destAddress: `0x${string}`;
115
136
  ccmMetadata: {
116
137
  message: `0x${string}`;
@@ -121,7 +142,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
121
142
  srcChain: "Ethereum";
122
143
  srcAsset: "ETH";
123
144
  destChain: "Ethereum";
124
- destAsset: "FLIP" | "USDC";
145
+ destAsset: "FLIP" | "USDC" | "USDT";
125
146
  destAddress: string;
126
147
  ccmMetadata: {
127
148
  message: string;
@@ -132,7 +153,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
132
153
  srcChain: z.ZodLiteral<"Ethereum">;
133
154
  srcAsset: z.ZodLiteral<"FLIP">;
134
155
  destChain: z.ZodLiteral<"Ethereum">;
135
- destAsset: z.ZodUnion<[z.ZodLiteral<"USDC">, z.ZodLiteral<"ETH">]>;
156
+ destAsset: z.ZodUnion<[z.ZodLiteral<"USDC">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDT">]>;
136
157
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
137
158
  ccmMetadata: z.ZodObject<{
138
159
  gasBudget: z.ZodString;
@@ -149,7 +170,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
149
170
  srcChain: "Ethereum";
150
171
  srcAsset: "FLIP";
151
172
  destChain: "Ethereum";
152
- destAsset: "USDC" | "ETH";
173
+ destAsset: "USDC" | "ETH" | "USDT";
153
174
  destAddress: `0x${string}`;
154
175
  ccmMetadata: {
155
176
  message: `0x${string}`;
@@ -160,7 +181,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
160
181
  srcChain: "Ethereum";
161
182
  srcAsset: "FLIP";
162
183
  destChain: "Ethereum";
163
- destAsset: "USDC" | "ETH";
184
+ destAsset: "USDC" | "ETH" | "USDT";
164
185
  destAddress: string;
165
186
  ccmMetadata: {
166
187
  message: string;
@@ -171,7 +192,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
171
192
  srcChain: z.ZodLiteral<"Ethereum">;
172
193
  srcAsset: z.ZodLiteral<"USDC">;
173
194
  destChain: z.ZodLiteral<"Ethereum">;
174
- destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">]>;
195
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDT">]>;
175
196
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
176
197
  ccmMetadata: z.ZodObject<{
177
198
  gasBudget: z.ZodString;
@@ -188,7 +209,7 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
188
209
  srcChain: "Ethereum";
189
210
  srcAsset: "USDC";
190
211
  destChain: "Ethereum";
191
- destAsset: "FLIP" | "ETH";
212
+ destAsset: "FLIP" | "ETH" | "USDT";
192
213
  destAddress: `0x${string}`;
193
214
  ccmMetadata: {
194
215
  message: `0x${string}`;
@@ -199,7 +220,46 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
199
220
  srcChain: "Ethereum";
200
221
  srcAsset: "USDC";
201
222
  destChain: "Ethereum";
202
- destAsset: "FLIP" | "ETH";
223
+ destAsset: "FLIP" | "ETH" | "USDT";
224
+ destAddress: string;
225
+ ccmMetadata: {
226
+ message: string;
227
+ gasBudget: string;
228
+ };
229
+ }>, z.ZodObject<{
230
+ amount: z.ZodString;
231
+ srcChain: z.ZodLiteral<"Ethereum">;
232
+ srcAsset: z.ZodLiteral<"USDT">;
233
+ destChain: z.ZodLiteral<"Ethereum">;
234
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDC">]>;
235
+ destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
236
+ ccmMetadata: z.ZodObject<{
237
+ gasBudget: z.ZodString;
238
+ message: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
239
+ }, "strip", z.ZodTypeAny, {
240
+ message: `0x${string}`;
241
+ gasBudget: string;
242
+ }, {
243
+ message: string;
244
+ gasBudget: string;
245
+ }>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ amount: string;
248
+ srcChain: "Ethereum";
249
+ srcAsset: "USDT";
250
+ destChain: "Ethereum";
251
+ destAsset: "FLIP" | "USDC" | "ETH";
252
+ destAddress: `0x${string}`;
253
+ ccmMetadata: {
254
+ message: `0x${string}`;
255
+ gasBudget: string;
256
+ };
257
+ }, {
258
+ amount: string;
259
+ srcChain: "Ethereum";
260
+ srcAsset: "USDT";
261
+ destChain: "Ethereum";
262
+ destAsset: "FLIP" | "USDC" | "ETH";
203
263
  destAddress: string;
204
264
  ccmMetadata: {
205
265
  message: string;
@@ -211,20 +271,20 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
211
271
  srcAsset: z.ZodLiteral<"ETH">;
212
272
  destChain: z.ZodLiteral<"Ethereum">;
213
273
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
214
- destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">]>;
274
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">, z.ZodLiteral<"USDT">]>;
215
275
  }, "strip", z.ZodTypeAny, {
216
276
  amount: string;
217
277
  srcChain: "Ethereum";
218
278
  srcAsset: "ETH";
219
279
  destChain: "Ethereum";
220
- destAsset: "FLIP" | "USDC";
280
+ destAsset: "FLIP" | "USDC" | "USDT";
221
281
  destAddress: `0x${string}`;
222
282
  }, {
223
283
  amount: string;
224
284
  srcChain: "Ethereum";
225
285
  srcAsset: "ETH";
226
286
  destChain: "Ethereum";
227
- destAsset: "FLIP" | "USDC";
287
+ destAsset: "FLIP" | "USDC" | "USDT";
228
288
  destAddress: string;
229
289
  }>, z.ZodObject<{
230
290
  amount: z.ZodString;
@@ -274,20 +334,20 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
274
334
  destChain: z.ZodLiteral<"Ethereum">;
275
335
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
276
336
  srcAsset: z.ZodLiteral<"FLIP">;
277
- destAsset: z.ZodUnion<[z.ZodLiteral<"USDC">, z.ZodLiteral<"ETH">]>;
337
+ destAsset: z.ZodUnion<[z.ZodLiteral<"USDC">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDT">]>;
278
338
  }, "strip", z.ZodTypeAny, {
279
339
  amount: string;
280
340
  srcChain: "Ethereum";
281
341
  srcAsset: "FLIP";
282
342
  destChain: "Ethereum";
283
- destAsset: "USDC" | "ETH";
343
+ destAsset: "USDC" | "ETH" | "USDT";
284
344
  destAddress: `0x${string}`;
285
345
  }, {
286
346
  amount: string;
287
347
  srcChain: "Ethereum";
288
348
  srcAsset: "FLIP";
289
349
  destChain: "Ethereum";
290
- destAsset: "USDC" | "ETH";
350
+ destAsset: "USDC" | "ETH" | "USDT";
291
351
  destAddress: string;
292
352
  }>, z.ZodObject<{
293
353
  amount: z.ZodString;
@@ -295,20 +355,41 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
295
355
  destChain: z.ZodLiteral<"Ethereum">;
296
356
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
297
357
  srcAsset: z.ZodLiteral<"USDC">;
298
- destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">]>;
358
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDT">]>;
299
359
  }, "strip", z.ZodTypeAny, {
300
360
  amount: string;
301
361
  srcChain: "Ethereum";
302
362
  srcAsset: "USDC";
303
363
  destChain: "Ethereum";
304
- destAsset: "FLIP" | "ETH";
364
+ destAsset: "FLIP" | "ETH" | "USDT";
305
365
  destAddress: `0x${string}`;
306
366
  }, {
307
367
  amount: string;
308
368
  srcChain: "Ethereum";
309
369
  srcAsset: "USDC";
310
370
  destChain: "Ethereum";
311
- destAsset: "FLIP" | "ETH";
371
+ destAsset: "FLIP" | "ETH" | "USDT";
372
+ destAddress: string;
373
+ }>, z.ZodObject<{
374
+ amount: z.ZodString;
375
+ srcChain: z.ZodLiteral<"Ethereum">;
376
+ destChain: z.ZodLiteral<"Ethereum">;
377
+ destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
378
+ srcAsset: z.ZodLiteral<"USDT">;
379
+ destAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"ETH">, z.ZodLiteral<"USDC">]>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ amount: string;
382
+ srcChain: "Ethereum";
383
+ srcAsset: "USDT";
384
+ destChain: "Ethereum";
385
+ destAsset: "FLIP" | "USDC" | "ETH";
386
+ destAddress: `0x${string}`;
387
+ }, {
388
+ amount: string;
389
+ srcChain: "Ethereum";
390
+ srcAsset: "USDT";
391
+ destChain: "Ethereum";
392
+ destAsset: "FLIP" | "USDC" | "ETH";
312
393
  destAddress: string;
313
394
  }>, z.ZodObject<{
314
395
  amount: z.ZodString;
@@ -316,18 +397,18 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
316
397
  destChain: z.ZodLiteral<"Polkadot">;
317
398
  destAsset: z.ZodLiteral<"DOT">;
318
399
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, `0x${string}`, string>]>, string | null, string>, string, string>, string, string>;
319
- srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">]>;
400
+ srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">, z.ZodLiteral<"USDT">]>;
320
401
  }, "strip", z.ZodTypeAny, {
321
402
  amount: string;
322
403
  srcChain: "Ethereum";
323
- srcAsset: "FLIP" | "USDC";
404
+ srcAsset: "FLIP" | "USDC" | "USDT";
324
405
  destChain: "Polkadot";
325
406
  destAsset: "DOT";
326
407
  destAddress: string;
327
408
  }, {
328
409
  amount: string;
329
410
  srcChain: "Ethereum";
330
- srcAsset: "FLIP" | "USDC";
411
+ srcAsset: "FLIP" | "USDC" | "USDT";
331
412
  destChain: "Polkadot";
332
413
  destAsset: "DOT";
333
414
  destAddress: string;
@@ -337,18 +418,18 @@ declare const executeSwapParamsSchema: (network: ChainflipNetwork) => z.ZodUnion
337
418
  destChain: z.ZodLiteral<"Bitcoin">;
338
419
  destAsset: z.ZodLiteral<"BTC">;
339
420
  destAddress: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string> | z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>, string, string>;
340
- srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">]>;
421
+ srcAsset: z.ZodUnion<[z.ZodLiteral<"FLIP">, z.ZodLiteral<"USDC">, z.ZodLiteral<"USDT">]>;
341
422
  }, "strip", z.ZodTypeAny, {
342
423
  amount: string;
343
424
  srcChain: "Ethereum";
344
- srcAsset: "FLIP" | "USDC";
425
+ srcAsset: "FLIP" | "USDC" | "USDT";
345
426
  destChain: "Bitcoin";
346
427
  destAsset: "BTC";
347
428
  destAddress: string;
348
429
  }, {
349
430
  amount: string;
350
431
  srcChain: "Ethereum";
351
- srcAsset: "FLIP" | "USDC";
432
+ srcAsset: "FLIP" | "USDC" | "USDT";
352
433
  destChain: "Bitcoin";
353
434
  destAsset: "BTC";
354
435
  destAddress: string;