1
1
/* eslint-disable */
2
- // sequence-api v0.4.0 444a337259dc00653fce8c0d3d5fa867fcb1ac59
2
+ // sequence-api v0.4.0 416e853bb8f0c0c743846ac941ea7f53b5f0683d
3
3
// --
4
4
// Code generated by [email protected] with typescript generator. DO NOT EDIT.
5
5
//
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1'
16
16
export const WebRPCSchemaVersion = 'v0.4.0'
17
17
18
18
// Schema hash generated from your RIDL schema
19
- export const WebRPCSchemaHash = '444a337259dc00653fce8c0d3d5fa867fcb1ac59 '
19
+ export const WebRPCSchemaHash = '416e853bb8f0c0c743846ac941ea7f53b5f0683d '
20
20
21
21
type WebrpcGenVersions = {
22
22
webrpcGenVersion : string
@@ -443,45 +443,25 @@ export interface SardinePaymentOption {
443
443
processingTime : string
444
444
}
445
445
446
- export interface SwapPermit2Price {
447
- currencyAddress : string
448
- currencyBalance : string
449
- price : string
450
- maxPrice : string
451
- transactionValue : string
452
- }
453
-
454
- export interface SwapPermit2Quote {
455
- currencyAddress : string
456
- currencyBalance : string
457
- price : string
458
- maxPrice : string
459
- to : string
460
- transactionData : string
461
- transactionValue : string
462
- approveData : string
463
- }
464
-
465
- export interface SwapPrice {
466
- currencyAddress : string
467
- currencyBalance : string
468
- price : string
469
- maxPrice : string
470
- transactionValue : string
446
+ export interface LifiToken {
447
+ chainId : number
448
+ address : string
449
+ symbol : string
450
+ name : string
451
+ decimals : number
452
+ priceUsd : string
453
+ coinKey : string
454
+ logoUri : string
471
455
}
472
456
473
- export interface SwapQuote {
474
- currencyAddress : string
475
- currencyBalance : string
476
- price : string
477
- maxPrice : string
478
- to : string
479
- transactionData : string
480
- transactionValue : string
481
- approveData : string
457
+ export interface LifiSwapRoute {
458
+ fromChainId : number
459
+ toChainId : number
460
+ fromTokens : Array < LifiToken >
461
+ toTokens : Array < LifiToken >
482
462
}
483
463
484
- export interface SwapQuoteV2 {
464
+ export interface LifiSwapQuote {
485
465
currencyAddress : string
486
466
currencyBalance : string
487
467
price : string
@@ -937,19 +917,10 @@ export interface API {
937
917
* Currency abstraction
938
918
*
939
919
*/
940
- getSwapPermit2Price ( args : GetSwapPermit2PriceArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapPermit2PriceReturn >
941
- getSwapPermit2Prices (
942
- args : GetSwapPermit2PricesArgs ,
943
- headers ?: object ,
944
- signal ?: AbortSignal
945
- ) : Promise < GetSwapPermit2PricesReturn >
946
- getSwapPermit2Quote ( args : GetSwapPermit2QuoteArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapPermit2QuoteReturn >
947
- getSwapPrice ( args : GetSwapPriceArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapPriceReturn >
948
- getSwapPrices ( args : GetSwapPricesArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapPricesReturn >
949
- getSwapQuote ( args : GetSwapQuoteArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapQuoteReturn >
950
- getSwapQuoteV2 ( args : GetSwapQuoteV2Args , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapQuoteV2Return >
951
920
getLifiChains ( headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiChainsReturn >
952
921
getLifiTokens ( args : GetLifiTokensArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiTokensReturn >
922
+ getLifiSwapRoutes ( args : GetLifiSwapRoutesArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiSwapRoutesReturn >
923
+ getLifiSwapQuote ( args : GetLifiSwapQuoteArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiSwapQuoteReturn >
953
924
/**
954
925
*
955
926
* Inventory, payments and management
@@ -1475,77 +1446,27 @@ export interface ListAdoptedWalletsReturn {
1475
1446
page : Page
1476
1447
wallets : Array < AdoptedChildWallet >
1477
1448
}
1478
- export interface GetSwapPermit2PriceArgs {
1479
- buyCurrencyAddress : string
1480
- sellCurrencyAddress : string
1481
- buyAmount : string
1482
- chainId : number
1483
- slippagePercentage ?: number
1484
- }
1485
-
1486
- export interface GetSwapPermit2PriceReturn {
1487
- swapPermit2Price : SwapPermit2Price
1488
- }
1489
- export interface GetSwapPermit2PricesArgs {
1490
- userAddress : string
1491
- buyCurrencyAddress : string
1492
- buyAmount : string
1493
- chainId : number
1494
- slippagePercentage ?: number
1495
- }
1496
-
1497
- export interface GetSwapPermit2PricesReturn {
1498
- swapPermit2Prices : Array < SwapPermit2Price >
1499
- }
1500
- export interface GetSwapPermit2QuoteArgs {
1501
- userAddress : string
1502
- buyCurrencyAddress : string
1503
- sellCurrencyAddress : string
1504
- buyAmount : string
1505
- chainId : number
1506
- includeApprove : boolean
1507
- slippagePercentage ?: number
1508
- }
1509
-
1510
- export interface GetSwapPermit2QuoteReturn {
1511
- swapPermit2Quote : SwapPermit2Quote
1512
- }
1513
- export interface GetSwapPriceArgs {
1514
- buyCurrencyAddress : string
1515
- sellCurrencyAddress : string
1516
- buyAmount : string
1517
- chainId : number
1518
- slippagePercentage ?: number
1519
- }
1449
+ export interface GetLifiChainsArgs { }
1520
1450
1521
- export interface GetSwapPriceReturn {
1522
- swapPrice : SwapPrice
1451
+ export interface GetLifiChainsReturn {
1452
+ chains : Array < number >
1523
1453
}
1524
- export interface GetSwapPricesArgs {
1525
- userAddress : string
1526
- buyCurrencyAddress : string
1527
- buyAmount : string
1528
- chainId : number
1529
- slippagePercentage ?: number
1454
+ export interface GetLifiTokensArgs {
1455
+ chainIds : Array < number >
1530
1456
}
1531
1457
1532
- export interface GetSwapPricesReturn {
1533
- swapPrices : Array < SwapPrice >
1458
+ export interface GetLifiTokensReturn {
1459
+ tokens : Array < Token >
1534
1460
}
1535
- export interface GetSwapQuoteArgs {
1536
- userAddress : string
1537
- buyCurrencyAddress : string
1538
- sellCurrencyAddress : string
1539
- buyAmount : string
1461
+ export interface GetLifiSwapRoutesArgs {
1540
1462
chainId : number
1541
- includeApprove : boolean
1542
- slippagePercentage ?: number
1463
+ toTokenAddress : string
1543
1464
}
1544
1465
1545
- export interface GetSwapQuoteReturn {
1546
- swapQuote : SwapQuote
1466
+ export interface GetLifiSwapRoutesReturn {
1467
+ routes : Array < LifiSwapRoute >
1547
1468
}
1548
- export interface GetSwapQuoteV2Args {
1469
+ export interface GetLifiSwapQuoteArgs {
1549
1470
userAddress : string
1550
1471
buyCurrencyAddress : string
1551
1472
sellCurrencyAddress : string
@@ -1556,20 +1477,8 @@ export interface GetSwapQuoteV2Args {
1556
1477
slippagePercentage ?: number
1557
1478
}
1558
1479
1559
- export interface GetSwapQuoteV2Return {
1560
- swapQuote : SwapQuoteV2
1561
- }
1562
- export interface GetLifiChainsArgs { }
1563
-
1564
- export interface GetLifiChainsReturn {
1565
- chains : Array < number >
1566
- }
1567
- export interface GetLifiTokensArgs {
1568
- chainIds : Array < number >
1569
- }
1570
-
1571
- export interface GetLifiTokensReturn {
1572
- tokens : Array < Token >
1480
+ export interface GetLifiSwapQuoteReturn {
1481
+ quote : LifiSwapQuote
1573
1482
}
1574
1483
export interface ListCurrencyGroupsArgs { }
1575
1484
@@ -2728,99 +2637,12 @@ export class API implements API {
2728
2637
)
2729
2638
}
2730
2639
2731
- getSwapPermit2Price = (
2732
- args : GetSwapPermit2PriceArgs ,
2733
- headers ?: object ,
2734
- signal ?: AbortSignal
2735
- ) : Promise < GetSwapPermit2PriceReturn > => {
2736
- return this . fetch ( this . url ( 'GetSwapPermit2Price' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2737
- res => {
2738
- return buildResponse ( res ) . then ( _data => {
2739
- return {
2740
- swapPermit2Price : < SwapPermit2Price > _data . swapPermit2Price
2741
- }
2742
- } )
2743
- } ,
2744
- error => {
2745
- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
2746
- }
2747
- )
2748
- }
2749
-
2750
- getSwapPermit2Prices = (
2751
- args : GetSwapPermit2PricesArgs ,
2752
- headers ?: object ,
2753
- signal ?: AbortSignal
2754
- ) : Promise < GetSwapPermit2PricesReturn > => {
2755
- return this . fetch ( this . url ( 'GetSwapPermit2Prices' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2756
- res => {
2757
- return buildResponse ( res ) . then ( _data => {
2758
- return {
2759
- swapPermit2Prices : < Array < SwapPermit2Price > > _data . swapPermit2Prices
2760
- }
2761
- } )
2762
- } ,
2763
- error => {
2764
- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
2765
- }
2766
- )
2767
- }
2768
-
2769
- getSwapPermit2Quote = (
2770
- args : GetSwapPermit2QuoteArgs ,
2771
- headers ?: object ,
2772
- signal ?: AbortSignal
2773
- ) : Promise < GetSwapPermit2QuoteReturn > => {
2774
- return this . fetch ( this . url ( 'GetSwapPermit2Quote' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2775
- res => {
2776
- return buildResponse ( res ) . then ( _data => {
2777
- return {
2778
- swapPermit2Quote : < SwapPermit2Quote > _data . swapPermit2Quote
2779
- }
2780
- } )
2781
- } ,
2782
- error => {
2783
- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
2784
- }
2785
- )
2786
- }
2787
-
2788
- getSwapPrice = ( args : GetSwapPriceArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapPriceReturn > => {
2789
- return this . fetch ( this . url ( 'GetSwapPrice' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2790
- res => {
2791
- return buildResponse ( res ) . then ( _data => {
2792
- return {
2793
- swapPrice : < SwapPrice > _data . swapPrice
2794
- }
2795
- } )
2796
- } ,
2797
- error => {
2798
- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
2799
- }
2800
- )
2801
- }
2802
-
2803
- getSwapPrices = ( args : GetSwapPricesArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapPricesReturn > => {
2804
- return this . fetch ( this . url ( 'GetSwapPrices' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2805
- res => {
2806
- return buildResponse ( res ) . then ( _data => {
2807
- return {
2808
- swapPrices : < Array < SwapPrice > > _data . swapPrices
2809
- }
2810
- } )
2811
- } ,
2812
- error => {
2813
- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
2814
- }
2815
- )
2816
- }
2817
-
2818
- getSwapQuote = ( args : GetSwapQuoteArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapQuoteReturn > => {
2819
- return this . fetch ( this . url ( 'GetSwapQuote' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2640
+ getLifiChains = ( headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiChainsReturn > => {
2641
+ return this . fetch ( this . url ( 'GetLifiChains' ) , createHTTPRequest ( { } , headers , signal ) ) . then (
2820
2642
res => {
2821
2643
return buildResponse ( res ) . then ( _data => {
2822
2644
return {
2823
- swapQuote : < SwapQuote > _data . swapQuote
2645
+ chains : < Array < number > > _data . chains
2824
2646
}
2825
2647
} )
2826
2648
} ,
@@ -2830,12 +2652,12 @@ export class API implements API {
2830
2652
)
2831
2653
}
2832
2654
2833
- getSwapQuoteV2 = ( args : GetSwapQuoteV2Args , headers ?: object , signal ?: AbortSignal ) : Promise < GetSwapQuoteV2Return > => {
2834
- return this . fetch ( this . url ( 'GetSwapQuoteV2 ' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2655
+ getLifiTokens = ( args : GetLifiTokensArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiTokensReturn > => {
2656
+ return this . fetch ( this . url ( 'GetLifiTokens ' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2835
2657
res => {
2836
2658
return buildResponse ( res ) . then ( _data => {
2837
2659
return {
2838
- swapQuote : < SwapQuoteV2 > _data . swapQuote
2660
+ tokens : < Array < Token > > _data . tokens
2839
2661
}
2840
2662
} )
2841
2663
} ,
@@ -2845,12 +2667,12 @@ export class API implements API {
2845
2667
)
2846
2668
}
2847
2669
2848
- getLifiChains = ( headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiChainsReturn > => {
2849
- return this . fetch ( this . url ( 'GetLifiChains ' ) , createHTTPRequest ( { } , headers , signal ) ) . then (
2670
+ getLifiSwapRoutes = ( args : GetLifiSwapRoutesArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiSwapRoutesReturn > => {
2671
+ return this . fetch ( this . url ( 'GetLifiSwapRoutes ' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2850
2672
res => {
2851
2673
return buildResponse ( res ) . then ( _data => {
2852
2674
return {
2853
- chains : < Array < number > > _data . chains
2675
+ routes : < Array < LifiSwapRoute > > _data . routes
2854
2676
}
2855
2677
} )
2856
2678
} ,
@@ -2860,12 +2682,12 @@ export class API implements API {
2860
2682
)
2861
2683
}
2862
2684
2863
- getLifiTokens = ( args : GetLifiTokensArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiTokensReturn > => {
2864
- return this . fetch ( this . url ( 'GetLifiTokens ' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2685
+ getLifiSwapQuote = ( args : GetLifiSwapQuoteArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiSwapQuoteReturn > => {
2686
+ return this . fetch ( this . url ( 'GetLifiSwapQuote ' ) , createHTTPRequest ( args , headers , signal ) ) . then (
2865
2687
res => {
2866
2688
return buildResponse ( res ) . then ( _data => {
2867
2689
return {
2868
- tokens : < Array < Token > > _data . tokens
2690
+ quote : < LifiSwapQuote > _data . quote
2869
2691
}
2870
2692
} )
2871
2693
} ,
0 commit comments