v1

latestOpenAPI 3.0.02026-07-174823135.4 KB
Derivations

Generate a hot wallet

NBXplorer will generate and save a mnemonic and create a derivationScheme.

post/v1/cryptos/{cryptoCode}/derivations

Path parameters

cryptoCodestring required

The cryptocurrency code to track (e.g., 'BTC' for Bitcoin, 'LTC' for Litecoin).

Request body

accountNumberinteger

Optional. The account number used for determining the key path that NBXplorer will track. This corresponds to the 'account' level in the derivation paths, e.g., m/44'/0'/accountNumber'. Default is 0.

wordList'English' | 'French' | 'Japanese' | 'Spanish' | 'ChineseSimplified'

Optional. The BIP39 wordlist to use when generating the mnemonic. Available options are English, French, Japanese, Spanish, ChineseSimplified. Default is 'English'.

existingMnemonicstring

Optional. An existing BIP39 mnemonic seed to import instead of generating a new one. If provided, NBXplorer will use this mnemonic to generate the wallet.

wordCountinteger

Optional. The number of words in the BIP39 mnemonic. Common options are 12, 15, 18, 21, or 24 words. Default is 12.

scriptPubKeyType'Legacy' | 'Segwit' | 'SegwitP2SH' | 'Taproot'

Optional. The type of scriptPubKey (address) to generate. Available options are:

  • Legacy: P2PKH addresses (starting with '1' on mainnet).
  • Segwit: Native SegWit addresses (bech32, starting with 'bc1' on mainnet).
  • SegwitP2SH: SegWit nested in P2SH addresses (starting with '3' on mainnet).
  • Taproot: Taproot addresses (bech32m, starting with 'bc1p' on mainnet). Default is 'Segwit', or 'Legacy' if the cryptoCode does not support SegWit.
passphrasestring

Optional. The BIP39 passphrase to use with the mnemonic. This is also known as the 'wallet password'. Default is an empty string.

savePrivateKeysboolean

Optional. If true, the private keys (mnemonic seed and derived keys) will be saved in NBXplorer's metadata under Mnemonic, MasterHDKey, and AccountHDKey. Be cautious when enabling this option, as storing private keys increases security risks.

additionalOptionsobject

Optional. Additional options that may be supported by certain networks or derivation schemes. For example, in Liquid, you might provide a slip77 master blinding key for confidential transactions. This field is network-specific.

Response

Successfully generated a hot wallet.

mnemonicstring

The generated BIP39 mnemonic phrase. This is the seed phrase consisting of a series of words used to generate the wallet's master private key.

passphrasestring

The BIP39 passphrase (also known as the wallet password) used in conjunction with the mnemonic to generate the master key. If not provided, this will be an empty string.

wordListstring

The language of the word list used to generate the mnemonic phrase. Available options are English, French, Japanese, Spanish, ChineseSimplified.

wordCountinteger

The number of words in the generated mnemonic phrase. Common values are 12, 15, 18, 21, or 24.

masterHDKeystring

The BIP32 master extended private key (xprv) derived from the mnemonic and passphrase. This key is the root of all derived keys in the wallet.

accountHDKeystring

The BIP32 account extended private key (xprv) derived from the masterHDKey and accountKeyPath. This key corresponds to a specific account in the wallet hierarchy.

accountKeyPathstring

The derivation path from the master key to the account key, including the master key's fingerprint as defined by BIP174. This follows the format {fingerprint}/{purpose}'/{coin_type}'/{account}' and allows reconstructing the full path to the account key.

accountDescriptorstring

The output descriptor representing the account's public key and the script type used. This can be used with compatible wallets and tools to import the account.

derivationSchemestring

The derivation scheme that is being tracked by NBXplorer. This includes information about the script type and any applied suffixes, often representing the account extended public key with optional script type indicators.

Example response

{
  "mnemonic": "musicien sinistre divertir réussir louve alliage péplum innocent filmer stipuler chignon utopie effusion heureux légal",
  "passphrase": "hello",
  "wordList": "French",
  "wordCount": 15,
  "masterHDKey": "tprv8ZgxMBicQKsPdv26BvirqqQCZJPSYEkSW7Por7a7r2PpsCUKHjjT18Gwk8k4FtkvqvakMFnsv9uaXHHoibieRd5BMhGCPYxVLaVY9vqpaxb",
  "accountHDKey": "tprv8gPRns62uoh4zbRatcxUWZY7aX3XsTchHBp79YL6E3fEocsgd6XjThU4r7E3iUemBffeLSjcjXyD1VrmHMwNceVipFL7txTFMgKm4kehuSR",
  "accountKeyPath": "a0aa59b4/49'/1'/2'",
  "accountDescriptor": "sh(wpkh([a0aa59b4/49'/1'/2']tpubDD5TwH8H4BNjt4TNnGd4uyCE9YZU2nobrVQtS4NPeKTde78TFVMKeC5w2G1nj7amQbGDptv4FtDBLuVQhofegQaZdFVuuxuCGpZQ4jZ6L5q))",
  "derivationScheme": "tpubDD5TwH8H4BNjt4TNnGd4uyCE9YZU2nobrVQtS4NPeKTde78TFVMKeC5w2G1nj7amQbGDptv4FtDBLuVQhofegQaZdFVuuxuCGpZQ4jZ6L5q-[p2sh]"
}