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.
- package/LICENSE +21 -0
- package/README.md +2886 -2
- package/dist/grpc/emit_subscription_error.d.ts +21 -0
- package/dist/grpc/emit_subscription_error.d.ts.map +1 -0
- package/dist/grpc/emit_subscription_error.js +26 -0
- package/dist/grpc/emit_subscription_error.js.map +1 -0
- package/dist/grpc/grpc_services.d.ts +46 -0
- package/dist/grpc/grpc_services.d.ts.map +1 -0
- package/dist/grpc/grpc_services.js +45 -0
- package/dist/grpc/grpc_services.js.map +1 -0
- package/dist/grpc/handle_remove_listener.d.ts +18 -0
- package/dist/grpc/handle_remove_listener.d.ts.map +1 -0
- package/dist/grpc/handle_remove_listener.js +22 -0
- package/dist/grpc/handle_remove_listener.js.map +1 -0
- package/dist/grpc/index.d.ts +32 -0
- package/dist/grpc/index.d.ts.map +1 -0
- package/dist/grpc/index.js +6 -0
- package/dist/grpc/index.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/tapd_grpc/api_for_proto.d.ts +28 -0
- package/dist/tapd_grpc/api_for_proto.d.ts.map +1 -0
- package/dist/tapd_grpc/api_for_proto.js +24 -0
- package/dist/tapd_grpc/api_for_proto.js.map +1 -0
- package/dist/tapd_grpc/authenticated_tapd_grpc.d.ts +35 -0
- package/dist/tapd_grpc/authenticated_tapd_grpc.d.ts.map +1 -0
- package/dist/tapd_grpc/authenticated_tapd_grpc.js +76 -0
- package/dist/tapd_grpc/authenticated_tapd_grpc.js.map +1 -0
- package/dist/tapd_grpc/decode_serialized.d.ts +18 -0
- package/dist/tapd_grpc/decode_serialized.d.ts.map +1 -0
- package/dist/tapd_grpc/decode_serialized.js +23 -0
- package/dist/tapd_grpc/decode_serialized.js.map +1 -0
- package/dist/tapd_grpc/grpc_credentials.d.ts +24 -0
- package/dist/tapd_grpc/grpc_credentials.d.ts.map +1 -0
- package/dist/tapd_grpc/grpc_credentials.js +39 -0
- package/dist/tapd_grpc/grpc_credentials.js.map +1 -0
- package/dist/tapd_grpc/grpc_options.d.ts +10 -0
- package/dist/tapd_grpc/grpc_options.d.ts.map +1 -0
- package/dist/tapd_grpc/grpc_options.js +9 -0
- package/dist/tapd_grpc/grpc_options.js.map +1 -0
- package/dist/tapd_grpc/grpc_ssl.d.ts +19 -0
- package/dist/tapd_grpc/grpc_ssl.d.ts.map +1 -0
- package/dist/tapd_grpc/grpc_ssl.js +18 -0
- package/dist/tapd_grpc/grpc_ssl.js.map +1 -0
- package/dist/tapd_grpc/index.d.ts +6 -0
- package/dist/tapd_grpc/index.d.ts.map +1 -0
- package/dist/tapd_grpc/index.js +2 -0
- package/dist/tapd_grpc/index.js.map +1 -0
- package/dist/tapd_grpc/types.d.ts +35 -0
- package/dist/tapd_grpc/types.d.ts.map +1 -0
- package/dist/tapd_grpc/types.js +2 -0
- package/dist/tapd_grpc/types.js.map +1 -0
- package/dist/tapd_methods/address/create_asset_address.d.ts +52 -0
- package/dist/tapd_methods/address/create_asset_address.d.ts.map +1 -0
- package/dist/tapd_methods/address/create_asset_address.js +127 -0
- package/dist/tapd_methods/address/create_asset_address.js.map +1 -0
- package/dist/tapd_methods/address/decode_asset_address.d.ts +38 -0
- package/dist/tapd_methods/address/decode_asset_address.d.ts.map +1 -0
- package/dist/tapd_methods/address/decode_asset_address.js +81 -0
- package/dist/tapd_methods/address/decode_asset_address.js.map +1 -0
- package/dist/tapd_methods/address/get_asset_addresses.d.ts +54 -0
- package/dist/tapd_methods/address/get_asset_addresses.d.ts.map +1 -0
- package/dist/tapd_methods/address/get_asset_addresses.js +153 -0
- package/dist/tapd_methods/address/get_asset_addresses.js.map +1 -0
- package/dist/tapd_methods/address/get_asset_receives.d.ts +72 -0
- package/dist/tapd_methods/address/get_asset_receives.d.ts.map +1 -0
- package/dist/tapd_methods/address/get_asset_receives.js +191 -0
- package/dist/tapd_methods/address/get_asset_receives.js.map +1 -0
- package/dist/tapd_methods/address/index.d.ts +15 -0
- package/dist/tapd_methods/address/index.d.ts.map +1 -0
- package/dist/tapd_methods/address/index.js +6 -0
- package/dist/tapd_methods/address/index.js.map +1 -0
- package/dist/tapd_methods/address/subscribe_to_asset_receives.d.ts +53 -0
- package/dist/tapd_methods/address/subscribe_to_asset_receives.d.ts.map +1 -0
- package/dist/tapd_methods/address/subscribe_to_asset_receives.js +93 -0
- package/dist/tapd_methods/address/subscribe_to_asset_receives.js.map +1 -0
- package/dist/tapd_methods/assets/get_asset_balances.d.ts +64 -0
- package/dist/tapd_methods/assets/get_asset_balances.d.ts.map +1 -0
- package/dist/tapd_methods/assets/get_asset_balances.js +177 -0
- package/dist/tapd_methods/assets/get_asset_balances.js.map +1 -0
- package/dist/tapd_methods/assets/get_asset_burns.d.ts +40 -0
- package/dist/tapd_methods/assets/get_asset_burns.d.ts.map +1 -0
- package/dist/tapd_methods/assets/get_asset_burns.js +92 -0
- package/dist/tapd_methods/assets/get_asset_burns.js.map +1 -0
- package/dist/tapd_methods/assets/get_asset_groups.d.ts +35 -0
- package/dist/tapd_methods/assets/get_asset_groups.d.ts.map +1 -0
- package/dist/tapd_methods/assets/get_asset_groups.js +78 -0
- package/dist/tapd_methods/assets/get_asset_groups.js.map +1 -0
- package/dist/tapd_methods/assets/get_asset_metadata.d.ts +40 -0
- package/dist/tapd_methods/assets/get_asset_metadata.d.ts.map +1 -0
- package/dist/tapd_methods/assets/get_asset_metadata.js +99 -0
- package/dist/tapd_methods/assets/get_asset_metadata.js.map +1 -0
- package/dist/tapd_methods/assets/get_asset_utxos.d.ts +83 -0
- package/dist/tapd_methods/assets/get_asset_utxos.d.ts.map +1 -0
- package/dist/tapd_methods/assets/get_asset_utxos.js +135 -0
- package/dist/tapd_methods/assets/get_asset_utxos.js.map +1 -0
- package/dist/tapd_methods/assets/get_assets.d.ts +113 -0
- package/dist/tapd_methods/assets/get_assets.d.ts.map +1 -0
- package/dist/tapd_methods/assets/get_assets.js +243 -0
- package/dist/tapd_methods/assets/get_assets.js.map +1 -0
- package/dist/tapd_methods/assets/index.d.ts +19 -0
- package/dist/tapd_methods/assets/index.d.ts.map +1 -0
- package/dist/tapd_methods/assets/index.js +7 -0
- package/dist/tapd_methods/assets/index.js.map +1 -0
- package/dist/tapd_methods/channels/asset_payment_args_error.d.ts +18 -0
- package/dist/tapd_methods/channels/asset_payment_args_error.d.ts.map +1 -0
- package/dist/tapd_methods/channels/asset_payment_args_error.js +59 -0
- package/dist/tapd_methods/channels/asset_payment_args_error.js.map +1 -0
- package/dist/tapd_methods/channels/asset_payment_request.d.ts +68 -0
- package/dist/tapd_methods/channels/asset_payment_request.d.ts.map +1 -0
- package/dist/tapd_methods/channels/asset_payment_request.js +54 -0
- package/dist/tapd_methods/channels/asset_payment_request.js.map +1 -0
- package/dist/tapd_methods/channels/create_asset_invoice.d.ts +134 -0
- package/dist/tapd_methods/channels/create_asset_invoice.d.ts.map +1 -0
- package/dist/tapd_methods/channels/create_asset_invoice.js +264 -0
- package/dist/tapd_methods/channels/create_asset_invoice.js.map +1 -0
- package/dist/tapd_methods/channels/decode_asset_payment_request.d.ts +72 -0
- package/dist/tapd_methods/channels/decode_asset_payment_request.d.ts.map +1 -0
- package/dist/tapd_methods/channels/decode_asset_payment_request.js +143 -0
- package/dist/tapd_methods/channels/decode_asset_payment_request.js.map +1 -0
- package/dist/tapd_methods/channels/emit_asset_payment.d.ts +30 -0
- package/dist/tapd_methods/channels/emit_asset_payment.d.ts.map +1 -0
- package/dist/tapd_methods/channels/emit_asset_payment.js +59 -0
- package/dist/tapd_methods/channels/emit_asset_payment.js.map +1 -0
- package/dist/tapd_methods/channels/encode_asset_custom_records.d.ts +51 -0
- package/dist/tapd_methods/channels/encode_asset_custom_records.d.ts.map +1 -0
- package/dist/tapd_methods/channels/encode_asset_custom_records.js +127 -0
- package/dist/tapd_methods/channels/encode_asset_custom_records.js.map +1 -0
- package/dist/tapd_methods/channels/get_asset_invoices.d.ts +84 -0
- package/dist/tapd_methods/channels/get_asset_invoices.d.ts.map +1 -0
- package/dist/tapd_methods/channels/get_asset_invoices.js +193 -0
- package/dist/tapd_methods/channels/get_asset_invoices.js.map +1 -0
- package/dist/tapd_methods/channels/get_asset_payments.d.ts +69 -0
- package/dist/tapd_methods/channels/get_asset_payments.d.ts.map +1 -0
- package/dist/tapd_methods/channels/get_asset_payments.js +180 -0
- package/dist/tapd_methods/channels/get_asset_payments.js.map +1 -0
- package/dist/tapd_methods/channels/index.d.ts +31 -0
- package/dist/tapd_methods/channels/index.d.ts.map +1 -0
- package/dist/tapd_methods/channels/index.js +12 -0
- package/dist/tapd_methods/channels/index.js.map +1 -0
- package/dist/tapd_methods/channels/open_asset_channel.d.ts +53 -0
- package/dist/tapd_methods/channels/open_asset_channel.d.ts.map +1 -0
- package/dist/tapd_methods/channels/open_asset_channel.js +128 -0
- package/dist/tapd_methods/channels/open_asset_channel.js.map +1 -0
- package/dist/tapd_methods/channels/pay_asset_invoice.d.ts +95 -0
- package/dist/tapd_methods/channels/pay_asset_invoice.d.ts.map +1 -0
- package/dist/tapd_methods/channels/pay_asset_invoice.js +132 -0
- package/dist/tapd_methods/channels/pay_asset_invoice.js.map +1 -0
- package/dist/tapd_methods/channels/send_asset_keysend.d.ts +84 -0
- package/dist/tapd_methods/channels/send_asset_keysend.d.ts.map +1 -0
- package/dist/tapd_methods/channels/send_asset_keysend.js +144 -0
- package/dist/tapd_methods/channels/send_asset_keysend.js.map +1 -0
- package/dist/tapd_methods/channels/send_asset_payment.d.ts +33 -0
- package/dist/tapd_methods/channels/send_asset_payment.d.ts.map +1 -0
- package/dist/tapd_methods/channels/send_asset_payment.js +114 -0
- package/dist/tapd_methods/channels/send_asset_payment.js.map +1 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_invoices.d.ts +51 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_invoices.d.ts.map +1 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_invoices.js +104 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_invoices.js.map +1 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_payments.d.ts +59 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_payments.d.ts.map +1 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_payments.js +104 -0
- package/dist/tapd_methods/channels/subscribe_to_asset_payments.js.map +1 -0
- package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.d.ts +62 -0
- package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.d.ts.map +1 -0
- package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.js +106 -0
- package/dist/tapd_methods/channels/subscribe_to_past_asset_payment.js.map +1 -0
- package/dist/tapd_methods/daemon/create_tapd_macaroon.d.ts +45 -0
- package/dist/tapd_methods/daemon/create_tapd_macaroon.d.ts.map +1 -0
- package/dist/tapd_methods/daemon/create_tapd_macaroon.js +99 -0
- package/dist/tapd_methods/daemon/create_tapd_macaroon.js.map +1 -0
- package/dist/tapd_methods/daemon/index.d.ts +8 -0
- package/dist/tapd_methods/daemon/index.d.ts.map +1 -0
- package/dist/tapd_methods/daemon/index.js +4 -0
- package/dist/tapd_methods/daemon/index.js.map +1 -0
- package/dist/tapd_methods/daemon/set_tapd_debug_level.d.ts +23 -0
- package/dist/tapd_methods/daemon/set_tapd_debug_level.d.ts.map +1 -0
- package/dist/tapd_methods/daemon/set_tapd_debug_level.js +60 -0
- package/dist/tapd_methods/daemon/set_tapd_debug_level.js.map +1 -0
- package/dist/tapd_methods/daemon/stop_tapd.d.ts +16 -0
- package/dist/tapd_methods/daemon/stop_tapd.d.ts.map +1 -0
- package/dist/tapd_methods/daemon/stop_tapd.js +50 -0
- package/dist/tapd_methods/daemon/stop_tapd.js.map +1 -0
- package/dist/tapd_methods/index.d.ts +10 -0
- package/dist/tapd_methods/index.d.ts.map +1 -0
- package/dist/tapd_methods/index.js +10 -0
- package/dist/tapd_methods/index.js.map +1 -0
- package/dist/tapd_methods/info/get_tapd_info.d.ts +44 -0
- package/dist/tapd_methods/info/get_tapd_info.d.ts.map +1 -0
- package/dist/tapd_methods/info/get_tapd_info.js +80 -0
- package/dist/tapd_methods/info/get_tapd_info.js.map +1 -0
- package/dist/tapd_methods/info/index.d.ts +4 -0
- package/dist/tapd_methods/info/index.d.ts.map +1 -0
- package/dist/tapd_methods/info/index.js +2 -0
- package/dist/tapd_methods/info/index.js.map +1 -0
- package/dist/tapd_methods/mint/add_asset_to_mint_batch.d.ts +124 -0
- package/dist/tapd_methods/mint/add_asset_to_mint_batch.d.ts.map +1 -0
- package/dist/tapd_methods/mint/add_asset_to_mint_batch.js +283 -0
- package/dist/tapd_methods/mint/add_asset_to_mint_batch.js.map +1 -0
- package/dist/tapd_methods/mint/cancel_mint_batch.d.ts +23 -0
- package/dist/tapd_methods/mint/cancel_mint_batch.d.ts.map +1 -0
- package/dist/tapd_methods/mint/cancel_mint_batch.js +62 -0
- package/dist/tapd_methods/mint/cancel_mint_batch.js.map +1 -0
- package/dist/tapd_methods/mint/finalize_mint_batch.d.ts +64 -0
- package/dist/tapd_methods/mint/finalize_mint_batch.d.ts.map +1 -0
- package/dist/tapd_methods/mint/finalize_mint_batch.js +130 -0
- package/dist/tapd_methods/mint/finalize_mint_batch.js.map +1 -0
- package/dist/tapd_methods/mint/fund_mint_batch.d.ts +82 -0
- package/dist/tapd_methods/mint/fund_mint_batch.d.ts.map +1 -0
- package/dist/tapd_methods/mint/fund_mint_batch.js +145 -0
- package/dist/tapd_methods/mint/fund_mint_batch.js.map +1 -0
- package/dist/tapd_methods/mint/get_mint_batches.d.ts +72 -0
- package/dist/tapd_methods/mint/get_mint_batches.d.ts.map +1 -0
- package/dist/tapd_methods/mint/get_mint_batches.js +123 -0
- package/dist/tapd_methods/mint/get_mint_batches.js.map +1 -0
- package/dist/tapd_methods/mint/index.d.ts +21 -0
- package/dist/tapd_methods/mint/index.d.ts.map +1 -0
- package/dist/tapd_methods/mint/index.js +8 -0
- package/dist/tapd_methods/mint/index.js.map +1 -0
- package/dist/tapd_methods/mint/seal_mint_batch.d.ts +64 -0
- package/dist/tapd_methods/mint/seal_mint_batch.d.ts.map +1 -0
- package/dist/tapd_methods/mint/seal_mint_batch.js +135 -0
- package/dist/tapd_methods/mint/seal_mint_batch.js.map +1 -0
- package/dist/tapd_methods/mint/subscribe_to_mint_events.d.ts +52 -0
- package/dist/tapd_methods/mint/subscribe_to_mint_events.d.ts.map +1 -0
- package/dist/tapd_methods/mint/subscribe_to_mint_events.js +91 -0
- package/dist/tapd_methods/mint/subscribe_to_mint_events.js.map +1 -0
- package/dist/tapd_methods/proofs/decode_asset_proof.d.ts +61 -0
- package/dist/tapd_methods/proofs/decode_asset_proof.d.ts.map +1 -0
- package/dist/tapd_methods/proofs/decode_asset_proof.js +129 -0
- package/dist/tapd_methods/proofs/decode_asset_proof.js.map +1 -0
- package/dist/tapd_methods/proofs/export_asset_proof.d.ts +39 -0
- package/dist/tapd_methods/proofs/export_asset_proof.d.ts.map +1 -0
- package/dist/tapd_methods/proofs/export_asset_proof.js +113 -0
- package/dist/tapd_methods/proofs/export_asset_proof.js.map +1 -0
- package/dist/tapd_methods/proofs/index.d.ts +13 -0
- package/dist/tapd_methods/proofs/index.d.ts.map +1 -0
- package/dist/tapd_methods/proofs/index.js +5 -0
- package/dist/tapd_methods/proofs/index.js.map +1 -0
- package/dist/tapd_methods/proofs/unpack_asset_proof_file.d.ts +29 -0
- package/dist/tapd_methods/proofs/unpack_asset_proof_file.d.ts.map +1 -0
- package/dist/tapd_methods/proofs/unpack_asset_proof_file.js +85 -0
- package/dist/tapd_methods/proofs/unpack_asset_proof_file.js.map +1 -0
- package/dist/tapd_methods/proofs/verify_asset_proof.d.ts +58 -0
- package/dist/tapd_methods/proofs/verify_asset_proof.d.ts.map +1 -0
- package/dist/tapd_methods/proofs/verify_asset_proof.js +110 -0
- package/dist/tapd_methods/proofs/verify_asset_proof.js.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_buy_offer.d.ts +31 -0
- package/dist/tapd_methods/rfq/add_asset_buy_offer.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_buy_offer.js +88 -0
- package/dist/tapd_methods/rfq/add_asset_buy_offer.js.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_buy_order.d.ts +79 -0
- package/dist/tapd_methods/rfq/add_asset_buy_order.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_buy_order.js +200 -0
- package/dist/tapd_methods/rfq/add_asset_buy_order.js.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_sell_offer.d.ts +30 -0
- package/dist/tapd_methods/rfq/add_asset_sell_offer.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_sell_offer.js +87 -0
- package/dist/tapd_methods/rfq/add_asset_sell_offer.js.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_sell_order.d.ts +79 -0
- package/dist/tapd_methods/rfq/add_asset_sell_order.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/add_asset_sell_order.js +200 -0
- package/dist/tapd_methods/rfq/add_asset_sell_order.js.map +1 -0
- package/dist/tapd_methods/rfq/get_accepted_quotes.d.ts +52 -0
- package/dist/tapd_methods/rfq/get_accepted_quotes.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/get_accepted_quotes.js +100 -0
- package/dist/tapd_methods/rfq/get_accepted_quotes.js.map +1 -0
- package/dist/tapd_methods/rfq/get_asset_forwards.d.ts +70 -0
- package/dist/tapd_methods/rfq/get_asset_forwards.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/get_asset_forwards.js +185 -0
- package/dist/tapd_methods/rfq/get_asset_forwards.js.map +1 -0
- package/dist/tapd_methods/rfq/index.d.ts +19 -0
- package/dist/tapd_methods/rfq/index.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/index.js +8 -0
- package/dist/tapd_methods/rfq/index.js.map +1 -0
- package/dist/tapd_methods/rfq/subscribe_to_rfq_events.d.ts +68 -0
- package/dist/tapd_methods/rfq/subscribe_to_rfq_events.d.ts.map +1 -0
- package/dist/tapd_methods/rfq/subscribe_to_rfq_events.js +107 -0
- package/dist/tapd_methods/rfq/subscribe_to_rfq_events.js.map +1 -0
- package/dist/tapd_methods/send/burn_asset.d.ts +135 -0
- package/dist/tapd_methods/send/burn_asset.d.ts.map +1 -0
- package/dist/tapd_methods/send/burn_asset.js +220 -0
- package/dist/tapd_methods/send/burn_asset.js.map +1 -0
- package/dist/tapd_methods/send/get_asset_transfers.d.ts +73 -0
- package/dist/tapd_methods/send/get_asset_transfers.d.ts.map +1 -0
- package/dist/tapd_methods/send/get_asset_transfers.js +122 -0
- package/dist/tapd_methods/send/get_asset_transfers.js.map +1 -0
- package/dist/tapd_methods/send/index.d.ts +15 -0
- package/dist/tapd_methods/send/index.d.ts.map +1 -0
- package/dist/tapd_methods/send/index.js +6 -0
- package/dist/tapd_methods/send/index.js.map +1 -0
- package/dist/tapd_methods/send/register_asset_transfer.d.ts +77 -0
- package/dist/tapd_methods/send/register_asset_transfer.d.ts.map +1 -0
- package/dist/tapd_methods/send/register_asset_transfer.js +165 -0
- package/dist/tapd_methods/send/register_asset_transfer.js.map +1 -0
- package/dist/tapd_methods/send/send_asset.d.ts +94 -0
- package/dist/tapd_methods/send/send_asset.d.ts.map +1 -0
- package/dist/tapd_methods/send/send_asset.js +169 -0
- package/dist/tapd_methods/send/send_asset.js.map +1 -0
- package/dist/tapd_methods/send/subscribe_to_asset_sends.d.ts +117 -0
- package/dist/tapd_methods/send/subscribe_to_asset_sends.d.ts.map +1 -0
- package/dist/tapd_methods/send/subscribe_to_asset_sends.js +159 -0
- package/dist/tapd_methods/send/subscribe_to_asset_sends.js.map +1 -0
- package/dist/tapd_requests/decimal_as_fixed_point.d.ts +23 -0
- package/dist/tapd_requests/decimal_as_fixed_point.d.ts.map +1 -0
- package/dist/tapd_requests/decimal_as_fixed_point.js +31 -0
- package/dist/tapd_requests/decimal_as_fixed_point.js.map +1 -0
- package/dist/tapd_requests/fee_rate_as_tokens_per_kw.d.ts +13 -0
- package/dist/tapd_requests/fee_rate_as_tokens_per_kw.d.ts.map +1 -0
- package/dist/tapd_requests/fee_rate_as_tokens_per_kw.js +21 -0
- package/dist/tapd_requests/fee_rate_as_tokens_per_kw.js.map +1 -0
- package/dist/tapd_requests/index.d.ts +9 -0
- package/dist/tapd_requests/index.d.ts.map +1 -0
- package/dist/tapd_requests/index.js +9 -0
- package/dist/tapd_requests/index.js.map +1 -0
- package/dist/tapd_requests/is_connection_failure.d.ts +23 -0
- package/dist/tapd_requests/is_connection_failure.d.ts.map +1 -0
- package/dist/tapd_requests/is_connection_failure.js +40 -0
- package/dist/tapd_requests/is_connection_failure.js.map +1 -0
- package/dist/tapd_requests/is_method_unsupported.d.ts +24 -0
- package/dist/tapd_requests/is_method_unsupported.d.ts.map +1 -0
- package/dist/tapd_requests/is_method_unsupported.js +27 -0
- package/dist/tapd_requests/is_method_unsupported.js.map +1 -0
- package/dist/tapd_requests/is_permission_denied.d.ts +19 -0
- package/dist/tapd_requests/is_permission_denied.d.ts.map +1 -0
- package/dist/tapd_requests/is_permission_denied.js +16 -0
- package/dist/tapd_requests/is_permission_denied.js.map +1 -0
- package/dist/tapd_requests/is_tapd.d.ts +19 -0
- package/dist/tapd_requests/is_tapd.d.ts.map +1 -0
- package/dist/tapd_requests/is_tapd.js +16 -0
- package/dist/tapd_requests/is_tapd.js.map +1 -0
- package/dist/tapd_requests/mint_funding_request.d.ts +53 -0
- package/dist/tapd_requests/mint_funding_request.d.ts.map +1 -0
- package/dist/tapd_requests/mint_funding_request.js +48 -0
- package/dist/tapd_requests/mint_funding_request.js.map +1 -0
- package/dist/tapd_requests/script_key_type_query.d.ts +26 -0
- package/dist/tapd_requests/script_key_type_query.d.ts.map +1 -0
- package/dist/tapd_requests/script_key_type_query.js +41 -0
- package/dist/tapd_requests/script_key_type_query.js.map +1 -0
- package/dist/tapd_responses/asset_channel_rpc_error.d.ts +19 -0
- package/dist/tapd_responses/asset_channel_rpc_error.d.ts.map +1 -0
- package/dist/tapd_responses/asset_channel_rpc_error.js +69 -0
- package/dist/tapd_responses/asset_channel_rpc_error.js.map +1 -0
- package/dist/tapd_responses/batch_states.d.ts +4 -0
- package/dist/tapd_responses/batch_states.d.ts.map +1 -0
- package/dist/tapd_responses/batch_states.js +13 -0
- package/dist/tapd_responses/batch_states.js.map +1 -0
- package/dist/tapd_responses/fixed_point_as_decimal.d.ts +25 -0
- package/dist/tapd_responses/fixed_point_as_decimal.d.ts.map +1 -0
- package/dist/tapd_responses/fixed_point_as_decimal.js +39 -0
- package/dist/tapd_responses/fixed_point_as_decimal.js.map +1 -0
- package/dist/tapd_responses/index.d.ts +76 -0
- package/dist/tapd_responses/index.d.ts.map +1 -0
- package/dist/tapd_responses/index.js +30 -0
- package/dist/tapd_responses/index.js.map +1 -0
- package/dist/tapd_responses/long_key_as_number.d.ts +16 -0
- package/dist/tapd_responses/long_key_as_number.d.ts.map +1 -0
- package/dist/tapd_responses/long_key_as_number.js +28 -0
- package/dist/tapd_responses/long_key_as_number.js.map +1 -0
- package/dist/tapd_responses/mint_rpc_error.d.ts +19 -0
- package/dist/tapd_responses/mint_rpc_error.d.ts.map +1 -0
- package/dist/tapd_responses/mint_rpc_error.js +35 -0
- package/dist/tapd_responses/mint_rpc_error.js.map +1 -0
- package/dist/tapd_responses/outpoint_as_transaction.d.ts +19 -0
- package/dist/tapd_responses/outpoint_as_transaction.d.ts.map +1 -0
- package/dist/tapd_responses/outpoint_as_transaction.js +23 -0
- package/dist/tapd_responses/outpoint_as_transaction.js.map +1 -0
- package/dist/tapd_responses/receive_statuses.d.ts +4 -0
- package/dist/tapd_responses/receive_statuses.d.ts.map +1 -0
- package/dist/tapd_responses/receive_statuses.js +9 -0
- package/dist/tapd_responses/receive_statuses.js.map +1 -0
- package/dist/tapd_responses/rpc_addr_as_address.d.ts +79 -0
- package/dist/tapd_responses/rpc_addr_as_address.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_addr_as_address.js +87 -0
- package/dist/tapd_responses/rpc_addr_as_address.js.map +1 -0
- package/dist/tapd_responses/rpc_addr_event_as_receive.d.ts +63 -0
- package/dist/tapd_responses/rpc_addr_event_as_receive.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_addr_event_as_receive.js +64 -0
- package/dist/tapd_responses/rpc_addr_event_as_receive.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_amount_as_amount.d.ts +34 -0
- package/dist/tapd_responses/rpc_asset_amount_as_amount.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_amount_as_amount.js +38 -0
- package/dist/tapd_responses/rpc_asset_amount_as_amount.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_as_asset.d.ts +204 -0
- package/dist/tapd_responses/rpc_asset_as_asset.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_as_asset.js +174 -0
- package/dist/tapd_responses/rpc_asset_as_asset.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_balance_as_balance.d.ts +53 -0
- package/dist/tapd_responses/rpc_asset_balance_as_balance.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_balance_as_balance.js +53 -0
- package/dist/tapd_responses/rpc_asset_balance_as_balance.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_burn_as_burn.d.ts +51 -0
- package/dist/tapd_responses/rpc_asset_burn_as_burn.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_burn_as_burn.js +54 -0
- package/dist/tapd_responses/rpc_asset_burn_as_burn.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_invoice_as_invoice.d.ts +39 -0
- package/dist/tapd_responses/rpc_asset_invoice_as_invoice.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_invoice_as_invoice.js +45 -0
- package/dist/tapd_responses/rpc_asset_invoice_as_invoice.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_meta_as_metadata.d.ts +68 -0
- package/dist/tapd_responses/rpc_asset_meta_as_metadata.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_meta_as_metadata.js +70 -0
- package/dist/tapd_responses/rpc_asset_meta_as_metadata.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_pay_req_as_request.d.ts +76 -0
- package/dist/tapd_responses/rpc_asset_pay_req_as_request.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_pay_req_as_request.js +73 -0
- package/dist/tapd_responses/rpc_asset_pay_req_as_request.js.map +1 -0
- package/dist/tapd_responses/rpc_asset_payment_as_payment.d.ts +39 -0
- package/dist/tapd_responses/rpc_asset_payment_as_payment.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_asset_payment_as_payment.js +45 -0
- package/dist/tapd_responses/rpc_asset_payment_as_payment.js.map +1 -0
- package/dist/tapd_responses/rpc_batch_as_batch.d.ts +158 -0
- package/dist/tapd_responses/rpc_batch_as_batch.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_batch_as_batch.js +181 -0
- package/dist/tapd_responses/rpc_batch_as_batch.js.map +1 -0
- package/dist/tapd_responses/rpc_buy_quote_as_quote.d.ts +83 -0
- package/dist/tapd_responses/rpc_buy_quote_as_quote.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_buy_quote_as_quote.js +85 -0
- package/dist/tapd_responses/rpc_buy_quote_as_quote.js.map +1 -0
- package/dist/tapd_responses/rpc_decoded_proof_as_proof.d.ts +161 -0
- package/dist/tapd_responses/rpc_decoded_proof_as_proof.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_decoded_proof_as_proof.js +138 -0
- package/dist/tapd_responses/rpc_decoded_proof_as_proof.js.map +1 -0
- package/dist/tapd_responses/rpc_forward_as_asset_forward.d.ts +100 -0
- package/dist/tapd_responses/rpc_forward_as_asset_forward.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_forward_as_asset_forward.js +101 -0
- package/dist/tapd_responses/rpc_forward_as_asset_forward.js.map +1 -0
- package/dist/tapd_responses/rpc_grouped_assets_as_group.d.ts +76 -0
- package/dist/tapd_responses/rpc_grouped_assets_as_group.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_grouped_assets_as_group.js +71 -0
- package/dist/tapd_responses/rpc_grouped_assets_as_group.js.map +1 -0
- package/dist/tapd_responses/rpc_managed_utxo_as_utxo.d.ts +63 -0
- package/dist/tapd_responses/rpc_managed_utxo_as_utxo.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_managed_utxo_as_utxo.js +65 -0
- package/dist/tapd_responses/rpc_managed_utxo_as_utxo.js.map +1 -0
- package/dist/tapd_responses/rpc_receive_event_as_receive_update.d.ts +53 -0
- package/dist/tapd_responses/rpc_receive_event_as_receive_update.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_receive_event_as_receive_update.js +52 -0
- package/dist/tapd_responses/rpc_receive_event_as_receive_update.js.map +1 -0
- package/dist/tapd_responses/rpc_rfq_event_as_event.d.ts +70 -0
- package/dist/tapd_responses/rpc_rfq_event_as_event.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_rfq_event_as_event.js +89 -0
- package/dist/tapd_responses/rpc_rfq_event_as_event.js.map +1 -0
- package/dist/tapd_responses/rpc_sell_quote_as_quote.d.ts +80 -0
- package/dist/tapd_responses/rpc_sell_quote_as_quote.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_sell_quote_as_quote.js +85 -0
- package/dist/tapd_responses/rpc_sell_quote_as_quote.js.map +1 -0
- package/dist/tapd_responses/rpc_send_event_as_send_event.d.ts +124 -0
- package/dist/tapd_responses/rpc_send_event_as_send_event.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_send_event_as_send_event.js +161 -0
- package/dist/tapd_responses/rpc_send_event_as_send_event.js.map +1 -0
- package/dist/tapd_responses/rpc_transfer_as_transfer.d.ts +241 -0
- package/dist/tapd_responses/rpc_transfer_as_transfer.d.ts.map +1 -0
- package/dist/tapd_responses/rpc_transfer_as_transfer.js +212 -0
- package/dist/tapd_responses/rpc_transfer_as_transfer.js.map +1 -0
- package/dist/tapd_responses/short_channel_id_as_channel.d.ts +13 -0
- package/dist/tapd_responses/short_channel_id_as_channel.d.ts.map +1 -0
- package/dist/tapd_responses/short_channel_id_as_channel.js +26 -0
- package/dist/tapd_responses/short_channel_id_as_channel.js.map +1 -0
- package/dist/typescript/index.d.ts +16 -0
- package/dist/typescript/index.d.ts.map +1 -0
- package/dist/typescript/index.js +2 -0
- package/dist/typescript/index.js.map +1 -0
- package/package.json +76 -3
- package/protos/VERSIONS +2 -0
- package/protos/lnrpc/lightning.proto +5380 -0
- package/protos/lnrpc/routerrpc/router.proto +1115 -0
- package/protos/taprpc/assetwalletrpc/assetwallet.proto +631 -0
- package/protos/taprpc/authmailboxrpc/mailbox.proto +281 -0
- package/protos/taprpc/mintrpc/mint.proto +452 -0
- package/protos/taprpc/portfoliopilotrpc/portfolio_pilot.proto +410 -0
- package/protos/taprpc/priceoraclerpc/price_oracle.proto +262 -0
- package/protos/taprpc/rfqrpc/rfq.proto +614 -0
- package/protos/taprpc/tapchannelrpc/tapchannel.proto +490 -0
- package/protos/taprpc/tapcommon.proto +47 -0
- package/protos/taprpc/tapdevrpc/tapdev.proto +120 -0
- package/protos/taprpc/taprootassets.proto +2117 -0
- package/protos/taprpc/universerpc/universe.proto +1101 -0
- package/src/grpc/emit_subscription_error.ts +39 -0
- package/src/grpc/grpc_services.ts +45 -0
- package/src/grpc/handle_remove_listener.ts +35 -0
- package/src/grpc/index.ts +18 -0
- package/src/index.ts +24 -0
- package/src/tapd_grpc/api_for_proto.ts +42 -0
- package/src/tapd_grpc/authenticated_tapd_grpc.ts +88 -0
- package/src/tapd_grpc/decode_serialized.ts +25 -0
- package/src/tapd_grpc/grpc_credentials.ts +48 -0
- package/src/tapd_grpc/grpc_options.ts +10 -0
- package/src/tapd_grpc/grpc_ssl.ts +20 -0
- package/src/tapd_grpc/index.ts +5 -0
- package/src/tapd_grpc/types.ts +35 -0
- package/src/tapd_methods/address/create_asset_address.ts +179 -0
- package/src/tapd_methods/address/decode_asset_address.ts +117 -0
- package/src/tapd_methods/address/get_asset_addresses.ts +212 -0
- package/src/tapd_methods/address/get_asset_receives.ts +265 -0
- package/src/tapd_methods/address/index.ts +14 -0
- package/src/tapd_methods/address/subscribe_to_asset_receives.ts +114 -0
- package/src/tapd_methods/assets/get_asset_balances.ts +249 -0
- package/src/tapd_methods/assets/get_asset_burns.ts +133 -0
- package/src/tapd_methods/assets/get_asset_groups.ts +109 -0
- package/src/tapd_methods/assets/get_asset_metadata.ts +141 -0
- package/src/tapd_methods/assets/get_asset_utxos.ts +175 -0
- package/src/tapd_methods/assets/get_assets.ts +327 -0
- package/src/tapd_methods/assets/index.ts +18 -0
- package/src/tapd_methods/channels/asset_payment_args_error.ts +83 -0
- package/src/tapd_methods/channels/asset_payment_request.ts +76 -0
- package/src/tapd_methods/channels/create_asset_invoice.ts +387 -0
- package/src/tapd_methods/channels/decode_asset_payment_request.ts +192 -0
- package/src/tapd_methods/channels/emit_asset_payment.ts +78 -0
- package/src/tapd_methods/channels/encode_asset_custom_records.ts +187 -0
- package/src/tapd_methods/channels/get_asset_invoices.ts +258 -0
- package/src/tapd_methods/channels/get_asset_payments.ts +243 -0
- package/src/tapd_methods/channels/index.ts +30 -0
- package/src/tapd_methods/channels/open_asset_channel.ts +193 -0
- package/src/tapd_methods/channels/pay_asset_invoice.ts +171 -0
- package/src/tapd_methods/channels/send_asset_keysend.ts +196 -0
- package/src/tapd_methods/channels/send_asset_payment.ts +158 -0
- package/src/tapd_methods/channels/subscribe_to_asset_invoices.ts +134 -0
- package/src/tapd_methods/channels/subscribe_to_asset_payments.ts +126 -0
- package/src/tapd_methods/channels/subscribe_to_past_asset_payment.ts +132 -0
- package/src/tapd_methods/daemon/create_tapd_macaroon.ts +153 -0
- package/src/tapd_methods/daemon/index.ts +7 -0
- package/src/tapd_methods/daemon/set_tapd_debug_level.ts +90 -0
- package/src/tapd_methods/daemon/stop_tapd.ts +75 -0
- package/src/tapd_methods/index.ts +9 -0
- package/src/tapd_methods/info/get_tapd_info.ts +129 -0
- package/src/tapd_methods/info/index.ts +3 -0
- package/src/tapd_methods/mint/add_asset_to_mint_batch.ts +396 -0
- package/src/tapd_methods/mint/cancel_mint_batch.ts +95 -0
- package/src/tapd_methods/mint/finalize_mint_batch.ts +181 -0
- package/src/tapd_methods/mint/fund_mint_batch.ts +193 -0
- package/src/tapd_methods/mint/get_mint_batches.ts +162 -0
- package/src/tapd_methods/mint/index.ts +20 -0
- package/src/tapd_methods/mint/seal_mint_batch.ts +184 -0
- package/src/tapd_methods/mint/subscribe_to_mint_events.ts +104 -0
- package/src/tapd_methods/proofs/decode_asset_proof.ts +175 -0
- package/src/tapd_methods/proofs/export_asset_proof.ts +169 -0
- package/src/tapd_methods/proofs/index.ts +12 -0
- package/src/tapd_methods/proofs/unpack_asset_proof_file.ts +126 -0
- package/src/tapd_methods/proofs/verify_asset_proof.ts +156 -0
- package/src/tapd_methods/rfq/add_asset_buy_offer.ts +127 -0
- package/src/tapd_methods/rfq/add_asset_buy_order.ts +279 -0
- package/src/tapd_methods/rfq/add_asset_sell_offer.ts +126 -0
- package/src/tapd_methods/rfq/add_asset_sell_order.ts +279 -0
- package/src/tapd_methods/rfq/get_accepted_quotes.ts +137 -0
- package/src/tapd_methods/rfq/get_asset_forwards.ts +259 -0
- package/src/tapd_methods/rfq/index.ts +18 -0
- package/src/tapd_methods/rfq/subscribe_to_rfq_events.ts +130 -0
- package/src/tapd_methods/send/burn_asset.ts +280 -0
- package/src/tapd_methods/send/get_asset_transfers.ts +161 -0
- package/src/tapd_methods/send/index.ts +14 -0
- package/src/tapd_methods/send/register_asset_transfer.ts +219 -0
- package/src/tapd_methods/send/send_asset.ts +223 -0
- package/src/tapd_methods/send/subscribe_to_asset_sends.ts +181 -0
- package/src/tapd_requests/decimal_as_fixed_point.ts +36 -0
- package/src/tapd_requests/fee_rate_as_tokens_per_kw.ts +23 -0
- package/src/tapd_requests/index.ts +8 -0
- package/src/tapd_requests/is_connection_failure.ts +48 -0
- package/src/tapd_requests/is_method_unsupported.ts +33 -0
- package/src/tapd_requests/is_permission_denied.ts +18 -0
- package/src/tapd_requests/is_tapd.ts +22 -0
- package/src/tapd_requests/mint_funding_request.ts +57 -0
- package/src/tapd_requests/script_key_type_query.ts +44 -0
- package/src/tapd_responses/asset_channel_rpc_error.ts +73 -0
- package/src/tapd_responses/batch_states.ts +12 -0
- package/src/tapd_responses/fixed_point_as_decimal.ts +51 -0
- package/src/tapd_responses/index.ts +75 -0
- package/src/tapd_responses/long_key_as_number.ts +31 -0
- package/src/tapd_responses/mint_rpc_error.ts +39 -0
- package/src/tapd_responses/outpoint_as_transaction.ts +25 -0
- package/src/tapd_responses/receive_statuses.ts +8 -0
- package/src/tapd_responses/rpc_addr_as_address.ts +138 -0
- package/src/tapd_responses/rpc_addr_event_as_receive.ts +103 -0
- package/src/tapd_responses/rpc_asset_amount_as_amount.ts +57 -0
- package/src/tapd_responses/rpc_asset_as_asset.ts +299 -0
- package/src/tapd_responses/rpc_asset_balance_as_balance.ts +85 -0
- package/src/tapd_responses/rpc_asset_burn_as_burn.ts +85 -0
- package/src/tapd_responses/rpc_asset_invoice_as_invoice.ts +62 -0
- package/src/tapd_responses/rpc_asset_meta_as_metadata.ts +113 -0
- package/src/tapd_responses/rpc_asset_pay_req_as_request.ts +114 -0
- package/src/tapd_responses/rpc_asset_payment_as_payment.ts +62 -0
- package/src/tapd_responses/rpc_batch_as_batch.ts +281 -0
- package/src/tapd_responses/rpc_buy_quote_as_quote.ts +139 -0
- package/src/tapd_responses/rpc_decoded_proof_as_proof.ts +229 -0
- package/src/tapd_responses/rpc_forward_as_asset_forward.ts +164 -0
- package/src/tapd_responses/rpc_grouped_assets_as_group.ts +117 -0
- package/src/tapd_responses/rpc_managed_utxo_as_utxo.ts +105 -0
- package/src/tapd_responses/rpc_receive_event_as_receive_update.ts +84 -0
- package/src/tapd_responses/rpc_rfq_event_as_event.ts +123 -0
- package/src/tapd_responses/rpc_sell_quote_as_quote.ts +136 -0
- package/src/tapd_responses/rpc_send_event_as_send_event.ts +245 -0
- package/src/tapd_responses/rpc_transfer_as_transfer.ts +366 -0
- package/src/tapd_responses/short_channel_id_as_channel.ts +30 -0
- package/src/typescript/asyncjs_util.d.ts +14 -0
- package/src/typescript/index.ts +22 -0
- package/src/typescript/invoices.d.ts +30 -0
- 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
|
+
}
|