@dxos/keys
Advanced tools
Comparing version 0.1.23 to 0.1.24-next.6b1f434
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":24051,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":553,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":463,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11571},"packages/common/keys/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["PUBLIC_KEY_LENGTH","PublicKey","SECRET_KEY_LENGTH"],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/public-key.ts":{"bytesInOutput":6051},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6227}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":24437,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":553,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":463,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11787},"packages/common/keys/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["PUBLIC_KEY_LENGTH","PublicKey","SECRET_KEY_LENGTH"],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/public-key.ts":{"bytesInOutput":6151},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6327}}} |
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":24051,"imports":[{"path":"node:assert","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":553,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":463,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11729},"packages/common/keys/dist/lib/node/index.cjs":{"imports":[{"path":"node:assert","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"randombytes","kind":"require-call","external":true},{"path":"@dxos/debug","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/index.ts":{"bytesInOutput":215},"packages/common/keys/src/public-key.ts":{"bytesInOutput":6240}},"bytes":8112}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":24437,"imports":[{"path":"node:assert","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":553,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":463,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11948},"packages/common/keys/dist/lib/node/index.cjs":{"imports":[{"path":"node:assert","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"randombytes","kind":"require-call","external":true},{"path":"@dxos/debug","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/index.ts":{"bytesInOutput":215},"packages/common/keys/src/public-key.ts":{"bytesInOutput":6340}},"bytes":8212}}} |
@@ -10,3 +10,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare type PublicKeyLike = PublicKey | Buffer | Uint8Array | string; | ||
export declare type PublicKeyLike = PublicKey | Buffer | Uint8Array | ArrayBuffer | string; | ||
/** | ||
@@ -63,3 +63,3 @@ * The purpose of this class is to assure consistent use of keys throughout the project. | ||
*/ | ||
static stringify(key: Buffer | Uint8Array): string; | ||
static stringify(key: Buffer | Uint8Array | ArrayBuffer): string; | ||
/** | ||
@@ -66,0 +66,0 @@ * To be used with ComplexMap and ComplexSet. |
{ | ||
"name": "@dxos/keys", | ||
"version": "0.1.23", | ||
"version": "0.1.24-next.6b1f434", | ||
"description": "Key utils and definitions.", | ||
@@ -20,4 +20,4 @@ "homepage": "https://dxos.org", | ||
"randombytes": "^2.1.0", | ||
"@dxos/debug": "0.1.23", | ||
"@dxos/node-std": "0.1.23" | ||
"@dxos/debug": "0.1.24-next.6b1f434", | ||
"@dxos/node-std": "0.1.24-next.6b1f434" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
@@ -17,3 +17,3 @@ // | ||
*/ | ||
export type PublicKeyLike = PublicKey | Buffer | Uint8Array | string; | ||
export type PublicKeyLike = PublicKey | Buffer | Uint8Array | ArrayBuffer | string; | ||
@@ -39,2 +39,4 @@ /** | ||
return new PublicKey(source); | ||
} else if (source instanceof ArrayBuffer) { | ||
return new PublicKey(new Uint8Array(source)); | ||
} else if (typeof source === 'string') { | ||
@@ -133,3 +135,3 @@ return PublicKey.fromHex(source); | ||
*/ | ||
static stringify(key: Buffer | Uint8Array): string { | ||
static stringify(key: Buffer | Uint8Array | ArrayBuffer): string { | ||
if (key instanceof PublicKey) { | ||
@@ -136,0 +138,0 @@ key = key.asBuffer(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
57945
906
+ Added@dxos/debug@0.1.24-next.6b1f434(transitive)
+ Added@dxos/node-std@0.1.24-next.6b1f434(transitive)
- Removed@dxos/debug@0.1.23(transitive)
- Removed@dxos/node-std@0.1.23(transitive)