From d36f5d7fcdda6260572f67fe07f0746de8965380 Mon Sep 17 00:00:00 2001 From: patrislav <934507+patrislav@users.noreply.github.com> Date: Thu, 28 Aug 2025 14:25:40 +0000 Subject: [PATCH 1/2] [AUTOMATED] Update: proto/clients/guard.gen.ts --- packages/guard/src/guard.gen.ts | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/guard/src/guard.gen.ts b/packages/guard/src/guard.gen.ts index a693ce74c..23f3d5836 100644 --- a/packages/guard/src/guard.gen.ts +++ b/packages/guard/src/guard.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-guard v0.4.0 776b307c2145ac7a994eec63240acae042c96067 +// sequence-guard v0.4.0 a465c693f2fdb46b87f61056f04c784acfcd4944 // -- // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // @@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' export const WebRPCSchemaVersion = 'v0.4.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = '776b307c2145ac7a994eec63240acae042c96067' +export const WebRPCSchemaHash = 'a465c693f2fdb46b87f61056f04c784acfcd4944' type WebrpcGenVersions = { webrpcGenVersion: string @@ -70,6 +70,20 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions { // Types // +export enum PayloadType { + Calls = 'Calls', + Message = 'Message', + ConfigUpdate = 'ConfigUpdate', + SessionImplicitAuthorize = 'SessionImplicitAuthorize' +} + +export enum SignatureType { + Hash = 'Hash', + Sapient = 'Sapient', + EthSign = 'EthSign', + Erc1271 = 'Erc1271' +} + export interface Version { webrpcVersion: string schemaVersion: string @@ -99,7 +113,11 @@ export interface WalletSigner { export interface SignRequest { chainId: number msg: string - auxData: string + auxData?: string + wallet?: string + payloadType?: PayloadType + payloadData?: string + signatures?: Array } export interface OwnershipProof { @@ -119,6 +137,13 @@ export interface RecoveryCode { used: boolean } +export interface Signature { + address: string + type: SignatureType + imageHash?: string + data: string +} + export interface Guard { ping(headers?: object, signal?: AbortSignal): Promise version(headers?: object, signal?: AbortSignal): Promise From 2e42752f1b246e3c6015a5e10f6188045b177627 Mon Sep 17 00:00:00 2001 From: patrislav <934507+patrislav@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:36:52 +0000 Subject: [PATCH 2/2] [AUTOMATED] Update: proto/clients/guard.gen.ts --- packages/guard/src/guard.gen.ts | 53 ++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/packages/guard/src/guard.gen.ts b/packages/guard/src/guard.gen.ts index 23f3d5836..45c77d2a4 100644 --- a/packages/guard/src/guard.gen.ts +++ b/packages/guard/src/guard.gen.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// sequence-guard v0.4.0 a465c693f2fdb46b87f61056f04c784acfcd4944 +// sequence-guard v0.5.0 29ecf507c86c5d53ab537783a32c1e8edf15d37f // -- // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT. // @@ -7,16 +7,16 @@ export const WebrpcHeader = 'Webrpc' -export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.4.0' +export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-guard@v0.5.0' // WebRPC description and code-gen version export const WebRPCVersion = 'v1' // Schema version of your RIDL schema -export const WebRPCSchemaVersion = 'v0.4.0' +export const WebRPCSchemaVersion = 'v0.5.0' // Schema hash generated from your RIDL schema -export const WebRPCSchemaHash = 'a465c693f2fdb46b87f61056f04c784acfcd4944' +export const WebRPCSchemaHash = '29ecf507c86c5d53ab537783a32c1e8edf15d37f' type WebrpcGenVersions = { webrpcGenVersion: string @@ -125,6 +125,7 @@ export interface OwnershipProof { timestamp: number signer: string signature: string + chainId: number } export interface AuthToken { @@ -267,18 +268,21 @@ export interface SetPINArgs { pin: string timestamp: number signature: string + chainId: number } export interface SetPINReturn {} export interface ResetPINArgs { timestamp: number signature: string + chainId: number } export interface ResetPINReturn {} export interface CreateTOTPArgs { timestamp: number signature: string + chainId: number } export interface CreateTOTPReturn { @@ -294,6 +298,7 @@ export interface CommitTOTPReturn { export interface ResetTOTPArgs { timestamp: number signature: string + chainId: number } export interface ResetTOTPReturn {} @@ -306,6 +311,7 @@ export interface Reset2FAReturn {} export interface RecoveryCodesArgs { timestamp: number signature: string + chainId: number } export interface RecoveryCodesReturn { @@ -314,6 +320,7 @@ export interface RecoveryCodesReturn { export interface ResetRecoveryCodesArgs { timestamp: number signature: string + chainId: number } export interface ResetRecoveryCodesReturn { @@ -956,6 +963,32 @@ export class NotFoundError extends WebrpcError { } } +export class RequiresTOTPError extends WebrpcError { + constructor( + name: string = 'RequiresTOTP', + code: number = 6600, + message: string = `TOTP is required`, + status: number = 0, + cause?: string + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequiresTOTPError.prototype) + } +} + +export class RequiresPINError extends WebrpcError { + constructor( + name: string = 'RequiresPIN', + code: number = 6601, + message: string = `PIN is required`, + status: number = 0, + cause?: string + ) { + super(name, code, message, status, cause) + Object.setPrototypeOf(this, RequiresPINError.prototype) + } +} + export enum errors { WebrpcEndpoint = 'WebrpcEndpoint', WebrpcRequestFailed = 'WebrpcRequestFailed', @@ -980,7 +1013,9 @@ export enum errors { Unavailable = 'Unavailable', QueryFailed = 'QueryFailed', ValidationFailed = 'ValidationFailed', - NotFound = 'NotFound' + NotFound = 'NotFound', + RequiresTOTP = 'RequiresTOTP', + RequiresPIN = 'RequiresPIN' } export enum WebrpcErrorCodes { @@ -1007,7 +1042,9 @@ export enum WebrpcErrorCodes { Unavailable = 2002, QueryFailed = 2003, ValidationFailed = 2004, - NotFound = 3000 + NotFound = 3000, + RequiresTOTP = 6600, + RequiresPIN = 6601 } export const webrpcErrorByCode: { [code: number]: any } = { @@ -1034,7 +1071,9 @@ export const webrpcErrorByCode: { [code: number]: any } = { [2002]: UnavailableError, [2003]: QueryFailedError, [2004]: ValidationFailedError, - [3000]: NotFoundError + [3000]: NotFoundError, + [6600]: RequiresTOTPError, + [6601]: RequiresPINError } export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise