# Onchain API Reference

## POST /wallet/generate\_keys

> Generate new wallet keys (mnemonic, xpub, account xpubs, master fingerprint)

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/generate_keys":{"post":{"tags":["Wallet"],"summary":"Generate new wallet keys (mnemonic, xpub, account xpubs, master fingerprint)","operationId":"generateKeys","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Keys"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"schemas":{"Keys":{"type":"object","properties":{"mnemonic":{"type":"string","description":"BIP39 mnemonic phrase"},"xpub":{"type":"string","description":"Extended public key"},"account_xpub_vanilla":{"type":"string","description":"Account vanilla extended public key"},"account_xpub_colored":{"type":"string","description":"Account colored extended public key"},"master_fingerprint":{"type":"string","description":"Master fingerprint"}},"required":["mnemonic","xpub","account_xpub_vanilla","account_xpub_colored","master_fingerprint"]}}}}
```

## POST /wallet/register

> Register a new wallet with the RGB Node

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/register":{"post":{"tags":["Wallet"],"summary":"Register a new wallet with the RGB Node","operationId":"registerWallet","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterWalletResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"RegisterWalletResponse":{"type":"object","properties":{"address":{"type":"string","description":"Bitcoin address"},"btc_balance":{"$ref":"#/components/schemas/BtcBalance"}},"required":["address","btc_balance"]},"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]}}}}
```

## POST /wallet/btcbalance

> Get the BTC balance for the wallet

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/btcbalance":{"post":{"tags":["Wallet"],"summary":"Get the BTC balance for the wallet","operationId":"getBtcBalance","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BtcBalance"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]}}}}
```

## POST /wallet/address

> Get a derived deposit address

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/address":{"post":{"tags":["Wallet"],"summary":"Get a derived deposit address","operationId":"getAddress","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}}}}
```

## POST /wallet/listunspents

> List all unspent UTXOs

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/listunspents":{"post":{"tags":["Wallet"],"summary":"List all unspent UTXOs","operationId":"listUnspents","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Unspent"}}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"Unspent":{"type":"object","properties":{"utxo":{"$ref":"#/components/schemas/Utxo"},"rgb_allocations":{"type":"array","items":{"$ref":"#/components/schemas/RgbAllocation"}}},"required":["utxo","rgb_allocations"]},"Utxo":{"type":"object","properties":{"outpoint":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"required":["txid","vout"]},"btc_amount":{"type":"number","description":"BTC amount in satoshis"},"colorable":{"type":"boolean","description":"Whether UTXO can be colored"}},"required":["outpoint","btc_amount","colorable"]},"RgbAllocation":{"type":"object","properties":{"asset_id":{"type":"string"},"amount":{"type":"number"},"settled":{"type":"boolean"}},"required":["asset_id","amount","settled"]}}}}
```

## POST /wallet/createutxosbegin

> Start creating new UTXOs

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"UTXOs","description":"UTXO management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/createutxosbegin":{"post":{"tags":["UTXOs"],"summary":"Start creating new UTXOs","operationId":"createUtxosBegin","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUtxosBeginRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"CreateUtxosBeginRequestModel":{"type":"object","properties":{"up_to":{"type":"boolean","description":"Create UTXOs up to a limit"},"num":{"type":"number","description":"Number of UTXOs to create"},"size":{"type":"number","description":"Size of each UTXO in satoshis"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB"}}}}}}
```

## POST /wallet/createutxosend

> Finalize UTXO creation with a signed PSBT

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"UTXOs","description":"UTXO management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/createutxosend":{"post":{"tags":["UTXOs"],"summary":"Finalize UTXO creation with a signed PSBT","operationId":"createUtxosEnd","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"number"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUtxosEndRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"CreateUtxosEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"}},"required":["signed_psbt"]}}}}
```

## POST /wallet/sendbegin

> Begin sending RGB assets

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/sendbegin":{"post":{"tags":["Transactions"],"summary":"Begin sending RGB assets","operationId":"sendBegin","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAssetBeginRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"SendAssetBeginRequestModel":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string"},"witness_data":{"$ref":"#/components/schemas/WitnessData"},"asset_id":{"type":"string","description":"Asset ID (optional if in invoice)"},"amount":{"type":"number","description":"Amount to send (optional if in invoice)"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB","default":1},"min_confirmations":{"type":"number","description":"Minimum confirmations","default":1}},"required":["invoice"]},"WitnessData":{"type":"object","properties":{"amount_sat":{"type":"number","description":"Amount in satoshis"},"blinding":{"type":"number","description":"Blinding factor"}},"required":["amount_sat"]}}}}
```

## POST /wallet/sendend

> Finalize sending RGB assets with a signed PSBT

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/sendend":{"post":{"tags":["Transactions"],"summary":"Finalize sending RGB assets with a signed PSBT","operationId":"sendEnd","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAssetEndRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"SendResult":{"type":"object","properties":{"txid":{"type":"string","description":"Transaction ID"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["txid","batch_transfer_idx"]},"SendAssetEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"}},"required":["signed_psbt"]}}}}
```

## POST /wallet/sendbtcbegin

> Begin sending BTC

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/sendbtcbegin":{"post":{"tags":["Transactions"],"summary":"Begin sending BTC","operationId":"sendBtcBegin","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBtcBeginRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"SendBtcBeginRequestModel":{"type":"object","properties":{"address":{"type":"string","description":"Bitcoin address to send to"},"amount":{"type":"number","description":"Amount in satoshis"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB"},"skip_sync":{"type":"boolean","description":"Skip wallet sync","default":false}},"required":["address","amount","fee_rate"]}}}}
```

## POST /wallet/sendbtcend

> Finalize sending BTC with a signed PSBT

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/sendbtcend":{"post":{"tags":["Transactions"],"summary":"Finalize sending BTC with a signed PSBT","operationId":"sendBtcEnd","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBtcEndRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"SendBtcEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"},"skip_sync":{"type":"boolean","description":"Skip wallet sync","default":false}},"required":["signed_psbt"]}}}}
```

## POST /wallet/get\_fee\_estimation

> Get fee estimation for a given number of blocks

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/get_fee_estimation":{"post":{"tags":["Wallet"],"summary":"Get fee estimation for a given number of blocks","operationId":"getFeeEstimation","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFeeEstimationResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFeeEstimationRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"GetFeeEstimationResponse":{"oneOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"number"}],"description":"Fee estimation as object or number"},"GetFeeEstimationRequestModel":{"type":"object","properties":{"blocks":{"type":"number","description":"Number of blocks for fee estimation"}},"required":["blocks"]}}}}
```

## POST /wallet/blindreceive

> Generate blinded UTXO for receiving RGB assets

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/blindreceive":{"post":{"tags":["Wallet"],"summary":"Generate blinded UTXO for receiving RGB assets","operationId":"blindReceive","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReceiveData"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"InvoiceReceiveData":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string"},"recipient_id":{"type":"string","description":"Recipient ID"},"expiration_timestamp":{"type":"number","description":"Expiration timestamp"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["invoice","recipient_id","expiration_timestamp","batch_transfer_idx"]},"InvoiceRequest":{"type":"object","properties":{"amount":{"type":"number","description":"Amount to receive"},"asset_id":{"type":"string","description":"Asset ID"}},"required":["amount","asset_id"]}}}}
```

## POST /wallet/witnessreceive

> Generate witness UTXO for receiving RGB assets

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/witnessreceive":{"post":{"tags":["Wallet"],"summary":"Generate witness UTXO for receiving RGB assets","operationId":"witnessReceive","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReceiveData"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"InvoiceReceiveData":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string"},"recipient_id":{"type":"string","description":"Recipient ID"},"expiration_timestamp":{"type":"number","description":"Expiration timestamp"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["invoice","recipient_id","expiration_timestamp","batch_transfer_idx"]},"InvoiceRequest":{"type":"object","properties":{"amount":{"type":"number","description":"Amount to receive"},"asset_id":{"type":"string","description":"Asset ID"}},"required":["amount","asset_id"]}}}}
```

## POST /wallet/assetbalance

> Get balance for a specific RGB asset

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Assets","description":"RGB asset operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/assetbalance":{"post":{"tags":["Assets"],"summary":"Get balance for a specific RGB asset","operationId":"getAssetBalance","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetBalanceResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAssetBalanceRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"AssetBalanceResponse":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"},"offchainOutbound":{"type":"number","description":"Off-chain outbound balance"},"offchainInbound":{"type":"number","description":"Off-chain inbound balance"}}},"GetAssetBalanceRequest":{"type":"object","properties":{"asset_id":{"type":"string","description":"Asset ID"}},"required":["asset_id"]}}}}
```

## POST /wallet/issueassetnia

> Issue a new Non-Inflationary Asset (NIA)

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Assets","description":"RGB asset operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/issueassetnia":{"post":{"tags":["Assets"],"summary":"Issue a new Non-Inflationary Asset (NIA)","operationId":"issueAssetNia","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetNIA"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueAssetNiaRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"AssetNIA":{"type":"object","properties":{"asset_id":{"type":"string"},"assetIface":{"type":"string","enum":["RGB20","RGB21","RGB25"]},"ticker":{"type":"string"},"name":{"type":"string"},"details":{"type":"string"},"precision":{"type":"number"},"issued_supply":{"type":"number"},"timestamp":{"type":"number"},"added_at":{"type":"number"},"balance":{"$ref":"#/components/schemas/BtcBalance"},"media":{"$ref":"#/components/schemas/Media"}}},"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]},"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}},"IssueAssetNiaRequestModel":{"type":"object","properties":{"ticker":{"type":"string","description":"Asset ticker symbol"},"name":{"type":"string","description":"Asset name"},"amounts":{"type":"array","items":{"type":"number"},"description":"Initial amounts to issue"},"precision":{"type":"number","description":"Decimal precision"}},"required":["ticker","name","amounts","precision"]}}}}
```

## POST /wallet/issueassetifa

> Issue a new Inflationary Asset (IFA)

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Assets","description":"RGB asset operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/issueassetifa":{"post":{"tags":["Assets"],"summary":"Issue a new Inflationary Asset (IFA)","operationId":"issueAssetIfa","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetIfa"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueAssetIfaRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"AssetIfa":{"type":"object","properties":{"asset_id":{"type":"string"},"ticker":{"type":"string"},"name":{"type":"string"},"details":{"type":"string"},"precision":{"type":"number"},"initial_supply":{"type":"number"},"max_supply":{"type":"number"},"known_circulating_supply":{"type":"number"},"timestamp":{"type":"number"},"added_at":{"type":"number"},"balance":{"$ref":"#/components/schemas/Balance"},"media":{"$ref":"#/components/schemas/Media"},"reject_list_url":{"type":"string"}},"required":["asset_id","ticker","name","precision","initial_supply","max_supply","known_circulating_supply","timestamp","added_at","balance"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]},"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}},"IssueAssetIfaRequestModel":{"type":"object","properties":{"ticker":{"type":"string","description":"Asset ticker symbol"},"name":{"type":"string","description":"Asset name"},"precision":{"type":"number","description":"Decimal precision"},"amounts":{"type":"array","items":{"type":"number"},"description":"Initial amounts to issue"},"inflation_amounts":{"type":"array","items":{"type":"number"},"description":"Inflation amounts"},"replace_rights_num":{"type":"number","description":"Number of replace rights"},"reject_list_url":{"type":"string","description":"Reject list URL"}},"required":["ticker","name","precision","amounts","inflation_amounts","replace_rights_num"]}}}}
```

## POST /wallet/inflatebegin

> Begin inflating an IFA asset

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Assets","description":"RGB asset operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/inflatebegin":{"post":{"tags":["Assets"],"summary":"Begin inflating an IFA asset","operationId":"inflateBegin","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InflateAssetIfaRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"InflateAssetIfaRequestModel":{"type":"object","properties":{"asset_id":{"type":"string","description":"Asset ID to inflate"},"inflation_amounts":{"type":"array","items":{"type":"number"},"description":"Amounts to inflate"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB"},"min_confirmations":{"type":"number","description":"Minimum confirmations","default":1}},"required":["asset_id","inflation_amounts"]}}}}
```

## POST /wallet/inflateend

> Finalize asset inflation with a signed PSBT

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Assets","description":"RGB asset operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/inflateend":{"post":{"tags":["Assets"],"summary":"Finalize asset inflation with a signed PSBT","operationId":"inflateEnd","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InflateEndRequestModel"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"OperationResult":{"type":"object","properties":{"txid":{"type":"string","description":"Transaction ID"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["txid","batch_transfer_idx"]},"InflateEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"}},"required":["signed_psbt"]}}}}
```

## POST /wallet/listassets

> List all RGB assets held in the wallet

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Assets","description":"RGB asset operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/listassets":{"post":{"tags":["Assets"],"summary":"List all RGB assets held in the wallet","operationId":"listAssets","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"ListAssetsResponse":{"type":"object","properties":{"nia":{"type":"array","items":{"$ref":"#/components/schemas/AssetNIA"}},"uda":{"type":"array","items":{"$ref":"#/components/schemas/AssetNIA"}},"cfa":{"type":"array","items":{"$ref":"#/components/schemas/AssetNIA"}}}},"AssetNIA":{"type":"object","properties":{"asset_id":{"type":"string"},"assetIface":{"type":"string","enum":["RGB20","RGB21","RGB25"]},"ticker":{"type":"string"},"name":{"type":"string"},"details":{"type":"string"},"precision":{"type":"number"},"issued_supply":{"type":"number"},"timestamp":{"type":"number"},"added_at":{"type":"number"},"balance":{"$ref":"#/components/schemas/BtcBalance"},"media":{"$ref":"#/components/schemas/Media"}}},"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]},"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}}}}}
```

## POST /wallet/decodergbinvoice

> Decode an RGB invoice string

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/decodergbinvoice":{"post":{"tags":["Wallet"],"summary":"Decode an RGB invoice string","operationId":"decodeRGBInvoice","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeRgbInvoiceResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeRgbInvoiceRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"DecodeRgbInvoiceResponse":{"type":"object","properties":{"recipient_id":{"type":"string","description":"Recipient ID"},"asset_schema":{"type":"string","description":"Asset schema type"},"asset_id":{"type":"string","description":"Asset ID"},"network":{"type":"string","description":"Network name"},"assignment":{"$ref":"#/components/schemas/Assignment"},"assignment_name":{"type":"string","description":"Assignment name"},"expiration_timestamp":{"type":"number","description":"Expiration timestamp"},"transport_endpoints":{"type":"array","items":{"type":"string"},"description":"Transport endpoints"}},"required":["recipient_id","network","assignment","transport_endpoints"]},"Assignment":{"type":"object","additionalProperties":true,"description":"Assignment data (key-value pairs)"},"DecodeRgbInvoiceRequest":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string to decode"}},"required":["invoice"]}}}}
```

## POST /wallet/refresh

> Sync and refresh wallet state

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/refresh":{"post":{"tags":["Wallet"],"summary":"Sync and refresh wallet state","operationId":"refreshWallet","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}}}}
```

## POST /wallet/drop

> Drop/delete the wallet from the RGB Node

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/drop":{"post":{"tags":["Wallet"],"summary":"Drop/delete the wallet from the RGB Node","operationId":"dropWallet","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}}}}
```

## POST /wallet/listtransactions

> List all wallet transactions

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/listtransactions":{"post":{"tags":["Transactions"],"summary":"List all wallet transactions","operationId":"listTransactions","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"Transaction":{"type":"object","properties":{"transaction_type":{"type":"number","enum":[0,1,2,3],"description":"0=RGB_SEND, 1=DRAIN, 2=CREATE_UTXOS, 3=USER"},"txid":{"type":"string"},"received":{"type":"number"},"sent":{"type":"number"},"fee":{"type":"number"},"confirmation_time":{"type":"object","properties":{"height":{"type":"number"},"timestamp":{"type":"number"}}}},"required":["transaction_type","txid","received","sent","fee"]}}}}
```

## POST /wallet/listtransfers

> List transfers for a specific asset

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/listtransfers":{"post":{"tags":["Transactions"],"summary":"List transfers for a specific asset","operationId":"listTransfers","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RgbTransfer"}}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTransfersRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"RgbTransfer":{"type":"object","properties":{"idx":{"type":"number"},"batch_transfer_idx":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"},"status":{"type":"number","enum":[0,1,2,3],"description":"0=WAITING_COUNTERPARTY, 1=WAITING_CONFIRMATIONS, 2=SETTLED, 3=FAILED"},"amount":{"type":"number"},"kind":{"type":"number","enum":[0,1,2,3,4],"description":"Transfer kind: 0=ISSUANCE, 1=RECEIVE_BLIND, 2=RECEIVE_WITNESS, 3=SEND, 4=INFLATION"},"txid":{"type":"string","nullable":true},"recipient_id":{"type":"string"},"receive_utxo":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"required":["txid","vout"]},"change_utxo":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"nullable":true},"expiration":{"type":"number"},"transport_endpoints":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"transport_type":{"type":"number"},"used":{"type":"boolean"}},"required":["endpoint","transport_type","used"]}}},"required":["idx","batch_transfer_idx","created_at","updated_at","status","amount","kind","recipient_id","receive_utxo","expiration","transport_endpoints"]},"ListTransfersRequest":{"type":"object","properties":{"asset_id":{"type":"string","description":"Asset ID"}},"required":["asset_id"]}}}}
```

## POST /wallet/sync

> Trigger wallet sync without additional refresh logic

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Wallet","description":"Wallet management operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/sync":{"post":{"tags":["Wallet"],"summary":"Trigger wallet sync without additional refresh logic","operationId":"syncWallet","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}}}}
```

## POST /wallet/failtransfers

> Mark transfers as failed

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Transactions","description":"Transaction and transfer operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/failtransfers":{"post":{"tags":["Transactions"],"summary":"Mark transfers as failed","operationId":"failTransfers","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailTransfersRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"FailTransfersRequest":{"type":"object","properties":{"batch_transfer_idx":{"type":"number","description":"Batch transfer index"},"no_asset_only":{"type":"boolean","description":"Fail only transfers with no asset","default":false},"skip_sync":{"type":"boolean","description":"Skip wallet sync","default":false}},"required":["batch_transfer_idx"]}}}}
```

## POST /wallet/backup

> Create a wallet backup

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Backup","description":"Wallet backup and restore operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/backup":{"post":{"tags":["Backup"],"summary":"Create a wallet backup","operationId":"createBackup","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletBackupResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBackupRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"WalletBackupResponse":{"type":"object","properties":{"message":{"type":"string"},"download_url":{"type":"string"}},"required":["message","download_url"]},"CreateBackupRequest":{"type":"object","properties":{"password":{"type":"string","description":"Backup password"}},"required":["password"]}}}}
```

## GET /wallet/backup/{backupId}

> Download a wallet backup file

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Backup","description":"Wallet backup and restore operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/backup/{backupId}":{"get":{"tags":["Backup"],"summary":"Download a wallet backup file","operationId":"downloadBackup","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"},{"name":"backupId","in":"path","required":true,"schema":{"type":"string"},"description":"The backupId parameter"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}}}}
```

## POST /wallet/restore

> Restore a wallet from a backup file

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"tags":[{"name":"Backup","description":"Wallet backup and restore operations"}],"servers":[{"url":"https://rgb-node.thunderstack.org","description":"Mainnet RGB Node"},{"url":"https://rgb-node.test.thunderstack.org","description":"Testnet RGB Node"},{"url":"http://127.0.0.1:8000","description":"Local RGB Node (development)"}],"paths":{"/wallet/restore":{"post":{"tags":["Backup"],"summary":"Restore a wallet from a backup file","operationId":"restoreWallet","parameters":[{"$ref":"#/components/parameters/XpubVan"},{"$ref":"#/components/parameters/XpubCol"},{"$ref":"#/components/parameters/MasterFingerprint"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletRestoreResponse"}}}},"400":{"description":"Bad request - RGB library error (default status for unlisted RGB errors)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number","description":"HTTP status code"}},"required":["error","message","status"]}}}},"404":{"description":"Not found - Wallet or asset not found","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"]},{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}},"409":{"description":"Conflict - File already exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"422":{"description":"Unprocessable Entity - Insufficient bitcoins or invalid amount","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["InsufficientBitcoins","InvalidAmountZero"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"428":{"description":"Precondition Required - Wallet sync needed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"}},"required":["error","message","status"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},{"type":"object","properties":{"error":{"type":"string","enum":["IO","Internal"],"description":"Error type"},"message":{"type":"string","description":"Detailed error message"},"status":{"type":"number"}},"required":["error","message","status"]}]}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RestoreWalletRequest"}}}}}}},"components":{"parameters":{"XpubVan":{"name":"xpub-van","in":"header","required":true,"schema":{"type":"string"},"description":"Vanilla extended public key"},"XpubCol":{"name":"xpub-col","in":"header","required":true,"schema":{"type":"string"},"description":"Colored extended public key"},"MasterFingerprint":{"name":"master-fingerprint","in":"header","required":true,"schema":{"type":"string"},"description":"Master fingerprint"}},"schemas":{"WalletRestoreResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"RestoreWalletRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Wallet backup file"},"password":{"type":"string","description":"Backup password"},"xpub_van":{"type":"string","description":"Vanilla extended public key (optional)"},"xpub_col":{"type":"string","description":"Colored extended public key (optional)"},"master_fingerprint":{"type":"string","description":"Master fingerprint (optional)"}},"required":["file","password"]}}}}
```

## The Keys object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Keys":{"type":"object","properties":{"mnemonic":{"type":"string","description":"BIP39 mnemonic phrase"},"xpub":{"type":"string","description":"Extended public key"},"account_xpub_vanilla":{"type":"string","description":"Account vanilla extended public key"},"account_xpub_colored":{"type":"string","description":"Account colored extended public key"},"master_fingerprint":{"type":"string","description":"Master fingerprint"}},"required":["mnemonic","xpub","account_xpub_vanilla","account_xpub_colored","master_fingerprint"]}}}}
```

## The RegisterWalletResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"RegisterWalletResponse":{"type":"object","properties":{"address":{"type":"string","description":"Bitcoin address"},"btc_balance":{"$ref":"#/components/schemas/BtcBalance"}},"required":["address","btc_balance"]},"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]}}}}
```

## The BtcBalance object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]}}}}
```

## The Balance object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]}}}}
```

## The Unspent object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Unspent":{"type":"object","properties":{"utxo":{"$ref":"#/components/schemas/Utxo"},"rgb_allocations":{"type":"array","items":{"$ref":"#/components/schemas/RgbAllocation"}}},"required":["utxo","rgb_allocations"]},"Utxo":{"type":"object","properties":{"outpoint":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"required":["txid","vout"]},"btc_amount":{"type":"number","description":"BTC amount in satoshis"},"colorable":{"type":"boolean","description":"Whether UTXO can be colored"}},"required":["outpoint","btc_amount","colorable"]},"RgbAllocation":{"type":"object","properties":{"asset_id":{"type":"string"},"amount":{"type":"number"},"settled":{"type":"boolean"}},"required":["asset_id","amount","settled"]}}}}
```

## The Utxo object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Utxo":{"type":"object","properties":{"outpoint":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"required":["txid","vout"]},"btc_amount":{"type":"number","description":"BTC amount in satoshis"},"colorable":{"type":"boolean","description":"Whether UTXO can be colored"}},"required":["outpoint","btc_amount","colorable"]}}}}
```

## The RgbAllocation object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"RgbAllocation":{"type":"object","properties":{"asset_id":{"type":"string"},"amount":{"type":"number"},"settled":{"type":"boolean"}},"required":["asset_id","amount","settled"]}}}}
```

## The CreateUtxosBeginRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"CreateUtxosBeginRequestModel":{"type":"object","properties":{"up_to":{"type":"boolean","description":"Create UTXOs up to a limit"},"num":{"type":"number","description":"Number of UTXOs to create"},"size":{"type":"number","description":"Size of each UTXO in satoshis"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB"}}}}}}
```

## The CreateUtxosEndRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"CreateUtxosEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"}},"required":["signed_psbt"]}}}}
```

## The SendAssetBeginRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"SendAssetBeginRequestModel":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string"},"witness_data":{"$ref":"#/components/schemas/WitnessData"},"asset_id":{"type":"string","description":"Asset ID (optional if in invoice)"},"amount":{"type":"number","description":"Amount to send (optional if in invoice)"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB","default":1},"min_confirmations":{"type":"number","description":"Minimum confirmations","default":1}},"required":["invoice"]},"WitnessData":{"type":"object","properties":{"amount_sat":{"type":"number","description":"Amount in satoshis"},"blinding":{"type":"number","description":"Blinding factor"}},"required":["amount_sat"]}}}}
```

## The WitnessData object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"WitnessData":{"type":"object","properties":{"amount_sat":{"type":"number","description":"Amount in satoshis"},"blinding":{"type":"number","description":"Blinding factor"}},"required":["amount_sat"]}}}}
```

## The SendAssetEndRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"SendAssetEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"}},"required":["signed_psbt"]}}}}
```

## The SendResult object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"SendResult":{"type":"object","properties":{"txid":{"type":"string","description":"Transaction ID"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["txid","batch_transfer_idx"]}}}}
```

## The SendBtcBeginRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"SendBtcBeginRequestModel":{"type":"object","properties":{"address":{"type":"string","description":"Bitcoin address to send to"},"amount":{"type":"number","description":"Amount in satoshis"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB"},"skip_sync":{"type":"boolean","description":"Skip wallet sync","default":false}},"required":["address","amount","fee_rate"]}}}}
```

## The SendBtcEndRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"SendBtcEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"},"skip_sync":{"type":"boolean","description":"Skip wallet sync","default":false}},"required":["signed_psbt"]}}}}
```

## The GetFeeEstimationRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"GetFeeEstimationRequestModel":{"type":"object","properties":{"blocks":{"type":"number","description":"Number of blocks for fee estimation"}},"required":["blocks"]}}}}
```

## The GetFeeEstimationResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"GetFeeEstimationResponse":{"oneOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"number"}],"description":"Fee estimation as object or number"}}}}
```

## The InvoiceRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"InvoiceRequest":{"type":"object","properties":{"amount":{"type":"number","description":"Amount to receive"},"asset_id":{"type":"string","description":"Asset ID"}},"required":["amount","asset_id"]}}}}
```

## The InvoiceReceiveData object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"InvoiceReceiveData":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string"},"recipient_id":{"type":"string","description":"Recipient ID"},"expiration_timestamp":{"type":"number","description":"Expiration timestamp"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["invoice","recipient_id","expiration_timestamp","batch_transfer_idx"]}}}}
```

## The GetAssetBalanceRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"GetAssetBalanceRequest":{"type":"object","properties":{"asset_id":{"type":"string","description":"Asset ID"}},"required":["asset_id"]}}}}
```

## The AssetBalanceResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"AssetBalanceResponse":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"},"offchainOutbound":{"type":"number","description":"Off-chain outbound balance"},"offchainInbound":{"type":"number","description":"Off-chain inbound balance"}}}}}}
```

## The IssueAssetNiaRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"IssueAssetNiaRequestModel":{"type":"object","properties":{"ticker":{"type":"string","description":"Asset ticker symbol"},"name":{"type":"string","description":"Asset name"},"amounts":{"type":"array","items":{"type":"number"},"description":"Initial amounts to issue"},"precision":{"type":"number","description":"Decimal precision"}},"required":["ticker","name","amounts","precision"]}}}}
```

## The AssetNIA object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"AssetNIA":{"type":"object","properties":{"asset_id":{"type":"string"},"assetIface":{"type":"string","enum":["RGB20","RGB21","RGB25"]},"ticker":{"type":"string"},"name":{"type":"string"},"details":{"type":"string"},"precision":{"type":"number"},"issued_supply":{"type":"number"},"timestamp":{"type":"number"},"added_at":{"type":"number"},"balance":{"$ref":"#/components/schemas/BtcBalance"},"media":{"$ref":"#/components/schemas/Media"}}},"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]},"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}}}}}
```

## The IssueAssetIfaRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"IssueAssetIfaRequestModel":{"type":"object","properties":{"ticker":{"type":"string","description":"Asset ticker symbol"},"name":{"type":"string","description":"Asset name"},"precision":{"type":"number","description":"Decimal precision"},"amounts":{"type":"array","items":{"type":"number"},"description":"Initial amounts to issue"},"inflation_amounts":{"type":"array","items":{"type":"number"},"description":"Inflation amounts"},"replace_rights_num":{"type":"number","description":"Number of replace rights"},"reject_list_url":{"type":"string","description":"Reject list URL"}},"required":["ticker","name","precision","amounts","inflation_amounts","replace_rights_num"]}}}}
```

## The AssetIfa object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"AssetIfa":{"type":"object","properties":{"asset_id":{"type":"string"},"ticker":{"type":"string"},"name":{"type":"string"},"details":{"type":"string"},"precision":{"type":"number"},"initial_supply":{"type":"number"},"max_supply":{"type":"number"},"known_circulating_supply":{"type":"number"},"timestamp":{"type":"number"},"added_at":{"type":"number"},"balance":{"$ref":"#/components/schemas/Balance"},"media":{"$ref":"#/components/schemas/Media"},"reject_list_url":{"type":"string"}},"required":["asset_id","ticker","name","precision","initial_supply","max_supply","known_circulating_supply","timestamp","added_at","balance"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]},"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}}}}}
```

## The Media object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}}}}}
```

## The InflateAssetIfaRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"InflateAssetIfaRequestModel":{"type":"object","properties":{"asset_id":{"type":"string","description":"Asset ID to inflate"},"inflation_amounts":{"type":"array","items":{"type":"number"},"description":"Amounts to inflate"},"fee_rate":{"type":"number","description":"Fee rate in sat/vB"},"min_confirmations":{"type":"number","description":"Minimum confirmations","default":1}},"required":["asset_id","inflation_amounts"]}}}}
```

## The InflateEndRequestModel object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"InflateEndRequestModel":{"type":"object","properties":{"signed_psbt":{"type":"string","description":"Signed PSBT in base64"}},"required":["signed_psbt"]}}}}
```

## The OperationResult object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"OperationResult":{"type":"object","properties":{"txid":{"type":"string","description":"Transaction ID"},"batch_transfer_idx":{"type":"number","description":"Batch transfer index"}},"required":["txid","batch_transfer_idx"]}}}}
```

## The ListAssetsResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"ListAssetsResponse":{"type":"object","properties":{"nia":{"type":"array","items":{"$ref":"#/components/schemas/AssetNIA"}},"uda":{"type":"array","items":{"$ref":"#/components/schemas/AssetNIA"}},"cfa":{"type":"array","items":{"$ref":"#/components/schemas/AssetNIA"}}}},"AssetNIA":{"type":"object","properties":{"asset_id":{"type":"string"},"assetIface":{"type":"string","enum":["RGB20","RGB21","RGB25"]},"ticker":{"type":"string"},"name":{"type":"string"},"details":{"type":"string"},"precision":{"type":"number"},"issued_supply":{"type":"number"},"timestamp":{"type":"number"},"added_at":{"type":"number"},"balance":{"$ref":"#/components/schemas/BtcBalance"},"media":{"$ref":"#/components/schemas/Media"}}},"BtcBalance":{"type":"object","properties":{"vanilla":{"$ref":"#/components/schemas/Balance"},"colored":{"$ref":"#/components/schemas/Balance"}},"required":["vanilla","colored"]},"Balance":{"type":"object","properties":{"settled":{"type":"number","description":"Settled balance"},"future":{"type":"number","description":"Future balance"},"spendable":{"type":"number","description":"Spendable balance"}},"required":["settled","future","spendable"]},"Media":{"type":"object","properties":{"filePath":{"type":"string"},"mime":{"type":"string"}}}}}}
```

## The DecodeRgbInvoiceRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"DecodeRgbInvoiceRequest":{"type":"object","properties":{"invoice":{"type":"string","description":"RGB invoice string to decode"}},"required":["invoice"]}}}}
```

## The DecodeRgbInvoiceResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"DecodeRgbInvoiceResponse":{"type":"object","properties":{"recipient_id":{"type":"string","description":"Recipient ID"},"asset_schema":{"type":"string","description":"Asset schema type"},"asset_id":{"type":"string","description":"Asset ID"},"network":{"type":"string","description":"Network name"},"assignment":{"$ref":"#/components/schemas/Assignment"},"assignment_name":{"type":"string","description":"Assignment name"},"expiration_timestamp":{"type":"number","description":"Expiration timestamp"},"transport_endpoints":{"type":"array","items":{"type":"string"},"description":"Transport endpoints"}},"required":["recipient_id","network","assignment","transport_endpoints"]},"Assignment":{"type":"object","additionalProperties":true,"description":"Assignment data (key-value pairs)"}}}}
```

## The Assignment object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Assignment":{"type":"object","additionalProperties":true,"description":"Assignment data (key-value pairs)"}}}}
```

## The Transaction object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"Transaction":{"type":"object","properties":{"transaction_type":{"type":"number","enum":[0,1,2,3],"description":"0=RGB_SEND, 1=DRAIN, 2=CREATE_UTXOS, 3=USER"},"txid":{"type":"string"},"received":{"type":"number"},"sent":{"type":"number"},"fee":{"type":"number"},"confirmation_time":{"type":"object","properties":{"height":{"type":"number"},"timestamp":{"type":"number"}}}},"required":["transaction_type","txid","received","sent","fee"]}}}}
```

## The ListTransfersRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"ListTransfersRequest":{"type":"object","properties":{"asset_id":{"type":"string","description":"Asset ID"}},"required":["asset_id"]}}}}
```

## The RgbTransfer object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"RgbTransfer":{"type":"object","properties":{"idx":{"type":"number"},"batch_transfer_idx":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"},"status":{"type":"number","enum":[0,1,2,3],"description":"0=WAITING_COUNTERPARTY, 1=WAITING_CONFIRMATIONS, 2=SETTLED, 3=FAILED"},"amount":{"type":"number"},"kind":{"type":"number","enum":[0,1,2,3,4],"description":"Transfer kind: 0=ISSUANCE, 1=RECEIVE_BLIND, 2=RECEIVE_WITNESS, 3=SEND, 4=INFLATION"},"txid":{"type":"string","nullable":true},"recipient_id":{"type":"string"},"receive_utxo":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"required":["txid","vout"]},"change_utxo":{"type":"object","properties":{"txid":{"type":"string"},"vout":{"type":"number"}},"nullable":true},"expiration":{"type":"number"},"transport_endpoints":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"transport_type":{"type":"number"},"used":{"type":"boolean"}},"required":["endpoint","transport_type","used"]}}},"required":["idx","batch_transfer_idx","created_at","updated_at","status","amount","kind","recipient_id","receive_utxo","expiration","transport_endpoints"]}}}}
```

## The FailTransfersRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"FailTransfersRequest":{"type":"object","properties":{"batch_transfer_idx":{"type":"number","description":"Batch transfer index"},"no_asset_only":{"type":"boolean","description":"Fail only transfers with no asset","default":false},"skip_sync":{"type":"boolean","description":"Skip wallet sync","default":false}},"required":["batch_transfer_idx"]}}}}
```

## The CreateBackupRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"CreateBackupRequest":{"type":"object","properties":{"password":{"type":"string","description":"Backup password"}},"required":["password"]}}}}
```

## The WalletBackupResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"WalletBackupResponse":{"type":"object","properties":{"message":{"type":"string"},"download_url":{"type":"string"}},"required":["message","download_url"]}}}}
```

## The RestoreWalletRequest object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"RestoreWalletRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Wallet backup file"},"password":{"type":"string","description":"Backup password"},"xpub_van":{"type":"string","description":"Vanilla extended public key (optional)"},"xpub_col":{"type":"string","description":"Colored extended public key (optional)"},"master_fingerprint":{"type":"string","description":"Master fingerprint (optional)"}},"required":["file","password"]}}}}
```

## The WalletRestoreResponse object

```json
{"openapi":"3.0.3","info":{"title":"RGB Node API","version":"1.2.7"},"components":{"schemas":{"WalletRestoreResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}
```
