Parent extended public key is the same as child extended public key? #2081
Replies: 3 comments 9 replies
-
In the line
|
Beta Was this translation helpful? Give feedback.
-
The purpose of sharing the parent extended public key is so that child public keys (and thus addresses) can be derived from it,The default address is obtained by the following methods, and the derived address of the customDerivationPath2 cannot be obtained TWPublicKey* pk1 = TWHDWalletGetPublicKeyFromExtended(TWAccountExtendedPublicKey(accountT1), TWCoinType::TWCoinTypeDogecoin, customDerivationPath2); |
Beta Was this translation helpful? Give feedback.
-
The extendedPublicKey parameter in the following interface, I understand it is the master/parent extended public key, I want to obtain the child extended public key of the corresponding address of the derivationPath through TWAccountCreate, TWAccountExtendedPublicKey, etc. struct TWAccount *_Nonnull TWAccountCreate(TWString *_Nonnull address, enum TWCoinType coin, TWString *_Nonnull derivationPath, TWString *_Nonnull extendedPublicKey); |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Parent extended public key is the same as child extended public key?
Expected behavior
Are the two xpubs "m/44'/3'/0'/0/0" and "m/44'/3'/1'/0/0" the same correct code?
My understanding:
"m/44'/3'/0'/0/0" TWHDWalletGetExtendedPublicKey Gets the parent extended public key
"m/44'/3'/1'/0/0" TWAccountExtendedPublicKey Get child extended public key
Additional context
auto secretMnemonict1 = TWStringCreateWithUTF8Bytes(mnemonic1);
TWHDWallet* walletImpt1 = TWHDWalletCreateWithMnemonic(secretMnemonict1, TWStringCreateWithUTF8Bytes(""));
TWStringDelete(secretMnemonict1);
Beta Was this translation helpful? Give feedback.
All reactions