generate extended public address from extended public key(xpub) for Cardano(ADA)

97 views Asked by At

how can i generate extended public address from extended public key(xpub) for Cardano in .Net Core I use CardanoSharp.wallet lib and serach in net and also use NBitcoin lib for parse XPUB but I Can not generate extended address.

please help me

1

There are 1 answers

1
Worthy On

To generate extended public addresses from extended public keys (xpub) in Cardano using .NET Core and the CardanoSharp.Wallet and NBitcoin libraries:

  1. Install CardanoSharp.Wallet and NBitcoin libraries.
  2. Derivation path for Cardano: "m/44'/1815'/0'".
  3. Generate xpub with CardanoSharp.Wallet from mnemonic.
  4. Use NBitcoin to derive the address:
    • Parse xpub with ExtKey.Parse(xpub, network).
    • Derive public key with the desired derivation path.
    • Get the address with extPubKey.PubKey.GetAddress(ScriptPubKeyType.Legacy, network).