diff --git a/openapi.yaml b/openapi.yaml index fe0e87d1..f500ba0e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.3 +openapi: 3.1.0 info: title: RGB Lightning Node description: |- @@ -978,18 +978,28 @@ components: schemas: AddressResponse: type: object + required: + - address properties: address: type: string example: bcrt1qnc5y6j6dmejrkwy93farhvpezk0lf46gk7aecs AssetBalanceRequest: type: object + required: + - asset_id properties: asset_id: type: string example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 AssetBalanceResponse: type: object + required: + - settled + - future + - spendable + - offchain_outbound + - offchain_inbound properties: settled: type: integer @@ -1008,6 +1018,14 @@ components: example: 0 AssetCFA: type: object + required: + - asset_id + - name + - precision + - issued_supply + - timestamp + - added_at + - balance properties: asset_id: type: string @@ -1016,7 +1034,9 @@ components: type: string example: Collectible details: - type: string + type: + - string + - 'null' example: asset details precision: type: integer @@ -1033,15 +1053,27 @@ components: balance: $ref: '#/components/schemas/AssetBalanceResponse' media: - $ref: '#/components/schemas/Media' + oneOf: + - $ref: '#/components/schemas/Media' + - type: 'null' AssetMetadataRequest: type: object + required: + - asset_id properties: asset_id: type: string example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 AssetMetadataResponse: type: object + required: + - asset_schema + - initial_supply + - max_supply + - known_circulating_supply + - timestamp + - name + - precision properties: asset_schema: $ref: '#/components/schemas/AssetSchema' @@ -1064,15 +1096,30 @@ components: type: integer example: 0 ticker: - type: string + type: + - string + - 'null' example: USDT details: - type: string + type: + - string + - 'null' example: asset details token: - $ref: '#/components/schemas/Token' + oneOf: + - $ref: '#/components/schemas/Token' + - type: 'null' AssetNIA: type: object + required: + - asset_id + - ticker + - name + - precision + - issued_supply + - timestamp + - added_at + - balance properties: asset_id: type: string @@ -1084,7 +1131,9 @@ components: type: string example: Tether details: - type: string + type: + - string + - 'null' example: asset details precision: type: integer @@ -1101,7 +1150,9 @@ components: balance: $ref: '#/components/schemas/AssetBalanceResponse' media: - $ref: '#/components/schemas/Media' + oneOf: + - $ref: '#/components/schemas/Media' + - type: 'null' AssetSchema: type: string enum: @@ -1110,6 +1161,14 @@ components: - Cfa AssetUDA: type: object + required: + - asset_id + - ticker + - name + - precision + - timestamp + - added_at + - balance properties: asset_id: type: string @@ -1121,7 +1180,9 @@ components: type: string example: Unique details: - type: string + type: + - string + - 'null' example: asset details precision: type: integer @@ -1135,7 +1196,9 @@ components: balance: $ref: '#/components/schemas/AssetBalanceResponse' token: - $ref: '#/components/schemas/TokenLight' + oneOf: + - $ref: '#/components/schemas/TokenLight' + - type: 'null' Assignment: oneOf: - $ref: '#/components/schemas/AssignmentFungible' @@ -1153,14 +1216,17 @@ components: Any: '#/components/schemas/AssignmentAny' AssignmentAny: type: object - required: [type] + required: + - type properties: type: type: string enum: [Any] AssignmentFungible: type: object - required: [type, value] + required: + - type + - value properties: type: type: string @@ -1173,7 +1239,9 @@ components: value: 42 AssignmentInflationRight: type: object - required: [type, value] + required: + - type + - value properties: type: type: string @@ -1183,20 +1251,25 @@ components: example: 200 AssignmentNonFungible: type: object - required: [type] + required: + - type properties: type: type: string enum: [NonFungible] AssignmentReplaceRight: type: object - required: [type] + required: + - type properties: type: type: string enum: [ReplaceRight] BackupRequest: type: object + required: + - backup_path + - password properties: backup_path: type: string @@ -1215,6 +1288,9 @@ components: - Regtest BlockTime: type: object + required: + - height + - timestamp properties: height: type: integer @@ -1224,6 +1300,10 @@ components: example: 1691160659 BtcBalance: type: object + required: + - settled + - future + - spendable properties: settled: type: integer @@ -1236,12 +1316,17 @@ components: example: 777000 BtcBalanceRequest: type: object + required: + - skip_sync properties: skip_sync: type: boolean example: false BtcBalanceResponse: type: object + required: + - vanilla + - colored properties: vanilla: $ref: '#/components/schemas/BtcBalance' @@ -1249,6 +1334,9 @@ components: $ref: '#/components/schemas/BtcBalance' ChangePasswordRequest: type: object + required: + - old_password + - new_password properties: old_password: type: string @@ -1258,21 +1346,40 @@ components: example: nodenewpassword Channel: type: object + required: + - channel_id + - peer_pubkey + - status + - ready + - capacity_sat + - local_balance_sat + - outbound_balance_msat + - inbound_balance_msat + - next_outbound_htlc_limit_msat + - next_outbound_htlc_minimum_msat + - is_usable + - public properties: channel_id: type: string example: 8129afe1b1d7cf60d5e1bf4c04b09bec925ed4df5417ceee0484e24f816a105a funding_txid: - type: string + type: + - string + - 'null' example: 5a106a814fe28404eece1754dfd45e92ec9bb0044cbfe1d560cfd7b1e1af2981 peer_pubkey: type: string example: 03b79a4bc1ec365524b4fab9a39eb133753646babb5a1da5c4bc94c53110b7795d peer_alias: - type: string + type: + - string + - 'null' example: null short_channel_id: - type: integer + type: + - integer + - 'null' example: 120946279120896 status: $ref: '#/components/schemas/ChannelStatus' @@ -1304,13 +1411,19 @@ components: type: boolean example: true asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 asset_local_amount: - type: integer + type: + - integer + - 'null' example: 777 asset_remote_amount: - type: integer + type: + - integer + - 'null' example: 0 ChannelStatus: type: string @@ -1320,23 +1433,33 @@ components: - Closing CheckIndexerUrlRequest: type: object + required: + - indexer_url properties: indexer_url: type: string example: 127.0.0.1:50001 CheckIndexerUrlResponse: type: object + required: + - indexer_protocol properties: indexer_protocol: $ref: '#/components/schemas/IndexerProtocol' CheckProxyEndpointRequest: type: object + required: + - proxy_endpoint properties: - proxy_url: + proxy_endpoint: type: string example: rpc://127.0.0.1:3000/json-rpc CloseChannelRequest: type: object + required: + - channel_id + - peer_pubkey + - force properties: channel_id: type: string @@ -1349,39 +1472,59 @@ components: example: false ConnectPeerRequest: type: object + required: + - peer_pubkey_and_addr properties: peer_pubkey_and_addr: type: string example: 03b79a4bc1ec365524b4fab9a39eb133753646babb5a1da5c4bc94c53110b7795d@localhost:9736 CreateUtxosRequest: type: object + required: + - up_to + - fee_rate + - skip_sync properties: up_to: type: boolean example: false num: - type: integer + type: + - integer + - 'null' example: 4 size: - type: integer + type: + - integer + - 'null' example: 32500 fee_rate: - type: number + type: integer example: 5 skip_sync: type: boolean example: false DecodeLNInvoiceRequest: type: object + required: + - invoice properties: invoice: type: string example: lnbcrt30u1pjv6yzndqud3jxktt5w46x7unfv9kz6mn0v3jsnp4qdpc280eur52luxppv6f3nnj8l6vnd9g2hnv3qv6mjhmhvlzf6327pp5tjjasx6g9dqptea3fhm6yllq5wxzycnnvp8l6wcq3d6j2uvpryuqsp5l8az8x3g8fe05dg7cmgddld3da09nfjvky8xftwsk4cj8p2l7kfq9qyysgqcqpcxqzdylzlwfnkyw3jv344x4rzwgkk53ng0fhxy5rdduk4g5tpvea8xa6rfckkza35va28xjn2tqkhgarcxep5umm4x5k56wfcdvu95eq7qzp20vrl4xz76syapsa3c09j7lg5gerkaj63llj0ark7ph8hfketn6fkqzm8laf66dhsncm23wkwm5l5377we9e8lnlknnkwje5eefkccusqm6rqt8 DecodeLNInvoiceResponse: type: object + required: + - expiry_sec + - timestamp + - payment_hash + - payment_secret + - network properties: amt_msat: - type: integer + type: + - integer + - 'null' example: 3000000 expiry_sec: type: integer @@ -1390,10 +1533,14 @@ components: type: integer example: 1691160659 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 asset_amount: - type: integer + type: + - integer + - 'null' example: 42 payment_hash: type: string @@ -1402,18 +1549,28 @@ components: type: string example: f9fa239a283a72fa351ec6d0d6fdb16f5e59a64cb10e64add0b57123855ff592 payee_pubkey: - type: string + type: + - string + - 'null' example: 0343851df9e0e8aff0c10b3498ce723ff4c9b4a855e6c8819adcafbbb3e24ea2af network: $ref: '#/components/schemas/BitcoinNetwork' DecodeRGBInvoiceRequest: type: object + required: + - invoice properties: invoice: type: string example: rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/RWhwUfTMpuP2Zfx1~j4nswCANGeJrYOqDcKelaMV4zU/~/bcrt:utxob:cbgHUJ4e-7QyKY4U-Jsj5AZw-oI0gxZh-7fxQY2_-tFFUAZN-4CgpX?expiry=1749906951&endpoints=rpcs://proxy.iriswallet.com/0.2/json-rpc DecodeRGBInvoiceResponse: type: object + required: + - recipient_id + - recipient_type + - assignment + - network + - transport_endpoints properties: recipient_id: type: string @@ -1421,16 +1578,22 @@ components: recipient_type: $ref: '#/components/schemas/RecipientType' asset_schema: - $ref: '#/components/schemas/AssetSchema' + oneOf: + - $ref: '#/components/schemas/AssetSchema' + - type: 'null' asset_id: - type: string + type: + - string + - 'null' example: rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE assignment: $ref: '#/components/schemas/Assignment' network: $ref: '#/components/schemas/BitcoinNetwork' expiration_timestamp: - type: integer + type: + - integer + - 'null' example: 1698325849 transport_endpoints: type: array @@ -1439,12 +1602,17 @@ components: example: rpcs://proxy.iriswallet.com/0.2/json-rpc DisconnectPeerRequest: type: object + required: + - peer_pubkey properties: peer_pubkey: type: string example: 03b79a4bc1ec365524b4fab9a39eb133753646babb5a1da5c4bc94c53110b7795d EmbeddedMedia: type: object + required: + - mime + - data properties: mime: type: string @@ -1458,21 +1626,30 @@ components: type: object EstimateFeeRequest: type: object + required: + - blocks properties: blocks: type: integer example: 7 EstimateFeeResponse: type: object + required: + - fee_rate properties: fee_rate: type: number example: 9.3 FailTransfersRequest: type: object + required: + - no_asset_only + - skip_sync properties: batch_transfer_idx: - type: integer + type: + - integer + - 'null' example: null no_asset_only: type: boolean @@ -1482,47 +1659,64 @@ components: example: false FailTransfersResponse: type: object + required: + - transfers_changed properties: transfers_changed: type: boolean example: true GetAssetMediaRequest: type: object + required: + - digest properties: digest: type: string example: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 GetAssetMediaResponse: type: object + required: + - bytes_hex properties: bytes_hex: type: string example: 68656c6c6f0a GetChannelIdRequest: type: object + required: + - temporary_channel_id properties: temporary_channel_id: type: string example: a8b60c8ce3067b5fc881d4831323e24751daec3b64353c8df3205ec5d838f1c5 GetChannelIdResponse: type: object + required: + - channel_id properties: channel_id: type: string example: 8129afe1b1d7cf60d5e1bf4c04b09bec925ed4df5417ceee0484e24f816a105a GetPaymentRequest: type: object + required: + - payment_hash properties: payment_hash: type: string example: 5ca5d81b482b4015e7b14df7a27fe0a38c226273604ffd3b008b752571811938 GetPaymentResponse: type: object + required: + - payment properties: payment: $ref: '#/components/schemas/Payment' GetSwapRequest: type: object + required: + - payment_hash + - taker properties: payment_hash: type: string @@ -1532,6 +1726,8 @@ components: example: false GetSwapResponse: type: object + required: + - swap properties: swap: $ref: '#/components/schemas/Swap' @@ -1548,15 +1744,21 @@ components: - Esplora InitRequest: type: object + required: + - password properties: password: type: string example: nodepassword mnemonic: - type: string + type: + - string + - 'null' example: skill lamp please gown put season degree collect decline account monitor insane InitResponse: type: object + required: + - mnemonic properties: mnemonic: type: string @@ -1570,17 +1772,25 @@ components: - Expired InvoiceStatusRequest: type: object + required: + - invoice properties: invoice: type: string example: lnbcrt30u1pjv6yzndqud3jxktt5w46x7unfv9kz6mn0v3jsnp4qdpc280eur52luxppv6f3nnj8l6vnd9g2hnv3qv6mjhmhvlzf6327pp5tjjasx6g9dqptea3fhm6yllq5wxzycnnvp8l6wcq3d6j2uvpryuqsp5l8az8x3g8fe05dg7cmgddld3da09nfjvky8xftwsk4cj8p2l7kfq9qyysgqcqpcxqzdylzlwfnkyw3jv344x4rzwgkk53ng0fhxy5rdduk4g5tpvea8xa6rfckkza35va28xjn2tqkhgarcxep5umm4x5k56wfcdvu95eq7qzp20vrl4xz76syapsa3c09j7lg5gerkaj63llj0ark7ph8hfketn6fkqzm8laf66dhsncm23wkwm5l5377we9e8lnlknnkwje5eefkccusqm6rqt8 InvoiceStatusResponse: type: object + required: + - status properties: status: $ref: '#/components/schemas/InvoiceStatus' IssueAssetCFARequest: type: object + required: + - amounts + - name + - precision properties: amounts: type: array @@ -1591,21 +1801,32 @@ components: type: string example: Tether details: - type: string + type: + - string + - 'null' example: asset details precision: type: integer example: 0 file_digest: - type: string + type: + - string + - 'null' example: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 IssueAssetCFAResponse: type: object + required: + - asset properties: asset: $ref: '#/components/schemas/AssetCFA' IssueAssetNIARequest: type: object + required: + - amounts + - ticker + - name + - precision properties: amounts: type: array @@ -1623,11 +1844,18 @@ components: example: 0 IssueAssetNIAResponse: type: object + required: + - asset properties: asset: $ref: '#/components/schemas/AssetNIA' IssueAssetUDARequest: type: object + required: + - ticker + - name + - precision + - attachments_file_digests properties: ticker: type: string @@ -1636,13 +1864,17 @@ components: type: string example: Unique details: - type: string + type: + - string + - 'null' example: asset details precision: type: integer example: 0 media_file_digest: - type: string + type: + - string + - 'null' example: /path/to/media attachments_file_digests: type: array @@ -1651,11 +1883,16 @@ components: example: [ 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03, d7516e3a27cdf35aa9dcb323b5f556344ef7f57570be30b88de2bfd4ba339b1a ] IssueAssetUDAResponse: type: object + required: + - asset properties: asset: $ref: '#/components/schemas/AssetUDA' KeysendRequest: type: object + required: + - dest_pubkey + - amt_msat properties: dest_pubkey: type: string @@ -1664,13 +1901,21 @@ components: type: integer example: 3000000 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 asset_amount: - type: integer + type: + - integer + - 'null' example: 42 KeysendResponse: type: object + required: + - payment_hash + - payment_preimage + - status properties: payment_hash: type: string @@ -1682,6 +1927,8 @@ components: $ref: '#/components/schemas/HTLCStatus' ListAssetsRequest: type: object + required: + - filter_asset_schemas properties: filter_asset_schemas: type: array @@ -1690,21 +1937,33 @@ components: example: [ Nia, Uda, Cfa ] ListAssetsResponse: type: object + required: + - nia + - uda + - cfa properties: nia: - type: array + type: + - array + - 'null' items: $ref: '#/components/schemas/AssetNIA' uda: - type: array + type: + - array + - 'null' items: $ref: '#/components/schemas/AssetUDA' cfa: - type: array + type: + - array + - 'null' items: $ref: '#/components/schemas/AssetCFA' ListChannelsResponse: type: object + required: + - channels properties: channels: type: array @@ -1712,6 +1971,8 @@ components: $ref: '#/components/schemas/Channel' ListPaymentsResponse: type: object + required: + - payments properties: payments: type: array @@ -1719,6 +1980,8 @@ components: $ref: '#/components/schemas/Payment' ListPeersResponse: type: object + required: + - peers properties: peers: type: array @@ -1726,6 +1989,9 @@ components: $ref: '#/components/schemas/Peer' ListSwapsResponse: type: object + required: + - maker + - taker properties: maker: type: array @@ -1737,12 +2003,16 @@ components: $ref: '#/components/schemas/Swap' ListTransactionsRequest: type: object + required: + - skip_sync properties: skip_sync: type: boolean example: false ListTransactionsResponse: type: object + required: + - transactions properties: transactions: type: array @@ -1750,12 +2020,16 @@ components: $ref: '#/components/schemas/Transaction' ListTransfersRequest: type: object + required: + - asset_id properties: asset_id: type: string example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 ListTransfersResponse: type: object + required: + - transfers properties: transfers: type: array @@ -1763,12 +2037,16 @@ components: $ref: '#/components/schemas/Transfer' ListUnspentsRequest: type: object + required: + - skip_sync properties: skip_sync: type: boolean example: false ListUnspentsResponse: type: object + required: + - unspents properties: unspents: type: array @@ -1776,39 +2054,57 @@ components: $ref: '#/components/schemas/Unspent' LNInvoiceRequest: type: object + required: + - expiry_sec properties: amt_msat: - type: integer + type: + - integer + - 'null' example: 3000000 expiry_sec: type: integer example: 420 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 asset_amount: - type: integer + type: + - integer + - 'null' example: 42 LNInvoiceResponse: type: object + required: + - invoice properties: invoice: type: string example: lnbcrt30u1pjv6yzndqud3jxktt5w46x7unfv9kz6mn0v3jsnp4qdpc280eur52luxppv6f3nnj8l6vnd9g2hnv3qv6mjhmhvlzf6327pp5tjjasx6g9dqptea3fhm6yllq5wxzycnnvp8l6wcq3d6j2uvpryuqsp5l8az8x3g8fe05dg7cmgddld3da09nfjvky8xftwsk4cj8p2l7kfq9qyysgqcqpcxqzdylzlwfnkyw3jv344x4rzwgkk53ng0fhxy5rdduk4g5tpvea8xa6rfckkza35va28xjn2tqkhgarcxep5umm4x5k56wfcdvu95eq7qzp20vrl4xz76syapsa3c09j7lg5gerkaj63llj0ark7ph8hfketn6fkqzm8laf66dhsncm23wkwm5l5377we9e8lnlknnkwje5eefkccusqm6rqt8 MakerExecuteRequest: type: object + required: + - swapstring + - payment_secret + - taker_pubkey properties: swapstring: - type: string - example: 30/rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8/10/rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/1715896416/9d342c6ba006e24abee84a2e034a22d5e30c1f2599fb9c3574d46d3cde3d65a2 + type: string + example: 30/rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8/10/rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/1715896416/9d342c6ba006e24abee84a2e034a22d5e30c1f2599fb9c3574d46d3cde3d65a2 payment_secret: - type: string - example: 777a7756c620868199ed5fdc35bee4095b5709d543e5c2bf0494396bf27d2ea2 + type: string + example: 777a7756c620868199ed5fdc35bee4095b5709d543e5c2bf0494396bf27d2ea2 taker_pubkey: type: string example: 02270dadcd6e7ba0ef707dac72acccae1a3607453a8dd2aef36ff3be4e0d31f043 MakerInitRequest: type: object + required: + - qty_from + - qty_to + - timeout_sec properties: qty_from: type: integer @@ -1817,37 +2113,55 @@ components: type: integer example: 10 from_asset: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 to_asset: - type: string + type: + - string + - 'null' example: rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE timeout_sec: type: integer example: 100 MakerInitResponse: type: object + required: + - payment_hash + - payment_secret + - swapstring properties: payment_hash: - type: string - example: 3febfae1e68b190c15461f4c2a3290f9af1dae63fd7d620d2bd61601869026cd + type: string + example: 3febfae1e68b190c15461f4c2a3290f9af1dae63fd7d620d2bd61601869026cd payment_secret: - type: string - example: 777a7756c620868199ed5fdc35bee4095b5709d543e5c2bf0494396bf27d2ea2 + type: string + example: 777a7756c620868199ed5fdc35bee4095b5709d543e5c2bf0494396bf27d2ea2 swapstring: - type: string - example: 30/rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8/10/rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/1715896416/9d342c6ba006e24abee84a2e034a22d5e30c1f2599fb9c3574d46d3cde3d65a2 + type: string + example: 30/rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8/10/rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/1715896416/9d342c6ba006e24abee84a2e034a22d5e30c1f2599fb9c3574d46d3cde3d65a2 Media: type: object + required: + - file_path + - digest + - mime properties: file_path: type: string example: /path/to/media + digest: + type: string + example: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 mime: type: string example: text/plain NetworkInfoResponse: type: object + required: + - network + - height properties: network: $ref: '#/components/schemas/BitcoinNetwork' @@ -1856,6 +2170,25 @@ components: example: 805434 NodeInfoResponse: type: object + required: + - pubkey + - num_channels + - num_usable_channels + - local_balance_sat + - eventual_close_fees_sat + - pending_outbound_payments_sat + - num_peers + - account_xpub_vanilla + - account_xpub_colored + - max_media_upload_size_mb + - rgb_htlc_min_msat + - rgb_channel_capacity_min_sat + - channel_capacity_min_sat + - channel_capacity_max_sat + - channel_asset_min_amount + - channel_asset_max_amount + - network_nodes + - network_channels properties: pubkey: type: string @@ -1913,6 +2246,12 @@ components: example: 7812821 OpenChannelRequest: type: object + required: + - peer_pubkey_and_opt_addr + - capacity_sat + - push_msat + - public + - with_anchors properties: peer_pubkey_and_opt_addr: type: string @@ -1924,10 +2263,14 @@ components: type: integer example: 1394000 asset_amount: - type: integer + type: + - integer + - 'null' example: 333 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 public: type: boolean @@ -1936,31 +2279,52 @@ components: type: boolean example: true fee_base_msat: - type: integer + type: + - integer + - 'null' example: 1000 fee_proportional_millionths: - type: integer + type: + - integer + - 'null' example: 0 temporary_channel_id: - type: string + type: + - string + - 'null' example: a8b60c8ce3067b5fc881d4831323e24751daec3b64353c8df3205ec5d838f1c5 OpenChannelResponse: type: object + required: + - temporary_channel_id properties: temporary_channel_id: type: string example: a8b60c8ce3067b5fc881d4831323e24751daec3b64353c8df3205ec5d838f1c5 Payment: type: object + required: + - payment_hash + - inbound + - status + - created_at + - updated_at + - payee_pubkey properties: amt_msat: - type: integer + type: + - integer + - 'null' example: 3000000 asset_amount: - type: integer + type: + - integer + - 'null' example: 42 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 payment_hash: type: string @@ -1976,32 +2340,38 @@ components: updated_at: type: integer example: 1691162674 - expires_at: - type: integer - example: 1691162674 payee_pubkey: type: string example: 03b79a4bc1ec365524b4fab9a39eb133753646babb5a1da5c4bc94c53110b7795d Peer: type: object + required: + - pubkey properties: pubkey: type: string example: 03b79a4bc1ec365524b4fab9a39eb133753646babb5a1da5c4bc94c53110b7795d PostAssetMediaRequest: type: object + required: + - file properties: file: type: string format: binary PostAssetMediaResponse: type: object + required: + - digest properties: digest: type: string example: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 ProofOfReserves: type: object + required: + - utxo + - proof properties: utxo: type: string @@ -2013,12 +2383,18 @@ components: example: [6, 36, 87, 13, 5, 17] Recipient: type: object + required: + - recipient_id + - assignment + - transport_endpoints properties: recipient_id: type: string example: bcrt:utxob:2FZsSuk-iyVQLVuU4-Gc6J4qkE8-mLS17N4jd-MEx6cWz9F-MFkyE1n witness_data: - $ref: '#/components/schemas/WitnessData' + oneOf: + - $ref: '#/components/schemas/WitnessData' + - type: 'null' assignment: $ref: '#/components/schemas/Assignment' transport_endpoints: @@ -2033,12 +2409,17 @@ components: - Witness RefreshRequest: type: object + required: + - skip_sync properties: skip_sync: type: boolean example: false RestoreRequest: type: object + required: + - backup_path + - password properties: backup_path: type: string @@ -2048,40 +2429,60 @@ components: example: nodepassword RevokeTokenRequest: type: object + required: + - token properties: token: type: string example: EnYKDBgDIggKBggGEgIYDRIkCAASICqCgqtFMIJ1eLCM3raDzqg9UqV-6nJWzGjjJG0S5IIUGkBpF-itmppHcdcSrSCiKklz9VZT4UmIND_0RFc32Imq3bLR_Y7GYaSpJo5lJfU1cA2BG_hy7P1UN4g5jKTKS88GIiIKIAUKXrrx0Ca-rMZa537VOFw2X8q_KVQ6OC4Z0ztro0sQ RgbAllocation: type: object + required: + - assignment + - settled properties: asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 assignment: - $ref: '#/components/schemas/AssignmentFungible' + $ref: '#/components/schemas/Assignment' settled: type: boolean example: false RgbInvoiceRequest: type: object + required: + - min_confirmations + - witness properties: min_confirmations: type: integer example: 1 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 assignment: - $ref: '#/components/schemas/Assignment' + oneOf: + - $ref: '#/components/schemas/Assignment' + - type: 'null' duration_seconds: - type: integer + type: + - integer + - 'null' example: 86400 witness: type: boolean example: false RgbInvoiceResponse: type: object + required: + - recipient_id + - invoice + - batch_transfer_idx properties: recipient_id: type: string @@ -2090,13 +2491,20 @@ components: type: string example: rgb:~/~/~/bcrt:utxob:cbgHUJ4e-7QyKY4U-Jsj5AZw-oI0gxZh-7fxQY2_-tFFUAZN-4CgpX?expiry=1695811760&endpoints=rpc://127.0.0.1:3000/json-rpc expiration_timestamp: - type: integer + type: + - integer + - 'null' example: 1695811760 batch_transfer_idx: type: integer example: 1 SendBtcRequest: type: object + required: + - amount + - address + - fee_rate + - skip_sync properties: amount: type: integer @@ -2105,19 +2513,25 @@ components: type: string example: bcrt1qwxht5tut39dws8tjcf649tp908r8fr2j75c94k fee_rate: - type: number + type: integer example: 5 skip_sync: type: boolean example: false SendBtcResponse: type: object + required: + - txid properties: txid: type: string example: 7c2c95b9c2aa0a7d140495b664de7973b76561de833f0dd84def3efa08941664 SendOnionMessageRequest: type: object + required: + - node_ids + - tlv_type + - data properties: node_ids: type: array @@ -2132,38 +2546,62 @@ components: example: message to send SendPaymentRequest: type: object + required: + - invoice properties: invoice: type: string example: lnbcrt30u1pjv6yzndqud3jxktt5w46x7unfv9kz6mn0v3jsnp4qdpc280eur52luxppv6f3nnj8l6vnd9g2hnv3qv6mjhmhvlzf6327pp5tjjasx6g9dqptea3fhm6yllq5wxzycnnvp8l6wcq3d6j2uvpryuqsp5l8az8x3g8fe05dg7cmgddld3da09nfjvky8xftwsk4cj8p2l7kfq9qyysgqcqpcxqzdylzlwfnkyw3jv344x4rzwgkk53ng0fhxy5rdduk4g5tpvea8xa6rfckkza35va28xjn2tqkhgarcxep5umm4x5k56wfcdvu95eq7qzp20vrl4xz76syapsa3c09j7lg5gerkaj63llj0ark7ph8hfketn6fkqzm8laf66dhsncm23wkwm5l5377we9e8lnlknnkwje5eefkccusqm6rqt8 amt_msat: - type: integer + type: + - integer + - 'null' example: 3000000 asset_id: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 asset_amount: - type: integer + type: + - integer + - 'null' example: 100 SendPaymentResponse: type: object + required: + - payment_id + - status properties: - payment_hash: + payment_id: type: string example: 3febfae1e68b190c15461f4c2a3290f9af1dae63fd7d620d2bd61601869026cd + payment_hash: + type: + - string + - 'null' + example: 3febfae1e68b190c15461f4c2a3290f9af1dae63fd7d620d2bd61601869026cd payment_secret: - type: string + type: + - string + - 'null' example: 777a7756c620868199ed5fdc35bee4095b5709d543e5c2bf0494396bf27d2ea2 status: $ref: '#/components/schemas/HTLCStatus' SendRgbRequest: type: object + required: + - donation + - fee_rate + - min_confirmations + - recipient_map + - skip_sync properties: donation: type: boolean example: false fee_rate: - type: number + type: integer example: 5 min_confirmations: type: integer @@ -2197,24 +2635,37 @@ components: example: false SendRgbResponse: type: object + required: + - txid properties: txid: type: string example: 7c2c95b9c2aa0a7d140495b664de7973b76561de833f0dd84def3efa08941664 SignMessageRequest: type: object + required: + - message properties: message: type: string example: message to sign SignMessageResponse: type: object + required: + - signed_message properties: signed_message: type: string example: signed message Swap: type: object + required: + - qty_from + - qty_to + - payment_hash + - status + - requested_at + - expires_at properties: qty_from: type: integer @@ -2223,10 +2674,14 @@ components: type: integer example: 10 from_asset: - type: string + type: + - string + - 'null' example: rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8 to_asset: - type: string + type: + - string + - 'null' example: rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE payment_hash: type: string @@ -2237,13 +2692,17 @@ components: type: integer example: 1691160765 initiated_at: - type: integer + type: + - integer + - 'null' example: 1691168512 expires_at: type: integer example: 1691172703 completed_at: - type: integer + type: + - integer + - 'null' example: 1691171075 SwapStatus: type: string @@ -2255,29 +2714,44 @@ components: - Failed TakerRequest: type: object + required: + - swapstring properties: swapstring: - type: string - example: 30/rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8/10/rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/1715896416/9d342c6ba006e24abee84a2e034a22d5e30c1f2599fb9c3574d46d3cde3d65a2 + type: string + example: 30/rgb:CJkb4YZw-jRiz2sk-~PARPio-wtVYI1c-XAEYCqO-wTfvRZ8/10/rgb:icfqnK9y-wObZKTu-XJcDL98-sKbE5Mh-OuDJhiI-brRJrzE/1715896416/9d342c6ba006e24abee84a2e034a22d5e30c1f2599fb9c3574d46d3cde3d65a2 Token: type: object + required: + - index + - attachments properties: index: type: integer example: 0 ticker: - type: string + type: + - string + - 'null' example: TKN name: - type: string + type: + - string + - 'null' example: Token details: - type: string + type: + - string + - 'null' example: token details embedded_media: - $ref: '#/components/schemas/EmbeddedMedia' + oneOf: + - $ref: '#/components/schemas/EmbeddedMedia' + - type: 'null' media: - $ref: '#/components/schemas/Media' + oneOf: + - $ref: '#/components/schemas/Media' + - type: 'null' attachments: type: object additionalProperties: @@ -2286,27 +2760,42 @@ components: 0: { file_path: path/to/attachment0, digest: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03, mime: text/plain } 1: { file_path: path/to/attachment1, digest: d7516e3a27cdf35aa9dcb323b5f556344ef7f57570be30b88de2bfd4ba339b1a, mime: image/png } reserves: - $ref: '#/components/schemas/ProofOfReserves' + oneOf: + - $ref: '#/components/schemas/ProofOfReserves' + - type: 'null' TokenLight: type: object + required: + - index + - embedded_media + - attachments + - reserves properties: index: type: integer example: 0 ticker: - type: string + type: + - string + - 'null' example: TKN name: - type: string + type: + - string + - 'null' example: Token details: - type: string + type: + - string + - 'null' example: token details embedded_media: type: boolean example: true media: - $ref: '#/components/schemas/Media' + oneOf: + - $ref: '#/components/schemas/Media' + - type: 'null' attachments: type: object additionalProperties: @@ -2319,6 +2808,12 @@ components: example: false Transaction: type: object + required: + - transaction_type + - txid + - received + - sent + - fee properties: transaction_type: $ref: '#/components/schemas/TransactionType' @@ -2335,7 +2830,9 @@ components: type: integer example: 100 confirmation_time: - $ref: '#/components/schemas/BlockTime' + oneOf: + - $ref: '#/components/schemas/BlockTime' + - type: 'null' TransactionType: type: string enum: @@ -2345,6 +2842,14 @@ components: - User Transfer: type: object + required: + - idx + - created_at + - updated_at + - status + - assignments + - kind + - transport_endpoints properties: idx: type: integer @@ -2358,27 +2863,39 @@ components: status: $ref: '#/components/schemas/TransferStatus' requested_assignment: - $ref: '#/components/schemas/AssignmentFungible' + oneOf: + - $ref: '#/components/schemas/Assignment' + - type: 'null' assignments: type: array items: - $ref: '#/components/schemas/AssignmentFungible' + $ref: '#/components/schemas/Assignment' kind: $ref: '#/components/schemas/TransferKind' txid: - type: string + type: + - string + - 'null' example: 7c2c95b9c2aa0a7d140495b664de7973b76561de833f0dd84def3efa08941664 recipient_id: - type: string + type: + - string + - 'null' example: 61qsVbWtkNmU54F2i6qtB9uSmEGsPoaeypCi5uC5uctZ receive_utxo: - type: string + type: + - string + - 'null' example: efed66f5309396ff43c8a09941c8103d9d5bbffd473ad9f13013ac89fb6b4671:0 change_utxo: - type: string + type: + - string + - 'null' example: null expiration: - type: integer + type: + - integer + - 'null' example: 1691171612 transport_endpoints: type: array @@ -2402,6 +2919,10 @@ components: - Failed TransferTransportEndpoint: type: object + required: + - endpoint + - transport_type + - used properties: endpoint: type: string @@ -2417,6 +2938,13 @@ components: - JsonRpc UnlockRequest: type: object + required: + - password + - bitcoind_rpc_username + - bitcoind_rpc_password + - bitcoind_rpc_host + - bitcoind_rpc_port + - announce_addresses properties: password: type: string @@ -2434,10 +2962,14 @@ components: type: integer example: 18443 indexer_url: - type: string + type: + - string + - 'null' example: 127.0.0.1:50001 proxy_endpoint: - type: string + type: + - string + - 'null' example: rpc://127.0.0.1:3000/json-rpc announce_addresses: type: array @@ -2445,10 +2977,15 @@ components: type: string example: pub.addr.example.com:9735 announce_alias: - type: string + type: + - string + - 'null' example: nodeAlias Unspent: type: object + required: + - utxo + - rgb_allocations properties: utxo: $ref: '#/components/schemas/Utxo' @@ -2458,6 +2995,10 @@ components: $ref: '#/components/schemas/RgbAllocation' Utxo: type: object + required: + - outpoint + - btc_amount + - colorable properties: outpoint: type: string @@ -2470,12 +3011,16 @@ components: example: true WitnessData: type: object + required: + - amount_sat properties: amount_sat: - type: number + type: integer example: 1000 blinding: - type: number + type: + - integer + - 'null' example: 439017309 securitySchemes: bearerAuth: