light
May 10, 2020, 4:09pm
#1
I looked for this information in the Blockstack docs and did a quick search of the website and forum, and did not find the answer. I want to find information about the Blockstack Browser BTC wallet similar to that found on https://walletsrecovery.org .
What is the derivation path used by the wallet? Is there a BIP39 password required if I want to import the wallet into another wallet like Electrum?
const PATH = m/44'/5757'/0'/0/0
const API_URL = "https://blockstack-explorer-api.herokuapp.com";
const BSKPK =
"03956cd9ba758cb7be56d0f8d52476673814d8dbb3c1a728d73a36b3b9268f9cba";
const PATH = `m/44'/5757'/0'/0/0`;
const CORE_NODE_URI = "http://testnet.blockstack.org:16268";
const CORE_NODE_URI_TEST_NET = "http://testnet.blockstack.org:16268";
const UTXO_SERVICE_URI = "https://utxo.blockstack.org";
const TESTNET_ADDRESS_PREFIX = {
wif: 0x6f,
bip32: {
public: 0x043587cf,
private: 0x04358394
}
};
This file has been truncated. show original
1 Like
For the blockstack browser the derivation path for the bitcoin wallet (for name buying on stacks 1.0) is just
m/44'/0'/0'/0/0
const encryptedBuffer = await encryptMnemonic(mnemonic, password, opts)
return encryptedBuffer.toString('hex')
}
getIdentityPrivateKeychain(): BIP32Interface {
return this.rootNode
.deriveHardened(IDENTITY_KEYCHAIN)
.deriveHardened(BLOCKSTACK_ON_BITCOIN)
}
getBitcoinPrivateKeychain(): BIP32Interface {
return this.rootNode
.deriveHardened(BITCOIN_BIP_44_PURPOSE)
.deriveHardened(BITCOIN_COIN_TYPE)
.deriveHardened(BITCOIN_ACCOUNT_INDEX)
}
getBitcoinNode(addressIndex: number, chainType: string = EXTERNAL_ADDRESS): BIP32Interface {
return BlockstackWallet.getNodeFromBitcoinKeychain(
this.getBitcoinPrivateKeychain().toBase58(),
addressIndex,
1 Like