🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@dxos/keys

Package Overview
Dependencies
Maintainers
13
Versions
2384
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/keys - npm Package Compare versions

Comparing version

to
0.1.18

2

dist/lib/browser/meta.json

@@ -1,1 +0,1 @@

{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":23598,"imports":[]},"packages/common/keys/src/types.ts":{"bytes":625,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":531,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement"}]}},"outputs":{"packages/common/keys/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11615},"packages/common/keys/dist/lib/browser/index.mjs":{"imports":[],"exports":["PUBLIC_KEY_LENGTH","PublicKey","SECRET_KEY_LENGTH"],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/public-key.ts":{"bytesInOutput":4447},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":4623}}}
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25259,"imports":[]},"packages/common/keys/src/types.ts":{"bytes":625,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":531,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement"}]}},"outputs":{"packages/common/keys/dist/lib/browser/index.mjs":{"imports":[],"exports":["PUBLIC_KEY_LENGTH","PublicKey","SECRET_KEY_LENGTH"],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/public-key.ts":{"bytesInOutput":4621},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":4762}}}

@@ -1,1 +0,1 @@

{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":23598,"imports":[]},"packages/common/keys/src/types.ts":{"bytes":625,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":531,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement"}]}},"outputs":{"packages/common/keys/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11831},"packages/common/keys/dist/lib/node/index.cjs":{"imports":[],"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":4642}},"bytes":6228}}}
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25259,"imports":[]},"packages/common/keys/src/types.ts":{"bytes":625,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":531,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement"}]}},"outputs":{"packages/common/keys/dist/lib/node/index.cjs":{"imports":[],"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":4816}},"bytes":6367}}}

@@ -19,5 +19,13 @@ /// <reference types="node" />

* Creates new instance of PublicKey automatically determining the input format.
* @param source A Buffer, or Uint8Array, or hex encoded string, or something with an `asUint8Array` method on it
* @returns PublicKey
*/
static from(source: PublicKeyLike): PublicKey;
/**
* Same as `PublicKey.from` but does not throw and instead returns a `{ key: PublicKey }` or `{ error: Error }`
* @param source Same PublicKeyLike argument as for `PublicKey.from`
* @returns PublicKey
*/
static safeFrom(source?: PublicKeyLike): PublicKey | undefined;
/**
* Creates new instance of PublicKey from hex string.

@@ -24,0 +32,0 @@ */

{
"name": "@dxos/keys",
"version": "0.1.17",
"version": "0.1.18",
"description": "Key utils and definitions.",

@@ -20,4 +20,4 @@ "homepage": "https://dxos.org",

"randombytes": "^2.1.0",
"@dxos/debug": "0.1.17",
"@dxos/node-std": "0.1.17"
"@dxos/debug": "0.1.18",
"@dxos/node-std": "0.1.18"
},

@@ -24,0 +24,0 @@ "devDependencies": {

@@ -27,2 +27,4 @@ //

* Creates new instance of PublicKey automatically determining the input format.
* @param source A Buffer, or Uint8Array, or hex encoded string, or something with an `asUint8Array` method on it
* @returns PublicKey
*/

@@ -47,2 +49,18 @@ static from(source: PublicKeyLike): PublicKey {

/**
* Same as `PublicKey.from` but does not throw and instead returns a `{ key: PublicKey }` or `{ error: Error }`
* @param source Same PublicKeyLike argument as for `PublicKey.from`
* @returns PublicKey
*/
static safeFrom(source?: PublicKeyLike): PublicKey | undefined {
if (!source) {
return undefined;
}
try {
return PublicKey.from(source);
} catch (error: any) {
return undefined;
}
}
/**
* Creates new instance of PublicKey from hex string.

@@ -49,0 +67,0 @@ */

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