11/* eslint-disable */
2- // sequence-relayer v0.4.1 381aab1c8d53149311790b7f6631af093819aeec
2+ // sequence-relayer v0.4.1 012e18e1a304ada0bdddbb9c4805697ff9771d36
33// --
44// Code generated by Webrpc-gen@v0.31.2 with typescript generator. DO NOT EDIT.
55//
@@ -12,7 +12,7 @@ export const WebrpcVersion = 'v1'
1212export const WebrpcSchemaVersion = 'v0.4.1'
1313
1414// Schema hash generated from your RIDL schema
15- export const WebrpcSchemaHash = '381aab1c8d53149311790b7f6631af093819aeec '
15+ export const WebrpcSchemaHash = '012e18e1a304ada0bdddbb9c4805697ff9771d36 '
1616
1717//
1818// Client interface
@@ -68,6 +68,23 @@ export interface RelayerClient {
6868
6969 feeOptions ( req : FeeOptionsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < FeeOptionsReturn >
7070
71+ /**
72+ * Bridge gas endpoints for S2S calls
73+ * Used for bridge fees (e.g., LayerZero messaging fees) that require msg.value to be fronted at runtime.
74+ * bridgeGas will be included in fee calculation so the relayer gets reimbursed.
75+ */
76+ sendMetaTxnWithBridgeGas (
77+ req : SendMetaTxnWithBridgeGasArgs ,
78+ headers ?: object ,
79+ signal ?: AbortSignal
80+ ) : Promise < SendMetaTxnWithBridgeGasReturn >
81+
82+ feeOptionsWithBridgeGas (
83+ req : FeeOptionsWithBridgeGasArgs ,
84+ headers ?: object ,
85+ signal ?: AbortSignal
86+ ) : Promise < FeeOptionsWithBridgeGasReturn >
87+
7188 /**
7289 * TODO: deprecated, to be removed by https://github.com/0xsequence/stack/pull/356 at a later date
7390 */
@@ -310,6 +327,7 @@ export interface MetaTxnLog {
310327 minedAt : string
311328 target : string
312329 input : string
330+ bridgeGas ?: string
313331 txnArgs : { [ key : string ] : any }
314332 txnReceipt ?: { [ key : string ] : any }
315333 walletAddress : string
@@ -544,6 +562,33 @@ export interface FeeOptionsReturn {
544562 quote ?: string
545563}
546564
565+ export interface SendMetaTxnWithBridgeGasArgs {
566+ call : MetaTxn
567+ quote ?: string
568+ projectID ?: number
569+ bridgeGas : string
570+ preconditions ?: Array < TransactionPrecondition >
571+ }
572+
573+ export interface SendMetaTxnWithBridgeGasReturn {
574+ status : boolean
575+ txnHash : string
576+ }
577+
578+ export interface FeeOptionsWithBridgeGasArgs {
579+ wallet : string
580+ to : string
581+ data : string
582+ simulate ?: boolean
583+ bridgeGas : string
584+ }
585+
586+ export interface FeeOptionsWithBridgeGasReturn {
587+ options : Array < FeeOption >
588+ sponsored : boolean
589+ quote ?: string
590+ }
591+
547592export interface GetMetaTxnNetworkFeeOptionsArgs {
548593 walletConfig : any
549594 payload : string
@@ -793,6 +838,8 @@ export class Relayer implements RelayerClient {
793838 updateMetaTxnGasLimits : ( req : UpdateMetaTxnGasLimitsArgs ) => [ 'Relayer' , 'updateMetaTxnGasLimits' , req ] as const ,
794839 feeTokens : ( ) => [ 'Relayer' , 'feeTokens' ] as const ,
795840 feeOptions : ( req : FeeOptionsArgs ) => [ 'Relayer' , 'feeOptions' , req ] as const ,
841+ sendMetaTxnWithBridgeGas : ( req : SendMetaTxnWithBridgeGasArgs ) => [ 'Relayer' , 'sendMetaTxnWithBridgeGas' , req ] as const ,
842+ feeOptionsWithBridgeGas : ( req : FeeOptionsWithBridgeGasArgs ) => [ 'Relayer' , 'feeOptionsWithBridgeGas' , req ] as const ,
796843 getMetaTxnNetworkFeeOptions : ( req : GetMetaTxnNetworkFeeOptionsArgs ) =>
797844 [ 'Relayer' , 'getMetaTxnNetworkFeeOptions' , req ] as const ,
798845 startSender : ( req : StartSenderArgs ) => [ 'Relayer' , 'startSender' , req ] as const ,
@@ -995,6 +1042,40 @@ export class Relayer implements RelayerClient {
9951042 )
9961043 }
9971044
1045+ sendMetaTxnWithBridgeGas = (
1046+ req : SendMetaTxnWithBridgeGasArgs ,
1047+ headers ?: object ,
1048+ signal ?: AbortSignal
1049+ ) : Promise < SendMetaTxnWithBridgeGasReturn > => {
1050+ return this . fetch ( this . url ( 'SendMetaTxnWithBridgeGas' ) , createHttpRequest ( JsonEncode ( req ) , headers , signal ) ) . then (
1051+ res => {
1052+ return buildResponse ( res ) . then ( _data => {
1053+ return JsonDecode < SendMetaTxnWithBridgeGasReturn > ( _data , 'SendMetaTxnWithBridgeGasReturn' )
1054+ } )
1055+ } ,
1056+ error => {
1057+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error instanceof Error ? error . message : String ( error ) } ` } )
1058+ }
1059+ )
1060+ }
1061+
1062+ feeOptionsWithBridgeGas = (
1063+ req : FeeOptionsWithBridgeGasArgs ,
1064+ headers ?: object ,
1065+ signal ?: AbortSignal
1066+ ) : Promise < FeeOptionsWithBridgeGasReturn > => {
1067+ return this . fetch ( this . url ( 'FeeOptionsWithBridgeGas' ) , createHttpRequest ( JsonEncode ( req ) , headers , signal ) ) . then (
1068+ res => {
1069+ return buildResponse ( res ) . then ( _data => {
1070+ return JsonDecode < FeeOptionsWithBridgeGasReturn > ( _data , 'FeeOptionsWithBridgeGasReturn' )
1071+ } )
1072+ } ,
1073+ error => {
1074+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error instanceof Error ? error . message : String ( error ) } ` } )
1075+ }
1076+ )
1077+ }
1078+
9981079 getMetaTxnNetworkFeeOptions = (
9991080 req : GetMetaTxnNetworkFeeOptionsArgs ,
10001081 headers ?: object ,
@@ -1371,6 +1452,7 @@ export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response
13711452
13721453const BIG_INT_FIELDS : { [ typ : string ] : ( string | [ string , string ] ) [ ] } = {
13731454 SendMetaTxnArgs : [ [ 'preconditions' , 'TransactionPrecondition[]' ] ] ,
1455+ SendMetaTxnWithBridgeGasArgs : [ [ 'preconditions' , 'TransactionPrecondition[]' ] ] ,
13741456 TransactionPrecondition : [ 'minAmount' ] ,
13751457 Transactions : [ [ 'preconditions' , 'TransactionPrecondition[]' ] ]
13761458}
0 commit comments