Skip to content

Commit

Permalink
Create wrapper.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglescode committed Aug 24, 2024
1 parent 2bb1cc9 commit b803b08
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/mesh-core-cst/src/stricahq/bip32ed25519/wrapper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as cjsBip32ed25519 from "@stricahq/bip32ed25519";

// This ensures that TypeScript understands the types properly
export const bip32ed25519: typeof cjsBip32ed25519 & {
default?: typeof cjsBip32ed25519;
} = cjsBip32ed25519;
const exportedBip32ed25519 = bip32ed25519?.default || bip32ed25519;

// Export individual classes and types
export type StricaPrivateKey = cjsBip32ed25519.PrivateKey;
export type StricaPublicKey = cjsBip32ed25519.PublicKey;
export type StricaBip32PrivateKey = cjsBip32ed25519.Bip32PrivateKey;
export type StricaBip32PublicKey = cjsBip32ed25519.Bip32PublicKey;

export const StricaPrivateKey = exportedBip32ed25519.PrivateKey;
export const StricaPublicKey = exportedBip32ed25519.PublicKey;
export const StricaBip32PrivateKey = exportedBip32ed25519.Bip32PrivateKey;
export const StricaBip32PublicKey = exportedBip32ed25519.Bip32PublicKey;

0 comments on commit b803b08

Please sign in to comment.