From 338f77601f6d7673a678e328cd5e99ca4b986668 Mon Sep 17 00:00:00 2001 From: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:50:03 +1000 Subject: [PATCH] chore: expose slip utils --- packages/hdwallet-core/src/utils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/hdwallet-core/src/utils.ts b/packages/hdwallet-core/src/utils.ts index 60198dab6..2cf611b32 100644 --- a/packages/hdwallet-core/src/utils.ts +++ b/packages/hdwallet-core/src/utils.ts @@ -126,7 +126,7 @@ export function base64toHEX(base64: string): string { } // https://github.com/satoshilabs/slips/blob/master/slip-0044.md -const slip44Table = Object.freeze({ +export const slip44Table = Object.freeze({ Bitcoin: 0, Testnet: 1, BitcoinCash: 145, @@ -159,7 +159,9 @@ const slip44Table = Object.freeze({ Arbitrum: 60, ArbitrumNova: 60, } as const); -type Slip44ByCoin = T extends keyof typeof slip44Table ? typeof slip44Table[T] : number | undefined; + +export type Slip44ByCoin = T extends keyof typeof slip44Table ? typeof slip44Table[T] : number | undefined; + export function slip44ByCoin(coin: T): Slip44ByCoin { return (slip44Table as any)[coin]; }