Accounts

Overview

An Account is an arbitrary keypair capable of storing value on the underlying `Network`; also referred to as a signing identity.

Accounts are capable of storing cryptocurrencies and tokens native to a specific Network, as well as authorization credentials and cryptographic material on behalf of Provide users. An Account may be setup as custodial or non-custodial, and may be derived from a Wallet. If the Account is custodial then the platform will sign and broadcast transactions to the specified network on behalf of an authorized User or Application

List Accounts

List Accounts

GET https://nchain.provide.services/api/v1/accounts

Returns accounts used for storing cryptocurrency or tokens on behalf of Provide users managing cryptographic material (i.e., for signing transactions).

Headers

[
    {
        "id": "10d015e9-f539-4401-8979-4e6b2df09cca",
        "created_at": "2021-08-17T01:00:46.411455Z",
        "network_id": "07102258-5e49-480e-86af-6d0c3260827d",
        "user_id": "49a02f33-33f2-4d69-a301-ffb1933e77cc",
        "vault_id": "190822c9-62f5-4caf-a419-df735a793b2f",
        "key_id": "9c810a06-69cd-4b3c-91e9-7f21e386e170",
        "public_key": "0x044487be810158d03b70ac8f2659ad2ae8ce01851b8cbcf4b4fe1b7200b92005cdc579d758ac350d62fd382bf4ab9f64e064a1bb2af527d1667b0c23ce97549e87",
        "address": "0x3fe1B2044A623325255738fd3358d76B8C7081Fb"
    },
    {
        "id": "9a24779c-d9b0-43aa-a34f-77d8df044109",
        "created_at": "2021-08-16T18:56:06.916327Z",
        "network_id": "07102258-5e49-480e-86af-6d0c3260827d",
        "user_id": "49a02f33-33f2-4d69-a301-ffb1933e77cc",
        "vault_id": "190822c9-62f5-4caf-a419-df735a793b2f",
        "key_id": "e831ee1a-db30-40cd-8e64-a987cf859f18",
        "public_key": "0x0445047d00be84b4c992cb121668b0dfb96a21853cd8cdbd44841a5054964ab8fc49549b88d9830356ab4891eb28a779eba3ff9dceec02cd22e258783e7b5dc879",
        "address": "0x5A888484e30161C2AD6A487567cF65F1FEef67B7"
    }
]
curl -i \
     -H 'content-type: application/json' \
     -H 'authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
     https://nchain.provide.services/api/v1/accounts
HTTP/2 200

This endpoint enumerates accounts used for storing cryptocurrency or tokens on behalf of Provide users managing cryptographic material (i.e., for signing transactions).

Balances are not returned here for performance reasons; see GET /api/v1/accounts/:id to get balance details in the native currency for the network and GET /api/v1/accounts/:id/balances/:token_id to get balance details for a specific token, if supported by the account and network.

Create Account

Create Account

POST https://nchain.provide.services/api/v1/accounts

Creates an Account using the given parameters. An Account may be setup as custodial or non-custodial, and may be derived from a HD (hierarchical deterministic) Wallet. If the Account is custodial then the platform will sign and broadcast transactions to the Network on behalf of an authorized User or Application.

Headers

Request Body

{
    "id": "10d015e9-f539-4401-8979-4e6b2df09cca",
    "created_at": "2021-08-17T01:00:46.411454786Z",
    "network_id": "07102258-5e49-480e-86af-6d0c3260827d",
    "user_id": "49a02f33-33f2-4d69-a301-ffb1933e77cc",
    "vault_id": "190822c9-62f5-4caf-a419-df735a793b2f",
    "key_id": "9c810a06-69cd-4b3c-91e9-7f21e386e170",
    "public_key": "0x044487be810158d03b70ac8f2659ad2ae8ce01851b8cbcf4b4fe1b7200b92005cdc579d758ac350d62fd382bf4ab9f64e064a1bb2af527d1667b0c23ce97549e87",
    "address": "0x3fe1B2044A623325255738fd3358d76B8C7081Fb"
}
curl -i \
     -H 'content-type: application/json' \
     -H 'authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
     https://nchain.provide.services/api/v1/accounts  --data-binary @- << EOF
{
     "network_id":"024ff1ef-7369-4dee-969c-1918c6edb5d4"
}
EOF

Creates an Account (also referred to as a signing identity) capable of storing cryptocurrencies and tokens native to a specific Network. An Account may be setup as custodial or non-custodial, and may be derived from a HD (hierarchical deterministic) Wallet. If the Account is custodial then the platform will sign and broadcast transactions to the Network on behalf of an authorized User or Application.

Retrieve Account Details

Get Account Details

GET https://nchain.provide.services/api/v1/accounts/:id

Returns detailed information for a specified Account

Path Parameters

Headers

{
    "id": "",
    "created_at": "2021-06-15T18:01:25.084851Z",
    "network_id": "66d44f30-9092-4182-a3c4-bc02736d6ae5",
    "user_id": "7c8fe6f1-38c3-4da1-b4b7-7591c6d0ca7c",
    "vault_id": "190822c9-62f5-4caf-a419-df735a793b2f",
    "key_id": "c569842e-93d6-45d4-83c8-776d61742ce2",
    "public_key": "0x0496c5f6f5c4466a296b8eee84a25376d7e1c2dc275f347ea78129e895d47b02c6ebc854bb2f876feb22131224f9114c0a8698102587da7e02504acb7173fe77eb",
    "address": "0x1c194e88A7d589F9E693FF9b6E237cA0CDc1a15D",
    "balance": 0
}
curl -i \
     -H 'content-type: application/json' \
     -H 'authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
     https://nchain.provide.services/api/v1/accounts/efef1044-4958-43bc-903b-28f2bb938037
HTTP/2 200

Retrieve details for an Account.

URL Parameters

Account Token Balance

Retrieve the on-chain token balance details for a specific Account and Token contract, if supported by the Account and Network.

Documentation forthcoming.

URL Parameters

Last updated