1
1
/* eslint-disable */
2
- // sequence-api v0.4.0 3129ee0cac1b417bbac1774ce408cd8753c6ce78
2
+ // sequence-api v0.4.0 01e4e5d5ce5e7b85514f2db2fb5b346229db727c
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 = '3129ee0cac1b417bbac1774ce408cd8753c6ce78 '
19
+ export const WebRPCSchemaHash = '01e4e5d5ce5e7b85514f2db2fb5b346229db727c '
20
20
21
21
type WebrpcGenVersions = {
22
22
webrpcGenVersion : string
@@ -106,6 +106,11 @@ export enum TransakBuySell {
106
106
SELL = 'SELL'
107
107
}
108
108
109
+ export enum TradeType {
110
+ EXACT_INPUT = 'EXACT_INPUT' ,
111
+ EXACT_OUTPUT = 'EXACT_OUTPUT'
112
+ }
113
+
109
114
export enum CheckoutOptionCrypto {
110
115
none = 'none' ,
111
116
partially = 'partially' ,
@@ -202,6 +207,43 @@ export interface Friend {
202
207
createdAt ?: string
203
208
}
204
209
210
+ export interface MetaTxn {
211
+ id : string
212
+ chainId : string
213
+ walletAddress : string
214
+ contract : string
215
+ input : string
216
+ }
217
+
218
+ export interface Call {
219
+ to : string
220
+ value ?: string
221
+ data ?: string
222
+ gasLimit ?: string
223
+ delegateCall ?: boolean
224
+ onlyFallback ?: boolean
225
+ behaviorOnError ?: number
226
+ }
227
+
228
+ export interface IntentCallsPayload {
229
+ chainId : string
230
+ space ?: string
231
+ nonce ?: string
232
+ calls : Array < Call >
233
+ }
234
+
235
+ export interface IntentConfig {
236
+ id : number
237
+ configHash : string
238
+ originIntentAddress : string
239
+ destinationIntentAddress : string
240
+ mainSigner : string
241
+ calls : Array < IntentCallsPayload >
242
+ preconditions : Array < IntentPrecondition >
243
+ updatedAt ?: string
244
+ createdAt ?: string
245
+ }
246
+
205
247
export interface InviteCode {
206
248
usesLeft : number
207
249
ownerAccount : string
@@ -234,29 +276,28 @@ export interface TupleComponent {
234
276
value : any
235
277
}
236
278
237
- export interface IntentPrecondition {
238
- type : string
239
- chainID : string
240
- data : any
279
+ export interface AddressOverrides {
280
+ trailsLiFiSapientSignerAddress ? : string
281
+ trailsRelaySapientSignerAddress ? : string
282
+ trailsCCTPV2SapientSignerAddress ?: string
241
283
}
242
284
243
- export interface IntentSolution {
244
- transactions : Array < Transactions >
285
+ export interface TakerFee {
286
+ address : string
287
+ bps : number
245
288
}
246
289
247
- export interface Transactions {
248
- chainID : string
249
- transactions : Array < Transaction >
250
- preconditions ?: Array < IntentPrecondition >
290
+ export interface OriginCall {
291
+ chainId : number
292
+ to : string
293
+ transactionData : string
294
+ transactionValue : string
251
295
}
252
296
253
- export interface Transaction {
254
- delegateCall : boolean
255
- revertOnError : boolean
256
- gasLimit : string
257
- target : string
258
- value : string
259
- data : string
297
+ export interface IntentPrecondition {
298
+ type : string
299
+ chainId : string
300
+ data : any
260
301
}
261
302
262
303
export interface UserStorage {
@@ -852,6 +893,62 @@ export interface FortePaymentStatus {
852
893
status : string
853
894
}
854
895
896
+ export interface CrossChainFee {
897
+ providerFee : string
898
+ trailsSwapFee : string
899
+ providerFeeUSD : number
900
+ trailsSwapFeeUSD : number
901
+ totalFeeAmount : string
902
+ totalFeeUSD : number
903
+ }
904
+
905
+ export interface MetaTxnFeeDetail {
906
+ metaTxnID : string
907
+ estimatedGasLimit : string
908
+ feeNative : string
909
+ }
910
+
911
+ export interface ChainExecuteQuote {
912
+ chainId : string
913
+ totalGasLimit : string
914
+ gasPrice : string
915
+ totalFeeAmount : string
916
+ nativeTokenSymbol : string
917
+ nativeTokenPrice ?: string
918
+ metaTxnFeeDetails : Array < MetaTxnFeeDetail >
919
+ totalFeeUSD ?: string
920
+ }
921
+
922
+ export interface ExecuteQuote {
923
+ chainQuotes : Array < ChainExecuteQuote >
924
+ }
925
+
926
+ export interface TrailsFee {
927
+ executeQuote : ExecuteQuote
928
+ crossChainFee ?: CrossChainFee
929
+ takerFeeAmount ?: string
930
+ takerFeeUSD ?: number
931
+ trailsFixedFeeUSD : number
932
+ feeToken ?: string
933
+ originTokenTotalAmount ?: string
934
+ totalFeeAmount ?: string
935
+ totalFeeUSD ?: string
936
+ quoteProvider ?: string
937
+ }
938
+
939
+ export interface IntentQuote {
940
+ fromAmount : string
941
+ fromAmountMin : string
942
+ toAmount : string
943
+ toAmountMin : string
944
+ priceImpact : number
945
+ priceImpactUsd : string
946
+ maxSlippage : number
947
+ quoteProvider : string
948
+ quoteProviderRequestId : string
949
+ quoteProviderFeeUsd : string
950
+ }
951
+
855
952
export interface API {
856
953
/**
857
954
*
@@ -1078,6 +1175,18 @@ export interface API {
1078
1175
*/
1079
1176
getLifiSwapRoutes ( args : GetLifiSwapRoutesArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiSwapRoutesReturn >
1080
1177
getLifiSwapQuote ( args : GetLifiSwapQuoteArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetLifiSwapQuoteReturn >
1178
+ /**
1179
+ *
1180
+ * Chain abstraction
1181
+ *
1182
+ */
1183
+ getIntentCallsPayloads (
1184
+ args : GetIntentCallsPayloadsArgs ,
1185
+ headers ?: object ,
1186
+ signal ?: AbortSignal
1187
+ ) : Promise < GetIntentCallsPayloadsReturn >
1188
+ commitIntentConfig ( args : CommitIntentConfigArgs , headers ?: object , signal ?: AbortSignal ) : Promise < CommitIntentConfigReturn >
1189
+ getIntentConfig ( args : GetIntentConfigArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetIntentConfigReturn >
1081
1190
/**
1082
1191
*
1083
1192
* Inventory, payments and management
@@ -1674,6 +1783,53 @@ export interface GetLifiSwapQuoteArgs {
1674
1783
export interface GetLifiSwapQuoteReturn {
1675
1784
quote : LifiSwapQuote
1676
1785
}
1786
+ export interface GetIntentCallsPayloadsArgs {
1787
+ userAddress : string
1788
+ destinationChainId : number
1789
+ destinationTokenAddress : string
1790
+ destinationTokenAmount : string
1791
+ destinationToAddress : string
1792
+ originChainId : number
1793
+ originTokenAddress : string
1794
+ originTokenAmount : string
1795
+ destinationCallData ?: string
1796
+ destinationCallValue ?: string
1797
+ provider ?: string
1798
+ addressOverrides ?: AddressOverrides
1799
+ destinationSalt ?: string
1800
+ takerFee ?: TakerFee
1801
+ slippageTolerance ?: number
1802
+ tradeType ?: TradeType
1803
+ }
1804
+
1805
+ export interface GetIntentCallsPayloadsReturn {
1806
+ calls : Array < IntentCallsPayload >
1807
+ preconditions : Array < IntentPrecondition >
1808
+ metaTxns : Array < MetaTxn >
1809
+ trailsFee : TrailsFee
1810
+ quote : IntentQuote
1811
+ originIntentAddress : string
1812
+ destinationIntentAddress : string
1813
+ }
1814
+ export interface CommitIntentConfigArgs {
1815
+ originIntentAddress : string
1816
+ destinationIntentAddress : string
1817
+ mainSigner : string
1818
+ calls : Array < IntentCallsPayload >
1819
+ preconditions : Array < IntentPrecondition >
1820
+ addressOverrides ?: AddressOverrides
1821
+ }
1822
+
1823
+ export interface CommitIntentConfigReturn {
1824
+ config : IntentConfig
1825
+ }
1826
+ export interface GetIntentConfigArgs {
1827
+ intentAddress : string
1828
+ }
1829
+
1830
+ export interface GetIntentConfigReturn {
1831
+ config : IntentConfig
1832
+ }
1677
1833
export interface ListCurrencyGroupsArgs { }
1678
1834
1679
1835
export interface ListCurrencyGroupsReturn {
@@ -2985,6 +3141,65 @@ export class API implements API {
2985
3141
)
2986
3142
}
2987
3143
3144
+ getIntentCallsPayloads = (
3145
+ args : GetIntentCallsPayloadsArgs ,
3146
+ headers ?: object ,
3147
+ signal ?: AbortSignal
3148
+ ) : Promise < GetIntentCallsPayloadsReturn > => {
3149
+ return this . fetch ( this . url ( 'GetIntentCallsPayloads' ) , createHTTPRequest ( args , headers , signal ) ) . then (
3150
+ res => {
3151
+ return buildResponse ( res ) . then ( _data => {
3152
+ return {
3153
+ calls : < Array < IntentCallsPayload > > _data . calls ,
3154
+ preconditions : < Array < IntentPrecondition > > _data . preconditions ,
3155
+ metaTxns : < Array < MetaTxn > > _data . metaTxns ,
3156
+ trailsFee : < TrailsFee > _data . trailsFee ,
3157
+ quote : < IntentQuote > _data . quote ,
3158
+ originIntentAddress : < string > _data . originIntentAddress ,
3159
+ destinationIntentAddress : < string > _data . destinationIntentAddress
3160
+ }
3161
+ } )
3162
+ } ,
3163
+ error => {
3164
+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
3165
+ }
3166
+ )
3167
+ }
3168
+
3169
+ commitIntentConfig = (
3170
+ args : CommitIntentConfigArgs ,
3171
+ headers ?: object ,
3172
+ signal ?: AbortSignal
3173
+ ) : Promise < CommitIntentConfigReturn > => {
3174
+ return this . fetch ( this . url ( 'CommitIntentConfig' ) , createHTTPRequest ( args , headers , signal ) ) . then (
3175
+ res => {
3176
+ return buildResponse ( res ) . then ( _data => {
3177
+ return {
3178
+ config : < IntentConfig > _data . config
3179
+ }
3180
+ } )
3181
+ } ,
3182
+ error => {
3183
+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
3184
+ }
3185
+ )
3186
+ }
3187
+
3188
+ getIntentConfig = ( args : GetIntentConfigArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetIntentConfigReturn > => {
3189
+ return this . fetch ( this . url ( 'GetIntentConfig' ) , createHTTPRequest ( args , headers , signal ) ) . then (
3190
+ res => {
3191
+ return buildResponse ( res ) . then ( _data => {
3192
+ return {
3193
+ config : < IntentConfig > _data . config
3194
+ }
3195
+ } )
3196
+ } ,
3197
+ error => {
3198
+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
3199
+ }
3200
+ )
3201
+ }
3202
+
2988
3203
listCurrencyGroups = ( headers ?: object , signal ?: AbortSignal ) : Promise < ListCurrencyGroupsReturn > => {
2989
3204
return this . fetch ( this . url ( 'ListCurrencyGroups' ) , createHTTPRequest ( { } , headers , signal ) ) . then (
2990
3205
res => {
0 commit comments