@dxos/keys
Advanced tools
Comparing version 0.1.31 to 0.1.32-next.86f5578
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":24496,"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":11817},"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":6154},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6330}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25136,"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":12155},"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}}} |
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":24496,"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":11978},"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":6343}},"bytes":8215}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25136,"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":12307},"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}}} |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { inspect, InspectOptionsStylized } from 'node:util'; | ||
import { devtoolsFormatter, DevtoolsFormatter } from '@dxos/debug'; | ||
import { devtoolsFormatter, DevtoolsFormatter, equalsSymbol, Equatable } from '@dxos/debug'; | ||
export declare const PUBLIC_KEY_LENGTH = 32; | ||
@@ -16,3 +16,3 @@ export declare const SECRET_KEY_LENGTH = 64; | ||
*/ | ||
export declare class PublicKey { | ||
export declare class PublicKey implements Equatable { | ||
private readonly _value; | ||
@@ -86,3 +86,4 @@ /** | ||
equals(other: PublicKeyLike): boolean; | ||
[equalsSymbol](other: any): boolean; | ||
} | ||
//# sourceMappingURL=public-key.d.ts.map |
{ | ||
"name": "@dxos/keys", | ||
"version": "0.1.31", | ||
"version": "0.1.32-next.86f5578", | ||
"description": "Key utils and definitions.", | ||
@@ -20,4 +20,4 @@ "homepage": "https://dxos.org", | ||
"randombytes": "^2.1.0", | ||
"@dxos/debug": "0.1.31", | ||
"@dxos/node-std": "0.1.31" | ||
"@dxos/debug": "0.1.32-next.86f5578", | ||
"@dxos/node-std": "0.1.32-next.86f5578" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
@@ -9,3 +9,3 @@ // | ||
import { truncateKey, devtoolsFormatter, DevtoolsFormatter } from '@dxos/debug'; | ||
import { truncateKey, devtoolsFormatter, DevtoolsFormatter, equalsSymbol, Equatable } from '@dxos/debug'; | ||
@@ -25,3 +25,3 @@ export const PUBLIC_KEY_LENGTH = 32; | ||
*/ | ||
export class PublicKey { | ||
export class PublicKey implements Equatable { | ||
/** | ||
@@ -273,2 +273,10 @@ * Creates new instance of PublicKey automatically determining the input format. | ||
} | ||
[equalsSymbol](other: any) { | ||
if (!PublicKey.isPublicKey(other)) { | ||
return false; | ||
} | ||
return this.equals(other); | ||
} | ||
} |
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
59309
926
+ Added@dxos/debug@0.1.32-next.86f5578(transitive)
+ Added@dxos/node-std@0.1.32-next.86f5578(transitive)
- Removed@dxos/debug@0.1.31(transitive)
- Removed@dxos/node-std@0.1.31(transitive)