Skip to content

Commit 3f656bd

Browse files
committed
[AUTOMATED] Update: api/proto/clients/api.gen.ts
1 parent e914c3d commit 3f656bd

File tree

1 file changed

+234
-19
lines changed

1 file changed

+234
-19
lines changed

packages/api/src/api.gen.ts

Lines changed: 234 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable */
2-
// sequence-api v0.4.0 3129ee0cac1b417bbac1774ce408cd8753c6ce78
2+
// sequence-api v0.4.0 01e4e5d5ce5e7b85514f2db2fb5b346229db727c
33
// --
44
// Code generated by [email protected] with typescript generator. DO NOT EDIT.
55
//
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1'
1616
export const WebRPCSchemaVersion = 'v0.4.0'
1717

1818
// Schema hash generated from your RIDL schema
19-
export const WebRPCSchemaHash = '3129ee0cac1b417bbac1774ce408cd8753c6ce78'
19+
export const WebRPCSchemaHash = '01e4e5d5ce5e7b85514f2db2fb5b346229db727c'
2020

2121
type WebrpcGenVersions = {
2222
webrpcGenVersion: string
@@ -106,6 +106,11 @@ export enum TransakBuySell {
106106
SELL = 'SELL'
107107
}
108108

109+
export enum TradeType {
110+
EXACT_INPUT = 'EXACT_INPUT',
111+
EXACT_OUTPUT = 'EXACT_OUTPUT'
112+
}
113+
109114
export enum CheckoutOptionCrypto {
110115
none = 'none',
111116
partially = 'partially',
@@ -202,6 +207,43 @@ export interface Friend {
202207
createdAt?: string
203208
}
204209

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+
205247
export interface InviteCode {
206248
usesLeft: number
207249
ownerAccount: string
@@ -234,29 +276,28 @@ export interface TupleComponent {
234276
value: any
235277
}
236278

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
241283
}
242284

243-
export interface IntentSolution {
244-
transactions: Array<Transactions>
285+
export interface TakerFee {
286+
address: string
287+
bps: number
245288
}
246289

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
251295
}
252296

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
260301
}
261302

262303
export interface UserStorage {
@@ -852,6 +893,62 @@ export interface FortePaymentStatus {
852893
status: string
853894
}
854895

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+
855952
export interface API {
856953
/**
857954
*
@@ -1078,6 +1175,18 @@ export interface API {
10781175
*/
10791176
getLifiSwapRoutes(args: GetLifiSwapRoutesArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapRoutesReturn>
10801177
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>
10811190
/**
10821191
*
10831192
* Inventory, payments and management
@@ -1674,6 +1783,53 @@ export interface GetLifiSwapQuoteArgs {
16741783
export interface GetLifiSwapQuoteReturn {
16751784
quote: LifiSwapQuote
16761785
}
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+
}
16771833
export interface ListCurrencyGroupsArgs {}
16781834

16791835
export interface ListCurrencyGroupsReturn {
@@ -2985,6 +3141,65 @@ export class API implements API {
29853141
)
29863142
}
29873143

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+
29883203
listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn> => {
29893204
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(
29903205
res => {

0 commit comments

Comments
 (0)