11/* eslint-disable */
2- // sequence-guard v0.4 .0 a465c693f2fdb46b87f61056f04c784acfcd4944
2+ // sequence-guard v0.5 .0 29ecf507c86c5d53ab537783a32c1e8edf15d37f
33// --
44// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
55//
66// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts
77
88export const WebrpcHeader = 'Webrpc'
99
10- export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4 .0'
10+ export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.5 .0'
1111
1212// WebRPC description and code-gen version
1313export const WebRPCVersion = 'v1'
1414
1515// Schema version of your RIDL schema
16- export const WebRPCSchemaVersion = 'v0.4 .0'
16+ export const WebRPCSchemaVersion = 'v0.5 .0'
1717
1818// Schema hash generated from your RIDL schema
19- export const WebRPCSchemaHash = 'a465c693f2fdb46b87f61056f04c784acfcd4944 '
19+ export const WebRPCSchemaHash = '29ecf507c86c5d53ab537783a32c1e8edf15d37f '
2020
2121type WebrpcGenVersions = {
2222 webrpcGenVersion : string
@@ -125,6 +125,7 @@ export interface OwnershipProof {
125125 timestamp : number
126126 signer : string
127127 signature : string
128+ chainId : number
128129}
129130
130131export interface AuthToken {
@@ -267,18 +268,21 @@ export interface SetPINArgs {
267268 pin : string
268269 timestamp : number
269270 signature : string
271+ chainId : number
270272}
271273
272274export interface SetPINReturn { }
273275export interface ResetPINArgs {
274276 timestamp : number
275277 signature : string
278+ chainId : number
276279}
277280
278281export interface ResetPINReturn { }
279282export interface CreateTOTPArgs {
280283 timestamp : number
281284 signature : string
285+ chainId : number
282286}
283287
284288export interface CreateTOTPReturn {
@@ -294,6 +298,7 @@ export interface CommitTOTPReturn {
294298export interface ResetTOTPArgs {
295299 timestamp : number
296300 signature : string
301+ chainId : number
297302}
298303
299304export interface ResetTOTPReturn { }
@@ -306,6 +311,7 @@ export interface Reset2FAReturn {}
306311export interface RecoveryCodesArgs {
307312 timestamp : number
308313 signature : string
314+ chainId : number
309315}
310316
311317export interface RecoveryCodesReturn {
@@ -314,6 +320,7 @@ export interface RecoveryCodesReturn {
314320export interface ResetRecoveryCodesArgs {
315321 timestamp : number
316322 signature : string
323+ chainId : number
317324}
318325
319326export interface ResetRecoveryCodesReturn {
@@ -956,6 +963,32 @@ export class NotFoundError extends WebrpcError {
956963 }
957964}
958965
966+ export class RequiresTOTPError extends WebrpcError {
967+ constructor (
968+ name : string = 'RequiresTOTP' ,
969+ code : number = 6600 ,
970+ message : string = `TOTP is required` ,
971+ status : number = 0 ,
972+ cause ?: string
973+ ) {
974+ super ( name , code , message , status , cause )
975+ Object . setPrototypeOf ( this , RequiresTOTPError . prototype )
976+ }
977+ }
978+
979+ export class RequiresPINError extends WebrpcError {
980+ constructor (
981+ name : string = 'RequiresPIN' ,
982+ code : number = 6601 ,
983+ message : string = `PIN is required` ,
984+ status : number = 0 ,
985+ cause ?: string
986+ ) {
987+ super ( name , code , message , status , cause )
988+ Object . setPrototypeOf ( this , RequiresPINError . prototype )
989+ }
990+ }
991+
959992export enum errors {
960993 WebrpcEndpoint = 'WebrpcEndpoint' ,
961994 WebrpcRequestFailed = 'WebrpcRequestFailed' ,
@@ -980,7 +1013,9 @@ export enum errors {
9801013 Unavailable = 'Unavailable' ,
9811014 QueryFailed = 'QueryFailed' ,
9821015 ValidationFailed = 'ValidationFailed' ,
983- NotFound = 'NotFound'
1016+ NotFound = 'NotFound' ,
1017+ RequiresTOTP = 'RequiresTOTP' ,
1018+ RequiresPIN = 'RequiresPIN'
9841019}
9851020
9861021export enum WebrpcErrorCodes {
@@ -1007,7 +1042,9 @@ export enum WebrpcErrorCodes {
10071042 Unavailable = 2002 ,
10081043 QueryFailed = 2003 ,
10091044 ValidationFailed = 2004 ,
1010- NotFound = 3000
1045+ NotFound = 3000 ,
1046+ RequiresTOTP = 6600 ,
1047+ RequiresPIN = 6601
10111048}
10121049
10131050export const webrpcErrorByCode : { [ code : number ] : any } = {
@@ -1034,7 +1071,9 @@ export const webrpcErrorByCode: { [code: number]: any } = {
10341071 [ 2002 ] : UnavailableError ,
10351072 [ 2003 ] : QueryFailedError ,
10361073 [ 2004 ] : ValidationFailedError ,
1037- [ 3000 ] : NotFoundError
1074+ [ 3000 ] : NotFoundError ,
1075+ [ 6600 ] : RequiresTOTPError ,
1076+ [ 6601 ] : RequiresPINError
10381077}
10391078
10401079export type Fetch = ( input : RequestInfo , init ?: RequestInit ) => Promise < Response >
0 commit comments