1
1
/* eslint-disable */
2
- // sequence-guard v0.4 .0 a465c693f2fdb46b87f61056f04c784acfcd4944
2
+ // sequence-guard v0.5 .0 29ecf507c86c5d53ab537783a32c1e8edf15d37f
3
3
// --
4
4
// Code generated by [email protected] with typescript generator. DO NOT EDIT.
5
5
//
6
6
// webrpc-gen -schema=guard.ridl -target=typescript -client -out=./clients/guard.gen.ts
7
7
8
8
export const WebrpcHeader = 'Webrpc'
9
9
10
- export const WebrpcHeaderValue = '[email protected] ;[email protected] ;sequence-guard@v0.4 .0'
10
+ export const WebrpcHeaderValue = '[email protected] ;[email protected] ;sequence-guard@v0.5 .0'
11
11
12
12
// WebRPC description and code-gen version
13
13
export const WebRPCVersion = 'v1'
14
14
15
15
// Schema version of your RIDL schema
16
- export const WebRPCSchemaVersion = 'v0.4 .0'
16
+ export const WebRPCSchemaVersion = 'v0.5 .0'
17
17
18
18
// Schema hash generated from your RIDL schema
19
- export const WebRPCSchemaHash = 'a465c693f2fdb46b87f61056f04c784acfcd4944 '
19
+ export const WebRPCSchemaHash = '29ecf507c86c5d53ab537783a32c1e8edf15d37f '
20
20
21
21
type WebrpcGenVersions = {
22
22
webrpcGenVersion : string
@@ -125,6 +125,7 @@ export interface OwnershipProof {
125
125
timestamp : number
126
126
signer : string
127
127
signature : string
128
+ chainId : number
128
129
}
129
130
130
131
export interface AuthToken {
@@ -267,18 +268,21 @@ export interface SetPINArgs {
267
268
pin : string
268
269
timestamp : number
269
270
signature : string
271
+ chainId : number
270
272
}
271
273
272
274
export interface SetPINReturn { }
273
275
export interface ResetPINArgs {
274
276
timestamp : number
275
277
signature : string
278
+ chainId : number
276
279
}
277
280
278
281
export interface ResetPINReturn { }
279
282
export interface CreateTOTPArgs {
280
283
timestamp : number
281
284
signature : string
285
+ chainId : number
282
286
}
283
287
284
288
export interface CreateTOTPReturn {
@@ -294,6 +298,7 @@ export interface CommitTOTPReturn {
294
298
export interface ResetTOTPArgs {
295
299
timestamp : number
296
300
signature : string
301
+ chainId : number
297
302
}
298
303
299
304
export interface ResetTOTPReturn { }
@@ -306,6 +311,7 @@ export interface Reset2FAReturn {}
306
311
export interface RecoveryCodesArgs {
307
312
timestamp : number
308
313
signature : string
314
+ chainId : number
309
315
}
310
316
311
317
export interface RecoveryCodesReturn {
@@ -314,6 +320,7 @@ export interface RecoveryCodesReturn {
314
320
export interface ResetRecoveryCodesArgs {
315
321
timestamp : number
316
322
signature : string
323
+ chainId : number
317
324
}
318
325
319
326
export interface ResetRecoveryCodesReturn {
@@ -956,6 +963,32 @@ export class NotFoundError extends WebrpcError {
956
963
}
957
964
}
958
965
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
+
959
992
export enum errors {
960
993
WebrpcEndpoint = 'WebrpcEndpoint' ,
961
994
WebrpcRequestFailed = 'WebrpcRequestFailed' ,
@@ -980,7 +1013,9 @@ export enum errors {
980
1013
Unavailable = 'Unavailable' ,
981
1014
QueryFailed = 'QueryFailed' ,
982
1015
ValidationFailed = 'ValidationFailed' ,
983
- NotFound = 'NotFound'
1016
+ NotFound = 'NotFound' ,
1017
+ RequiresTOTP = 'RequiresTOTP' ,
1018
+ RequiresPIN = 'RequiresPIN'
984
1019
}
985
1020
986
1021
export enum WebrpcErrorCodes {
@@ -1007,7 +1042,9 @@ export enum WebrpcErrorCodes {
1007
1042
Unavailable = 2002 ,
1008
1043
QueryFailed = 2003 ,
1009
1044
ValidationFailed = 2004 ,
1010
- NotFound = 3000
1045
+ NotFound = 3000 ,
1046
+ RequiresTOTP = 6600 ,
1047
+ RequiresPIN = 6601
1011
1048
}
1012
1049
1013
1050
export const webrpcErrorByCode : { [ code : number ] : any } = {
@@ -1034,7 +1071,9 @@ export const webrpcErrorByCode: { [code: number]: any } = {
1034
1071
[ 2002 ] : UnavailableError ,
1035
1072
[ 2003 ] : QueryFailedError ,
1036
1073
[ 2004 ] : ValidationFailedError ,
1037
- [ 3000 ] : NotFoundError
1074
+ [ 3000 ] : NotFoundError ,
1075
+ [ 6600 ] : RequiresTOTPError ,
1076
+ [ 6601 ] : RequiresPINError
1038
1077
}
1039
1078
1040
1079
export type Fetch = ( input : RequestInfo , init ?: RequestInit ) => Promise < Response >
0 commit comments