Skip to content

Dogecoin hdPath address problem #172

@Pp-Tomo

Description

@Pp-Tomo

Dogecoin problem

import { DogeWallet } from "@okxweb3/coin-bitcoin";
const wallet = new DogeWallet()

const hdPath = await wallet.getDerivedPath({ index: 0, })
console.log('hdPath:', hdPath)

const privateKey = await wallet.getDerivedPrivateKey({
  mnemonic,
  hdPath
})

console.log('---privateKey::', privateKey)

const { address, publicKey } = await wallet.getNewAddress({
privateKey,
})
console.log('---address::', address)

Why is the hdPath output m/44'/3'/0'/0/0?

The address generated by the same mnemonic using the address m/44'/0'/0'/0/0 is inconsistent with the address generated in the OKX wallet. Only when m/44'/3'/0'/0/0 is used, the address is consistent with the Doge address generated in OKX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions