Skip to content

Commit

Permalink
eliminate Ed25519PrivateExtendedKeyHex import
Browse files Browse the repository at this point in the history
  • Loading branch information
micahkendall committed May 1, 2024
1 parent 309375a commit 2f186ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/blaze-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export const Ed25519PrivateNormalKeyHex = (
value: string,
): Ed25519PrivateNormalKeyHex => typedHex(value, 64);

export type Ed25519PrivateExtendedKeyHex = OpaqueString<"Ed25519PrivateKeyHex">;
export const Ed25519PrivateExtendedKeyHex = (
value: string,
): Ed25519PrivateExtendedKeyHex => typedHex(value, 128);

export const Ed25519KeyHashHex = Crypto.Ed25519KeyHashHex;
export type Ed25519KeyHashHex = Crypto.Ed25519KeyHashHex;

Expand Down
6 changes: 3 additions & 3 deletions packages/blaze-core/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import * as C from "@cardano-sdk/core";
import { HexBlob, OpaqueString, typedHex } from "@cardano-sdk/util";
import {Ed25519PrivateExtendedKeyHex,
Ed25519PrivateNormalKeyHex,
Ed25519SignatureHex} from "@cardano-sdk/crypto"
import {
PolicyId,
Hash28ByteBase16,
Expand All @@ -15,6 +12,9 @@ import {
NetworkId,
Credential,
Hash32ByteBase16,
Ed25519PrivateExtendedKeyHex,
Ed25519PrivateNormalKeyHex,
Ed25519SignatureHex
} from "./types";
import { sha256 } from "@noble/hashes/sha256";
import * as sha3 from "@noble/hashes/sha3";
Expand Down

0 comments on commit 2f186ea

Please sign in to comment.