tapass 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (600) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2886 -2
  3. package/dist/grpc/emit_subscription_error.d.ts +21 -0
  4. package/dist/grpc/emit_subscription_error.d.ts.map +1 -0
  5. package/dist/grpc/emit_subscription_error.js +26 -0
  6. package/dist/grpc/emit_subscription_error.js.map +1 -0
  7. package/dist/grpc/grpc_services.d.ts +46 -0
  8. package/dist/grpc/grpc_services.d.ts.map +1 -0
  9. package/dist/grpc/grpc_services.js +45 -0
  10. package/dist/grpc/grpc_services.js.map +1 -0
  11. package/dist/grpc/handle_remove_listener.d.ts +18 -0
  12. package/dist/grpc/handle_remove_listener.d.ts.map +1 -0
  13. package/dist/grpc/handle_remove_listener.js +22 -0
  14. package/dist/grpc/handle_remove_listener.js.map +1 -0
  15. package/dist/grpc/index.d.ts +32 -0
  16. package/dist/grpc/index.d.ts.map +1 -0
  17. package/dist/grpc/index.js +6 -0
  18. package/dist/grpc/index.js.map +1 -0
  19. package/dist/index.d.ts +25 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +3 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/tapd_grpc/api_for_proto.d.ts +28 -0
  24. package/dist/tapd_grpc/api_for_proto.d.ts.map +1 -0
  25. package/dist/tapd_grpc/api_for_proto.js +24 -0
  26. package/dist/tapd_grpc/api_for_proto.js.map +1 -0
  27. package/dist/tapd_grpc/authenticated_tapd_grpc.d.ts +35 -0
  28. package/dist/tapd_grpc/authenticated_tapd_grpc.d.ts.map +1 -0
  29. package/dist/tapd_grpc/authenticated_tapd_grpc.js +76 -0
  30. package/dist/tapd_grpc/authenticated_tapd_grpc.js.map +1 -0
  31. package/dist/tapd_grpc/decode_serialized.d.ts +18 -0
  32. package/dist/tapd_grpc/decode_serialized.d.ts.map +1 -0
  33. package/dist/tapd_grpc/decode_serialized.js +23 -0
  34. package/dist/tapd_grpc/decode_serialized.js.map +1 -0
  35. package/dist/tapd_grpc/grpc_credentials.d.ts +24 -0
  36. package/dist/tapd_grpc/grpc_credentials.d.ts.map +1 -0
  37. package/dist/tapd_grpc/grpc_credentials.js +39 -0
  38. package/dist/tapd_grpc/grpc_credentials.js.map +1 -0
  39. package/dist/tapd_grpc/grpc_options.d.ts +10 -0
  40. package/dist/tapd_grpc/grpc_options.d.ts.map +1 -0
  41. package/dist/tapd_grpc/grpc_options.js +9 -0
  42. package/dist/tapd_grpc/grpc_options.js.map +1 -0
  43. package/dist/tapd_grpc/grpc_ssl.d.ts +19 -0
  44. package/dist/tapd_grpc/grpc_ssl.d.ts.map +1 -0
  45. package/dist/tapd_grpc/grpc_ssl.js +18 -0
  46. package/dist/tapd_grpc/grpc_ssl.js.map +1 -0
  47. package/dist/tapd_grpc/index.d.ts +6 -0
  48. package/dist/tapd_grpc/index.d.ts.map +1 -0
  49. package/dist/tapd_grpc/index.js +2 -0
  50. package/dist/tapd_grpc/index.js.map +1 -0
  51. package/dist/tapd_grpc/types.d.ts +35 -0
  52. package/dist/tapd_grpc/types.d.ts.map +1 -0
  53. package/dist/tapd_grpc/types.js +2 -0
  54. package/dist/tapd_grpc/types.js.map +1 -0
  55. package/dist/tapd_methods/address/create_asset_address.d.ts +52 -0
  56. package/dist/tapd_methods/address/create_asset_address.d.ts.map +1 -0
  57. package/dist/tapd_methods/address/create_asset_address.js +127 -0
  58. package/dist/tapd_methods/address/create_asset_address.js.map +1 -0
  59. package/dist/tapd_methods/address/decode_asset_address.d.ts +38 -0
  60. package/dist/tapd_methods/address/decode_asset_address.d.ts.map +1 -0
  61. package/dist/tapd_methods/address/decode_asset_address.js +81 -0
  62. package/dist/tapd_methods/address/decode_asset_address.js.map +1 -0
  63. package/dist/tapd_methods/address/get_asset_addresses.d.ts +54 -0
  64. package/dist/tapd_methods/address/get_asset_addresses.d.ts.map +1 -0
  65. package/dist/tapd_methods/address/get_asset_addresses.js +153 -0
  66. package/dist/tapd_methods/address/get_asset_addresses.js.map +1 -0
  67. package/dist/tapd_methods/address/get_asset_receives.d.ts +72 -0
  68. package/dist/tapd_methods/address/get_asset_receives.d.ts.map +1 -0
  69. package/dist/tapd_methods/address/get_asset_receives.js +191 -0
  70. package/dist/tapd_methods/address/get_asset_receives.js.map +1 -0
  71. package/dist/tapd_methods/address/index.d.ts +15 -0
  72. package/dist/tapd_methods/address/index.d.ts.map +1 -0
  73. package/dist/tapd_methods/address/index.js +6 -0
  74. package/dist/tapd_methods/address/index.js.map +1 -0
  75. package/dist/tapd_methods/address/subscribe_to_asset_receives.d.ts +53 -0
  76. package/dist/tapd_methods/address/subscribe_to_asset_receives.d.ts.map +1 -0
  77. package/dist/tapd_methods/address/subscribe_to_asset_receives.js +93 -0
  78. package/dist/tapd_methods/address/subscribe_to_asset_receives.js.map +1 -0
  79. package/dist/tapd_methods/assets/get_asset_balances.d.ts +64 -0
  80. package/dist/tapd_methods/assets/get_asset_balances.d.ts.map +1 -0
  81. package/dist/tapd_methods/assets/get_asset_balances.js +177 -0
  82. package/dist/tapd_methods/assets/get_asset_balances.js.map +1 -0
  83. package/dist/tapd_methods/assets/get_asset_burns.d.ts +40 -0
  84. package/dist/tapd_methods/assets/get_asset_burns.d.ts.map +1 -0
  85. package/dist/tapd_methods/assets/get_asset_burns.js +92 -0
  86. package/dist/tapd_methods/assets/get_asset_burns.js.map +1 -0
  87. package/dist/tapd_methods/assets/get_asset_groups.d.ts +35 -0
  88. package/dist/tapd_methods/assets/get_asset_groups.d.ts.map +1 -0
  89. package/dist/tapd_methods/assets/get_asset_groups.js +78 -0
  90. package/dist/tapd_methods/assets/get_asset_groups.js.map +1 -0
  91. package/dist/tapd_methods/assets/get_asset_metadata.d.ts +40 -0
  92. package/dist/tapd_methods/assets/get_asset_metadata.d.ts.map +1 -0
  93. package/dist/tapd_methods/assets/get_asset_metadata.js +99 -0
  94. package/dist/tapd_methods/assets/get_asset_metadata.js.map +1 -0
  95. package/dist/tapd_methods/assets/get_asset_utxos.d.ts +83 -0
  96. package/dist/tapd_methods/assets/get_asset_utxos.d.ts.map +1 -0
  97. package/dist/tapd_methods/assets/get_asset_utxos.js +135 -0
  98. package/dist/tapd_methods/assets/get_asset_utxos.js.map +1 -0
  99. package/dist/tapd_methods/assets/get_assets.d.ts +113 -0
  100. package/dist/tapd_methods/assets/get_assets.d.ts.map +1 -0
  101. package/dist/tapd_methods/assets/get_assets.js +243 -0
  102. package/dist/tapd_methods/assets/get_assets.js.map +1 -0
  103. package/dist/tapd_methods/assets/index.d.ts +19 -0
  104. package/dist/tapd_methods/assets/index.d.ts.map +1 -0
  105. package/dist/tapd_methods/assets/index.js +7 -0
  106. package/dist/tapd_methods/assets/index.js.map +1 -0
  107. package/dist/tapd_methods/channels/asset_payment_args_error.d.ts +18 -0
  108. package/dist/tapd_methods/channels/asset_payment_args_error.d.ts.map +1 -0
  109. package/dist/tapd_methods/channels/asset_payment_args_error.js +59 -0
  110. package/dist/tapd_methods/channels/asset_payment_args_error.js.map +1 -0
  111. package/dist/tapd_methods/channels/asset_payment_request.d.ts +68 -0
  112. package/dist/tapd_methods/channels/asset_payment_request.d.ts.map +1 -0
  113. package/dist/tapd_methods/channels/asset_payment_request.js +54 -0
  114. package/dist/tapd_methods/channels/asset_payment_request.js.map +1 -0
  115. package/dist/tapd_methods/channels/create_asset_invoice.d.ts +134 -0
  116. package/dist/tapd_methods/channels/create_asset_invoice.d.ts.map +1 -0
  117. package/dist/tapd_methods/channels/create_asset_invoice.js +264 -0
  118. package/dist/tapd_methods/channels/create_asset_invoice.js.map +1 -0
  119. package/dist/tapd_methods/channels/decode_asset_payment_request.d.ts +72 -0
  120. package/dist/tapd_methods/channels/decode_asset_payment_request.d.ts.map +1 -0
  121. package/dist/tapd_methods/channels/decode_asset_payment_request.js +143 -0
  122. package/dist/tapd_methods/channels/decode_asset_payment_request.js.map +1 -0
  123. package/dist/tapd_methods/channels/emit_asset_payment.d.ts +30 -0
  124. package/dist/tapd_methods/channels/emit_asset_payment.d.ts.map +1 -0
  125. package/dist/tapd_methods/channels/emit_asset_payment.js +59 -0
  126. package/dist/tapd_methods/channels/emit_asset_payment.js.map +1 -0
  127. package/dist/tapd_methods/channels/encode_asset_custom_records.d.ts +51 -0
  128. package/dist/tapd_methods/channels/encode_asset_custom_records.d.ts.map +1 -0
  129. package/dist/tapd_methods/channels/encode_asset_custom_records.js +127 -0
  130. package/dist/tapd_methods/channels/encode_asset_custom_records.js.map +1 -0
  131. package/dist/tapd_methods/channels/get_asset_invoices.d.ts +84 -0
  132. package/dist/tapd_methods/channels/get_asset_invoices.d.ts.map +1 -0
  133. package/dist/tapd_methods/channels/get_asset_invoices.js +193 -0
  134. package/dist/tapd_methods/channels/get_asset_invoices.js.map +1 -0
  135. package/dist/tapd_methods/channels/get_asset_payments.d.ts +69 -0
  136. package/dist/tapd_methods/channels/get_asset_payments.d.ts.map +1 -0
  137. package/dist/tapd_methods/channels/get_asset_payments.js +180 -0
  138. package/dist/tapd_methods/channels/get_asset_payments.js.map +1 -0
  139. package/dist/tapd_methods/channels/index.d.ts +31 -0
  140. package/dist/tapd_methods/channels/index.d.ts.map +1 -0
  141. package/dist/tapd_methods/channels/index.js +12 -0
  142. package/dist/tapd_methods/channels/index.js.map +1 -0
  143. package/dist/tapd_methods/channels/open_asset_channel.d.ts +53 -0
  144. package/dist/tapd_methods/channels/open_asset_channel.d.ts.map +1 -0
  145. package/dist/tapd_methods/channels/open_asset_channel.js +128 -0
  146. package/dist/tapd_methods/channels/open_asset_channel.js.map +1 -0
  147. package/dist/tapd_methods/channels/pay_asset_invoice.d.ts +95 -0
  148. package/dist/tapd_methods/channels/pay_asset_invoice.d.ts.map +1 -0
  149. package/dist/tapd_methods/channels/pay_asset_invoice.js +132 -0
  150. package/dist/tapd_methods/channels/pay_asset_invoice.js.map +1 -0
  151. package/dist/tapd_methods/channels/send_asset_keysend.d.ts +84 -0
  152. package/dist/tapd_methods/channels/send_asset_keysend.d.ts.map +1 -0
  153. package/dist/tapd_methods/channels/send_asset_keysend.js +144 -0
  154. package/dist/tapd_methods/channels/send_asset_keysend.js.map +1 -0
  155. package/dist/tapd_methods/channels/send_asset_payment.d.ts +33 -0
  156. package/dist/tapd_methods/channels/send_asset_payment.d.ts.map +1 -0
  157. package/dist/tapd_methods/channels/send_asset_payment.js +114 -0
  158. package/dist/tapd_methods/channels/send_asset_payment.js.map +1 -0
  159. package/dist/tapd_methods/channels/subscribe_to_asset_invoices.d.ts +51 -0
  160. package/dist/tapd_methods/channels/subscribe_to_asset_invoices.d.ts.map +1 -0
  161. package/dist/tapd_methods/channels/subscribe_to_asset_invoices.js +104 -0
  162. package/dist/tapd_methods/channels/subscribe_to_asset_invoices.js.map +1 -0
  163. package/dist/tapd_methods/channels/subscribe_to_asset_payments.d.ts +59 -0
  164. package/dist/tapd_methods/channels/subscribe_to_asset_payments.d.ts.map +1 -0
  165. package/dist/tapd_methods/channels/subscribe_to_asset_payments.js +104 -0
  166. package/dist/tapd_methods/channels/subscribe_to_asset_payments.js.map +1 -0
  167. package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.d.ts +62 -0
  168. package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.d.ts.map +1 -0
  169. package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.js +106 -0
  170. package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.js.map +1 -0
  171. package/dist/tapd_methods/daemon/create_tapd_macaroon.d.ts +45 -0
  172. package/dist/tapd_methods/daemon/create_tapd_macaroon.d.ts.map +1 -0
  173. package/dist/tapd_methods/daemon/create_tapd_macaroon.js +99 -0
  174. package/dist/tapd_methods/daemon/create_tapd_macaroon.js.map +1 -0
  175. package/dist/tapd_methods/daemon/index.d.ts +8 -0
  176. package/dist/tapd_methods/daemon/index.d.ts.map +1 -0
  177. package/dist/tapd_methods/daemon/index.js +4 -0
  178. package/dist/tapd_methods/daemon/index.js.map +1 -0
  179. package/dist/tapd_methods/daemon/set_tapd_debug_level.d.ts +23 -0
  180. package/dist/tapd_methods/daemon/set_tapd_debug_level.d.ts.map +1 -0
  181. package/dist/tapd_methods/daemon/set_tapd_debug_level.js +60 -0
  182. package/dist/tapd_methods/daemon/set_tapd_debug_level.js.map +1 -0
  183. package/dist/tapd_methods/daemon/stop_tapd.d.ts +16 -0
  184. package/dist/tapd_methods/daemon/stop_tapd.d.ts.map +1 -0
  185. package/dist/tapd_methods/daemon/stop_tapd.js +50 -0
  186. package/dist/tapd_methods/daemon/stop_tapd.js.map +1 -0
  187. package/dist/tapd_methods/index.d.ts +10 -0
  188. package/dist/tapd_methods/index.d.ts.map +1 -0
  189. package/dist/tapd_methods/index.js +10 -0
  190. package/dist/tapd_methods/index.js.map +1 -0
  191. package/dist/tapd_methods/info/get_tapd_info.d.ts +44 -0
  192. package/dist/tapd_methods/info/get_tapd_info.d.ts.map +1 -0
  193. package/dist/tapd_methods/info/get_tapd_info.js +80 -0
  194. package/dist/tapd_methods/info/get_tapd_info.js.map +1 -0
  195. package/dist/tapd_methods/info/index.d.ts +4 -0
  196. package/dist/tapd_methods/info/index.d.ts.map +1 -0
  197. package/dist/tapd_methods/info/index.js +2 -0
  198. package/dist/tapd_methods/info/index.js.map +1 -0
  199. package/dist/tapd_methods/mint/add_asset_to_mint_batch.d.ts +124 -0
  200. package/dist/tapd_methods/mint/add_asset_to_mint_batch.d.ts.map +1 -0
  201. package/dist/tapd_methods/mint/add_asset_to_mint_batch.js +283 -0
  202. package/dist/tapd_methods/mint/add_asset_to_mint_batch.js.map +1 -0
  203. package/dist/tapd_methods/mint/cancel_mint_batch.d.ts +23 -0
  204. package/dist/tapd_methods/mint/cancel_mint_batch.d.ts.map +1 -0
  205. package/dist/tapd_methods/mint/cancel_mint_batch.js +62 -0
  206. package/dist/tapd_methods/mint/cancel_mint_batch.js.map +1 -0
  207. package/dist/tapd_methods/mint/finalize_mint_batch.d.ts +64 -0
  208. package/dist/tapd_methods/mint/finalize_mint_batch.d.ts.map +1 -0
  209. package/dist/tapd_methods/mint/finalize_mint_batch.js +130 -0
  210. package/dist/tapd_methods/mint/finalize_mint_batch.js.map +1 -0
  211. package/dist/tapd_methods/mint/fund_mint_batch.d.ts +82 -0
  212. package/dist/tapd_methods/mint/fund_mint_batch.d.ts.map +1 -0
  213. package/dist/tapd_methods/mint/fund_mint_batch.js +145 -0
  214. package/dist/tapd_methods/mint/fund_mint_batch.js.map +1 -0
  215. package/dist/tapd_methods/mint/get_mint_batches.d.ts +72 -0
  216. package/dist/tapd_methods/mint/get_mint_batches.d.ts.map +1 -0
  217. package/dist/tapd_methods/mint/get_mint_batches.js +123 -0
  218. package/dist/tapd_methods/mint/get_mint_batches.js.map +1 -0
  219. package/dist/tapd_methods/mint/index.d.ts +21 -0
  220. package/dist/tapd_methods/mint/index.d.ts.map +1 -0
  221. package/dist/tapd_methods/mint/index.js +8 -0
  222. package/dist/tapd_methods/mint/index.js.map +1 -0
  223. package/dist/tapd_methods/mint/seal_mint_batch.d.ts +64 -0
  224. package/dist/tapd_methods/mint/seal_mint_batch.d.ts.map +1 -0
  225. package/dist/tapd_methods/mint/seal_mint_batch.js +135 -0
  226. package/dist/tapd_methods/mint/seal_mint_batch.js.map +1 -0
  227. package/dist/tapd_methods/mint/subscribe_to_mint_events.d.ts +52 -0
  228. package/dist/tapd_methods/mint/subscribe_to_mint_events.d.ts.map +1 -0
  229. package/dist/tapd_methods/mint/subscribe_to_mint_events.js +91 -0
  230. package/dist/tapd_methods/mint/subscribe_to_mint_events.js.map +1 -0
  231. package/dist/tapd_methods/proofs/decode_asset_proof.d.ts +61 -0
  232. package/dist/tapd_methods/proofs/decode_asset_proof.d.ts.map +1 -0
  233. package/dist/tapd_methods/proofs/decode_asset_proof.js +129 -0
  234. package/dist/tapd_methods/proofs/decode_asset_proof.js.map +1 -0
  235. package/dist/tapd_methods/proofs/export_asset_proof.d.ts +39 -0
  236. package/dist/tapd_methods/proofs/export_asset_proof.d.ts.map +1 -0
  237. package/dist/tapd_methods/proofs/export_asset_proof.js +113 -0
  238. package/dist/tapd_methods/proofs/export_asset_proof.js.map +1 -0
  239. package/dist/tapd_methods/proofs/index.d.ts +13 -0
  240. package/dist/tapd_methods/proofs/index.d.ts.map +1 -0
  241. package/dist/tapd_methods/proofs/index.js +5 -0
  242. package/dist/tapd_methods/proofs/index.js.map +1 -0
  243. package/dist/tapd_methods/proofs/unpack_asset_proof_file.d.ts +29 -0
  244. package/dist/tapd_methods/proofs/unpack_asset_proof_file.d.ts.map +1 -0
  245. package/dist/tapd_methods/proofs/unpack_asset_proof_file.js +85 -0
  246. package/dist/tapd_methods/proofs/unpack_asset_proof_file.js.map +1 -0
  247. package/dist/tapd_methods/proofs/verify_asset_proof.d.ts +58 -0
  248. package/dist/tapd_methods/proofs/verify_asset_proof.d.ts.map +1 -0
  249. package/dist/tapd_methods/proofs/verify_asset_proof.js +110 -0
  250. package/dist/tapd_methods/proofs/verify_asset_proof.js.map +1 -0
  251. package/dist/tapd_methods/rfq/add_asset_buy_offer.d.ts +31 -0
  252. package/dist/tapd_methods/rfq/add_asset_buy_offer.d.ts.map +1 -0
  253. package/dist/tapd_methods/rfq/add_asset_buy_offer.js +88 -0
  254. package/dist/tapd_methods/rfq/add_asset_buy_offer.js.map +1 -0
  255. package/dist/tapd_methods/rfq/add_asset_buy_order.d.ts +79 -0
  256. package/dist/tapd_methods/rfq/add_asset_buy_order.d.ts.map +1 -0
  257. package/dist/tapd_methods/rfq/add_asset_buy_order.js +200 -0
  258. package/dist/tapd_methods/rfq/add_asset_buy_order.js.map +1 -0
  259. package/dist/tapd_methods/rfq/add_asset_sell_offer.d.ts +30 -0
  260. package/dist/tapd_methods/rfq/add_asset_sell_offer.d.ts.map +1 -0
  261. package/dist/tapd_methods/rfq/add_asset_sell_offer.js +87 -0
  262. package/dist/tapd_methods/rfq/add_asset_sell_offer.js.map +1 -0
  263. package/dist/tapd_methods/rfq/add_asset_sell_order.d.ts +79 -0
  264. package/dist/tapd_methods/rfq/add_asset_sell_order.d.ts.map +1 -0
  265. package/dist/tapd_methods/rfq/add_asset_sell_order.js +200 -0
  266. package/dist/tapd_methods/rfq/add_asset_sell_order.js.map +1 -0
  267. package/dist/tapd_methods/rfq/get_accepted_quotes.d.ts +52 -0
  268. package/dist/tapd_methods/rfq/get_accepted_quotes.d.ts.map +1 -0
  269. package/dist/tapd_methods/rfq/get_accepted_quotes.js +100 -0
  270. package/dist/tapd_methods/rfq/get_accepted_quotes.js.map +1 -0
  271. package/dist/tapd_methods/rfq/get_asset_forwards.d.ts +70 -0
  272. package/dist/tapd_methods/rfq/get_asset_forwards.d.ts.map +1 -0
  273. package/dist/tapd_methods/rfq/get_asset_forwards.js +185 -0
  274. package/dist/tapd_methods/rfq/get_asset_forwards.js.map +1 -0
  275. package/dist/tapd_methods/rfq/index.d.ts +19 -0
  276. package/dist/tapd_methods/rfq/index.d.ts.map +1 -0
  277. package/dist/tapd_methods/rfq/index.js +8 -0
  278. package/dist/tapd_methods/rfq/index.js.map +1 -0
  279. package/dist/tapd_methods/rfq/subscribe_to_rfq_events.d.ts +68 -0
  280. package/dist/tapd_methods/rfq/subscribe_to_rfq_events.d.ts.map +1 -0
  281. package/dist/tapd_methods/rfq/subscribe_to_rfq_events.js +107 -0
  282. package/dist/tapd_methods/rfq/subscribe_to_rfq_events.js.map +1 -0
  283. package/dist/tapd_methods/send/burn_asset.d.ts +135 -0
  284. package/dist/tapd_methods/send/burn_asset.d.ts.map +1 -0
  285. package/dist/tapd_methods/send/burn_asset.js +220 -0
  286. package/dist/tapd_methods/send/burn_asset.js.map +1 -0
  287. package/dist/tapd_methods/send/get_asset_transfers.d.ts +73 -0
  288. package/dist/tapd_methods/send/get_asset_transfers.d.ts.map +1 -0
  289. package/dist/tapd_methods/send/get_asset_transfers.js +122 -0
  290. package/dist/tapd_methods/send/get_asset_transfers.js.map +1 -0
  291. package/dist/tapd_methods/send/index.d.ts +15 -0
  292. package/dist/tapd_methods/send/index.d.ts.map +1 -0
  293. package/dist/tapd_methods/send/index.js +6 -0
  294. package/dist/tapd_methods/send/index.js.map +1 -0
  295. package/dist/tapd_methods/send/register_asset_transfer.d.ts +77 -0
  296. package/dist/tapd_methods/send/register_asset_transfer.d.ts.map +1 -0
  297. package/dist/tapd_methods/send/register_asset_transfer.js +165 -0
  298. package/dist/tapd_methods/send/register_asset_transfer.js.map +1 -0
  299. package/dist/tapd_methods/send/send_asset.d.ts +94 -0
  300. package/dist/tapd_methods/send/send_asset.d.ts.map +1 -0
  301. package/dist/tapd_methods/send/send_asset.js +169 -0
  302. package/dist/tapd_methods/send/send_asset.js.map +1 -0
  303. package/dist/tapd_methods/send/subscribe_to_asset_sends.d.ts +117 -0
  304. package/dist/tapd_methods/send/subscribe_to_asset_sends.d.ts.map +1 -0
  305. package/dist/tapd_methods/send/subscribe_to_asset_sends.js +159 -0
  306. package/dist/tapd_methods/send/subscribe_to_asset_sends.js.map +1 -0
  307. package/dist/tapd_requests/decimal_as_fixed_point.d.ts +23 -0
  308. package/dist/tapd_requests/decimal_as_fixed_point.d.ts.map +1 -0
  309. package/dist/tapd_requests/decimal_as_fixed_point.js +31 -0
  310. package/dist/tapd_requests/decimal_as_fixed_point.js.map +1 -0
  311. package/dist/tapd_requests/fee_rate_as_tokens_per_kw.d.ts +13 -0
  312. package/dist/tapd_requests/fee_rate_as_tokens_per_kw.d.ts.map +1 -0
  313. package/dist/tapd_requests/fee_rate_as_tokens_per_kw.js +21 -0
  314. package/dist/tapd_requests/fee_rate_as_tokens_per_kw.js.map +1 -0
  315. package/dist/tapd_requests/index.d.ts +9 -0
  316. package/dist/tapd_requests/index.d.ts.map +1 -0
  317. package/dist/tapd_requests/index.js +9 -0
  318. package/dist/tapd_requests/index.js.map +1 -0
  319. package/dist/tapd_requests/is_connection_failure.d.ts +23 -0
  320. package/dist/tapd_requests/is_connection_failure.d.ts.map +1 -0
  321. package/dist/tapd_requests/is_connection_failure.js +40 -0
  322. package/dist/tapd_requests/is_connection_failure.js.map +1 -0
  323. package/dist/tapd_requests/is_method_unsupported.d.ts +24 -0
  324. package/dist/tapd_requests/is_method_unsupported.d.ts.map +1 -0
  325. package/dist/tapd_requests/is_method_unsupported.js +27 -0
  326. package/dist/tapd_requests/is_method_unsupported.js.map +1 -0
  327. package/dist/tapd_requests/is_permission_denied.d.ts +19 -0
  328. package/dist/tapd_requests/is_permission_denied.d.ts.map +1 -0
  329. package/dist/tapd_requests/is_permission_denied.js +16 -0
  330. package/dist/tapd_requests/is_permission_denied.js.map +1 -0
  331. package/dist/tapd_requests/is_tapd.d.ts +19 -0
  332. package/dist/tapd_requests/is_tapd.d.ts.map +1 -0
  333. package/dist/tapd_requests/is_tapd.js +16 -0
  334. package/dist/tapd_requests/is_tapd.js.map +1 -0
  335. package/dist/tapd_requests/mint_funding_request.d.ts +53 -0
  336. package/dist/tapd_requests/mint_funding_request.d.ts.map +1 -0
  337. package/dist/tapd_requests/mint_funding_request.js +48 -0
  338. package/dist/tapd_requests/mint_funding_request.js.map +1 -0
  339. package/dist/tapd_requests/script_key_type_query.d.ts +26 -0
  340. package/dist/tapd_requests/script_key_type_query.d.ts.map +1 -0
  341. package/dist/tapd_requests/script_key_type_query.js +41 -0
  342. package/dist/tapd_requests/script_key_type_query.js.map +1 -0
  343. package/dist/tapd_responses/asset_channel_rpc_error.d.ts +19 -0
  344. package/dist/tapd_responses/asset_channel_rpc_error.d.ts.map +1 -0
  345. package/dist/tapd_responses/asset_channel_rpc_error.js +69 -0
  346. package/dist/tapd_responses/asset_channel_rpc_error.js.map +1 -0
  347. package/dist/tapd_responses/batch_states.d.ts +4 -0
  348. package/dist/tapd_responses/batch_states.d.ts.map +1 -0
  349. package/dist/tapd_responses/batch_states.js +13 -0
  350. package/dist/tapd_responses/batch_states.js.map +1 -0
  351. package/dist/tapd_responses/fixed_point_as_decimal.d.ts +25 -0
  352. package/dist/tapd_responses/fixed_point_as_decimal.d.ts.map +1 -0
  353. package/dist/tapd_responses/fixed_point_as_decimal.js +39 -0
  354. package/dist/tapd_responses/fixed_point_as_decimal.js.map +1 -0
  355. package/dist/tapd_responses/index.d.ts +76 -0
  356. package/dist/tapd_responses/index.d.ts.map +1 -0
  357. package/dist/tapd_responses/index.js +30 -0
  358. package/dist/tapd_responses/index.js.map +1 -0
  359. package/dist/tapd_responses/long_key_as_number.d.ts +16 -0
  360. package/dist/tapd_responses/long_key_as_number.d.ts.map +1 -0
  361. package/dist/tapd_responses/long_key_as_number.js +28 -0
  362. package/dist/tapd_responses/long_key_as_number.js.map +1 -0
  363. package/dist/tapd_responses/mint_rpc_error.d.ts +19 -0
  364. package/dist/tapd_responses/mint_rpc_error.d.ts.map +1 -0
  365. package/dist/tapd_responses/mint_rpc_error.js +35 -0
  366. package/dist/tapd_responses/mint_rpc_error.js.map +1 -0
  367. package/dist/tapd_responses/outpoint_as_transaction.d.ts +19 -0
  368. package/dist/tapd_responses/outpoint_as_transaction.d.ts.map +1 -0
  369. package/dist/tapd_responses/outpoint_as_transaction.js +23 -0
  370. package/dist/tapd_responses/outpoint_as_transaction.js.map +1 -0
  371. package/dist/tapd_responses/receive_statuses.d.ts +4 -0
  372. package/dist/tapd_responses/receive_statuses.d.ts.map +1 -0
  373. package/dist/tapd_responses/receive_statuses.js +9 -0
  374. package/dist/tapd_responses/receive_statuses.js.map +1 -0
  375. package/dist/tapd_responses/rpc_addr_as_address.d.ts +79 -0
  376. package/dist/tapd_responses/rpc_addr_as_address.d.ts.map +1 -0
  377. package/dist/tapd_responses/rpc_addr_as_address.js +87 -0
  378. package/dist/tapd_responses/rpc_addr_as_address.js.map +1 -0
  379. package/dist/tapd_responses/rpc_addr_event_as_receive.d.ts +63 -0
  380. package/dist/tapd_responses/rpc_addr_event_as_receive.d.ts.map +1 -0
  381. package/dist/tapd_responses/rpc_addr_event_as_receive.js +64 -0
  382. package/dist/tapd_responses/rpc_addr_event_as_receive.js.map +1 -0
  383. package/dist/tapd_responses/rpc_asset_amount_as_amount.d.ts +34 -0
  384. package/dist/tapd_responses/rpc_asset_amount_as_amount.d.ts.map +1 -0
  385. package/dist/tapd_responses/rpc_asset_amount_as_amount.js +38 -0
  386. package/dist/tapd_responses/rpc_asset_amount_as_amount.js.map +1 -0
  387. package/dist/tapd_responses/rpc_asset_as_asset.d.ts +204 -0
  388. package/dist/tapd_responses/rpc_asset_as_asset.d.ts.map +1 -0
  389. package/dist/tapd_responses/rpc_asset_as_asset.js +174 -0
  390. package/dist/tapd_responses/rpc_asset_as_asset.js.map +1 -0
  391. package/dist/tapd_responses/rpc_asset_balance_as_balance.d.ts +53 -0
  392. package/dist/tapd_responses/rpc_asset_balance_as_balance.d.ts.map +1 -0
  393. package/dist/tapd_responses/rpc_asset_balance_as_balance.js +53 -0
  394. package/dist/tapd_responses/rpc_asset_balance_as_balance.js.map +1 -0
  395. package/dist/tapd_responses/rpc_asset_burn_as_burn.d.ts +51 -0
  396. package/dist/tapd_responses/rpc_asset_burn_as_burn.d.ts.map +1 -0
  397. package/dist/tapd_responses/rpc_asset_burn_as_burn.js +54 -0
  398. package/dist/tapd_responses/rpc_asset_burn_as_burn.js.map +1 -0
  399. package/dist/tapd_responses/rpc_asset_invoice_as_invoice.d.ts +39 -0
  400. package/dist/tapd_responses/rpc_asset_invoice_as_invoice.d.ts.map +1 -0
  401. package/dist/tapd_responses/rpc_asset_invoice_as_invoice.js +45 -0
  402. package/dist/tapd_responses/rpc_asset_invoice_as_invoice.js.map +1 -0
  403. package/dist/tapd_responses/rpc_asset_meta_as_metadata.d.ts +68 -0
  404. package/dist/tapd_responses/rpc_asset_meta_as_metadata.d.ts.map +1 -0
  405. package/dist/tapd_responses/rpc_asset_meta_as_metadata.js +70 -0
  406. package/dist/tapd_responses/rpc_asset_meta_as_metadata.js.map +1 -0
  407. package/dist/tapd_responses/rpc_asset_pay_req_as_request.d.ts +76 -0
  408. package/dist/tapd_responses/rpc_asset_pay_req_as_request.d.ts.map +1 -0
  409. package/dist/tapd_responses/rpc_asset_pay_req_as_request.js +73 -0
  410. package/dist/tapd_responses/rpc_asset_pay_req_as_request.js.map +1 -0
  411. package/dist/tapd_responses/rpc_asset_payment_as_payment.d.ts +39 -0
  412. package/dist/tapd_responses/rpc_asset_payment_as_payment.d.ts.map +1 -0
  413. package/dist/tapd_responses/rpc_asset_payment_as_payment.js +45 -0
  414. package/dist/tapd_responses/rpc_asset_payment_as_payment.js.map +1 -0
  415. package/dist/tapd_responses/rpc_batch_as_batch.d.ts +158 -0
  416. package/dist/tapd_responses/rpc_batch_as_batch.d.ts.map +1 -0
  417. package/dist/tapd_responses/rpc_batch_as_batch.js +181 -0
  418. package/dist/tapd_responses/rpc_batch_as_batch.js.map +1 -0
  419. package/dist/tapd_responses/rpc_buy_quote_as_quote.d.ts +83 -0
  420. package/dist/tapd_responses/rpc_buy_quote_as_quote.d.ts.map +1 -0
  421. package/dist/tapd_responses/rpc_buy_quote_as_quote.js +85 -0
  422. package/dist/tapd_responses/rpc_buy_quote_as_quote.js.map +1 -0
  423. package/dist/tapd_responses/rpc_decoded_proof_as_proof.d.ts +161 -0
  424. package/dist/tapd_responses/rpc_decoded_proof_as_proof.d.ts.map +1 -0
  425. package/dist/tapd_responses/rpc_decoded_proof_as_proof.js +138 -0
  426. package/dist/tapd_responses/rpc_decoded_proof_as_proof.js.map +1 -0
  427. package/dist/tapd_responses/rpc_forward_as_asset_forward.d.ts +100 -0
  428. package/dist/tapd_responses/rpc_forward_as_asset_forward.d.ts.map +1 -0
  429. package/dist/tapd_responses/rpc_forward_as_asset_forward.js +101 -0
  430. package/dist/tapd_responses/rpc_forward_as_asset_forward.js.map +1 -0
  431. package/dist/tapd_responses/rpc_grouped_assets_as_group.d.ts +76 -0
  432. package/dist/tapd_responses/rpc_grouped_assets_as_group.d.ts.map +1 -0
  433. package/dist/tapd_responses/rpc_grouped_assets_as_group.js +71 -0
  434. package/dist/tapd_responses/rpc_grouped_assets_as_group.js.map +1 -0
  435. package/dist/tapd_responses/rpc_managed_utxo_as_utxo.d.ts +63 -0
  436. package/dist/tapd_responses/rpc_managed_utxo_as_utxo.d.ts.map +1 -0
  437. package/dist/tapd_responses/rpc_managed_utxo_as_utxo.js +65 -0
  438. package/dist/tapd_responses/rpc_managed_utxo_as_utxo.js.map +1 -0
  439. package/dist/tapd_responses/rpc_receive_event_as_receive_update.d.ts +53 -0
  440. package/dist/tapd_responses/rpc_receive_event_as_receive_update.d.ts.map +1 -0
  441. package/dist/tapd_responses/rpc_receive_event_as_receive_update.js +52 -0
  442. package/dist/tapd_responses/rpc_receive_event_as_receive_update.js.map +1 -0
  443. package/dist/tapd_responses/rpc_rfq_event_as_event.d.ts +70 -0
  444. package/dist/tapd_responses/rpc_rfq_event_as_event.d.ts.map +1 -0
  445. package/dist/tapd_responses/rpc_rfq_event_as_event.js +89 -0
  446. package/dist/tapd_responses/rpc_rfq_event_as_event.js.map +1 -0
  447. package/dist/tapd_responses/rpc_sell_quote_as_quote.d.ts +80 -0
  448. package/dist/tapd_responses/rpc_sell_quote_as_quote.d.ts.map +1 -0
  449. package/dist/tapd_responses/rpc_sell_quote_as_quote.js +85 -0
  450. package/dist/tapd_responses/rpc_sell_quote_as_quote.js.map +1 -0
  451. package/dist/tapd_responses/rpc_send_event_as_send_event.d.ts +124 -0
  452. package/dist/tapd_responses/rpc_send_event_as_send_event.d.ts.map +1 -0
  453. package/dist/tapd_responses/rpc_send_event_as_send_event.js +161 -0
  454. package/dist/tapd_responses/rpc_send_event_as_send_event.js.map +1 -0
  455. package/dist/tapd_responses/rpc_transfer_as_transfer.d.ts +241 -0
  456. package/dist/tapd_responses/rpc_transfer_as_transfer.d.ts.map +1 -0
  457. package/dist/tapd_responses/rpc_transfer_as_transfer.js +212 -0
  458. package/dist/tapd_responses/rpc_transfer_as_transfer.js.map +1 -0
  459. package/dist/tapd_responses/short_channel_id_as_channel.d.ts +13 -0
  460. package/dist/tapd_responses/short_channel_id_as_channel.d.ts.map +1 -0
  461. package/dist/tapd_responses/short_channel_id_as_channel.js +26 -0
  462. package/dist/tapd_responses/short_channel_id_as_channel.js.map +1 -0
  463. package/dist/typescript/index.d.ts +16 -0
  464. package/dist/typescript/index.d.ts.map +1 -0
  465. package/dist/typescript/index.js +2 -0
  466. package/dist/typescript/index.js.map +1 -0
  467. package/package.json +76 -3
  468. package/protos/VERSIONS +2 -0
  469. package/protos/lnrpc/lightning.proto +5380 -0
  470. package/protos/lnrpc/routerrpc/router.proto +1115 -0
  471. package/protos/taprpc/assetwalletrpc/assetwallet.proto +631 -0
  472. package/protos/taprpc/authmailboxrpc/mailbox.proto +281 -0
  473. package/protos/taprpc/mintrpc/mint.proto +452 -0
  474. package/protos/taprpc/portfoliopilotrpc/portfolio_pilot.proto +410 -0
  475. package/protos/taprpc/priceoraclerpc/price_oracle.proto +262 -0
  476. package/protos/taprpc/rfqrpc/rfq.proto +614 -0
  477. package/protos/taprpc/tapchannelrpc/tapchannel.proto +490 -0
  478. package/protos/taprpc/tapcommon.proto +47 -0
  479. package/protos/taprpc/tapdevrpc/tapdev.proto +120 -0
  480. package/protos/taprpc/taprootassets.proto +2117 -0
  481. package/protos/taprpc/universerpc/universe.proto +1101 -0
  482. package/src/grpc/emit_subscription_error.ts +39 -0
  483. package/src/grpc/grpc_services.ts +45 -0
  484. package/src/grpc/handle_remove_listener.ts +35 -0
  485. package/src/grpc/index.ts +18 -0
  486. package/src/index.ts +24 -0
  487. package/src/tapd_grpc/api_for_proto.ts +42 -0
  488. package/src/tapd_grpc/authenticated_tapd_grpc.ts +88 -0
  489. package/src/tapd_grpc/decode_serialized.ts +25 -0
  490. package/src/tapd_grpc/grpc_credentials.ts +48 -0
  491. package/src/tapd_grpc/grpc_options.ts +10 -0
  492. package/src/tapd_grpc/grpc_ssl.ts +20 -0
  493. package/src/tapd_grpc/index.ts +5 -0
  494. package/src/tapd_grpc/types.ts +35 -0
  495. package/src/tapd_methods/address/create_asset_address.ts +179 -0
  496. package/src/tapd_methods/address/decode_asset_address.ts +117 -0
  497. package/src/tapd_methods/address/get_asset_addresses.ts +212 -0
  498. package/src/tapd_methods/address/get_asset_receives.ts +265 -0
  499. package/src/tapd_methods/address/index.ts +14 -0
  500. package/src/tapd_methods/address/subscribe_to_asset_receives.ts +114 -0
  501. package/src/tapd_methods/assets/get_asset_balances.ts +249 -0
  502. package/src/tapd_methods/assets/get_asset_burns.ts +133 -0
  503. package/src/tapd_methods/assets/get_asset_groups.ts +109 -0
  504. package/src/tapd_methods/assets/get_asset_metadata.ts +141 -0
  505. package/src/tapd_methods/assets/get_asset_utxos.ts +175 -0
  506. package/src/tapd_methods/assets/get_assets.ts +327 -0
  507. package/src/tapd_methods/assets/index.ts +18 -0
  508. package/src/tapd_methods/channels/asset_payment_args_error.ts +83 -0
  509. package/src/tapd_methods/channels/asset_payment_request.ts +76 -0
  510. package/src/tapd_methods/channels/create_asset_invoice.ts +387 -0
  511. package/src/tapd_methods/channels/decode_asset_payment_request.ts +192 -0
  512. package/src/tapd_methods/channels/emit_asset_payment.ts +78 -0
  513. package/src/tapd_methods/channels/encode_asset_custom_records.ts +187 -0
  514. package/src/tapd_methods/channels/get_asset_invoices.ts +258 -0
  515. package/src/tapd_methods/channels/get_asset_payments.ts +243 -0
  516. package/src/tapd_methods/channels/index.ts +30 -0
  517. package/src/tapd_methods/channels/open_asset_channel.ts +193 -0
  518. package/src/tapd_methods/channels/pay_asset_invoice.ts +171 -0
  519. package/src/tapd_methods/channels/send_asset_keysend.ts +196 -0
  520. package/src/tapd_methods/channels/send_asset_payment.ts +158 -0
  521. package/src/tapd_methods/channels/subscribe_to_asset_invoices.ts +134 -0
  522. package/src/tapd_methods/channels/subscribe_to_asset_payments.ts +126 -0
  523. package/src/tapd_methods/channels/subscribe_to_past_asset_payment.ts +132 -0
  524. package/src/tapd_methods/daemon/create_tapd_macaroon.ts +153 -0
  525. package/src/tapd_methods/daemon/index.ts +7 -0
  526. package/src/tapd_methods/daemon/set_tapd_debug_level.ts +90 -0
  527. package/src/tapd_methods/daemon/stop_tapd.ts +75 -0
  528. package/src/tapd_methods/index.ts +9 -0
  529. package/src/tapd_methods/info/get_tapd_info.ts +129 -0
  530. package/src/tapd_methods/info/index.ts +3 -0
  531. package/src/tapd_methods/mint/add_asset_to_mint_batch.ts +396 -0
  532. package/src/tapd_methods/mint/cancel_mint_batch.ts +95 -0
  533. package/src/tapd_methods/mint/finalize_mint_batch.ts +181 -0
  534. package/src/tapd_methods/mint/fund_mint_batch.ts +193 -0
  535. package/src/tapd_methods/mint/get_mint_batches.ts +162 -0
  536. package/src/tapd_methods/mint/index.ts +20 -0
  537. package/src/tapd_methods/mint/seal_mint_batch.ts +184 -0
  538. package/src/tapd_methods/mint/subscribe_to_mint_events.ts +104 -0
  539. package/src/tapd_methods/proofs/decode_asset_proof.ts +175 -0
  540. package/src/tapd_methods/proofs/export_asset_proof.ts +169 -0
  541. package/src/tapd_methods/proofs/index.ts +12 -0
  542. package/src/tapd_methods/proofs/unpack_asset_proof_file.ts +126 -0
  543. package/src/tapd_methods/proofs/verify_asset_proof.ts +156 -0
  544. package/src/tapd_methods/rfq/add_asset_buy_offer.ts +127 -0
  545. package/src/tapd_methods/rfq/add_asset_buy_order.ts +279 -0
  546. package/src/tapd_methods/rfq/add_asset_sell_offer.ts +126 -0
  547. package/src/tapd_methods/rfq/add_asset_sell_order.ts +279 -0
  548. package/src/tapd_methods/rfq/get_accepted_quotes.ts +137 -0
  549. package/src/tapd_methods/rfq/get_asset_forwards.ts +259 -0
  550. package/src/tapd_methods/rfq/index.ts +18 -0
  551. package/src/tapd_methods/rfq/subscribe_to_rfq_events.ts +130 -0
  552. package/src/tapd_methods/send/burn_asset.ts +280 -0
  553. package/src/tapd_methods/send/get_asset_transfers.ts +161 -0
  554. package/src/tapd_methods/send/index.ts +14 -0
  555. package/src/tapd_methods/send/register_asset_transfer.ts +219 -0
  556. package/src/tapd_methods/send/send_asset.ts +223 -0
  557. package/src/tapd_methods/send/subscribe_to_asset_sends.ts +181 -0
  558. package/src/tapd_requests/decimal_as_fixed_point.ts +36 -0
  559. package/src/tapd_requests/fee_rate_as_tokens_per_kw.ts +23 -0
  560. package/src/tapd_requests/index.ts +8 -0
  561. package/src/tapd_requests/is_connection_failure.ts +48 -0
  562. package/src/tapd_requests/is_method_unsupported.ts +33 -0
  563. package/src/tapd_requests/is_permission_denied.ts +18 -0
  564. package/src/tapd_requests/is_tapd.ts +22 -0
  565. package/src/tapd_requests/mint_funding_request.ts +57 -0
  566. package/src/tapd_requests/script_key_type_query.ts +44 -0
  567. package/src/tapd_responses/asset_channel_rpc_error.ts +73 -0
  568. package/src/tapd_responses/batch_states.ts +12 -0
  569. package/src/tapd_responses/fixed_point_as_decimal.ts +51 -0
  570. package/src/tapd_responses/index.ts +75 -0
  571. package/src/tapd_responses/long_key_as_number.ts +31 -0
  572. package/src/tapd_responses/mint_rpc_error.ts +39 -0
  573. package/src/tapd_responses/outpoint_as_transaction.ts +25 -0
  574. package/src/tapd_responses/receive_statuses.ts +8 -0
  575. package/src/tapd_responses/rpc_addr_as_address.ts +138 -0
  576. package/src/tapd_responses/rpc_addr_event_as_receive.ts +103 -0
  577. package/src/tapd_responses/rpc_asset_amount_as_amount.ts +57 -0
  578. package/src/tapd_responses/rpc_asset_as_asset.ts +299 -0
  579. package/src/tapd_responses/rpc_asset_balance_as_balance.ts +85 -0
  580. package/src/tapd_responses/rpc_asset_burn_as_burn.ts +85 -0
  581. package/src/tapd_responses/rpc_asset_invoice_as_invoice.ts +62 -0
  582. package/src/tapd_responses/rpc_asset_meta_as_metadata.ts +113 -0
  583. package/src/tapd_responses/rpc_asset_pay_req_as_request.ts +114 -0
  584. package/src/tapd_responses/rpc_asset_payment_as_payment.ts +62 -0
  585. package/src/tapd_responses/rpc_batch_as_batch.ts +281 -0
  586. package/src/tapd_responses/rpc_buy_quote_as_quote.ts +139 -0
  587. package/src/tapd_responses/rpc_decoded_proof_as_proof.ts +229 -0
  588. package/src/tapd_responses/rpc_forward_as_asset_forward.ts +164 -0
  589. package/src/tapd_responses/rpc_grouped_assets_as_group.ts +117 -0
  590. package/src/tapd_responses/rpc_managed_utxo_as_utxo.ts +105 -0
  591. package/src/tapd_responses/rpc_receive_event_as_receive_update.ts +84 -0
  592. package/src/tapd_responses/rpc_rfq_event_as_event.ts +123 -0
  593. package/src/tapd_responses/rpc_sell_quote_as_quote.ts +136 -0
  594. package/src/tapd_responses/rpc_send_event_as_send_event.ts +245 -0
  595. package/src/tapd_responses/rpc_transfer_as_transfer.ts +366 -0
  596. package/src/tapd_responses/short_channel_id_as_channel.ts +30 -0
  597. package/src/typescript/asyncjs_util.d.ts +14 -0
  598. package/src/typescript/index.ts +22 -0
  599. package/src/typescript/invoices.d.ts +30 -0
  600. package/src/typescript/lightning_lnd_responses.d.ts +44 -0
@@ -0,0 +1,410 @@
1
+ syntax = "proto3";
2
+
3
+ package portfoliopilotrpc;
4
+
5
+ option go_package = "github.com/lightninglabs/taproot-assets/taprpc/portfoliopilotrpc";
6
+
7
+ service PortfolioPilot {
8
+ /*
9
+ ResolveRequest resolves a quote request by returning either an accepted
10
+ asset rate or a rejection reason.
11
+ */
12
+ rpc ResolveRequest (ResolveRequestRequest) returns (ResolveRequestResponse);
13
+
14
+ /*
15
+ VerifyAcceptQuote verifies that an accepted quote from a peer meets
16
+ acceptable conditions.
17
+ */
18
+ rpc VerifyAcceptQuote (VerifyAcceptQuoteRequest)
19
+ returns (VerifyAcceptQuoteResponse);
20
+
21
+ /*
22
+ QueryAssetRates returns current asset rate information for a given asset
23
+ and direction. This can be used for rate discovery, outgoing RFQ request
24
+ construction, or general pricing information.
25
+ */
26
+ rpc QueryAssetRates (QueryAssetRatesRequest)
27
+ returns (QueryAssetRatesResponse);
28
+ }
29
+
30
+ // AssetTransferDirection represents the direction of an asset transfer from
31
+ // our perspective for pricing and rate queries.
32
+ enum AssetTransferDirection {
33
+ // ASSET_TRANSFER_DIRECTION_UNSPECIFIED indicates an unspecified direction.
34
+ ASSET_TRANSFER_DIRECTION_UNSPECIFIED = 0;
35
+
36
+ // ASSET_TRANSFER_DIRECTION_BUY indicates we want to buy the asset.
37
+ ASSET_TRANSFER_DIRECTION_BUY = 1;
38
+
39
+ // ASSET_TRANSFER_DIRECTION_SELL indicates we want to sell the asset.
40
+ ASSET_TRANSFER_DIRECTION_SELL = 2;
41
+ }
42
+
43
+ // Intent is an enum informing the portfolio pilot about the intent of the
44
+ // price rate query. This is used to provide context for the asset rates being
45
+ // requested, allowing the pilot to tailor the response based on the specific
46
+ // use case, such as paying an invoice or receiving a payment and the different
47
+ // stages involved in those.
48
+ enum Intent {
49
+ // INTENT_UNSPECIFIED is used to indicate that the intent of the price rate
50
+ // query is not specified. This is the fallback default value and should not
51
+ // be used in production code. It is primarily used for backward
52
+ // compatibility with older versions of the protocol that did not include
53
+ // intent information.
54
+ INTENT_UNSPECIFIED = 0;
55
+
56
+ // INTENT_PAY_INVOICE_HINT is used to indicate that the user is requesting
57
+ // a price rate hint for paying an invoice. This is typically used by the
58
+ // payer of an invoice to provide a suggestion of the expected asset rate to
59
+ // the RFQ peer (edge node) that will determine the actual rate for the
60
+ // payment.
61
+ INTENT_PAY_INVOICE_HINT = 1;
62
+
63
+ // INTENT_PAY_INVOICE is used to indicate that a peer wants to pay an
64
+ // invoice with assets. This is typically used by the edge node that
65
+ // facilitates the swap from assets to BTC for the payer of an invoice. This
66
+ // intent is used to provide the actual asset rate for the payment, which
67
+ // may differ from the hint provided by the payer.
68
+ INTENT_PAY_INVOICE = 2;
69
+
70
+ // INTENT_PAY_INVOICE_QUALIFY is used to indicate that the payer of an
71
+ // invoice has received an asset rate from their RFQ peer (edge node) and is
72
+ // qualifying the rate for the payment. This is typically used by the payer
73
+ // of an invoice to ensure that the asset rate provided by their peer (edge
74
+ // node) is acceptable before proceeding with the payment.
75
+ INTENT_PAY_INVOICE_QUALIFY = 3;
76
+
77
+ // INTENT_RECV_PAYMENT_HINT is used to indicate that the user is requesting
78
+ // a price rate hint for receiving a payment through an invoice. This is
79
+ // typically used by the creator of an invoice to provide a suggestion of
80
+ // the expected asset rate to the RFQ peer (edge node) that will determine
81
+ // the actual rate used for creating an invoice.
82
+ INTENT_RECV_PAYMENT_HINT = 4;
83
+
84
+ // INTENT_RECV_PAYMENT is used to indicate that a peer wants to create an
85
+ // invoice to receive a payment with assets. This is typically used by the
86
+ // edge node that facilitates the swap from BTC to assets for the receiver
87
+ // of a payment. This intent is used to provide the actual asset rate for
88
+ // the invoice creation, which may differ from the hint provided by the
89
+ // receiver.
90
+ INTENT_RECV_PAYMENT = 5;
91
+
92
+ // INTENT_RECV_PAYMENT_QUALIFY is used to indicate that the creator of an
93
+ // invoice received an asset rate from their RFQ peer (edge node) and is
94
+ // qualifying the rate for the creation of the invoice. This is typically
95
+ // used by the creator of an invoice to ensure that the asset rate provided
96
+ // by their peer (edge node) is acceptable before proceeding with creating
97
+ // the invoice.
98
+ INTENT_RECV_PAYMENT_QUALIFY = 6;
99
+ }
100
+
101
+ // ExecutionPolicy specifies how a quote request should be filled.
102
+ enum ExecutionPolicy {
103
+ // EXECUTION_POLICY_IOC (Immediate-Or-Cancel) accepts any partial
104
+ // fill. This is the default policy.
105
+ EXECUTION_POLICY_IOC = 0;
106
+
107
+ // EXECUTION_POLICY_FOK (Fill-Or-Kill) requires the accepted rate
108
+ // to satisfy the full requested amount.
109
+ EXECUTION_POLICY_FOK = 1;
110
+ }
111
+
112
+ // RejectCode represents the possible error codes that can be returned in a
113
+ // ResolveRequestResponse reject result.
114
+ enum RejectCode {
115
+ // REJECT_CODE_UNSPECIFIED indicates an unspecified error.
116
+ REJECT_CODE_UNSPECIFIED = 0;
117
+
118
+ // REJECT_CODE_PRICE_ORACLE_UNAVAILABLE indicates that pricing could not be
119
+ // provided due to an unavailable oracle.
120
+ REJECT_CODE_PRICE_ORACLE_UNAVAILABLE = 1;
121
+
122
+ // REJECT_CODE_MIN_FILL_NOT_MET indicates that the minimum fill
123
+ // constraint was not satisfiable at the accepted rate.
124
+ REJECT_CODE_MIN_FILL_NOT_MET = 2;
125
+
126
+ // REJECT_CODE_PRICE_BOUND_MISS indicates that the accepted rate
127
+ // violated the requester's rate limit constraint.
128
+ REJECT_CODE_PRICE_BOUND_MISS = 3;
129
+
130
+ // REJECT_CODE_FOK_NOT_VIABLE indicates that the FOK execution
131
+ // policy could not be satisfied at the accepted rate.
132
+ REJECT_CODE_FOK_NOT_VIABLE = 4;
133
+
134
+ // REJECT_CODE_FILL_EXCEEDS_MAX indicates that the negotiated
135
+ // fill amount exceeds the requester's maximum.
136
+ REJECT_CODE_FILL_EXCEEDS_MAX = 5;
137
+ }
138
+
139
+ // QuoteRespStatus is an enum that represents the status of a quote response.
140
+ enum QuoteRespStatus {
141
+ // INVALID_ASSET_RATES indicates that at least one asset rate in the
142
+ // quote response is invalid.
143
+ INVALID_ASSET_RATES = 0;
144
+
145
+ // INVALID_EXPIRY indicates that the expiry in the quote response is
146
+ // invalid.
147
+ INVALID_EXPIRY = 1;
148
+
149
+ // PRICE_ORACLE_QUERY_ERR indicates that an error occurred when querying the
150
+ // price oracle whilst evaluating the quote response.
151
+ PRICE_ORACLE_QUERY_ERR = 2;
152
+
153
+ // PORTFOLIO_PILOT_ERR indicates that an unexpected error occurred in the
154
+ // portfolio pilot while evaluating the quote response.
155
+ PORTFOLIO_PILOT_ERR = 3;
156
+
157
+ // VALID_ACCEPT_QUOTE indicates that the accepted quote passed all
158
+ // validation checks successfully.
159
+ VALID_ACCEPT_QUOTE = 4;
160
+
161
+ // MIN_FILL_NOT_MET indicates that the minimum fill constraint was
162
+ // not satisfiable at the accepted rate.
163
+ MIN_FILL_NOT_MET = 5;
164
+
165
+ // RATE_BOUND_MISS indicates that the accepted rate violated the
166
+ // requester's rate limit constraint.
167
+ RATE_BOUND_MISS = 6;
168
+
169
+ // FOK_NOT_VIABLE indicates that the FOK execution policy could
170
+ // not be satisfied at the accepted rate.
171
+ FOK_NOT_VIABLE = 7;
172
+
173
+ // FILL_EXCEEDS_MAX indicates that the negotiated fill amount
174
+ // exceeds the requester's maximum.
175
+ FILL_EXCEEDS_MAX = 8;
176
+ }
177
+
178
+ // RejectErr captures a rejection reason for a quote request.
179
+ message RejectErr {
180
+ // code is the error code.
181
+ RejectCode code = 1;
182
+
183
+ // message is a human-readable error message.
184
+ string message = 2;
185
+ }
186
+
187
+ message AssetSpecifier {
188
+ oneof id {
189
+ // The 32-byte asset ID specified as raw bytes (gRPC only).
190
+ bytes asset_id = 1;
191
+
192
+ // The 32-byte asset ID encoded as a hex string (use this for REST).
193
+ string asset_id_str = 2;
194
+
195
+ // The 32-byte asset group key specified as raw bytes (gRPC only).
196
+ bytes group_key = 3;
197
+
198
+ // The 32-byte asset group key encoded as hex string (use this for
199
+ // REST).
200
+ string group_key_str = 4;
201
+ }
202
+ }
203
+
204
+ // FixedPoint is a scaled integer representation of a fractional number.
205
+ //
206
+ // This type consists of two integer fields: a coefficient and a scale.
207
+ // Using this format enables precise and consistent representation of fractional
208
+ // numbers while avoiding floating-point data types, which are prone to
209
+ // precision errors.
210
+ //
211
+ // The relationship between the fractional representation and its fixed-point
212
+ // representation is expressed as:
213
+ // ```
214
+ // V = F_c / (10^F_s)
215
+ // ```
216
+ // where:
217
+ //
218
+ // * `V` is the fractional value.
219
+ //
220
+ // * `F_c` is the coefficient component of the fixed-point representation. It is
221
+ // the scaled-up fractional value represented as an integer.
222
+ //
223
+ // * `F_s` is the scale component. It is an integer specifying how
224
+ // many decimal places `F_c` should be divided by to obtain the fractional
225
+ // representation.
226
+ message FixedPoint {
227
+ // The coefficient is the fractional value scaled-up as an integer. This
228
+ // integer is represented as a string as it may be too large to fit in a
229
+ // uint64.
230
+ string coefficient = 1;
231
+
232
+ // The scale is the component that determines how many decimal places
233
+ // the coefficient should be divided by to obtain the fractional value.
234
+ uint32 scale = 2;
235
+ }
236
+
237
+ // AssetRate represents the exchange rate of an asset to BTC along with an
238
+ // expiry timestamp in seconds.
239
+ message AssetRate {
240
+ // rate is the asset to BTC conversion rate represented as a fixed-point
241
+ // number.
242
+ FixedPoint rate = 1;
243
+
244
+ // expiry_timestamp is the Unix timestamp in seconds after which the rate
245
+ // is no longer valid.
246
+ uint64 expiry_timestamp = 2;
247
+ }
248
+
249
+ // BuyRequest represents a request to buy the subject asset.
250
+ message BuyRequest {
251
+ // asset_specifier is the subject asset.
252
+ AssetSpecifier asset_specifier = 1;
253
+
254
+ // asset_max_amount is the maximum amount of the asset that the peer must
255
+ // be willing to offer.
256
+ uint64 asset_max_amount = 2;
257
+
258
+ // asset_rate_hint is an optional suggested asset rate for the request.
259
+ AssetRate asset_rate_hint = 3;
260
+
261
+ // price_oracle_metadata is optional metadata for pricing decisions.
262
+ string price_oracle_metadata = 4;
263
+
264
+ // peer_id is the 33-byte public key of the counterparty peer.
265
+ bytes peer_id = 5;
266
+
267
+ // asset_min_amount is an optional minimum asset amount. A value of 0
268
+ // means unset.
269
+ uint64 asset_min_amount = 6;
270
+
271
+ // asset_rate_limit is an optional minimum acceptable rate (asset units
272
+ // per BTC).
273
+ FixedPoint asset_rate_limit = 7;
274
+
275
+ // execution_policy is the optional execution policy for this request.
276
+ ExecutionPolicy execution_policy = 8;
277
+ }
278
+
279
+ // SellRequest represents a request to sell the subject asset.
280
+ message SellRequest {
281
+ // asset_specifier is the subject asset.
282
+ AssetSpecifier asset_specifier = 1;
283
+
284
+ // payment_max_amount is the maximum msat amount that the peer must agree
285
+ // to pay.
286
+ uint64 payment_max_amount = 2;
287
+
288
+ // asset_rate_hint is an optional suggested asset rate for the request.
289
+ AssetRate asset_rate_hint = 3;
290
+
291
+ // price_oracle_metadata is optional metadata for pricing decisions.
292
+ string price_oracle_metadata = 4;
293
+
294
+ // peer_id is the 33-byte public key of the counterparty peer.
295
+ bytes peer_id = 5;
296
+
297
+ // payment_min_amount is an optional minimum msat amount. A value of 0
298
+ // means unset.
299
+ uint64 payment_min_amount = 6;
300
+
301
+ // asset_rate_limit is an optional maximum acceptable rate (asset units
302
+ // per BTC).
303
+ FixedPoint asset_rate_limit = 7;
304
+
305
+ // execution_policy is the optional execution policy for this request.
306
+ ExecutionPolicy execution_policy = 8;
307
+ }
308
+
309
+ // ResolveRequestRequest specifies a quote request to resolve.
310
+ message ResolveRequestRequest {
311
+ oneof request {
312
+ // buy_request is a request to buy the subject asset.
313
+ BuyRequest buy_request = 1;
314
+
315
+ // sell_request is a request to sell the subject asset.
316
+ SellRequest sell_request = 2;
317
+ }
318
+ }
319
+
320
+ // ResolveRequestResponse is the response to a ResolveRequest call.
321
+ message ResolveRequestResponse {
322
+ oneof result {
323
+ // accept is the accepted asset rate for the request.
324
+ AssetRate accept = 1;
325
+
326
+ // reject is the rejection reason for the request.
327
+ RejectErr reject = 2;
328
+ }
329
+
330
+ // accepted_max_amount is an optional fill quantity that caps the
331
+ // amount the responder is willing to accept. Only meaningful when
332
+ // accept is set; 0 means no fill cap (full request max). The unit
333
+ // depends on the request type: asset units for a buy request, msat
334
+ // for a sell request.
335
+ uint64 accepted_max_amount = 3;
336
+ }
337
+
338
+ // AcceptedQuote bundles an accepted quote and its original request.
339
+ message AcceptedQuote {
340
+ // peer_id is the 33-byte public key of the accepting peer.
341
+ bytes peer_id = 1;
342
+
343
+ // accepted_rate is the asset rate accepted by the peer.
344
+ AssetRate accepted_rate = 2;
345
+
346
+ oneof request {
347
+ // buy_request is the original buy request.
348
+ BuyRequest buy_request = 3;
349
+
350
+ // sell_request is the original sell request.
351
+ SellRequest sell_request = 4;
352
+ }
353
+
354
+ // accepted_max_amount is the optional negotiated fill quantity.
355
+ // 0 means no fill cap (full request max). The unit depends on
356
+ // the request type: asset units for a buy request, msat for a
357
+ // sell request.
358
+ uint64 accepted_max_amount = 5;
359
+ }
360
+
361
+ // VerifyAcceptQuoteRequest specifies an accepted quote to verify.
362
+ message VerifyAcceptQuoteRequest {
363
+ // accept is the accepted quote and request details.
364
+ AcceptedQuote accept = 1;
365
+ }
366
+
367
+ // VerifyAcceptQuoteResponse is the response to a VerifyAcceptQuote call.
368
+ message VerifyAcceptQuoteResponse {
369
+ // status is the verification result.
370
+ QuoteRespStatus status = 1;
371
+ }
372
+
373
+ // QueryAssetRatesRequest specifies the parameters for querying asset rates.
374
+ message QueryAssetRatesRequest {
375
+ // asset_specifier identifies the subject asset.
376
+ AssetSpecifier asset_specifier = 1;
377
+
378
+ // direction specifies whether we want to buy or sell the asset.
379
+ AssetTransferDirection direction = 2;
380
+
381
+ // intent specifies the purpose of the query.
382
+ Intent intent = 3;
383
+
384
+ // asset_amount is an optional constraint on the asset amount. If set to
385
+ // zero, it is considered unset.
386
+ uint64 asset_amount = 4;
387
+
388
+ // payment_amount is an optional constraint on the payment amount in msat.
389
+ // If set to zero, it is considered unset.
390
+ uint64 payment_amount = 5;
391
+
392
+ // asset_rate_hint is an optional suggested asset rate.
393
+ AssetRate asset_rate_hint = 6;
394
+
395
+ // price_oracle_metadata is optional metadata for pricing decisions.
396
+ string price_oracle_metadata = 7;
397
+
398
+ // peer_id is the 33-byte public key of the counterparty peer.
399
+ bytes peer_id = 8;
400
+
401
+ // expiry_timestamp is an optional expiry Unix timestamp (seconds) for the
402
+ // query context. If set to zero, it is considered unset.
403
+ uint64 expiry_timestamp = 9;
404
+ }
405
+
406
+ // QueryAssetRatesResponse is the response to a QueryAssetRates call.
407
+ message QueryAssetRatesResponse {
408
+ // asset_rate is the asset exchange rate response.
409
+ AssetRate asset_rate = 1;
410
+ }
@@ -0,0 +1,262 @@
1
+ syntax = "proto3";
2
+
3
+ package priceoraclerpc;
4
+
5
+ option go_package = "github.com/lightninglabs/taproot-assets/taprpc/priceoraclerpc";
6
+
7
+ service PriceOracle {
8
+ /*
9
+ QueryAssetRates retrieves the exchange rate between a tap asset and BTC for
10
+ a specified transaction type, subject asset, and payment asset. The asset
11
+ rate represents the number of tap asset units per BTC.
12
+ */
13
+ rpc QueryAssetRates (QueryAssetRatesRequest)
14
+ returns (QueryAssetRatesResponse);
15
+ }
16
+
17
+ // TransactionType is an enum representing the type of transaction.
18
+ enum TransactionType {
19
+ // PURCHASE indicates a purchase transaction.
20
+ PURCHASE = 0;
21
+
22
+ // SALE indicates a sale transaction.
23
+ SALE = 1;
24
+ }
25
+
26
+ // Intent is an enum informing the price oracle about the intent of the price
27
+ // rate query. This is used to provide context for the asset rates being
28
+ // requested, allowing the price oracle to tailor the response based on the
29
+ // specific use case, such as paying an invoice or receiving a payment and the
30
+ // different stages involved in those.
31
+ enum Intent {
32
+ // INTENT_UNSPECIFIED is used to indicate that the intent of the price rate
33
+ // query is not specified. This is the fallback default value and should not
34
+ // be used in production code. It is primarily used for backward
35
+ // compatibility with older versions of the protocol that did not include
36
+ // intent information.
37
+ INTENT_UNSPECIFIED = 0;
38
+
39
+ // INTENT_PAY_INVOICE_HINT is used to indicate that the user is requesting
40
+ // a price rate hint for paying an invoice. This is typically used by the
41
+ // payer of an invoice to provide a suggestion of the expected asset rate to
42
+ // the RFQ peer (edge node) that will determine the actual rate for the
43
+ // payment.
44
+ INTENT_PAY_INVOICE_HINT = 1;
45
+
46
+ // INTENT_PAY_INVOICE is used to indicate that a peer wants to pay an
47
+ // invoice with assets. This is typically used by the edge node that
48
+ // facilitates the swap from assets to BTC for the payer of an invoice. This
49
+ // intent is used to provide the actual asset rate for the payment, which
50
+ // may differ from the hint provided by the payer.
51
+ INTENT_PAY_INVOICE = 2;
52
+
53
+ // INTENT_PAY_INVOICE_QUALIFY is used to indicate that the payer of an
54
+ // invoice has received an asset rate from their RFQ peer (edge node) and is
55
+ // qualifying the rate for the payment. This is typically used by the payer
56
+ // of an invoice to ensure that the asset rate provided by their peer (edge
57
+ // node) is acceptable before proceeding with the payment.
58
+ INTENT_PAY_INVOICE_QUALIFY = 3;
59
+
60
+ // INTENT_RECV_PAYMENT_HINT is used to indicate that the user is requesting
61
+ // a price rate hint for receiving a payment through an invoice. This is
62
+ // typically used by the creator of an invoice to provide a suggestion of
63
+ // the expected asset rate to the RFQ peer (edge node) that will determine
64
+ // the actual rate used for creating an invoice.
65
+ INTENT_RECV_PAYMENT_HINT = 4;
66
+
67
+ // INTENT_RECV_PAYMENT is used to indicate that a peer wants to create an
68
+ // invoice to receive a payment with assets. This is typically used by the
69
+ // edge node that facilitates the swap from BTC to assets for the receiver
70
+ // of a payment. This intent is used to provide the actual asset rate for
71
+ // the invoice creation, which may differ from the hint provided by the
72
+ // receiver.
73
+ INTENT_RECV_PAYMENT = 5;
74
+
75
+ // INTENT_RECV_PAYMENT_QUALIFY is used to indicate that the creator of an
76
+ // invoice received an asset rate from their RFQ peer (edge node) and is
77
+ // qualifying the rate for the creation of the invoice. This is typically
78
+ // used by the creator of an invoice to ensure that the asset rate provided
79
+ // by their peer (edge node) is acceptable before proceeding with creating
80
+ // the invoice.
81
+ INTENT_RECV_PAYMENT_QUALIFY = 6;
82
+ }
83
+
84
+ // ErrorCode represents the possible error codes that can be returned in a
85
+ // QueryAssetRatesErrResponse.
86
+ enum ErrorCode {
87
+ // UNSPECIFIED_ORACLE_ERROR_CODE indicates an unspecified error.
88
+ UNSPECIFIED_ORACLE_ERROR_CODE = 0;
89
+
90
+ // UNSUPPORTED_ASSET_ORACLE_ERROR_CODE indicates the asset is not
91
+ // supported.
92
+ UNSUPPORTED_ASSET_ORACLE_ERROR_CODE = 1;
93
+ }
94
+
95
+ // FixedPoint is a scaled integer representation of a fractional number.
96
+ //
97
+ // This type consists of two integer fields: a coefficient and a scale.
98
+ // Using this format enables precise and consistent representation of fractional
99
+ // numbers while avoiding floating-point data types, which are prone to
100
+ // precision errors.
101
+ //
102
+ // The relationship between the fractional representation and its fixed-point
103
+ // representation is expressed as:
104
+ // ```
105
+ // V = F_c / (10^F_s)
106
+ // ```
107
+ // where:
108
+ //
109
+ // * `V` is the fractional value.
110
+ //
111
+ // * `F_c` is the coefficient component of the fixed-point representation. It is
112
+ // the scaled-up fractional value represented as an integer.
113
+ //
114
+ // * `F_s` is the scale component. It is an integer specifying how
115
+ // many decimal places `F_c` should be divided by to obtain the fractional
116
+ // representation.
117
+ message FixedPoint {
118
+ // The coefficient is the fractional value scaled-up as an integer. This
119
+ // integer is represented as a string as it may be too large to fit in a
120
+ // uint64.
121
+ string coefficient = 1;
122
+
123
+ // The scale is the component that determines how many decimal places
124
+ // the coefficient should be divided by to obtain the fractional value.
125
+ uint32 scale = 2;
126
+ }
127
+
128
+ // AssetRates represents the exchange rates for subject and payment assets
129
+ // relative to BTC, expressed as fixed-point numbers. It includes the rates
130
+ // for both assets and an expiration timestamp indicating when the rates
131
+ // are no longer valid.
132
+ message AssetRates {
133
+ // subjectAssetRate is the number of subject asset units per BTC represented
134
+ // as a fixed-point number. This field is also commonly referred to as the
135
+ // subject asset to BTC (conversion) rate. When the subject asset is BTC,
136
+ // this field should be set to 100 billion, as one BTC is equivalent to 100
137
+ // billion msats.
138
+ FixedPoint subjectAssetRate = 1;
139
+
140
+ // paymentAssetRate is the number of payment asset units per BTC represented
141
+ // as a fixed-point number. This field is also commonly referred to as the
142
+ // payment asset to BTC (conversion) rate. When the payment asset is BTC,
143
+ // this field should be set to 100 billion, as one BTC is equivalent to 100
144
+ // billion msats.
145
+ FixedPoint paymentAssetRate = 2;
146
+
147
+ // expiry_timestamp is the Unix timestamp in seconds after which the asset
148
+ // rates are no longer valid.
149
+ uint64 expiry_timestamp = 3;
150
+ }
151
+
152
+ // AssetSpecifier is a union type for specifying an asset by either its asset ID
153
+ // or group key.
154
+ message AssetSpecifier {
155
+ oneof id {
156
+ // The 32-byte asset ID specified as raw bytes (gRPC only).
157
+ bytes asset_id = 1;
158
+
159
+ // The 32-byte asset ID encoded as a hex string (use this for REST).
160
+ string asset_id_str = 2;
161
+
162
+ // The 32-byte asset group key specified as raw bytes (gRPC only).
163
+ bytes group_key = 3;
164
+
165
+ // The 32-byte asset group key encoded as hex string (use this for
166
+ // REST).
167
+ string group_key_str = 4;
168
+ }
169
+ }
170
+
171
+ // QueryAssetRatesRequest specifies the parameters for querying asset exchange
172
+ // rates in a transaction. It includes the transaction type, details about the
173
+ // subject and payment assets, and an optional hint for expected asset rates.
174
+ message QueryAssetRatesRequest {
175
+ // transaction_type indicates whether the transaction is a purchase or a
176
+ // sale.
177
+ TransactionType transaction_type = 1;
178
+
179
+ // subject_asset is the asset to be priced for purchase or sale.
180
+ AssetSpecifier subject_asset = 2;
181
+
182
+ // subject_asset_max_amount is the maximum amount of the subject asset that
183
+ // could be involved in the transaction.
184
+ uint64 subject_asset_max_amount = 3;
185
+
186
+ // payment_asset is the asset used for purchasing or receiving from a sale.
187
+ //
188
+ // NOTE: An asset ID of all zeros indicates that the payment asset is BTC.
189
+ // In this case, the asset rate will be given as milli-satoshi per asset
190
+ // unit
191
+ AssetSpecifier payment_asset = 4;
192
+
193
+ // payment_asset_max_amount is the maximum amount of the payment asset that
194
+ // could be involved in the transaction. This field is optional. If set to
195
+ // zero, it is considered unset.
196
+ uint64 payment_asset_max_amount = 5;
197
+
198
+ // asset_rates_hint is an optional suggestion of asset rates for the
199
+ // transaction, intended to provide guidance on expected pricing.
200
+ AssetRates asset_rates_hint = 6;
201
+
202
+ // intent informs the price oracle about the stage of the payment flow that
203
+ // lead to the price rate query. This is used to provide context for the
204
+ // asset rates being requested, allowing the price oracle to tailor the
205
+ // response based on the specific use case, such as paying an invoice or
206
+ // receiving a payment and the different stages involved in those. This
207
+ // field will only be set by tapd v0.7.0 and later.
208
+ Intent intent = 7;
209
+
210
+ // counterparty_id is the 33-byte public key of the peer that is on the
211
+ // opposite side of the transaction. This field will only be set by tapd
212
+ // v0.7.0 and later and only if the user initiating the transaction (sending
213
+ // a payment or creating an invoice) opted in to sharing their peer ID with
214
+ // the price oracle.
215
+ bytes counterparty_id = 8;
216
+
217
+ // metadata is an optional text field that can be used to provide
218
+ // additional metadata about the transaction to the price oracle. This can
219
+ // include information about the wallet end user that initiated the
220
+ // transaction, or any authentication information that the price oracle
221
+ // can use to give out a more accurate (or discount) asset rate. Though not
222
+ // verified or enforced by tapd, the suggested format for this field is a
223
+ // JSON string. This field is optional and can be left empty if no metadata
224
+ // is available. The maximum length of this field is 32'768 bytes. This
225
+ // field will only be set by tapd v0.7.0 and later.
226
+ string metadata = 9;
227
+
228
+ // node_id is the 33-byte public key of the local node making the
229
+ // request to the price oracle. This identifies the tapd node that is
230
+ // querying rates, as opposed to the counterparty_id field which
231
+ // identifies the peer on the other side of the transaction. This field
232
+ // is set by default and can be disabled via the
233
+ // --experimental.rfq.priceoracledisablenodeid configuration option.
234
+ bytes node_id = 10;
235
+ }
236
+
237
+ // QueryAssetRatesOkResponse is the successful response to a
238
+ // QueryAssetRates call.
239
+ message QueryAssetRatesOkResponse {
240
+ // asset_rates is the asset exchange rates for the transaction.
241
+ AssetRates asset_rates = 1;
242
+ }
243
+
244
+ // QueryAssetRatesErrResponse is the error response to a QueryAssetRates call.
245
+ message QueryAssetRatesErrResponse {
246
+ // error is the error message.
247
+ string message = 1;
248
+
249
+ // code is the error code.
250
+ ErrorCode code = 2;
251
+ }
252
+
253
+ // QueryAssetRatesResponse is the response from a QueryAssetRates RPC call.
254
+ message QueryAssetRatesResponse {
255
+ oneof result {
256
+ // ok is the successful response to the query.
257
+ QueryAssetRatesOkResponse ok = 1;
258
+
259
+ // error is the error response to the query.
260
+ QueryAssetRatesErrResponse error = 2;
261
+ }
262
+ }