@0xsequence/wallet-wdk 3.0.0-beta.9 → 3.0.0

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.
Files changed (113) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/.turbo/turbo-lint.log +4 -0
  3. package/.turbo/turbo-typecheck.log +4 -0
  4. package/CHANGELOG.md +170 -0
  5. package/dist/dbs/auth-commitments.d.ts.map +1 -1
  6. package/dist/dbs/auth-keys.d.ts +3 -1
  7. package/dist/dbs/auth-keys.d.ts.map +1 -1
  8. package/dist/dbs/auth-keys.js +16 -4
  9. package/dist/dbs/messages.d.ts.map +1 -1
  10. package/dist/dbs/passkey-credentials.d.ts.map +1 -1
  11. package/dist/dbs/recovery.d.ts.map +1 -1
  12. package/dist/dbs/signatures.d.ts.map +1 -1
  13. package/dist/dbs/transactions.d.ts.map +1 -1
  14. package/dist/dbs/wallets.d.ts.map +1 -1
  15. package/dist/env.d.ts +22 -0
  16. package/dist/env.d.ts.map +1 -0
  17. package/dist/env.js +30 -0
  18. package/dist/identity/signer.d.ts +5 -4
  19. package/dist/identity/signer.d.ts.map +1 -1
  20. package/dist/identity/signer.js +11 -4
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1 -0
  24. package/dist/sequence/cron.d.ts +3 -0
  25. package/dist/sequence/cron.d.ts.map +1 -1
  26. package/dist/sequence/cron.js +72 -39
  27. package/dist/sequence/handlers/authcode-pkce.d.ts +2 -1
  28. package/dist/sequence/handlers/authcode-pkce.d.ts.map +1 -1
  29. package/dist/sequence/handlers/authcode-pkce.js +4 -4
  30. package/dist/sequence/handlers/authcode.d.ts +4 -1
  31. package/dist/sequence/handlers/authcode.d.ts.map +1 -1
  32. package/dist/sequence/handlers/authcode.js +23 -6
  33. package/dist/sequence/handlers/devices.d.ts +1 -1
  34. package/dist/sequence/handlers/devices.d.ts.map +1 -1
  35. package/dist/sequence/handlers/devices.js +1 -1
  36. package/dist/sequence/handlers/guard.d.ts +1 -1
  37. package/dist/sequence/handlers/guard.d.ts.map +1 -1
  38. package/dist/sequence/handlers/guard.js +22 -19
  39. package/dist/sequence/handlers/identity.d.ts +3 -1
  40. package/dist/sequence/handlers/identity.d.ts.map +1 -1
  41. package/dist/sequence/handlers/identity.js +14 -7
  42. package/dist/sequence/handlers/mnemonic.d.ts.map +1 -1
  43. package/dist/sequence/handlers/mnemonic.js +21 -18
  44. package/dist/sequence/handlers/otp.d.ts +2 -1
  45. package/dist/sequence/handlers/otp.d.ts.map +1 -1
  46. package/dist/sequence/handlers/otp.js +4 -3
  47. package/dist/sequence/handlers/passkeys.d.ts +6 -4
  48. package/dist/sequence/handlers/passkeys.d.ts.map +1 -1
  49. package/dist/sequence/handlers/passkeys.js +8 -5
  50. package/dist/sequence/handlers/recovery.js +1 -1
  51. package/dist/sequence/index.d.ts +2 -0
  52. package/dist/sequence/index.d.ts.map +1 -1
  53. package/dist/sequence/index.js +1 -0
  54. package/dist/sequence/manager.d.ts +67 -55
  55. package/dist/sequence/manager.d.ts.map +1 -1
  56. package/dist/sequence/manager.js +77 -17
  57. package/dist/sequence/messages.js +1 -1
  58. package/dist/sequence/passkeys-provider.d.ts +24 -0
  59. package/dist/sequence/passkeys-provider.d.ts.map +1 -0
  60. package/dist/sequence/passkeys-provider.js +15 -0
  61. package/dist/sequence/recovery.d.ts +2 -0
  62. package/dist/sequence/recovery.d.ts.map +1 -1
  63. package/dist/sequence/recovery.js +100 -34
  64. package/dist/sequence/signers.d.ts.map +1 -1
  65. package/dist/sequence/signers.js +3 -1
  66. package/dist/sequence/transactions.d.ts.map +1 -1
  67. package/dist/sequence/transactions.js +5 -2
  68. package/dist/sequence/wallets.d.ts +2 -1
  69. package/dist/sequence/wallets.d.ts.map +1 -1
  70. package/dist/sequence/wallets.js +32 -22
  71. package/eslint.config.js +12 -0
  72. package/package.json +16 -14
  73. package/src/dbs/auth-commitments.ts +1 -1
  74. package/src/dbs/auth-keys.ts +20 -6
  75. package/src/dbs/messages.ts +1 -1
  76. package/src/dbs/passkey-credentials.ts +1 -1
  77. package/src/dbs/recovery.ts +1 -1
  78. package/src/dbs/signatures.ts +1 -1
  79. package/src/dbs/transactions.ts +1 -1
  80. package/src/dbs/wallets.ts +1 -1
  81. package/src/env.ts +58 -0
  82. package/src/identity/signer.ts +13 -7
  83. package/src/index.ts +1 -0
  84. package/src/sequence/cron.ts +75 -42
  85. package/src/sequence/handlers/authcode-pkce.ts +6 -4
  86. package/src/sequence/handlers/authcode.ts +26 -5
  87. package/src/sequence/handlers/devices.ts +1 -1
  88. package/src/sequence/handlers/guard.ts +6 -4
  89. package/src/sequence/handlers/identity.ts +18 -8
  90. package/src/sequence/handlers/mnemonic.ts +5 -3
  91. package/src/sequence/handlers/otp.ts +5 -3
  92. package/src/sequence/handlers/passkeys.ts +13 -13
  93. package/src/sequence/handlers/recovery.ts +1 -1
  94. package/src/sequence/index.ts +2 -0
  95. package/src/sequence/manager.ts +168 -14
  96. package/src/sequence/messages.ts +1 -1
  97. package/src/sequence/passkeys-provider.ts +55 -0
  98. package/src/sequence/recovery.ts +165 -56
  99. package/src/sequence/signers.ts +3 -1
  100. package/src/sequence/transactions.ts +6 -2
  101. package/src/sequence/wallets.ts +39 -25
  102. package/test/authcode-pkce.test.ts +2 -3
  103. package/test/authcode.test.ts +6 -8
  104. package/test/constants.ts +4 -2
  105. package/test/guard.test.ts +5 -5
  106. package/test/identity-signer.test.ts +1 -1
  107. package/test/otp.test.ts +1 -1
  108. package/test/passkeys.test.ts +1 -1
  109. package/test/recovery.test.ts +3 -3
  110. package/test/sessions.test.ts +1 -1
  111. package/test/{test-ssr-safety.mjs → test-ssr-safety.js} +143 -137
  112. package/test/transactions.test.ts +3 -3
  113. package/test/wallets.test.ts +5 -5
@@ -1,17 +1,17 @@
1
1
  import { Wallet as CoreWallet, Envelope, Signers, State } from '@0xsequence/wallet-core'
2
- import { Config, Constants, GenericTree, Payload, SessionConfig } from '@0xsequence/wallet-primitives'
2
+ import { Config, Constants, Payload } from '@0xsequence/wallet-primitives'
3
3
  import { Address, Hex, Provider, RpcTransport } from 'ox'
4
4
  import { AuthCommitment } from '../dbs/auth-commitments.js'
5
5
  import { AuthCodeHandler } from './handlers/authcode.js'
6
6
  import { MnemonicHandler } from './handlers/mnemonic.js'
7
7
  import { OtpHandler } from './handlers/otp.js'
8
- import { ManagerOptionsDefaults, Shared } from './manager.js'
8
+ import { Shared } from './manager.js'
9
9
  import { Device } from './types/device.js'
10
10
  import { Action, Module } from './types/index.js'
11
11
  import { Kinds, SignerWithKind, WitnessExtraSignerKind } from './types/signer.js'
12
12
  import { Wallet, WalletSelectionUiHandler } from './types/wallet.js'
13
13
  import { PasskeysHandler } from './handlers/passkeys.js'
14
- import { GuardRole } from './guards.js'
14
+ import type { PasskeySigner } from './passkeys-provider.js'
15
15
 
16
16
  export type StartSignUpWithRedirectArgs = {
17
17
  kind: 'google-pkce' | 'apple' | `custom-${string}`
@@ -417,17 +417,17 @@ function buildCappedTree(members: { address: Address.Address; imageHash?: Hex.He
417
417
  } as Config.NestedLeaf
418
418
  }
419
419
 
420
- function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): Config.Topology {
421
- // We may optimize this for some topology types
422
- // but it is not worth it, because the topology
423
- // that we will use for prod won't be optimizable
424
- return {
425
- type: 'nested',
426
- weight: weight,
427
- threshold: weight,
428
- tree: topology,
429
- }
430
- }
420
+ // function buildCappedTreeFromTopology(weight: bigint, topology: Config.Topology): Config.Topology {
421
+ // // We may optimize this for some topology types
422
+ // // but it is not worth it, because the topology
423
+ // // that we will use for prod won't be optimizable
424
+ // return {
425
+ // type: 'nested',
426
+ // weight: weight,
427
+ // threshold: weight,
428
+ // tree: topology,
429
+ // }
430
+ // }
431
431
 
432
432
  function toConfig(
433
433
  checkpoint: bigint,
@@ -625,8 +625,8 @@ export class Wallets implements WalletsInterface {
625
625
  loginEmail?: string
626
626
  }> {
627
627
  switch (args.kind) {
628
- case 'passkey':
629
- const passkeySigner = await Signers.Passkey.Passkey.create(this.shared.sequence.extensions, {
628
+ case 'passkey': {
629
+ const passkeySigner = await this.shared.passkeyProvider.create(this.shared.sequence.extensions, {
630
630
  stateProvider: this.shared.sequence.stateProvider,
631
631
  credentialName: args.name,
632
632
  })
@@ -638,8 +638,9 @@ export class Wallets implements WalletsInterface {
638
638
  signerKind: Kinds.LoginPasskey,
639
639
  },
640
640
  }
641
+ }
641
642
 
642
- case 'mnemonic':
643
+ case 'mnemonic': {
643
644
  const mnemonicSigner = MnemonicHandler.toSigner(args.mnemonic)
644
645
  if (!mnemonicSigner) {
645
646
  throw new Error('invalid-mnemonic')
@@ -653,6 +654,7 @@ export class Wallets implements WalletsInterface {
653
654
  signerKind: Kinds.LoginMnemonic,
654
655
  },
655
656
  }
657
+ }
656
658
 
657
659
  case 'email-otp': {
658
660
  const handler = this.shared.handlers.get(Kinds.LoginEmailOtp) as OtpHandler
@@ -834,7 +836,7 @@ export class Wallets implements WalletsInterface {
834
836
  const sessionsGuardTopology = args.noGuard ? undefined : this.shared.modules.guards.topology('sessions')
835
837
 
836
838
  // Add modules
837
- let modules: Module[] = []
839
+ const modules: Module[] = []
838
840
 
839
841
  if (!args.noSessionManager) {
840
842
  const identitySigners = [device.address]
@@ -891,7 +893,7 @@ export class Wallets implements WalletsInterface {
891
893
  }
892
894
 
893
895
  // Store passkey credential ID mapping if this is a passkey signup
894
- if (args.kind === 'passkey' && loginSigner.signer instanceof Signers.Passkey.Passkey) {
896
+ if (args.kind === 'passkey' && this.isPasskeySigner(loginSigner.signer)) {
895
897
  try {
896
898
  await this.shared.databases.passkeyCredentials.saveCredential(
897
899
  loginSigner.signer.credentialId,
@@ -1043,8 +1045,6 @@ export class Wallets implements WalletsInterface {
1043
1045
  })
1044
1046
 
1045
1047
  return requestId
1046
- } catch (error) {
1047
- throw error
1048
1048
  } finally {
1049
1049
  this.pendingMnemonicOrPasskeyLogin = undefined
1050
1050
  }
@@ -1075,7 +1075,7 @@ export class Wallets implements WalletsInterface {
1075
1075
  }
1076
1076
 
1077
1077
  if (isLoginToPasskeyArgs(args)) {
1078
- let passkeySigner: Signers.Passkey.Passkey
1078
+ let passkeySigner: PasskeySigner
1079
1079
 
1080
1080
  if (args.credentialId) {
1081
1081
  // Application-controlled login: use the provided credentialId
@@ -1087,7 +1087,7 @@ export class Wallets implements WalletsInterface {
1087
1087
  }
1088
1088
 
1089
1089
  // Create passkey signer from stored credential
1090
- passkeySigner = new Signers.Passkey.Passkey({
1090
+ passkeySigner = this.shared.passkeyProvider.fromCredential({
1091
1091
  credentialId: credential.credentialId,
1092
1092
  publicKey: credential.publicKey,
1093
1093
  extensions: this.shared.sequence.extensions,
@@ -1098,7 +1098,7 @@ export class Wallets implements WalletsInterface {
1098
1098
  // Default discovery behavior: use WebAuthn discovery
1099
1099
  this.shared.modules.logger.log('No credentialId provided, using discovery method')
1100
1100
 
1101
- const foundPasskeySigner = await Signers.Passkey.Passkey.find(
1101
+ const foundPasskeySigner = await this.shared.passkeyProvider.find(
1102
1102
  this.shared.sequence.stateProvider,
1103
1103
  this.shared.sequence.extensions,
1104
1104
  )
@@ -1153,6 +1153,20 @@ export class Wallets implements WalletsInterface {
1153
1153
  throw new Error('invalid-login-args')
1154
1154
  }
1155
1155
 
1156
+ private isPasskeySigner(signer: unknown): signer is PasskeySigner {
1157
+ const guard = this.shared.passkeyProvider.isSigner
1158
+ if (guard) {
1159
+ return guard(signer)
1160
+ }
1161
+ return (
1162
+ typeof signer === 'object' &&
1163
+ signer !== null &&
1164
+ 'credentialId' in signer &&
1165
+ 'publicKey' in signer &&
1166
+ 'imageHash' in signer
1167
+ )
1168
+ }
1169
+
1156
1170
  async completeLogin(requestId: string) {
1157
1171
  const request = await this.shared.modules.signatures.get(requestId)
1158
1172
 
@@ -1220,7 +1234,7 @@ export class Wallets implements WalletsInterface {
1220
1234
  return requestId
1221
1235
  }
1222
1236
 
1223
- async completeLogout(requestId: string, options?: { skipValidateSave?: boolean }) {
1237
+ async completeLogout(requestId: string, _options?: { skipValidateSave?: boolean }) {
1224
1238
  const request = await this.shared.modules.signatures.get(requestId)
1225
1239
  const walletEntry = await this.shared.databases.manager.get(request.wallet)
1226
1240
  if (!walletEntry) {
@@ -1,5 +1,4 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
2
- import { Address, Hex, Bytes } from 'ox'
3
2
  import * as Identity from '@0xsequence/identity-instrument'
4
3
  import { AuthCodePkceHandler } from '../src/sequence/handlers/authcode-pkce.js'
5
4
  import { Signatures } from '../src/sequence/signatures.js'
@@ -68,7 +67,7 @@ describe('AuthCodePkceHandler', () => {
68
67
  handler.setRedirectUri('https://example.com/auth/callback')
69
68
 
70
69
  // Mock inherited methods
71
- vi.spyOn(handler as any, 'nitroCommitVerifier').mockImplementation(async (challenge) => {
70
+ vi.spyOn(handler as any, 'nitroCommitVerifier').mockImplementation(async () => {
72
71
  return {
73
72
  verifier: 'mock-verifier-code',
74
73
  loginHint: 'user@example.com',
@@ -76,7 +75,7 @@ describe('AuthCodePkceHandler', () => {
76
75
  }
77
76
  })
78
77
 
79
- vi.spyOn(handler as any, 'nitroCompleteAuth').mockImplementation(async (challenge) => {
78
+ vi.spyOn(handler as any, 'nitroCompleteAuth').mockImplementation(async () => {
80
79
  return {
81
80
  signer: mockIdentitySigner,
82
81
  email: 'user@example.com',
@@ -1,5 +1,5 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
2
- import { Address, Hex, Bytes } from 'ox'
2
+ import { Address, Hex } from 'ox'
3
3
  import { Network, Payload } from '@0xsequence/wallet-primitives'
4
4
  import { IdentityInstrument, IdentityType, KeyType, AuthCodeChallenge } from '@0xsequence/identity-instrument'
5
5
  import { AuthCodeHandler } from '../src/sequence/handlers/authcode.js'
@@ -45,8 +45,8 @@ class MockURLSearchParams {
45
45
  }
46
46
  }
47
47
 
48
- // @ts-ignore - Override global URLSearchParams for testing
49
- global.URLSearchParams = MockURLSearchParams as any
48
+ // Override global URLSearchParams for testing
49
+ globalThis.URLSearchParams = MockURLSearchParams as any
50
50
 
51
51
  // Mock dependencies with proper vi.fn() types
52
52
  const mockCommitVerifier = vi.fn()
@@ -285,8 +285,7 @@ describe('AuthCodeHandler', () => {
285
285
  })
286
286
 
287
287
  it('Should generate random state when not provided', async () => {
288
- const result = await authCodeHandler.commitAuth('/target', false)
289
-
288
+ await authCodeHandler.commitAuth('/target', false)
290
289
  const commitmentCall = mockAuthCommitmentsSet.mock.calls[0]![0]!
291
290
  expect(commitmentCall.id).toBeDefined()
292
291
  expect(typeof commitmentCall.id).toBe('string')
@@ -316,8 +315,7 @@ describe('AuthCodeHandler', () => {
316
315
  })
317
316
 
318
317
  it('Should create commitment without signer', async () => {
319
- const result = await authCodeHandler.commitAuth('/target', true)
320
-
318
+ await authCodeHandler.commitAuth('/target', true)
321
319
  const commitmentCall = mockAuthCommitmentsSet.mock.calls[0]![0]!
322
320
  expect(commitmentCall.signer).toBeUndefined()
323
321
  expect(commitmentCall.isSignUp).toBe(true)
@@ -329,7 +327,7 @@ describe('AuthCodeHandler', () => {
329
327
  describe('completeAuth()', () => {
330
328
  it('Should complete auth flow with code and return signer', async () => {
331
329
  const authCode = 'test-auth-code-123'
332
- const mockSigner = {} as IdentitySigner
330
+ // const mockSigner = {} as IdentitySigner
333
331
  const mockEmail = 'test@example.com'
334
332
 
335
333
  mockCommitVerifier.mockResolvedValueOnce(undefined)
package/test/constants.ts CHANGED
@@ -7,6 +7,7 @@ import { Relayer } from '@0xsequence/relayer'
7
7
  import * as Db from '../src/dbs/index.js'
8
8
  import { Network } from '@0xsequence/wallet-primitives'
9
9
 
10
+ // eslint-disable-next-line turbo/no-undeclared-env-vars
10
11
  const envFile = process.env.CI ? '.env.test' : '.env.test.local'
11
12
  dotenvConfig({ path: envFile })
12
13
 
@@ -14,6 +15,7 @@ export const EMITTER_ADDRESS: Address.Address = '0xb7bE532959236170064cf099e1a33
14
15
  export const EMITTER_ABI = Abi.from(['function explicitEmit()', 'function implicitEmit()'])
15
16
 
16
17
  // Environment variables
18
+ // eslint-disable-next-line turbo/no-undeclared-env-vars
17
19
  export const LOCAL_RPC_URL = process.env.LOCAL_RPC_URL || 'http://localhost:8545'
18
20
 
19
21
  let testIdCounter = 0
@@ -81,8 +83,8 @@ export function newRemoteManager(
81
83
  ? `_${remoteManagerOptions.tag}_testrun_${testIdCounter}`
82
84
  : `_testrun_${testIdCounter}`
83
85
 
84
- let relayers: Relayer.Relayer[] = []
85
- let bundlers: Bundler.Bundler[] = []
86
+ const relayers: Relayer.Relayer[] = []
87
+ const bundlers: Bundler.Bundler[] = []
86
88
 
87
89
  if (remoteManagerOptions.network.relayerPk) {
88
90
  const provider = Provider.from(RpcTransport.fromHttp(remoteManagerOptions.network.rpcUrl))
@@ -5,7 +5,7 @@ import { Address, Bytes, Hex, TypedData } from 'ox'
5
5
  import { Config, Constants, Network, Payload } from '@0xsequence/wallet-primitives'
6
6
  import { Kinds } from '../src/sequence/types/signer.js'
7
7
  import { newManager } from './constants.js'
8
- import { GuardRole, Guards } from '../src/sequence/guards.js'
8
+ import { Guards } from '../src/sequence/guards.js'
9
9
 
10
10
  // Mock fetch globally for guard API calls
11
11
  const mockFetch = vi.fn()
@@ -16,8 +16,8 @@ describe('GuardHandler', () => {
16
16
  let guards: Guards
17
17
  let testWallet: Address.Address
18
18
  let testPayload: Payload.Payload
19
- let testMessageDigest: Bytes.Bytes
20
- let testMessage: Hex.Hex
19
+ let _testMessageDigest: Bytes.Bytes
20
+ let _testMessage: Hex.Hex
21
21
 
22
22
  beforeEach(async () => {
23
23
  vi.clearAllMocks()
@@ -28,8 +28,8 @@ describe('GuardHandler', () => {
28
28
 
29
29
  testWallet = '0x1234567890123456789012345678901234567890' as Address.Address
30
30
  testPayload = Payload.fromMessage(Hex.fromString('Test message'))
31
- testMessage = TypedData.encode(Payload.toTyped(testWallet, Network.ChainId.ARBITRUM, testPayload))
32
- testMessageDigest = Payload.hash(testWallet, Network.ChainId.ARBITRUM, testPayload)
31
+ _testMessage = TypedData.encode(Payload.toTyped(testWallet, Network.ChainId.ARBITRUM, testPayload))
32
+ _testMessageDigest = Payload.hash(testWallet, Network.ChainId.ARBITRUM, testPayload)
33
33
  })
34
34
 
35
35
  afterEach(async () => {
@@ -1,5 +1,5 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, Mock, vi } from 'vitest'
2
- import { Address, Bytes, Hex } from 'ox'
2
+ import { Address, Hex } from 'ox'
3
3
  import { Network, Payload } from '@0xsequence/wallet-primitives'
4
4
  import { IdentityInstrument, KeyType } from '@0xsequence/identity-instrument'
5
5
  import { State } from '@0xsequence/wallet-core'
package/test/otp.test.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, Mock, vi } from 'vitest'
2
2
  import { Address, Hex } from 'ox'
3
3
  import { Network, Payload } from '@0xsequence/wallet-primitives'
4
- import { IdentityInstrument, IdentityType, KeyType, OtpChallenge } from '@0xsequence/identity-instrument'
4
+ import { IdentityInstrument, IdentityType, KeyType } from '@0xsequence/identity-instrument'
5
5
  import { OtpHandler, PromptOtpHandler } from '../src/sequence/handlers/otp.js'
6
6
  import { Signatures } from '../src/sequence/signatures.js'
7
7
  import * as Db from '../src/dbs/index.js'
@@ -1,7 +1,7 @@
1
1
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
2
2
  import { Address, Hex } from 'ox'
3
3
  import { Network, Payload } from '@0xsequence/wallet-primitives'
4
- import { Signers, State } from '@0xsequence/wallet-core'
4
+ import { State } from '@0xsequence/wallet-core'
5
5
  import { Extensions } from '@0xsequence/wallet-primitives'
6
6
  import { PasskeysHandler } from '../src/sequence/handlers/passkeys.js'
7
7
  import { Signatures } from '../src/sequence/signatures.js'
@@ -174,7 +174,7 @@ describe('Recovery', () => {
174
174
  const recoverySigner = request4.signers.find((s) => s.handler?.kind === 'recovery-extension')
175
175
  expect(recoverySigner).toBeDefined()
176
176
  expect(recoverySigner!.status).toBe('ready')
177
- 1
177
+
178
178
  // Handle the recovery signer
179
179
  const result4 = await (recoverySigner as SignerReady).handle()
180
180
  expect(result4).toBeDefined()
@@ -303,9 +303,9 @@ describe('Recovery', () => {
303
303
  })
304
304
 
305
305
  // Set up mnemonic handler and sign the payload
306
- let handledMnemonic2 = 0
306
+ let _handledMnemonic2 = 0
307
307
  const unregisterHandler = manager.registerMnemonicUI(async (respond) => {
308
- handledMnemonic2++
308
+ _handledMnemonic2++
309
309
  await respond(mnemonic2)
310
310
  })
311
311
 
@@ -358,7 +358,7 @@ for (const extension of ALL_EXTENSIONS) {
358
358
  throw new Error('Failed to create pk store')
359
359
  }
360
360
  // Create the initial permissions
361
- let explicitSession: ExplicitSession = {
361
+ const explicitSession: ExplicitSession = {
362
362
  type: 'explicit',
363
363
  sessionAddress: e.address,
364
364
  chainId,