@0xsequence/guard 1.9.34 → 1.9.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,6 +112,19 @@ class Guard {
112
112
  });
113
113
  });
114
114
  };
115
+ this.patch = (args, headers, signal) => {
116
+ return this.fetch(this.url('Patch'), createHTTPRequest(args, headers, signal)).then(res => {
117
+ return buildResponse(res).then(_data => {
118
+ return {
119
+ txs: _data.txs
120
+ };
121
+ });
122
+ }, error => {
123
+ throw WebrpcRequestFailedError.new({
124
+ cause: `fetch(): ${error.message || ''}`
125
+ });
126
+ });
127
+ };
115
128
  this.authMethods = (args, headers, signal) => {
116
129
  return this.fetch(this.url('AuthMethods'), createHTTPRequest(args, headers, signal)).then(res => {
117
130
  return buildResponse(res).then(_data => {
@@ -694,6 +707,7 @@ function toUTCString(date) {
694
707
  }
695
708
 
696
709
  exports.AuthMethod = AuthMethod;
710
+ exports.Guard = Guard;
697
711
  exports.GuardSigner = GuardSigner;
698
712
  exports.getAuthUpdateProofTypedData = getAuthUpdateProofTypedData;
699
713
  exports.getOwnershipProofTypedData = getOwnershipProofTypedData;
@@ -112,6 +112,19 @@ class Guard {
112
112
  });
113
113
  });
114
114
  };
115
+ this.patch = (args, headers, signal) => {
116
+ return this.fetch(this.url('Patch'), createHTTPRequest(args, headers, signal)).then(res => {
117
+ return buildResponse(res).then(_data => {
118
+ return {
119
+ txs: _data.txs
120
+ };
121
+ });
122
+ }, error => {
123
+ throw WebrpcRequestFailedError.new({
124
+ cause: `fetch(): ${error.message || ''}`
125
+ });
126
+ });
127
+ };
115
128
  this.authMethods = (args, headers, signal) => {
116
129
  return this.fetch(this.url('AuthMethods'), createHTTPRequest(args, headers, signal)).then(res => {
117
130
  return buildResponse(res).then(_data => {
@@ -694,6 +707,7 @@ function toUTCString(date) {
694
707
  }
695
708
 
696
709
  exports.AuthMethod = AuthMethod;
710
+ exports.Guard = Guard;
697
711
  exports.GuardSigner = GuardSigner;
698
712
  exports.getAuthUpdateProofTypedData = getAuthUpdateProofTypedData;
699
713
  exports.getOwnershipProofTypedData = getOwnershipProofTypedData;
@@ -108,6 +108,19 @@ class Guard {
108
108
  });
109
109
  });
110
110
  };
111
+ this.patch = (args, headers, signal) => {
112
+ return this.fetch(this.url('Patch'), createHTTPRequest(args, headers, signal)).then(res => {
113
+ return buildResponse(res).then(_data => {
114
+ return {
115
+ txs: _data.txs
116
+ };
117
+ });
118
+ }, error => {
119
+ throw WebrpcRequestFailedError.new({
120
+ cause: `fetch(): ${error.message || ''}`
121
+ });
122
+ });
123
+ };
111
124
  this.authMethods = (args, headers, signal) => {
112
125
  return this.fetch(this.url('AuthMethods'), createHTTPRequest(args, headers, signal)).then(res => {
113
126
  return buildResponse(res).then(_data => {
@@ -689,4 +702,4 @@ function toUTCString(date) {
689
702
  return date.toUTCString().replace('GMT', 'UTC');
690
703
  }
691
704
 
692
- export { AuthMethod, GuardSigner, getAuthUpdateProofTypedData, getOwnershipProofTypedData, isSignedOwnershipProof, signOwnershipProof };
705
+ export { AuthMethod, Guard, GuardSigner, getAuthUpdateProofTypedData, getOwnershipProofTypedData, isSignedOwnershipProof, signOwnershipProof };
@@ -1,6 +1,6 @@
1
1
  export declare const WebRPCVersion = "v1";
2
2
  export declare const WebRPCSchemaVersion = "v0.4.0";
3
- export declare const WebRPCSchemaHash = "12059311f086716f467356ed38189f565d5f172a";
3
+ export declare const WebRPCSchemaHash = "5b203e30a5c79b2b9a37483ce17500a51b94ebe1";
4
4
  export interface Version {
5
5
  webrpcVersion: string;
6
6
  schemaVersion: string;
@@ -49,6 +49,7 @@ export interface Guard {
49
49
  getSignerConfig(args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetSignerConfigReturn>;
50
50
  sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise<SignReturn>;
51
51
  signWith(args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise<SignWithReturn>;
52
+ patch(args: PatchArgs, headers?: object, signal?: AbortSignal): Promise<PatchReturn>;
52
53
  authMethods(args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise<AuthMethodsReturn>;
53
54
  setPIN(args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise<SetPINReturn>;
54
55
  resetPIN(args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise<ResetPINReturn>;
@@ -95,6 +96,14 @@ export interface SignWithArgs {
95
96
  export interface SignWithReturn {
96
97
  sig: string;
97
98
  }
99
+ export interface PatchArgs {
100
+ signer: string;
101
+ chainId: number;
102
+ secret: string;
103
+ }
104
+ export interface PatchReturn {
105
+ txs: any;
106
+ }
98
107
  export interface AuthMethodsArgs {
99
108
  proof?: OwnershipProof;
100
109
  }
@@ -166,6 +175,7 @@ export declare class Guard implements Guard {
166
175
  getSignerConfig: (args: GetSignerConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetSignerConfigReturn>;
167
176
  sign: (args: SignArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SignReturn>;
168
177
  signWith: (args: SignWithArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SignWithReturn>;
178
+ patch: (args: PatchArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<PatchReturn>;
169
179
  authMethods: (args: AuthMethodsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AuthMethodsReturn>;
170
180
  setPIN: (args: SetPINArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<SetPINReturn>;
171
181
  resetPIN: (args: ResetPINArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ResetPINReturn>;
@@ -1 +1,2 @@
1
+ export { Guard } from "./guard.gen.js";
1
2
  export * from "./signer.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/guard",
3
- "version": "1.9.34",
3
+ "version": "1.9.36",
4
4
  "description": "guard sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/guard",
6
6
  "source": "src/index.ts",
@@ -10,10 +10,10 @@
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "ethers": "^5.7.2",
13
- "@0xsequence/account": "1.9.34",
14
- "@0xsequence/core": "1.9.34",
15
- "@0xsequence/signhub": "1.9.34",
16
- "@0xsequence/utils": "1.9.34"
13
+ "@0xsequence/account": "1.9.36",
14
+ "@0xsequence/core": "1.9.36",
15
+ "@0xsequence/signhub": "1.9.36",
16
+ "@0xsequence/utils": "1.9.36"
17
17
  },
18
18
  "files": [
19
19
  "src",
package/src/guard.gen.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-guard v0.4.0 12059311f086716f467356ed38189f565d5f172a
2
+ // sequence-guard v0.4.0 5b203e30a5c79b2b9a37483ce17500a51b94ebe1
3
3
  // --
4
4
  // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
5
5
  //
@@ -12,7 +12,7 @@ export const WebRPCVersion = 'v1'
12
12
  export const WebRPCSchemaVersion = 'v0.4.0'
13
13
 
14
14
  // Schema hash generated from your RIDL schema
15
- export const WebRPCSchemaHash = '12059311f086716f467356ed38189f565d5f172a'
15
+ export const WebRPCSchemaHash = '5b203e30a5c79b2b9a37483ce17500a51b94ebe1'
16
16
 
17
17
  //
18
18
  // Types
@@ -74,6 +74,7 @@ export interface Guard {
74
74
  getSignerConfig(args: GetSignerConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetSignerConfigReturn>
75
75
  sign(args: SignArgs, headers?: object, signal?: AbortSignal): Promise<SignReturn>
76
76
  signWith(args: SignWithArgs, headers?: object, signal?: AbortSignal): Promise<SignWithReturn>
77
+ patch(args: PatchArgs, headers?: object, signal?: AbortSignal): Promise<PatchReturn>
77
78
  authMethods(args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise<AuthMethodsReturn>
78
79
  setPIN(args: SetPINArgs, headers?: object, signal?: AbortSignal): Promise<SetPINReturn>
79
80
  resetPIN(args: ResetPINArgs, headers?: object, signal?: AbortSignal): Promise<ResetPINReturn>
@@ -124,6 +125,15 @@ export interface SignWithArgs {
124
125
  export interface SignWithReturn {
125
126
  sig: string
126
127
  }
128
+ export interface PatchArgs {
129
+ signer: string
130
+ chainId: number
131
+ secret: string
132
+ }
133
+
134
+ export interface PatchReturn {
135
+ txs: any
136
+ }
127
137
  export interface AuthMethodsArgs {
128
138
  proof?: OwnershipProof
129
139
  }
@@ -296,6 +306,21 @@ export class Guard implements Guard {
296
306
  )
297
307
  }
298
308
 
309
+ patch = (args: PatchArgs, headers?: object, signal?: AbortSignal): Promise<PatchReturn> => {
310
+ return this.fetch(this.url('Patch'), createHTTPRequest(args, headers, signal)).then(
311
+ res => {
312
+ return buildResponse(res).then(_data => {
313
+ return {
314
+ txs: <any>_data.txs
315
+ }
316
+ })
317
+ },
318
+ error => {
319
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
320
+ }
321
+ )
322
+ }
323
+
299
324
  authMethods = (args: AuthMethodsArgs, headers?: object, signal?: AbortSignal): Promise<AuthMethodsReturn> => {
300
325
  return this.fetch(this.url('AuthMethods'), createHTTPRequest(args, headers, signal)).then(
301
326
  res => {
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
+ export { Guard } from './guard.gen'
1
2
  export * from './signer'