@dxos/keys
Advanced tools
Comparing version 0.1.48 to 0.1.49-next.55d8a92
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25144,"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":12160},"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":6296},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6472}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25104,"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":12147},"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":6247},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6423}}} |
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25144,"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":12312},"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":6484}},"bytes":8356}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25104,"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":12303},"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":6435}},"bytes":8307}}} |
@@ -52,3 +52,3 @@ /// <reference types="node" /> | ||
/** | ||
* @param Hex string representation of key. | ||
* @param str string representation of key. | ||
* @return Key buffer. | ||
@@ -59,3 +59,3 @@ * @deprecated All keys should be represented as instances of PublicKey. | ||
/** | ||
* @param Public key like data structure (but not PublicKey which should use toString). | ||
* @param key key like data structure (but not PublicKey which should use toString). | ||
* @return Hex string representation of key. | ||
@@ -71,6 +71,6 @@ * @deprecated All keys should be represented as instances of PublicKey. | ||
constructor(_value: Uint8Array); | ||
truncate(length?: number): string; | ||
toString(): string; | ||
toJSON(): string; | ||
toHex(): string; | ||
truncate(length?: undefined): string; | ||
asBuffer(): Buffer; | ||
@@ -77,0 +77,0 @@ asUint8Array(): Uint8Array; |
{ | ||
"name": "@dxos/keys", | ||
"version": "0.1.48", | ||
"version": "0.1.49-next.55d8a92", | ||
"description": "Key utils and definitions.", | ||
@@ -20,4 +20,4 @@ "homepage": "https://dxos.org", | ||
"randombytes": "^2.1.0", | ||
"@dxos/debug": "0.1.48", | ||
"@dxos/node-std": "0.1.48" | ||
"@dxos/debug": "0.1.49-next.55d8a92", | ||
"@dxos/node-std": "0.1.49-next.55d8a92" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
@@ -74,2 +74,3 @@ // | ||
// TODO(burdon): Test if key. | ||
return new PublicKey(new Uint8Array(Buffer.from(hex, 'hex'))); | ||
@@ -118,3 +119,3 @@ } | ||
/** | ||
* @param Hex string representation of key. | ||
* @param str string representation of key. | ||
* @return Key buffer. | ||
@@ -132,3 +133,3 @@ * @deprecated All keys should be represented as instances of PublicKey. | ||
/** | ||
* @param Public key like data structure (but not PublicKey which should use toString). | ||
* @param key key like data structure (but not PublicKey which should use toString). | ||
* @return Hex string representation of key. | ||
@@ -162,6 +163,2 @@ * @deprecated All keys should be represented as instances of PublicKey. | ||
truncate(length = 8) { | ||
return truncateKey(this, { length }); | ||
} | ||
toString(): string { | ||
@@ -171,3 +168,2 @@ return this.toHex(); | ||
// TODO(burdon): How is this used? | ||
toJSON() { | ||
@@ -181,2 +177,6 @@ return this.toHex(); | ||
truncate(length = undefined) { | ||
return truncateKey(this, length); | ||
} | ||
asBuffer(): Buffer { | ||
@@ -183,0 +183,0 @@ return Buffer.from(this._value); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59195
920
+ Added@dxos/debug@0.1.49-next.55d8a92(transitive)
+ Added@dxos/node-std@0.1.49-next.55d8a92(transitive)
- Removed@dxos/debug@0.1.48(transitive)
- Removed@dxos/node-std@0.1.48(transitive)