API reference
URL: https://rgb-nodejs-server.thunderstack.org/api/
POST /wallet/generate_keys HTTP/1.1
Host:
Accept: */*
Generate private keys
{
"mnemonic": "text",
"xpub": "text",
"account_xpub_vanilla": "text",
"account_xpub_colored": "text",
"account_xpub_colored_fingerprint": "text"
}
Extended public key of the wallet
POST /wallet/register HTTP/1.1
Host:
xpub: text
Accept: */*
Register Wallet in Manager
{
"address": "text",
"btc_balance": {
"vanilla": {
"settled": 1,
"future": 1,
"spendable": 1
},
"colored": {
"settled": 1,
"future": 1,
"spendable": 1
}
}
}
Extended public key of the wallet
POST /wallet/listassets HTTP/1.1
Host:
xpub: text
Accept: */*
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"
}
}
]
}
Extended public key of the wallet
bcrt1pgj23pna0ajlayxq9thphg9yyrtq6dd8rfl8xcfxtcmfh87cfus9qavs6zj
POST /wallet/address HTTP/1.1
Host:
xpub: text
Accept: */*
Get Address
bcrt1pgj23pna0ajlayxq9thphg9yyrtq6dd8rfl8xcfxtcmfh87cfus9qavs6zj
Extended public key of the wallet
POST /wallet/assetbalance HTTP/1.1
Host:
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"asset_id": "text"
}
Asset Balance
{
"settled": 777,
"future": 777,
"spendable": 777,
"offchainOutbound": 444,
"offchainInbound": 0
}
Extended public key of the wallet
POST /wallet/btcbalance HTTP/1.1
Host:
xpub: text
Accept: */*
BTC Balance
{
"vanilla": {
"settled": 1,
"future": 1,
"spendable": 1
},
"colored": {
"settled": 1,
"future": 1,
"spendable": 1
}
}
Extended public key of the wallet
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
}
returns PSBT to sign
text
Extended public key of the wallet
POST /wallet/createutxosend HTTP/1.1
Host:
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"signedPsbt": "text"
}
UTXO creation result
1
Extended public key of the wallet
POST /wallet/listunspends HTTP/1.1
Host:
xpub: text
Accept: */*
List of unspent outputs
[
{
"utxo": {
"outpoint": {},
"btc_amount": 1,
"colorable": true
},
"rgb_allocations": [
{
"asset_id": "text",
"amount": 1,
"settled": true
}
]
}
]
Extended public key of the wallet
false
1
1
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
}
returns PSBT to sign
text
Extended public key of the wallet
false
1
1
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
}
Returns transaction ID and batch index
{
"txid": "text",
"batch_transfer_idx": 1
}
Extended public key of the wallet
POST /wallet/listtransfers HTTP/1.1
Host:
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"asset_id": "text"
}
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
}
]
}
]
Extended public key of the wallet
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
}
Fail transfers
No content
Extended public key of the wallet
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
}
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"
}
}
}
Extended public key of the wallet
POST /wallet/decodergbinvoice HTTP/1.1
Host:
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"invoice": "text"
}
Decoded RGB invoice
{
"recipient_id": "text",
"asset_iface": "text",
"asset_id": "text",
"amount": "text",
"expiration_timestamp": 1,
"transport_endpoints": [
"text"
]
}
Extended public key of the wallet
POST /wallet/refresh HTTP/1.1
Host:
xpub: text
Accept: */*
No content
Extended public key of the wallet
POST /invoice/create HTTP/1.1
Host:
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"asset_id": "text",
"amount": 1
}
Returns the created invoice
{
"invoice": "text",
"recipient_id": "text",
"expiration_timestamp": 777,
"batch_transfer_idx": 1
}
Extended public key of the wallet
POST /invoice/status HTTP/1.1
Host:
xpub: text
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"invoice": "text"
}
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