@0xsequence/guard 1.4.2 → 1.4.3

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.
@@ -277,7 +277,9 @@ class GuardSigner {
277
277
  }
278
278
  });
279
279
  }
280
- return response.methods.map(parseAuthMethod);
280
+ return _extends({}, response, {
281
+ methods: response.methods.map(parseAuthMethod)
282
+ });
281
283
  }
282
284
  async setPin(pin, proof) {
283
285
  const signedProof = await signAuthUpdateProof(proof);
@@ -277,7 +277,9 @@ class GuardSigner {
277
277
  }
278
278
  });
279
279
  }
280
- return response.methods.map(parseAuthMethod);
280
+ return _extends({}, response, {
281
+ methods: response.methods.map(parseAuthMethod)
282
+ });
281
283
  }
282
284
  async setPin(pin, proof) {
283
285
  const signedProof = await signAuthUpdateProof(proof);
@@ -273,7 +273,9 @@ class GuardSigner {
273
273
  }
274
274
  });
275
275
  }
276
- return response.methods.map(parseAuthMethod);
276
+ return _extends({}, response, {
277
+ methods: response.methods.map(parseAuthMethod)
278
+ });
277
279
  }
278
280
  async setPin(pin, proof) {
279
281
  const signedProof = await signAuthUpdateProof(proof);
@@ -20,7 +20,10 @@ export declare class GuardSigner implements signers.SapientSigner {
20
20
  onStatus: (situation: string) => void;
21
21
  }): Promise<boolean>;
22
22
  notifyStatusChange(_id: string, _status: Status, _metadata: object): void;
23
- getAuthMethods(proof: OwnershipProof): Promise<AuthMethod[]>;
23
+ getAuthMethods(proof: OwnershipProof): Promise<{
24
+ methods: AuthMethod[];
25
+ active: boolean;
26
+ }>;
24
27
  setPin(pin: string | undefined, proof: AuthUpdateProof): Promise<void>;
25
28
  resetPin(proof: AuthUpdateProof): Promise<void>;
26
29
  createTotp(proof: AuthUpdateProof): Promise<URL>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/guard",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
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.4.2",
14
- "@0xsequence/core": "1.4.2",
15
- "@0xsequence/signhub": "1.4.2",
16
- "@0xsequence/utils": "1.4.2"
13
+ "@0xsequence/account": "1.4.3",
14
+ "@0xsequence/core": "1.4.3",
15
+ "@0xsequence/signhub": "1.4.3",
16
+ "@0xsequence/utils": "1.4.3"
17
17
  },
18
18
  "files": [
19
19
  "src",
package/src/signer.ts CHANGED
@@ -86,7 +86,7 @@ export class GuardSigner implements signers.SapientSigner {
86
86
 
87
87
  notifyStatusChange(_id: string, _status: Status, _metadata: object): void {}
88
88
 
89
- async getAuthMethods(proof: OwnershipProof): Promise<AuthMethod[]> {
89
+ async getAuthMethods(proof: OwnershipProof): Promise<{ methods: AuthMethod[]; active: boolean }> {
90
90
  let response: AuthMethodsReturn
91
91
 
92
92
  if ('jwt' in proof) {
@@ -104,7 +104,7 @@ export class GuardSigner implements signers.SapientSigner {
104
104
  })
105
105
  }
106
106
 
107
- return response.methods.map(parseAuthMethod)
107
+ return { ...response, methods: response.methods.map(parseAuthMethod) }
108
108
  }
109
109
 
110
110
  async setPin(pin: string | undefined, proof: AuthUpdateProof): Promise<void> {