@tokenlon/v6-sdk 0.0.11 → 1.0.0-canary.81b96ae
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/cjs/constants/abis.js +320 -1
- package/dist/cjs/constants/abis.js.map +1 -1
- package/dist/cjs/constants/addresses.js +17 -18
- package/dist/cjs/constants/addresses.js.map +1 -1
- package/dist/cjs/permit/index.js +64 -0
- package/dist/cjs/permit/index.js.map +1 -1
- package/dist/cjs/price/index.js +3 -2
- package/dist/cjs/price/index.js.map +1 -1
- package/dist/cjs/swap/index.js +28 -59
- package/dist/cjs/swap/index.js.map +1 -1
- package/dist/cjs/swap/type.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/constants/abis.js +319 -0
- package/dist/esm/constants/abis.js.map +1 -1
- package/dist/esm/constants/addresses.js +16 -17
- package/dist/esm/constants/addresses.js.map +1 -1
- package/dist/esm/permit/index.js +64 -0
- package/dist/esm/permit/index.js.map +1 -1
- package/dist/esm/price/index.js +3 -2
- package/dist/esm/price/index.js.map +1 -1
- package/dist/esm/swap/index.js +30 -61
- package/dist/esm/swap/index.js.map +1 -1
- package/dist/esm/swap/type.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/constants/abis.d.ts +251 -0
- package/dist/types/constants/abis.d.ts.map +1 -1
- package/dist/types/constants/addresses.d.ts +3 -4
- package/dist/types/constants/addresses.d.ts.map +1 -1
- package/dist/types/errors/base.d.ts +1 -1
- package/dist/types/errors/base.d.ts.map +1 -1
- package/dist/types/permit/index.d.ts +24 -0
- package/dist/types/permit/index.d.ts.map +1 -1
- package/dist/types/price/index.d.ts.map +1 -1
- package/dist/types/swap/index.d.ts +6 -6
- package/dist/types/swap/index.d.ts.map +1 -1
- package/dist/types/swap/type.d.ts +10 -1
- package/dist/types/swap/type.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +28 -21
|
@@ -281,6 +281,242 @@ export declare const GENERIC_SWAP_ABI: readonly [{
|
|
|
281
281
|
readonly stateMutability: "payable";
|
|
282
282
|
readonly type: "receive";
|
|
283
283
|
}];
|
|
284
|
+
export declare const UNIAGENT_SWAP_ABI: readonly [{
|
|
285
|
+
readonly inputs: readonly [{
|
|
286
|
+
readonly internalType: "address";
|
|
287
|
+
readonly name: "_owner";
|
|
288
|
+
readonly type: "address";
|
|
289
|
+
}, {
|
|
290
|
+
readonly internalType: "address";
|
|
291
|
+
readonly name: "_uniswapPermit2";
|
|
292
|
+
readonly type: "address";
|
|
293
|
+
}, {
|
|
294
|
+
readonly internalType: "address";
|
|
295
|
+
readonly name: "_allowanceTarget";
|
|
296
|
+
readonly type: "address";
|
|
297
|
+
}];
|
|
298
|
+
readonly stateMutability: "nonpayable";
|
|
299
|
+
readonly type: "constructor";
|
|
300
|
+
}, {
|
|
301
|
+
readonly inputs: readonly [];
|
|
302
|
+
readonly name: "InsufficientBalance";
|
|
303
|
+
readonly type: "error";
|
|
304
|
+
}, {
|
|
305
|
+
readonly inputs: readonly [];
|
|
306
|
+
readonly name: "InvalidMsgValue";
|
|
307
|
+
readonly type: "error";
|
|
308
|
+
}, {
|
|
309
|
+
readonly inputs: readonly [];
|
|
310
|
+
readonly name: "NominationExists";
|
|
311
|
+
readonly type: "error";
|
|
312
|
+
}, {
|
|
313
|
+
readonly inputs: readonly [];
|
|
314
|
+
readonly name: "NotNominated";
|
|
315
|
+
readonly type: "error";
|
|
316
|
+
}, {
|
|
317
|
+
readonly inputs: readonly [];
|
|
318
|
+
readonly name: "NotOwner";
|
|
319
|
+
readonly type: "error";
|
|
320
|
+
}, {
|
|
321
|
+
readonly inputs: readonly [];
|
|
322
|
+
readonly name: "Permit2DataEmpty";
|
|
323
|
+
readonly type: "error";
|
|
324
|
+
}, {
|
|
325
|
+
readonly inputs: readonly [];
|
|
326
|
+
readonly name: "ZeroOwner";
|
|
327
|
+
readonly type: "error";
|
|
328
|
+
}, {
|
|
329
|
+
readonly anonymous: false;
|
|
330
|
+
readonly inputs: readonly [{
|
|
331
|
+
readonly indexed: true;
|
|
332
|
+
readonly internalType: "address";
|
|
333
|
+
readonly name: "oldOwner";
|
|
334
|
+
readonly type: "address";
|
|
335
|
+
}, {
|
|
336
|
+
readonly indexed: true;
|
|
337
|
+
readonly internalType: "address";
|
|
338
|
+
readonly name: "newOwner";
|
|
339
|
+
readonly type: "address";
|
|
340
|
+
}];
|
|
341
|
+
readonly name: "OwnerChanged";
|
|
342
|
+
readonly type: "event";
|
|
343
|
+
}, {
|
|
344
|
+
readonly anonymous: false;
|
|
345
|
+
readonly inputs: readonly [{
|
|
346
|
+
readonly indexed: true;
|
|
347
|
+
readonly internalType: "address";
|
|
348
|
+
readonly name: "newOwner";
|
|
349
|
+
readonly type: "address";
|
|
350
|
+
}];
|
|
351
|
+
readonly name: "OwnerNominated";
|
|
352
|
+
readonly type: "event";
|
|
353
|
+
}, {
|
|
354
|
+
readonly anonymous: false;
|
|
355
|
+
readonly inputs: readonly [{
|
|
356
|
+
readonly indexed: true;
|
|
357
|
+
readonly internalType: "address";
|
|
358
|
+
readonly name: "user";
|
|
359
|
+
readonly type: "address";
|
|
360
|
+
}, {
|
|
361
|
+
readonly indexed: true;
|
|
362
|
+
readonly internalType: "address";
|
|
363
|
+
readonly name: "router";
|
|
364
|
+
readonly type: "address";
|
|
365
|
+
}, {
|
|
366
|
+
readonly indexed: true;
|
|
367
|
+
readonly internalType: "address";
|
|
368
|
+
readonly name: "inputToken";
|
|
369
|
+
readonly type: "address";
|
|
370
|
+
}, {
|
|
371
|
+
readonly indexed: false;
|
|
372
|
+
readonly internalType: "uint256";
|
|
373
|
+
readonly name: "inputAmount";
|
|
374
|
+
readonly type: "uint256";
|
|
375
|
+
}];
|
|
376
|
+
readonly name: "Swap";
|
|
377
|
+
readonly type: "event";
|
|
378
|
+
}, {
|
|
379
|
+
readonly inputs: readonly [];
|
|
380
|
+
readonly name: "acceptOwnership";
|
|
381
|
+
readonly outputs: readonly [];
|
|
382
|
+
readonly stateMutability: "nonpayable";
|
|
383
|
+
readonly type: "function";
|
|
384
|
+
}, {
|
|
385
|
+
readonly inputs: readonly [];
|
|
386
|
+
readonly name: "allowanceTarget";
|
|
387
|
+
readonly outputs: readonly [{
|
|
388
|
+
readonly internalType: "address";
|
|
389
|
+
readonly name: "";
|
|
390
|
+
readonly type: "address";
|
|
391
|
+
}];
|
|
392
|
+
readonly stateMutability: "view";
|
|
393
|
+
readonly type: "function";
|
|
394
|
+
}, {
|
|
395
|
+
readonly inputs: readonly [{
|
|
396
|
+
readonly internalType: "enum IUniAgent.RouterType";
|
|
397
|
+
readonly name: "routerType";
|
|
398
|
+
readonly type: "uint8";
|
|
399
|
+
}, {
|
|
400
|
+
readonly internalType: "address";
|
|
401
|
+
readonly name: "inputToken";
|
|
402
|
+
readonly type: "address";
|
|
403
|
+
}, {
|
|
404
|
+
readonly internalType: "uint256";
|
|
405
|
+
readonly name: "inputAmount";
|
|
406
|
+
readonly type: "uint256";
|
|
407
|
+
}, {
|
|
408
|
+
readonly internalType: "bytes";
|
|
409
|
+
readonly name: "payload";
|
|
410
|
+
readonly type: "bytes";
|
|
411
|
+
}, {
|
|
412
|
+
readonly internalType: "bytes";
|
|
413
|
+
readonly name: "userPermit";
|
|
414
|
+
readonly type: "bytes";
|
|
415
|
+
}];
|
|
416
|
+
readonly name: "approveAndSwap";
|
|
417
|
+
readonly outputs: readonly [];
|
|
418
|
+
readonly stateMutability: "payable";
|
|
419
|
+
readonly type: "function";
|
|
420
|
+
}, {
|
|
421
|
+
readonly inputs: readonly [{
|
|
422
|
+
readonly internalType: "address[]";
|
|
423
|
+
readonly name: "tokens";
|
|
424
|
+
readonly type: "address[]";
|
|
425
|
+
}];
|
|
426
|
+
readonly name: "approveTokensToRouters";
|
|
427
|
+
readonly outputs: readonly [];
|
|
428
|
+
readonly stateMutability: "nonpayable";
|
|
429
|
+
readonly type: "function";
|
|
430
|
+
}, {
|
|
431
|
+
readonly inputs: readonly [{
|
|
432
|
+
readonly internalType: "address";
|
|
433
|
+
readonly name: "newOwner";
|
|
434
|
+
readonly type: "address";
|
|
435
|
+
}];
|
|
436
|
+
readonly name: "nominateNewOwner";
|
|
437
|
+
readonly outputs: readonly [];
|
|
438
|
+
readonly stateMutability: "nonpayable";
|
|
439
|
+
readonly type: "function";
|
|
440
|
+
}, {
|
|
441
|
+
readonly inputs: readonly [];
|
|
442
|
+
readonly name: "nominatedOwner";
|
|
443
|
+
readonly outputs: readonly [{
|
|
444
|
+
readonly internalType: "address";
|
|
445
|
+
readonly name: "";
|
|
446
|
+
readonly type: "address";
|
|
447
|
+
}];
|
|
448
|
+
readonly stateMutability: "view";
|
|
449
|
+
readonly type: "function";
|
|
450
|
+
}, {
|
|
451
|
+
readonly inputs: readonly [];
|
|
452
|
+
readonly name: "owner";
|
|
453
|
+
readonly outputs: readonly [{
|
|
454
|
+
readonly internalType: "address";
|
|
455
|
+
readonly name: "";
|
|
456
|
+
readonly type: "address";
|
|
457
|
+
}];
|
|
458
|
+
readonly stateMutability: "view";
|
|
459
|
+
readonly type: "function";
|
|
460
|
+
}, {
|
|
461
|
+
readonly inputs: readonly [];
|
|
462
|
+
readonly name: "permit2";
|
|
463
|
+
readonly outputs: readonly [{
|
|
464
|
+
readonly internalType: "address";
|
|
465
|
+
readonly name: "";
|
|
466
|
+
readonly type: "address";
|
|
467
|
+
}];
|
|
468
|
+
readonly stateMutability: "view";
|
|
469
|
+
readonly type: "function";
|
|
470
|
+
}, {
|
|
471
|
+
readonly inputs: readonly [];
|
|
472
|
+
readonly name: "renounceOwnership";
|
|
473
|
+
readonly outputs: readonly [];
|
|
474
|
+
readonly stateMutability: "nonpayable";
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
}, {
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly internalType: "address[]";
|
|
479
|
+
readonly name: "tokens";
|
|
480
|
+
readonly type: "address[]";
|
|
481
|
+
}, {
|
|
482
|
+
readonly internalType: "address";
|
|
483
|
+
readonly name: "recipient";
|
|
484
|
+
readonly type: "address";
|
|
485
|
+
}];
|
|
486
|
+
readonly name: "rescueTokens";
|
|
487
|
+
readonly outputs: readonly [];
|
|
488
|
+
readonly stateMutability: "nonpayable";
|
|
489
|
+
readonly type: "function";
|
|
490
|
+
}, {
|
|
491
|
+
readonly inputs: readonly [{
|
|
492
|
+
readonly internalType: "enum IUniAgent.RouterType";
|
|
493
|
+
readonly name: "routerType";
|
|
494
|
+
readonly type: "uint8";
|
|
495
|
+
}, {
|
|
496
|
+
readonly internalType: "address";
|
|
497
|
+
readonly name: "inputToken";
|
|
498
|
+
readonly type: "address";
|
|
499
|
+
}, {
|
|
500
|
+
readonly internalType: "uint256";
|
|
501
|
+
readonly name: "inputAmount";
|
|
502
|
+
readonly type: "uint256";
|
|
503
|
+
}, {
|
|
504
|
+
readonly internalType: "bytes";
|
|
505
|
+
readonly name: "payload";
|
|
506
|
+
readonly type: "bytes";
|
|
507
|
+
}, {
|
|
508
|
+
readonly internalType: "bytes";
|
|
509
|
+
readonly name: "userPermit";
|
|
510
|
+
readonly type: "bytes";
|
|
511
|
+
}];
|
|
512
|
+
readonly name: "swap";
|
|
513
|
+
readonly outputs: readonly [];
|
|
514
|
+
readonly stateMutability: "payable";
|
|
515
|
+
readonly type: "function";
|
|
516
|
+
}, {
|
|
517
|
+
readonly stateMutability: "payable";
|
|
518
|
+
readonly type: "receive";
|
|
519
|
+
}];
|
|
284
520
|
export declare const GS_EIP712_TYPES: {
|
|
285
521
|
GenericSwapData: {
|
|
286
522
|
name: string;
|
|
@@ -987,4 +1223,19 @@ export declare const PERMIT2_ABI: readonly [{
|
|
|
987
1223
|
readonly stateMutability: "nonpayable";
|
|
988
1224
|
readonly type: "function";
|
|
989
1225
|
}];
|
|
1226
|
+
export declare const ALLOWANCE_ABI: readonly [{
|
|
1227
|
+
readonly type: "function";
|
|
1228
|
+
readonly name: "allowance";
|
|
1229
|
+
readonly stateMutability: "view";
|
|
1230
|
+
readonly inputs: readonly [{
|
|
1231
|
+
readonly name: "owner";
|
|
1232
|
+
readonly type: "address";
|
|
1233
|
+
}, {
|
|
1234
|
+
readonly name: "spender";
|
|
1235
|
+
readonly type: "address";
|
|
1236
|
+
}];
|
|
1237
|
+
readonly outputs: readonly [{
|
|
1238
|
+
readonly type: "uint256";
|
|
1239
|
+
}];
|
|
1240
|
+
}];
|
|
990
1241
|
//# sourceMappingURL=abis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../src/constants/abis.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuNnB,CAAA;AAEV,eAAO,MAAM,eAAe;;;;;CA2C3B,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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eeeEEeE";
|
|
4
3
|
export declare const wethAddress: Record<number, Address>;
|
|
5
4
|
export declare const allowanceTargetAddress: Record<number, Address>;
|
|
5
|
+
export declare const uniAgentAddress: Record<number, Address>;
|
|
6
|
+
export declare const swapRouter02: Record<number, Address>;
|
|
6
7
|
export declare const genericSwapAddress: Record<number, Address>;
|
|
7
8
|
export declare const permit2Address: Record<number, Address>;
|
|
8
|
-
export declare const routerSpender: Record<number, {
|
|
9
|
-
[protocol in RouteProtocol]?: Address;
|
|
10
|
-
}>;
|
|
11
9
|
export declare const strategyAddress: Record<number, Address>;
|
|
10
|
+
export declare const feeReceiptAddress: Record<number, Address>;
|
|
12
11
|
//# sourceMappingURL=addresses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/constants/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/constants/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,eAAO,MAAM,WAAW,8CAAwD,CAAA;AAChF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAG/C,CAAA;AAGD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAG1D,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGnD,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGhD,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGtD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGlD,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGnD,CAAA;AAGD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGrD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/errors/base.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACpC,GAAG,CACA;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,GACD;IACE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAA;IACxB,OAAO,CAAC,EAAE,KAAK,CAAA;CAChB,GACD;IACE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB,CACJ,CAAA;AAED,qBAAa,SAAU,SAAQ,KAAK;IACzB,IAAI,SAAqB;IAElC,QAAQ,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/errors/base.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACpC,GAAG,CACA;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,GACD;IACE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAA;IACxB,OAAO,CAAC,EAAE,KAAK,CAAA;CAChB,GACD;IACE,KAAK,EAAE,SAAS,GAAG,KAAK,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB,CACJ,CAAA;AAED,qBAAa,SAAU,SAAQ,KAAK;IACzB,IAAI,SAAqB;IAElC,QAAQ,CAAC,OAAO,0BAAU;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;gBAIlB,YAAY,EAAE,MAAM,EACpB,IAAI,GAAE,kBAA6C;CAwBtD"}
|
|
@@ -80,5 +80,29 @@ export declare class Permit extends ContextHost {
|
|
|
80
80
|
amount: bigint;
|
|
81
81
|
token: Address;
|
|
82
82
|
}, account?: Account) => Promise<TransactionReceipt>;
|
|
83
|
+
/**
|
|
84
|
+
* @description approve a spender contract to spend a user's token via permit2
|
|
85
|
+
*/
|
|
86
|
+
approveSpenderContract: ({ spender, expiration, token, }: {
|
|
87
|
+
spender: Address;
|
|
88
|
+
expiration: number;
|
|
89
|
+
token: Address;
|
|
90
|
+
}, account?: Account | Address) => Promise<Hex>;
|
|
91
|
+
approveSpenderContractWithReceipt: ({ spender, expiration, token, }: {
|
|
92
|
+
spender: Address;
|
|
93
|
+
expiration: number;
|
|
94
|
+
token: Address;
|
|
95
|
+
}, account?: Account | Address) => Promise<TransactionReceipt>;
|
|
96
|
+
/**
|
|
97
|
+
* @description revoke a token allowance of a spender contract in permit2
|
|
98
|
+
*/
|
|
99
|
+
revokeSpenderContract: ({ spender, token, }: {
|
|
100
|
+
spender: Address;
|
|
101
|
+
token: Address;
|
|
102
|
+
}, account?: Account | Address) => Promise<Hex>;
|
|
103
|
+
revokeSpenderContractWithReceipt: ({ spender, token, }: {
|
|
104
|
+
spender: Address;
|
|
105
|
+
token: Address;
|
|
106
|
+
}, account?: Account | Address) => Promise<TransactionReceipt>;
|
|
83
107
|
}
|
|
84
108
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/permit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/permit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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iBAMD,OAAO;gBACR,MAAM;eACP,OAAO;iBAEN,OAAO,KAChB,QAAQ,GAAG,CAAC,CAYd;IAED;;OAEG;IACI,kBAAkB;iBAMZ,OAAO;gBACR,MAAM;eACP,OAAO;iBAEN,OAAO,KAChB,QAAQ,kBAAkB,CAAC,CAO7B;IAED;;OAEG;IACI,sBAAsB;iBAMhB,OAAO;oBACJ,MAAM;eACX,OAAO;iBAEN,OAAO,GAAG,OAAO,KAC1B,QAAQ,GAAG,CAAC,CAUd;IAEM,iCAAiC;iBAM3B,OAAO;oBACJ,MAAM;eACX,OAAO;iBAEN,OAAO,GAAG,OAAO,KAC1B,QAAQ,kBAAkB,CAAC,CAa7B;IAED;;OAEG;IACI,qBAAqB;iBAKf,OAAO;eACT,OAAO;iBAEN,OAAO,GAAG,OAAO,KAC1B,QAAQ,GAAG,CAAC,CAUd;IAEM,gCAAgC;iBAK1B,OAAO;eACT,OAAO;iBAEN,OAAO,GAAG,OAAO,KAC1B,QAAQ,kBAAkB,CAAC,CAY7B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/price/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,UAAU,EAEV,WAAW,EACZ,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/price/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,UAAU,EAEV,WAAW,EACZ,MAAM,wBAAwB,CAAA;AAI/B,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAIf,MAAM,MAAM,CAAA;AAKb,qBAAa,KAAM,SAAQ,WAAW;IACpC,WAAW,QAAe,WAAW,KAAG,QAAQ,QAAQ,CAAC,CAQxD;IAED,cAAc,WACJ,OAAO,EAAE,aACP,QAAQ,KACjB,QAAQ,WAAW,CAAC,CAiBtB;IAED;;;OAGG;IACH,aAAa,UACJ,OAAO,aACJ,QAAQ,KACjB,QAAQ,UAAU,GAAG,SAAS,CAAC,CAGjC;IAED,UAAU;aAQH,MAAM,GAAG,MAAM,GAAG,GAAG,MAAM,EAAE;qBACrB,SAAS;mBACX,MAAM;mBACN,QAAQ;gCACK,MAAM;kBACpB,OAAO;UACf,QAAQ,MAAM,CAAC,CA6BlB;IAED,aAAa,YACF,OAAO,UACR,MAAM,GAAG,MAAM,GAAG,GAAG,MAAM,EAAE,aAC3B,QAAQ,KACjB,QAAQ,MAAM,CAAC,CAYjB;IAED,yBAAyB;eAIhB,MAAM,GAAG,MAAM,GAAG,GAAG,MAAM,EAAE;sBACtB,OAAO;0BAoBtB;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Price } from '../price/index.js';
|
|
2
2
|
import { ContextHost } from '../service/contextHost.js';
|
|
3
3
|
import { PermitSource } from '../types/permit2.js';
|
|
4
|
-
import { type AppConfig, type ListDTO, type ListItem, type Order, type OrderState, type QuoteDTO, type StatusDTO, type SubmitDTO, type SwapConfig, type SwapData } from './type.js';
|
|
4
|
+
import { type AppConfig, type ListDTO, type ListItem, type Order, type OrderState, type QuoteDTO, type StatusDTO, type SubmitDTO, type SwapConfig, type SwapData, type UniAgentCalldata } from './type.js';
|
|
5
5
|
import { JsonRpcProvider } from 'ethers';
|
|
6
6
|
import { type Address, type Hex, type PrivateKeyAccount, type PublicClient, type TransactionRequest, type WalletClient } from 'viem';
|
|
7
7
|
export declare const ERC20_TRANSFER_GAS = 65000n;
|
|
@@ -17,6 +17,7 @@ export type PrepareOrderParams = {
|
|
|
17
17
|
sendByRelayer?: boolean;
|
|
18
18
|
};
|
|
19
19
|
export type PreparedOrder = {
|
|
20
|
+
uniAgentCalldata?: UniAgentCalldata;
|
|
20
21
|
swapData: SwapData;
|
|
21
22
|
gasFee: bigint;
|
|
22
23
|
gasFeeTokenAmount: bigint;
|
|
@@ -52,7 +53,8 @@ export declare class Swap extends ContextHost {
|
|
|
52
53
|
private getRoutesApproveStrategy;
|
|
53
54
|
prepareOrder: ({ order, slippage, gasFee, sendByRelayer, }: PrepareOrderParams) => Promise<PreparedOrder>;
|
|
54
55
|
quote: (dto: QuoteDTO) => Promise<Order>;
|
|
55
|
-
getTokenPermitData: (
|
|
56
|
+
getTokenPermitData: (token: Address, permitType?: PermitSource) => Hex;
|
|
57
|
+
private isETH;
|
|
56
58
|
estimate: ({ account, order, slippage, permit, }: {
|
|
57
59
|
account: Address;
|
|
58
60
|
order: Order;
|
|
@@ -65,13 +67,11 @@ export declare class Swap extends ContextHost {
|
|
|
65
67
|
takerTokenPermit: `0x${string}`;
|
|
66
68
|
value: bigint;
|
|
67
69
|
txOverride?: Partial<TransactionRequest>;
|
|
68
|
-
}) => Promise
|
|
69
|
-
rawTx: `0x${string}` | `0x02${string}` | `0x01${string}`;
|
|
70
|
-
txHash: `0x${string}`;
|
|
71
|
-
}>;
|
|
70
|
+
}) => Promise<`0x${string}`>;
|
|
72
71
|
signWithReceipt: (params: {
|
|
73
72
|
account: Address;
|
|
74
73
|
swapData: SwapData;
|
|
74
|
+
uniAgentCalldata: UniAgentCalldata | undefined;
|
|
75
75
|
takerTokenPermit: `0x${string}`;
|
|
76
76
|
value: bigint;
|
|
77
77
|
}) => Promise<import("viem").TransactionReceipt>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swap/index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K,EAAE,MAAM,CAAA;QACb,UAAU,CAAC,EAAE,QAAQ,kBAAkB,CAAC,CAAA;KACzC,KAAG,QAAQ,KAAK,MAAM,EAAE,CAAC,CAqBzB;IAEM,eAAe,WAAkB;QACtC,OAAO,EAAE,OAAO,CAAA;QAChB,QAAQ,EAAE,QAAQ,CAAA;QAClB,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;QAC9C,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAA;QAC/B,KAAK,EAAE,MAAM,CAAA;KACd,gDAMA;IAEM,aAAa,aACR,QAAQ,WACT,OAAO,GAAG,iBAAiB,4BAoBrC;IAEM,MAAM,QAAe,SAAS,kBAUpC;IAEM,IAAI,QAAe,OAAO,KAAG,QAAQ,QAAQ,CAAC,CAKpD;IAEM,MAAM,QAAe,SAAS,KAAG,QAAQ,UAAU,CAAC,CAO1D;IAEM,MAAM,gBAAuB,MAAM,KAAG,QAAQ,SAAS,CAAC,CAI9D;CACF"}
|
|
@@ -48,10 +48,10 @@ export type SubmitBaseDTO = {
|
|
|
48
48
|
minAmountOut: bigint;
|
|
49
49
|
permit: string;
|
|
50
50
|
strategyData: `0x${string}`;
|
|
51
|
+
uniAgentCalldata?: UniAgentCalldata | undefined;
|
|
51
52
|
};
|
|
52
53
|
export type SubmitBySelfDTO = SubmitBaseDTO & {
|
|
53
54
|
txHash: string;
|
|
54
|
-
rawTx: string;
|
|
55
55
|
};
|
|
56
56
|
export type SubmitByRelayerDTO = SubmitBaseDTO & {
|
|
57
57
|
orderSignature: string;
|
|
@@ -88,6 +88,8 @@ export type Order = {
|
|
|
88
88
|
rate: `${number}`;
|
|
89
89
|
feeFactor: number;
|
|
90
90
|
routes: PercentRoute[];
|
|
91
|
+
permitAddresses: Address[];
|
|
92
|
+
uniAgentCalldata: UniAgentCalldata;
|
|
91
93
|
swapData: {
|
|
92
94
|
maker: Address;
|
|
93
95
|
takerToken: Address;
|
|
@@ -127,6 +129,13 @@ export type ListItem = {
|
|
|
127
129
|
createdAt: string;
|
|
128
130
|
updatedAt: string;
|
|
129
131
|
};
|
|
132
|
+
export type UniAgentCalldata = {
|
|
133
|
+
inputAmount: bigint;
|
|
134
|
+
inputToken: Address;
|
|
135
|
+
payload: `0x${string}`;
|
|
136
|
+
routerType: number;
|
|
137
|
+
userPermit?: `0x${string}`;
|
|
138
|
+
};
|
|
130
139
|
export type SwapData = {
|
|
131
140
|
maker: Address;
|
|
132
141
|
takerToken: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/swap/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,GAAG,CAAA;IACR,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,EAAE,CAAA;IAC1B;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,MAAM,EAAE,GAAG,MAAM,EAAE,CAAA;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,GAAG,MAAM,EAAE,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,kBAAkB,CAAA;AAC5D,MAAM,MAAM,aAAa,GAAG;I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CAAC,EAAE,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE;QACX;YACE,OAAO,EAAE,OAAO,CAAA;YAChB,IAAI,EAAE,MAAM,CAAA;SACb;QACD;YACE,OAAO,EAAE,OAAO,CAAA;YAChB,IAAI,EAAE,MAAM,CAAA;SACb;KACF,CAAA;IACD,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AACD,MAAM,MAAM,SAAS,GAAG;IACtB,aAAa,EAAE,eAAe,EAAE,CAAA;IAChC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAA;IAGnB,cAAc,EAAE;QACd,OAAO,EAAE,MAAM,CAAA;QACf,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;CACF,CAAA"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "1.0.0-canary.81b96ae";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,yBAAyB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenlon/v6-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "1.0.0-canary.81b96ae",
|
|
4
4
|
"packageManager": "pnpm@8.5.0",
|
|
5
5
|
"repository": "consenlabs/tokenlon-v6-sdk",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"changeset": "changeset",
|
|
8
|
+
"changeset:release": "pnpm build && changeset publish",
|
|
9
|
+
"changeset:version": "changeset status && changeset version",
|
|
10
|
+
"preinstall": "npx only-allow pnpm",
|
|
11
|
+
"prepare": "npx simple-git-hooks",
|
|
12
|
+
"clean": "rimraf dist",
|
|
13
|
+
"build": "pnpm run clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
|
|
14
|
+
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
|
|
15
|
+
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir dist/esm --removeComments && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'",
|
|
16
|
+
"build:types": "tsc --project tsconfig.build.json --module esnext --emitDeclarationOnly --declarationDir dist/types --declaration --declarationMap ",
|
|
17
|
+
"test": "vitest dev",
|
|
18
|
+
"test:swap": "vitest run src/_test/trade/erc20-eth-byrelayer.spec.ts && vitest run src/_test/trade/erc20-eth-byself.spec.ts && vitest run src/_test/trade/eth-erc20-byself.spec.ts && vitest run src/_test/trade/trade-with-approve.spec.ts",
|
|
19
|
+
"test:permit": "vitest run src/_test/approve/permit2.spec.ts",
|
|
20
|
+
"test:typecheck": "SKIP_GLOBAL_SETUP=true vitest typecheck",
|
|
21
|
+
"quotesWarmUP": "QUOTE_ENV=dev pnpm bun scripts/quotesWarmUp.ts",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"format": "rome format . --write",
|
|
24
|
+
"lint": "rome check .",
|
|
25
|
+
"lint:fix": "pnpm lint --apply-unsafe"
|
|
26
|
+
},
|
|
6
27
|
"type": "module",
|
|
7
28
|
"main": "./dist/cjs/index.js",
|
|
8
29
|
"module": "./dist/esm/index.js",
|
|
@@ -40,28 +61,14 @@
|
|
|
40
61
|
"vitest": "^0.32.4"
|
|
41
62
|
},
|
|
42
63
|
"dependencies": {
|
|
64
|
+
"bignumber.js": "^9.1.2",
|
|
43
65
|
"dayjs": "^1.11.9",
|
|
44
66
|
"ethers": "^6.4.2",
|
|
45
67
|
"viem": "^1.2.9"
|
|
46
68
|
},
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"preinstall": "npx only-allow pnpm",
|
|
52
|
-
"clean": "rimraf dist",
|
|
53
|
-
"build": "pnpm run clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
|
|
54
|
-
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
|
|
55
|
-
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir dist/esm --removeComments && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'",
|
|
56
|
-
"build:types": "tsc --project tsconfig.build.json --module esnext --emitDeclarationOnly --declarationDir dist/types --declaration --declarationMap ",
|
|
57
|
-
"test": "vitest dev",
|
|
58
|
-
"test:swap": "vitest run src/_test/trade/erc20-eth-byrelayer.spec.ts && vitest run src/_test/trade/erc20-eth-byself.spec.ts && vitest run src/_test/trade/eth-erc20-byself.spec.ts && vitest run src/_test/trade/trade-with-approve.spec.ts",
|
|
59
|
-
"test:permit": "vitest run src/_test/approve/permit2.spec.ts",
|
|
60
|
-
"test:typecheck": "SKIP_GLOBAL_SETUP=true vitest typecheck",
|
|
61
|
-
"quotesWarmUP": "QUOTE_ENV=dev pnpm bun scripts/quotesWarmUp.ts",
|
|
62
|
-
"typecheck": "tsc --noEmit",
|
|
63
|
-
"format": "rome format . --write",
|
|
64
|
-
"lint": "rome check .",
|
|
65
|
-
"lint:fix": "pnpm lint --apply"
|
|
69
|
+
"pnpm": {
|
|
70
|
+
"overrides": {
|
|
71
|
+
"@tokenlon/v6-sdk": "workspace:*"
|
|
72
|
+
}
|
|
66
73
|
}
|
|
67
|
-
}
|
|
74
|
+
}
|