@radixdlt/crypto
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.0.15](https://github.com/radixdlt/radixdlt-javascript/compare/@radixdlt/crypto@1.0.14...@radixdlt/crypto@1.0.15) (2021-04-19) | ||
**Note:** Version bump only for package @radixdlt/crypto | ||
## [1.0.14](https://github.com/radixdlt/radixdlt-javascript/compare/@radixdlt/crypto@1.0.13...@radixdlt/crypto@1.0.14) (2021-04-16) | ||
@@ -8,0 +16,0 @@ |
@@ -30,2 +30,3 @@ /// <reference types="node" /> | ||
export declare type PublicKey = Readonly<{ | ||
__hex: string; | ||
asData: (input: { | ||
@@ -32,0 +33,0 @@ readonly compressed: boolean; |
/// <reference types="node" /> | ||
export { publicKeyFromPrivateKeyScalar, publicKeyFromPrivateKey, } from './wrap/publicKeyWrapped'; | ||
export declare const publicKeyFromBytes: (publicKeyBytes: Buffer) => import("neverthrow").Result<Readonly<{ | ||
__hex: string; | ||
asData: (input: { | ||
@@ -29,2 +30,3 @@ readonly compressed: boolean; | ||
export declare const isPublicKey: (something: unknown) => something is Readonly<{ | ||
__hex: string; | ||
asData: (input: { | ||
@@ -31,0 +33,0 @@ readonly compressed: boolean; |
@@ -34,5 +34,7 @@ "use strict"; | ||
}; | ||
const toString = (compressed) => newKeyAsData({ compressed: compressed !== null && compressed !== void 0 ? compressed : true }).toString('hex'); | ||
const publicKey = { | ||
__hex: toString(), | ||
asData: newKeyAsData, | ||
toString: (compressed) => newKeyAsData({ compressed: compressed !== null && compressed !== void 0 ? compressed : true }).toString('hex'), | ||
toString, | ||
isValidSignature: isValidSignature, | ||
@@ -39,0 +41,0 @@ equals: equals, |
{ | ||
"name": "@radixdlt/crypto", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Cryptographic primitives such as digests (hashing) and Elliptic Curve Cryptography (ECC) methods such as key generation, signing and verify.", | ||
@@ -38,6 +38,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@radixdlt/data-formats": "^1.0.11", | ||
"@radixdlt/primitives": "^1.0.13", | ||
"@radixdlt/data-formats": "^1.0.12", | ||
"@radixdlt/primitives": "^1.0.14", | ||
"@radixdlt/uint256": "^1.1.0", | ||
"@radixdlt/util": "^1.0.10", | ||
"@radixdlt/util": "^1.0.11", | ||
"base-x": "^3.0.8", | ||
@@ -56,3 +56,3 @@ "elliptic": "^6.5.3", | ||
}, | ||
"gitHead": "ab614e64084928260e3cd31ecd07bcaaae134e10" | ||
"gitHead": "10f6f8c5ebbf1290c3ce65f84d00cbfb38e0fb66" | ||
} |
@@ -42,2 +42,3 @@ import { UInt256 } from '@radixdlt/uint256' | ||
export type PublicKey = Readonly<{ | ||
__hex: string // debug print | ||
asData: (input: { readonly compressed: boolean }) => Buffer | ||
@@ -44,0 +45,0 @@ toString: (compressed?: boolean) => string |
@@ -47,6 +47,9 @@ import { err, ok, Result } from 'neverthrow' | ||
const toString = (compressed?: boolean): string => | ||
newKeyAsData({ compressed: compressed ?? true }).toString('hex') | ||
const publicKey: PublicKey = { | ||
__hex: toString(), | ||
asData: newKeyAsData, | ||
toString: (compressed?: boolean): string => | ||
newKeyAsData({ compressed: compressed ?? true }).toString('hex'), | ||
toString, | ||
isValidSignature: isValidSignature, | ||
@@ -53,0 +56,0 @@ equals: equals, |
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
326649
4219
Updated@radixdlt/primitives@^1.0.14
Updated@radixdlt/util@^1.0.11