accounts 0.17.2 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # accounts
2
2
 
3
+ ## 0.17.3
4
+
5
+ ### Patch Changes
6
+
7
+ - d9183cc: Updated Tempo Wallet CLI device-code defaults to use `/api/auth/device`.
8
+
3
9
  ## 0.17.2
4
10
 
5
11
  ### Patch Changes
@@ -7,7 +7,7 @@ import { cli } from './adapter.js';
7
7
  export declare function create(options: create.Options): create.ReturnType;
8
8
  export declare namespace create {
9
9
  type Options = Omit<CoreProvider.create.Options & cli.Options, 'adapter' | 'authorizeAccessKey' | 'host'> & {
10
- /** Base URL of the wallet's device-code endpoints. @default "https://wallet.tempo.xyz/auth/device" */
10
+ /** Base URL of the wallet's device-code endpoints. @default "https://wallet.tempo.xyz/api/auth/device" */
11
11
  host?: string | undefined;
12
12
  };
13
13
  type ReturnType = CoreProvider.create.ReturnType;
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../src/cli/Provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAGlC;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAgCjE;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,KAAY,OAAO,GAAG,IAAI,CACxB,YAAY,CAAC,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EACzC,SAAS,GAAG,oBAAoB,GAAG,MAAM,CAC1C,GAAG;QACF,sGAAsG;QACtG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC1B,CAAA;IACD,KAAY,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,UAAU,CAAA;CACxD"}
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../src/cli/Provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAGlC;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAgCjE;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,KAAY,OAAO,GAAG,IAAI,CACxB,YAAY,CAAC,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EACzC,SAAS,GAAG,oBAAoB,GAAG,MAAM,CAC1C,GAAG;QACF,0GAA0G;QAC1G,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC1B,CAAA;IACD,KAAY,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,UAAU,CAAA;CACxD"}
@@ -6,7 +6,7 @@ import * as Storage from './storage.js';
6
6
  * device-code flow.
7
7
  */
8
8
  export function create(options) {
9
- const { host = 'https://wallet.tempo.xyz/auth/device', name, open, pollingInterval, rdns, storage = Storage.filesystem(), timeout, ...rest } = options;
9
+ const { host = 'https://wallet.tempo.xyz/api/auth/device', name, open, pollingInterval, rdns, storage = Storage.filesystem(), timeout, ...rest } = options;
10
10
  // CLI defaults `mode` to `'pull'` (local account friendly path).
11
11
  const mpp = (() => {
12
12
  if (!options.mpp)
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../src/cli/Provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAuB;IAC5C,MAAM,EACJ,IAAI,GAA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C,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9C,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvB,OAAO;KACR,CAAC,CAAA;AACJ,CAAC"}
@@ -5,7 +5,7 @@ export function tempoWallet(options) {
5
5
  ...options,
6
6
  name: 'Tempo Wallet',
7
7
  rdns: 'xyz.tempo',
8
- url: 'https://wallet.tempo.xyz/auth/device',
8
+ url: 'https://wallet.tempo.xyz/api/auth/device',
9
9
  });
10
10
  }
11
11
  //# sourceMappingURL=tempoWallet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tempoWallet.js","sourceRoot":"","sources":["../../../../src/core/adapters/deviceCode/tempoWallet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,6EAA6E;AAC7E,MAAM,UAAU,WAAW,CAAC,OAA4B;IACtD,OAAO,UAAU,CAAC;QAChB,GAAG,OAAO;QACV,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,sCAAsC;KAC5C,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"tempoWallet.js","sourceRoot":"","sources":["../../../../src/core/adapters/deviceCode/tempoWallet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,6EAA6E;AAC7E,MAAM,UAAU,WAAW,CAAC,OAA4B;IACtD,OAAO,UAAU,CAAC;QAChB,GAAG,OAAO;QACV,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,0CAA0C;KAChD,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "accounts",
3
3
  "description": "Tempo Accounts SDK",
4
4
  "type": "module",
5
- "version": "0.17.2",
5
+ "version": "0.17.3",
6
6
  "dependencies": {
7
7
  "hono": "^4.12.34",
8
8
  "idb-keyval": "^6.2.2",
@@ -0,0 +1,32 @@
1
+ import { vi } from 'vitest'
2
+ import { beforeEach, expect, test } from 'vp/test'
3
+
4
+ const mock = vi.hoisted(() => ({
5
+ cli: vi.fn(() => ({})),
6
+ create: vi.fn(() => ({})),
7
+ filesystem: vi.fn(() => ({})),
8
+ }))
9
+
10
+ vi.mock('../core/Provider.js', () => ({ create: mock.create }))
11
+ vi.mock('./adapter.js', () => ({ cli: mock.cli }))
12
+ vi.mock('./storage.js', () => ({ filesystem: mock.filesystem }))
13
+
14
+ import { create } from './Provider.js'
15
+
16
+ beforeEach(() => {
17
+ vi.clearAllMocks()
18
+ })
19
+
20
+ test('defaults to the Tempo Wallet device-code endpoint', () => {
21
+ create({})
22
+
23
+ expect(mock.cli.mock.calls).toMatchInlineSnapshot(`
24
+ [
25
+ [
26
+ {
27
+ "host": "https://wallet.tempo.xyz/api/auth/device",
28
+ },
29
+ ],
30
+ ]
31
+ `)
32
+ })
@@ -8,7 +8,7 @@ import * as Storage from './storage.js'
8
8
  */
9
9
  export function create(options: create.Options): create.ReturnType {
10
10
  const {
11
- host = 'https://wallet.tempo.xyz/auth/device',
11
+ host = 'https://wallet.tempo.xyz/api/auth/device',
12
12
  name,
13
13
  open,
14
14
  pollingInterval,
@@ -45,7 +45,7 @@ export declare namespace create {
45
45
  CoreProvider.create.Options & cli.Options,
46
46
  'adapter' | 'authorizeAccessKey' | 'host'
47
47
  > & {
48
- /** Base URL of the wallet's device-code endpoints. @default "https://wallet.tempo.xyz/auth/device" */
48
+ /** Base URL of the wallet's device-code endpoints. @default "https://wallet.tempo.xyz/api/auth/device" */
49
49
  host?: string | undefined
50
50
  }
51
51
  export type ReturnType = CoreProvider.create.ReturnType
@@ -7,7 +7,7 @@ export function tempoWallet(options: tempoWallet.Options): Adapter.Adapter {
7
7
  ...options,
8
8
  name: 'Tempo Wallet',
9
9
  rdns: 'xyz.tempo',
10
- url: 'https://wallet.tempo.xyz/auth/device',
10
+ url: 'https://wallet.tempo.xyz/api/auth/device',
11
11
  })
12
12
  }
13
13