Repository navigation
Batch generate address enhancements #53
Description
Activity
@riongull this functionality has been added but does not have any opaque visual implementation that can be seen by an end user. It should be working at https://fix-dashwallet-implementation.wallet.dashincubator.dev/.
@jojobyte, was there a typo in what you said here:
needs to generate change addresses (
m/44'/5'/0'/${DashHd.CHANGE}/0) in addition to the current receive addresses (m/44'/5'/0'/${DashHd.RECEIVE}/0)By memory I thought the BIP44 spec defined what you're calling change and receive as the last two positions in the hd path. I always forget which order, but it's certainly not the same position for each. Have you read that spec and are we implementing it at least roughly per the spec?
Probably better to have a phone call about this, as it's pretty involved.
@jojobyte, was there a typo in what you said here:
needs to generate change addresses (
m/44'/5'/0'/${DashHd.CHANGE}/0) in addition to the current receive addresses (m/44'/5'/0'/${DashHd.RECEIVE}/0)By memory I thought the BIP44 spec defined what you're calling change and receive as the last two positions in the hd path. I always forget which order, but it's certainly not the same position for each. Have you read that spec and are we implementing it at least roughly per the spec?
Probably better to have a phone call about this, as it's pretty involved.
I have not read the spec, I've based the order off what is shown in dashhive/DashHD.js here https://github.com/dashhive/DashHD.js?tab=readme-ov-file#part-2a-hd-path-derivation and off the Constants
let accountIndex = 0; let use = DashHd.RECEIVE; let addressIndex = 0; let maxTries = 3; let hdPartial = `m/44'/5'/${accountIndex}'/${use}`;
If that is in fact the wrong order we've got a lot bigger of a problem because that is how DashHD.js is implementing it.
Please look closer at your comment (that I quoted), and the section in this screenshot from AJ's docs (that you linked to).
Your comment has both the
CHANGEandRECEIVEin the same HD path position. Does you comment have a typo? I don't know because I'm not sure how you implemented account transactions. Really I just want to confirm how we implemented it, but the comment is throwing me off.@jojobyte, as discussed yesterday, there is in fact no typo.
I was overlooking that
changein the HD path is just a boolean that can be0or1, and if it's0then it's assumed that it's forreceiveing, hence, they should in fact be at the same depth in the path. Your and AJ's naming convention update tousagemakes more sense than the BIPchangeto me, but I see the argument for either.Go ahead and close this if everything is done.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone

DashHd.RECEIVE&DashHd.CHANGEm/44'/5'/0'/${DashHd.CHANGE}/0) in addition to the current receive addresses (m/44'/5'/0'/${DashHd.RECEIVE}/0)Batch Interactions
DashHd.RECEIVE&DashHd.CHANGEaddressIndexfor contactaccountIndex >= 1or main walletaccountIndex === 0addressIndexfor main account (accountIndex === 0) changeaddressIndexfor contactaccountIndex >= 1or main walletaccountIndex === 0updateAllBalancesaddressIndexaddressIndexat theaccountIndexDashHd.RECEIVE||DashHd.CHANGE)