@dxos/keyring 0.8.4-main.84f28bd → 0.8.4-main.ae835ea

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/keyring",
3
- "version": "0.8.4-main.84f28bd",
3
+ "version": "0.8.4-main.ae835ea",
4
4
  "description": "Halo Keyring.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,6 +10,7 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs",
15
16
  "node": "./dist/lib/node-esm/index.mjs"
@@ -24,16 +25,16 @@
24
25
  "src"
25
26
  ],
26
27
  "dependencies": {
27
- "@dxos/async": "0.8.4-main.84f28bd",
28
- "@dxos/codec-protobuf": "0.8.4-main.84f28bd",
29
- "@dxos/crypto": "0.8.4-main.84f28bd",
30
- "@dxos/debug": "0.8.4-main.84f28bd",
31
- "@dxos/invariant": "0.8.4-main.84f28bd",
32
- "@dxos/keys": "0.8.4-main.84f28bd",
33
- "@dxos/node-std": "0.8.4-main.84f28bd",
34
- "@dxos/protocols": "0.8.4-main.84f28bd",
35
- "@dxos/random-access-storage": "0.8.4-main.84f28bd",
36
- "@dxos/util": "0.8.4-main.84f28bd"
28
+ "@dxos/async": "0.8.4-main.ae835ea",
29
+ "@dxos/codec-protobuf": "0.8.4-main.ae835ea",
30
+ "@dxos/debug": "0.8.4-main.ae835ea",
31
+ "@dxos/invariant": "0.8.4-main.ae835ea",
32
+ "@dxos/node-std": "0.8.4-main.ae835ea",
33
+ "@dxos/crypto": "0.8.4-main.ae835ea",
34
+ "@dxos/keys": "0.8.4-main.ae835ea",
35
+ "@dxos/protocols": "0.8.4-main.ae835ea",
36
+ "@dxos/random-access-storage": "0.8.4-main.ae835ea",
37
+ "@dxos/util": "0.8.4-main.ae835ea"
37
38
  },
38
39
  "devDependencies": {},
39
40
  "publishConfig": {
@@ -6,7 +6,7 @@ import { describe, expect, test } from 'vitest';
6
6
 
7
7
  import { verifySignature } from '@dxos/crypto';
8
8
  import { PublicKey } from '@dxos/keys';
9
- import { createStorage, StorageType } from '@dxos/random-access-storage';
9
+ import { StorageType, createStorage } from '@dxos/random-access-storage';
10
10
 
11
11
  import { Keyring } from './keyring';
12
12
  import { generateJWKKeyPair, parseJWKKeyPair } from './testing';
package/src/keyring.ts CHANGED
@@ -4,13 +4,13 @@
4
4
 
5
5
  import { Event, synchronized } from '@dxos/async';
6
6
  import { type ProtoCodec } from '@dxos/codec-protobuf';
7
- import { subtleCrypto, type Signer } from '@dxos/crypto';
7
+ import { type Signer, subtleCrypto } from '@dxos/crypto';
8
8
  import { todo } from '@dxos/debug';
9
9
  import { invariant } from '@dxos/invariant';
10
10
  import { PublicKey } from '@dxos/keys';
11
11
  import { schema } from '@dxos/protocols/proto';
12
12
  import { type KeyRecord } from '@dxos/protocols/proto/dxos/halo/keyring';
13
- import { createStorage, type Directory, StorageType } from '@dxos/random-access-storage';
13
+ import { type Directory, StorageType, createStorage } from '@dxos/random-access-storage';
14
14
  import { ComplexMap, arrayToBuffer } from '@dxos/util';
15
15
 
16
16
  const KeyRecord: ProtoCodec<KeyRecord> = schema.getCodecForType('dxos.halo.keyring.KeyRecord');
@@ -40,7 +40,7 @@ export class Keyring implements Signer {
40
40
  hash: 'SHA-256',
41
41
  },
42
42
  keyPair.privateKey,
43
- message,
43
+ message as Uint8Array<ArrayBuffer>,
44
44
  ),
45
45
  );
46
46
  }
@@ -79,7 +79,7 @@ export class Keyring implements Signer {
79
79
  const keyPair: CryptoKeyPair = {
80
80
  publicKey: await subtleCrypto.importKey(
81
81
  'raw',
82
- record.publicKey,
82
+ record.publicKey as Uint8Array<ArrayBuffer>,
83
83
  {
84
84
  name: 'ECDSA',
85
85
  namedCurve: 'P-256',
@@ -89,7 +89,7 @@ export class Keyring implements Signer {
89
89
  ),
90
90
  privateKey: await subtleCrypto.importKey(
91
91
  'pkcs8',
92
- record.privateKey,
92
+ record.privateKey as Uint8Array<ArrayBuffer>,
93
93
  {
94
94
  name: 'ECDSA',
95
95
  namedCurve: 'P-256',