@dxos/keys
Advanced tools
Comparing version 0.1.53-main.b9267b1 to 0.1.53-main.d095ee3
@@ -1,1 +0,1 @@ | ||
{"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}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25939,"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":12540},"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":6446},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6622}}} |
@@ -1,1 +0,1 @@ | ||
{"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}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25939,"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":12695},"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":6634}},"bytes":8506}}} |
{ | ||
"name": "@dxos/keys", | ||
"version": "0.1.53-main.b9267b1", | ||
"version": "0.1.53-main.d095ee3", | ||
"description": "Key utils and definitions.", | ||
@@ -20,4 +20,4 @@ "homepage": "https://dxos.org", | ||
"randombytes": "^2.1.0", | ||
"@dxos/debug": "0.1.53-main.b9267b1", | ||
"@dxos/node-std": "0.1.53-main.b9267b1" | ||
"@dxos/debug": "0.1.53-main.d095ee3", | ||
"@dxos/node-std": "0.1.53-main.d095ee3" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
@@ -35,3 +35,3 @@ // | ||
} else if (source instanceof Buffer) { | ||
return new PublicKey(new Uint8Array(source)); | ||
return new PublicKey(new Uint8Array(source.buffer, source.byteOffset, source.byteLength)); | ||
} else if (source instanceof Uint8Array) { | ||
@@ -75,4 +75,5 @@ return new PublicKey(source); | ||
const buf = Buffer.from(hex, 'hex'); | ||
// TODO(burdon): Test if key. | ||
return new PublicKey(new Uint8Array(Buffer.from(hex, 'hex'))); | ||
return new PublicKey(new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength)); | ||
} | ||
@@ -141,3 +142,3 @@ | ||
} else if (key instanceof Uint8Array) { | ||
key = Buffer.from(key); | ||
key = Buffer.from(key.buffer, key.byteOffset, key.byteLength); | ||
} | ||
@@ -180,3 +181,3 @@ | ||
asBuffer(): Buffer { | ||
return Buffer.from(this._value); | ||
return Buffer.from(this._value.buffer, this._value.byteOffset, this._value.byteLength); | ||
} | ||
@@ -183,0 +184,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
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
60577
923
+ Added@dxos/debug@0.1.53-main.d095ee3(transitive)
+ Added@dxos/node-std@0.1.53-main.d095ee3(transitive)
- Removed@dxos/debug@0.1.53-main.b9267b1(transitive)
- Removed@dxos/node-std@0.1.53-main.b9267b1(transitive)