HD Wallets

List HD Wallets

curl -i \
     -H 'content-type: application/json' \
     -H 'authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
     https://nchain.provide.services/api/v1/wallets
HTTP/2 200

This endpoint enumerates HD (hierarchical deterministic) wallets used for deriving addresses in accordance with BIP32.

Create HD Wallet

curl -i \
     -H 'content-type: application/json' \
     -H 'authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
     https://nchain.provide.services/api/v1/wallets \
     -d '{"purpose": 44}'
HTTP/2 201

Creates an HD (hierarchical deterministic) Wallet in accordance with BIP32. A Wallet may be setup as custodial or non-custodial. If the Wallet is custodial then the platform will derive addresses and securely persist an Account for each of those derived addresses.

Request Parameters

ParameterDescription

purpose

specification to be used by the HD node subtree; set to 44 for 44' (i.e., 0x8000002C following the BIP43 recommendation)

List Derived HD Wallet Addresses

curl -i \
     -H 'content-type: application/json' \
     -H 'authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
     https://nchain.provide.services/api/v1/wallets/88081786-f3d7-4907-b1af-b7f23de3a471/accounts?page=1
HTTP/2 200

This endpoint returns a paginated list of the derived addresses for a specific derivation path for a specific HD (hierarchical deterministic) wallet.

The HD derivation path for each derived address is returned. The returned addresses are not currently being "pinned" (or otherwise persisted) by the API; as such, an ephemeral representation of the Account, complete with its derived key material, is returned by the API.

URL Parameters

ParameterDescription

id

id of the HD Wallet

Query Parameters

ParameterDescription

coin_type

the coin type, per BIP44

index

the index of the account or identity, per BIP44

chain_path

a constant representing the internal or external chain path, per BIP44; public derivation is used at this level

In addition to the above parameters, page and rpp pagination query parameters are supported.

Last updated