11/* eslint-disable */
2- // sequence-relayer v0.4.1 62fe2b49d57c4a0d3960ac1176d48ecfffc7af5a
2+ // sequence-relayer v0.4.1 93ac61641d0351211680e2092673726b5c4f1848
33// --
44// Code generated by [email protected] with typescript generator. DO NOT EDIT. 55//
66// webrpc-gen -schema=relayer.ridl -target=typescript -client -out=./clients/relayer.gen.ts
77
88export const WebrpcHeader = 'Webrpc'
99
10- 10+ 1111
1212// WebRPC description and code-gen version
1313export const WebRPCVersion = 'v1'
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1'
1616export const WebRPCSchemaVersion = 'v0.4.1'
1717
1818// Schema hash generated from your RIDL schema
19- export const WebRPCSchemaHash = "62fe2b49d57c4a0d3960ac1176d48ecfffc7af5a"
19+ export const WebRPCSchemaHash = '93ac61641d0351211680e2092673726b5c4f1848'
2020
2121type WebrpcGenVersions = {
2222 webrpcGenVersion : string
@@ -351,9 +351,9 @@ export interface Relayer {
351351 getSequenceContext ( headers ?: object , signal ?: AbortSignal ) : Promise < GetSequenceContextReturn >
352352 getChainID ( headers ?: object , signal ?: AbortSignal ) : Promise < GetChainIDReturn >
353353 /**
354- *
354+ *
355355 * Transactions
356- *
356+ *
357357 * TODO (future): rename this to just, 'SendTransaction(txn: MetaTransaction)' or 'SendTransaction(txn: SignedTransaction)', or something..
358358 * Project ID is only used by service and admin calls. Other clients must have projectID passed via the context
359359 * TODO: rename return txnHash: string to metaTxnID: string
@@ -374,13 +374,21 @@ export interface Relayer {
374374 /**
375375 * TODO: deprecated, to be removed by https://github.com/0xsequence/stack/pull/356 at a later date
376376 */
377- updateMetaTxnGasLimits ( args : UpdateMetaTxnGasLimitsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < UpdateMetaTxnGasLimitsReturn >
377+ updateMetaTxnGasLimits (
378+ args : UpdateMetaTxnGasLimitsArgs ,
379+ headers ?: object ,
380+ signal ?: AbortSignal
381+ ) : Promise < UpdateMetaTxnGasLimitsReturn >
378382 feeTokens ( headers ?: object , signal ?: AbortSignal ) : Promise < FeeTokensReturn >
379383 feeOptions ( args : FeeOptionsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < FeeOptionsReturn >
380384 /**
381385 * TODO: deprecated, to be removed by https://github.com/0xsequence/stack/pull/356 at a later date
382386 */
383- getMetaTxnNetworkFeeOptions ( args : GetMetaTxnNetworkFeeOptionsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetMetaTxnNetworkFeeOptionsReturn >
387+ getMetaTxnNetworkFeeOptions (
388+ args : GetMetaTxnNetworkFeeOptionsArgs ,
389+ headers ?: object ,
390+ signal ?: AbortSignal
391+ ) : Promise < GetMetaTxnNetworkFeeOptionsReturn >
384392 getMetaTransactions ( args : GetMetaTransactionsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetMetaTransactionsReturn >
385393 getTransactionCost ( args : GetTransactionCostArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetTransactionCostReturn >
386394 /**
@@ -401,10 +409,26 @@ export interface Relayer {
401409 /**
402410 * Legacy Gas Adjustment
403411 */
404- nextGasTankBalanceAdjustmentNonce ( args : NextGasTankBalanceAdjustmentNonceArgs , headers ?: object , signal ?: AbortSignal ) : Promise < NextGasTankBalanceAdjustmentNonceReturn >
405- adjustGasTankBalance ( args : AdjustGasTankBalanceArgs , headers ?: object , signal ?: AbortSignal ) : Promise < AdjustGasTankBalanceReturn >
406- getGasTankBalanceAdjustment ( args : GetGasTankBalanceAdjustmentArgs , headers ?: object , signal ?: AbortSignal ) : Promise < GetGasTankBalanceAdjustmentReturn >
407- listGasTankBalanceAdjustments ( args : ListGasTankBalanceAdjustmentsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < ListGasTankBalanceAdjustmentsReturn >
412+ nextGasTankBalanceAdjustmentNonce (
413+ args : NextGasTankBalanceAdjustmentNonceArgs ,
414+ headers ?: object ,
415+ signal ?: AbortSignal
416+ ) : Promise < NextGasTankBalanceAdjustmentNonceReturn >
417+ adjustGasTankBalance (
418+ args : AdjustGasTankBalanceArgs ,
419+ headers ?: object ,
420+ signal ?: AbortSignal
421+ ) : Promise < AdjustGasTankBalanceReturn >
422+ getGasTankBalanceAdjustment (
423+ args : GetGasTankBalanceAdjustmentArgs ,
424+ headers ?: object ,
425+ signal ?: AbortSignal
426+ ) : Promise < GetGasTankBalanceAdjustmentReturn >
427+ listGasTankBalanceAdjustments (
428+ args : ListGasTankBalanceAdjustmentsArgs ,
429+ headers ?: object ,
430+ signal ?: AbortSignal
431+ ) : Promise < ListGasTankBalanceAdjustmentsReturn >
408432 /**
409433 * Gas Sponsorship
410434 */
@@ -493,7 +517,7 @@ export interface SimulateV3Args {
493517}
494518
495519export interface SimulateV3Return {
496- results : Array < SimulateV3Result >
520+ results : Array < SimulateV3Result >
497521}
498522export interface UpdateMetaTxnGasLimitsArgs {
499523 walletAddress : string
@@ -509,6 +533,7 @@ export interface FeeTokensArgs {}
509533export interface FeeTokensReturn {
510534 isFeeRequired : boolean
511535 tokens : Array < FeeToken >
536+ paymentAddress : string
512537}
513538export interface FeeOptionsArgs {
514539 wallet : string
@@ -852,33 +877,39 @@ export class Relayer implements Relayer {
852877 }
853878 )
854879 }
855-
880+
856881 simulateV3 = ( args : SimulateV3Args , headers ?: object , signal ?: AbortSignal ) : Promise < SimulateV3Return > => {
857- return this . fetch (
858- this . url ( 'SimulateV3' ) ,
859- createHTTPRequest ( args , headers , signal ) ) . then ( ( res ) => {
860- return buildResponse ( res ) . then ( _data => {
861- return {
862- results : < Array < SimulateV3Result > > ( _data . results ) ,
863- }
864- } )
865- } , ( error ) => {
866- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
867- } )
868- }
869-
870- updateMetaTxnGasLimits = ( args : UpdateMetaTxnGasLimitsArgs , headers ?: object , signal ?: AbortSignal ) : Promise < UpdateMetaTxnGasLimitsReturn > => {
871- return this . fetch (
872- this . url ( 'UpdateMetaTxnGasLimits' ) ,
873- createHTTPRequest ( args , headers , signal ) ) . then ( ( res ) => {
874- return buildResponse ( res ) . then ( _data => {
875- return {
876- payload : < string > ( _data . payload ) ,
877- }
878- } )
879- } , ( error ) => {
880- throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
881- } )
882+ return this . fetch ( this . url ( 'SimulateV3' ) , createHTTPRequest ( args , headers , signal ) ) . then (
883+ res => {
884+ return buildResponse ( res ) . then ( _data => {
885+ return {
886+ results : < Array < SimulateV3Result > > _data . results
887+ }
888+ } )
889+ } ,
890+ error => {
891+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
892+ }
893+ )
894+ }
895+
896+ updateMetaTxnGasLimits = (
897+ args : UpdateMetaTxnGasLimitsArgs ,
898+ headers ?: object ,
899+ signal ?: AbortSignal
900+ ) : Promise < UpdateMetaTxnGasLimitsReturn > => {
901+ return this . fetch ( this . url ( 'UpdateMetaTxnGasLimits' ) , createHTTPRequest ( args , headers , signal ) ) . then (
902+ res => {
903+ return buildResponse ( res ) . then ( _data => {
904+ return {
905+ payload : < string > _data . payload
906+ }
907+ } )
908+ } ,
909+ error => {
910+ throw WebrpcRequestFailedError . new ( { cause : `fetch(): ${ error . message || '' } ` } )
911+ }
912+ )
882913 }
883914
884915 feeTokens = ( headers ?: object , signal ?: AbortSignal ) : Promise < FeeTokensReturn > => {
@@ -887,7 +918,8 @@ export class Relayer implements Relayer {
887918 return buildResponse ( res ) . then ( _data => {
888919 return {
889920 isFeeRequired : < boolean > _data . isFeeRequired ,
890- tokens : < Array < FeeToken > > _data . tokens
921+ tokens : < Array < FeeToken > > _data . tokens ,
922+ paymentAddress : < string > _data . paymentAddress
891923 }
892924 } )
893925 } ,
@@ -1829,7 +1861,6 @@ export class SimulationFailedError extends WebrpcError {
18291861 }
18301862}
18311863
1832-
18331864export enum errors {
18341865 WebrpcEndpoint = 'WebrpcEndpoint' ,
18351866 WebrpcRequestFailed = 'WebrpcRequestFailed' ,
@@ -1868,7 +1899,7 @@ export enum errors {
18681899 NotFound = 'NotFound' ,
18691900 InsufficientFee = 'InsufficientFee' ,
18701901 NotEnoughBalance = 'NotEnoughBalance' ,
1871- SimulationFailed = 'SimulationFailed' ,
1902+ SimulationFailed = 'SimulationFailed'
18721903}
18731904
18741905export enum WebrpcErrorCodes {
@@ -1909,7 +1940,7 @@ export enum WebrpcErrorCodes {
19091940 NotFound = 3000 ,
19101941 InsufficientFee = 3004 ,
19111942 NotEnoughBalance = 3005 ,
1912- SimulationFailed = 3006 ,
1943+ SimulationFailed = 3006
19131944}
19141945
19151946export const webrpcErrorByCode : { [ code : number ] : any } = {
@@ -1950,7 +1981,7 @@ export const webrpcErrorByCode: { [code: number]: any } = {
19501981 [ 3000 ] : NotFoundError ,
19511982 [ 3004 ] : InsufficientFeeError ,
19521983 [ 3005 ] : NotEnoughBalanceError ,
1953- [ 3006 ] : SimulationFailedError ,
1984+ [ 3006 ] : SimulationFailedError
19541985}
19551986
19561987export type Fetch = ( input : RequestInfo , init ?: RequestInit ) => Promise < Response >
0 commit comments