diff --git a/packages/proto-signing/src/directsecp256k1hdwallet.ts b/packages/proto-signing/src/directsecp256k1hdwallet.ts index 0a3f02cf..c6c52d89 100644 --- a/packages/proto-signing/src/directsecp256k1hdwallet.ts +++ b/packages/proto-signing/src/directsecp256k1hdwallet.ts @@ -1,4 +1,4 @@ -import { encodeSecp256k1Signature, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino"; +import { encodeSecp256k1Signature, makeCosmoshubPath, rawSecp256k1PubkeyToRawAddress } from "@cosmjs/amino"; import { Bip39, EnglishMnemonic, @@ -12,7 +12,6 @@ import { import { Bech32 } from "@cosmjs/encoding"; import { SignDoc } from "./codec/cosmos/tx/v1beta1/tx"; -import { makeCosmoshubPath } from "./paths"; import { AccountData, DirectSignResponse, OfflineDirectSigner } from "./signer"; import { makeSignBytes } from "./signing"; diff --git a/packages/proto-signing/src/index.ts b/packages/proto-signing/src/index.ts index 56518dd2..a27372db 100644 --- a/packages/proto-signing/src/index.ts +++ b/packages/proto-signing/src/index.ts @@ -10,7 +10,6 @@ export { } from "./registry"; export { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet"; export { DirectSecp256k1Wallet } from "./directsecp256k1wallet"; -export { makeCosmoshubPath } from "./paths"; export { decodePubkey, encodePubkey } from "./pubkey"; export { AccountData, diff --git a/packages/proto-signing/src/paths.spec.ts b/packages/proto-signing/src/paths.spec.ts deleted file mode 100644 index 17fd85b6..00000000 --- a/packages/proto-signing/src/paths.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Slip10RawIndex } from "@cosmjs/crypto"; - -import { makeCosmoshubPath } from "./paths"; - -describe("paths", () => { - describe("makeCosmoshubPath", () => { - it("works", () => { - // m/44'/118'/0'/0/0 - expect(makeCosmoshubPath(0)).toEqual([ - Slip10RawIndex.hardened(44), - Slip10RawIndex.hardened(118), - Slip10RawIndex.hardened(0), - Slip10RawIndex.normal(0), - Slip10RawIndex.normal(0), - ]); - // m/44'/118'/0'/0/123 - expect(makeCosmoshubPath(123)).toEqual([ - Slip10RawIndex.hardened(44), - Slip10RawIndex.hardened(118), - Slip10RawIndex.hardened(0), - Slip10RawIndex.normal(0), - Slip10RawIndex.normal(123), - ]); - }); - }); -}); diff --git a/packages/proto-signing/src/paths.ts b/packages/proto-signing/src/paths.ts deleted file mode 100644 index 1b4f0d8a..00000000 --- a/packages/proto-signing/src/paths.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { HdPath, Slip10RawIndex } from "@cosmjs/crypto"; - -/** - * The Cosmos Hub derivation path in the form `m/44'/118'/0'/0/a` - * with 0-based account index `a`. - * - * This is the same as makeCosmoshubPath from @cosmjs/launchpad but those might diverge in the future. - */ -export function makeCosmoshubPath(a: number): HdPath { - return [ - Slip10RawIndex.hardened(44), - Slip10RawIndex.hardened(118), - Slip10RawIndex.hardened(0), - Slip10RawIndex.normal(0), - Slip10RawIndex.normal(a), - ]; -}