API reference

URL: https://rgb-nodejs-server.thunderstack.org/api/

post
Responses
200
Generate private keys
application/json
post
POST /wallet/generate_keys HTTP/1.1
Host: 
Accept: */*
200

Generate private keys

{
  "mnemonic": "text",
  "xpub": "text",
  "account_xpub_vanilla": "text",
  "account_xpub_colored": "text",
  "account_xpub_colored_fingerprint": "text"
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Responses
200
Register Wallet in Manager
application/json
post
POST /wallet/register HTTP/1.1
Host: 
xpub: text
Accept: */*
200

Register Wallet in Manager

{
  "address": "text",
  "btc_balance": {
    "vanilla": {
      "settled": 1,
      "future": 1,
      "spendable": 1
    },
    "colored": {
      "settled": 1,
      "future": 1,
      "spendable": 1
    }
  }
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Responses
200
List of assets
application/json
post
POST /wallet/listassets HTTP/1.1
Host: 
xpub: text
Accept: */*
200

List of assets

{
  "nia": [
    {
      "assetId": "text",
      "assetIface": "text",
      "ticker": "text",
      "name": "text",
      "details": "text",
      "precision": 1,
      "issuedSupply": 1,
      "timestamp": 1,
      "addedAt": 1,
      "balance": {
        "vanilla": {
          "settled": 1,
          "future": 1,
          "spendable": 1
        },
        "colored": {
          "settled": 1,
          "future": 1,
          "spendable": 1
        }
      },
      "media": {
        "filePath": "text",
        "mime": "text"
      }
    }
  ],
  "uda": [
    {
      "assetId": "text",
      "assetIface": "text",
      "ticker": "text",
      "name": "text",
      "details": "text",
      "precision": 1,
      "issuedSupply": 1,
      "timestamp": 1,
      "addedAt": 1,
      "balance": {
        "vanilla": {
          "settled": 1,
          "future": 1,
          "spendable": 1
        },
        "colored": {
          "settled": 1,
          "future": 1,
          "spendable": 1
        }
      },
      "media": {
        "filePath": "text",
        "mime": "text"
      }
    }
  ],
  "cfa": [
    {
      "assetId": "text",
      "assetIface": "text",
      "ticker": "text",
      "name": "text",
      "details": "text",
      "precision": 1,
      "issuedSupply": 1,
      "timestamp": 1,
      "addedAt": 1,
      "balance": {
        "vanilla": {
          "settled": 1,
          "future": 1,
          "spendable": 1
        },
        "colored": {
          "settled": 1,
          "future": 1,
          "spendable": 1
        }
      },
      "media": {
        "filePath": "text",
        "mime": "text"
      }
    }
  ]
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Responses
200
Get Address
application/json
ResponsestringExample: bcrt1pgj23pna0ajlayxq9thphg9yyrtq6dd8rfl8xcfxtcmfh87cfus9qavs6zj
post
POST /wallet/address HTTP/1.1
Host: 
xpub: text
Accept: */*
200

Get Address

bcrt1pgj23pna0ajlayxq9thphg9yyrtq6dd8rfl8xcfxtcmfh87cfus9qavs6zj
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
asset_idstringRequired
Responses
200
Asset Balance
application/json
post
POST /wallet/assetbalance HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "asset_id": "text"
}
200

Asset Balance

{
  "settled": 777,
  "future": 777,
  "spendable": 777,
  "offchainOutbound": 444,
  "offchainInbound": 0
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Responses
200
BTC Balance
application/json
post
POST /wallet/btcbalance HTTP/1.1
Host: 
xpub: text
Accept: */*
200

BTC Balance

{
  "vanilla": {
    "settled": 1,
    "future": 1,
    "spendable": 1
  },
  "colored": {
    "settled": 1,
    "future": 1,
    "spendable": 1
  }
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
upTobooleanRequired
numnumberRequired
sizenumberRequired
feeRatenumberRequired
Responses
200
returns PSBT to sign
application/json
Responsestring
post
POST /wallet/createutxosbegin HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "upTo": true,
  "num": 1,
  "size": 1,
  "feeRate": 1
}
200

returns PSBT to sign

text
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
signedPsbtstringRequired
Responses
200
UTXO creation result
application/json
Responsenumber
post
POST /wallet/createutxosend HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "signedPsbt": "text"
}
200

UTXO creation result

1
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Responses
200
List of unspent outputs
application/json
post
POST /wallet/listunspends HTTP/1.1
Host: 
xpub: text
Accept: */*
200

List of unspent outputs

[
  {
    "utxo": {
      "outpoint": {},
      "btc_amount": 1,
      "colorable": true
    },
    "rgb_allocations": [
      {
        "asset_id": "text",
        "amount": 1,
        "settled": true
      }
    ]
  }
]
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
donationbooleanRequiredExample: false
fee_ratenumberRequiredExample: 1
min_confirmationsnumberRequiredExample: 1
Responses
200
returns PSBT to sign
application/json
Responsestring
post
POST /wallet/sendbegin HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 199

{
  "recipient_map": {
    "ANY_ASSET_ID": [
      {
        "recipient_id": "text",
        "witness_data": {
          "amount_sat": 1,
          "blinding": 1
        },
        "amount": 1,
        "transport_endpoints": [
          "text"
        ]
      }
    ]
  },
  "donation": false,
  "fee_rate": 1,
  "min_confirmations": 1
}
200

returns PSBT to sign

text
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
donationbooleanRequiredExample: false
fee_ratenumberRequiredExample: 1
min_confirmationsnumberRequiredExample: 1
Responses
200
Returns transaction ID and batch index
application/json
post
POST /wallet/sendend HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 199

{
  "recipient_map": {
    "ANY_ASSET_ID": [
      {
        "recipient_id": "text",
        "witness_data": {
          "amount_sat": 1,
          "blinding": 1
        },
        "amount": 1,
        "transport_endpoints": [
          "text"
        ]
      }
    ]
  },
  "donation": false,
  "fee_rate": 1,
  "min_confirmations": 1
}
200

Returns transaction ID and batch index

{
  "txid": "text",
  "batch_transfer_idx": 1
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
asset_idstringRequired
Responses
200
List of transfers for asset
application/json
post
POST /wallet/listtransfers HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "asset_id": "text"
}
200

List of transfers for asset

[
  {
    "idx": 1,
    "batch_transfer_idx": 1,
    "created_at": 1,
    "updated_at": 1,
    "status": 1,
    "amount": 1,
    "kind": 1,
    "txid": {},
    "receive_utxo": {},
    "change_utxo": {},
    "expiration": 1,
    "transport_endpoints": [
      {
        "endpoint": "text",
        "transport_type": 1,
        "used": true
      }
    ]
  }
]
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
batch_transfer_idxnumberRequired
no_asset_onlybooleanOptional
skip_syncbooleanOptional
Responses
200
Fail transfers
post
POST /wallet/failtransfers HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "batch_transfer_idx": 1,
  "no_asset_only": true,
  "skip_sync": true
}
200

Fail transfers

No content

post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
tickerstringRequired
namestringRequired
amountsnumber[]Required
precisionnumberRequired
Responses
200
Issued NIA asset
application/json
post
POST /wallet/issueassetnia HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "ticker": "text",
  "name": "text",
  "amounts": [
    1
  ],
  "precision": 1
}
200

Issued NIA asset

{
  "asset": {
    "assetId": "text",
    "assetIface": "text",
    "ticker": "text",
    "name": "text",
    "details": "text",
    "precision": 1,
    "issuedSupply": 1,
    "timestamp": 1,
    "addedAt": 1,
    "balance": {
      "vanilla": {
        "settled": 1,
        "future": 1,
        "spendable": 1
      },
      "colored": {
        "settled": 1,
        "future": 1,
        "spendable": 1
      }
    },
    "media": {
      "filePath": "text",
      "mime": "text"
    }
  }
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
invoicestringRequired
Responses
200
Decoded RGB invoice
application/json
post
POST /wallet/decodergbinvoice HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "invoice": "text"
}
200

Decoded RGB invoice

{
  "recipient_id": "text",
  "asset_iface": "text",
  "asset_id": "text",
  "amount": "text",
  "expiration_timestamp": 1,
  "transport_endpoints": [
    "text"
  ]
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Responses
201Success
post
POST /wallet/refresh HTTP/1.1
Host: 
xpub: text
Accept: */*
201Success

No content

post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
asset_idstringRequired
amountnumberRequired
Responses
200
Returns the created invoice
application/json
post
POST /invoice/create HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "asset_id": "text",
  "amount": 1
}
200

Returns the created invoice

{
  "invoice": "text",
  "recipient_id": "text",
  "expiration_timestamp": 777,
  "batch_transfer_idx": 1
}
post
Header parameters
xpubstringRequired

Extended public key of the wallet

Body
invoicestringRequired
Responses
200
Returns the transfer
application/json
post
POST /invoice/status HTTP/1.1
Host: 
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "invoice": "text"
}
200

Returns the transfer

{
  "idx": 1,
  "batch_transfer_idx": 1,
  "created_at": 1,
  "updated_at": 1,
  "status": 1,
  "amount": 1,
  "kind": 1,
  "txid": {},
  "receive_utxo": {},
  "change_utxo": {},
  "expiration": 1,
  "transport_endpoints": [
    {
      "endpoint": "text",
      "transport_type": 1,
      "used": true
    }
  ]
}

Last updated