1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct OutPoint {
5 #[prost(bytes = "vec", tag = "1")]
8 pub txid: ::prost::alloc::vec::Vec<u8>,
9 #[prost(uint32, tag = "2")]
12 pub output_index: u32,
13}
14#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct AssetOutPoint {
18 #[prost(string, tag = "1")]
24 pub anchor_out_point: ::prost::alloc::string::String,
25 #[prost(bytes = "vec", tag = "2")]
27 pub asset_id: ::prost::alloc::vec::Vec<u8>,
28 #[prost(bytes = "vec", tag = "3")]
31 pub script_key: ::prost::alloc::vec::Vec<u8>,
32}
33#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
34#[repr(i32)]
35pub enum SortDirection {
36 Desc = 0,
38 Asc = 1,
40}
41impl SortDirection {
42 pub fn as_str_name(&self) -> &'static str {
47 match self {
48 Self::Desc => "SORT_DIRECTION_DESC",
49 Self::Asc => "SORT_DIRECTION_ASC",
50 }
51 }
52 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
54 match value {
55 "SORT_DIRECTION_DESC" => Some(Self::Desc),
56 "SORT_DIRECTION_ASC" => Some(Self::Asc),
57 _ => None,
58 }
59 }
60}
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct AssetMeta {
63 #[prost(bytes = "vec", tag = "1")]
68 pub data: ::prost::alloc::vec::Vec<u8>,
69 #[prost(enumeration = "AssetMetaType", tag = "2")]
71 pub r#type: i32,
72 #[prost(bytes = "vec", tag = "3")]
76 pub meta_hash: ::prost::alloc::vec::Vec<u8>,
77}
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct ListAssetRequest {
80 #[prost(bool, tag = "1")]
85 pub with_witness: bool,
86 #[prost(bool, tag = "2")]
89 pub include_spent: bool,
90 #[prost(bool, tag = "3")]
94 pub include_leased: bool,
95 #[prost(bool, tag = "4")]
101 pub include_unconfirmed_mints: bool,
102 #[prost(uint64, tag = "5")]
104 pub min_amount: u64,
105 #[prost(uint64, tag = "6")]
107 pub max_amount: u64,
108 #[prost(bytes = "vec", tag = "7")]
110 pub group_key: ::prost::alloc::vec::Vec<u8>,
111 #[prost(message, optional, tag = "8")]
113 pub script_key: ::core::option::Option<ScriptKey>,
114 #[prost(message, optional, tag = "9")]
116 pub anchor_outpoint: ::core::option::Option<OutPoint>,
117 #[prost(message, optional, tag = "10")]
124 pub script_key_type: ::core::option::Option<ScriptKeyTypeQuery>,
125}
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct AnchorInfo {
128 #[prost(bytes = "vec", tag = "1")]
131 pub anchor_tx: ::prost::alloc::vec::Vec<u8>,
132 #[prost(string, tag = "3")]
134 pub anchor_block_hash: ::prost::alloc::string::String,
135 #[prost(string, tag = "4")]
137 pub anchor_outpoint: ::prost::alloc::string::String,
138 #[prost(bytes = "vec", tag = "5")]
141 pub internal_key: ::prost::alloc::vec::Vec<u8>,
142 #[prost(bytes = "vec", tag = "6")]
147 pub merkle_root: ::prost::alloc::vec::Vec<u8>,
148 #[prost(bytes = "vec", tag = "7")]
153 pub tapscript_sibling: ::prost::alloc::vec::Vec<u8>,
154 #[prost(uint32, tag = "8")]
156 pub block_height: u32,
157 #[prost(int64, tag = "9")]
159 pub block_timestamp: i64,
160}
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct GenesisInfo {
163 #[prost(string, tag = "1")]
165 pub genesis_point: ::prost::alloc::string::String,
166 #[prost(string, tag = "2")]
168 pub name: ::prost::alloc::string::String,
169 #[prost(bytes = "vec", tag = "3")]
171 pub meta_hash: ::prost::alloc::vec::Vec<u8>,
172 #[prost(bytes = "vec", tag = "4")]
174 pub asset_id: ::prost::alloc::vec::Vec<u8>,
175 #[prost(enumeration = "AssetType", tag = "5")]
177 pub asset_type: i32,
178 #[prost(uint32, tag = "6")]
182 pub output_index: u32,
183}
184#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct ExternalKey {
189 #[prost(string, tag = "1")]
194 pub xpub: ::prost::alloc::string::String,
195 #[prost(bytes = "vec", tag = "2")]
200 pub master_fingerprint: ::prost::alloc::vec::Vec<u8>,
201 #[prost(string, tag = "3")]
208 pub derivation_path: ::prost::alloc::string::String,
209}
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct GroupKeyRequest {
212 #[prost(message, optional, tag = "1")]
216 pub raw_key: ::core::option::Option<KeyDescriptor>,
217 #[prost(message, optional, tag = "2")]
222 pub anchor_genesis: ::core::option::Option<GenesisInfo>,
223 #[prost(bytes = "vec", tag = "3")]
228 pub tapscript_root: ::prost::alloc::vec::Vec<u8>,
229 #[prost(bytes = "vec", tag = "4")]
234 pub new_asset: ::prost::alloc::vec::Vec<u8>,
235 #[prost(message, optional, tag = "5")]
243 pub external_key: ::core::option::Option<ExternalKey>,
244}
245#[derive(Clone, PartialEq, ::prost::Message)]
246pub struct TxOut {
247 #[prost(int64, tag = "1")]
249 pub value: i64,
250 #[prost(bytes = "vec", tag = "2")]
252 pub pk_script: ::prost::alloc::vec::Vec<u8>,
253}
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct GroupVirtualTx {
256 #[prost(bytes = "vec", tag = "1")]
260 pub transaction: ::prost::alloc::vec::Vec<u8>,
261 #[prost(message, optional, tag = "2")]
266 pub prev_out: ::core::option::Option<TxOut>,
267 #[prost(bytes = "vec", tag = "3")]
272 pub genesis_id: ::prost::alloc::vec::Vec<u8>,
273 #[prost(bytes = "vec", tag = "4")]
277 pub tweaked_key: ::prost::alloc::vec::Vec<u8>,
278}
279#[derive(Clone, PartialEq, ::prost::Message)]
280pub struct GroupWitness {
281 #[prost(bytes = "vec", tag = "1")]
284 pub genesis_id: ::prost::alloc::vec::Vec<u8>,
285 #[prost(bytes = "vec", repeated, tag = "2")]
287 pub witness: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
288}
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct AssetGroup {
291 #[prost(bytes = "vec", tag = "1")]
293 pub raw_group_key: ::prost::alloc::vec::Vec<u8>,
294 #[prost(bytes = "vec", tag = "2")]
298 pub tweaked_group_key: ::prost::alloc::vec::Vec<u8>,
299 #[prost(bytes = "vec", tag = "3")]
303 pub asset_witness: ::prost::alloc::vec::Vec<u8>,
304 #[prost(bytes = "vec", tag = "4")]
308 pub tapscript_root: ::prost::alloc::vec::Vec<u8>,
309}
310#[derive(Clone, PartialEq, ::prost::Message)]
311pub struct GroupKeyReveal {
312 #[prost(bytes = "vec", tag = "1")]
314 pub raw_group_key: ::prost::alloc::vec::Vec<u8>,
315 #[prost(bytes = "vec", tag = "2")]
317 pub tapscript_root: ::prost::alloc::vec::Vec<u8>,
318}
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct GenesisReveal {
321 #[prost(message, optional, tag = "1")]
323 pub genesis_base_reveal: ::core::option::Option<GenesisInfo>,
324}
325#[derive(Clone, Copy, PartialEq, ::prost::Message)]
326pub struct DecimalDisplay {
327 #[prost(uint32, tag = "1")]
339 pub decimal_display: u32,
340}
341#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct Asset {
343 #[prost(enumeration = "AssetVersion", tag = "1")]
345 pub version: i32,
346 #[prost(message, optional, tag = "2")]
348 pub asset_genesis: ::core::option::Option<GenesisInfo>,
349 #[prost(uint64, tag = "4")]
351 pub amount: u64,
352 #[prost(int32, tag = "5")]
354 pub lock_time: i32,
355 #[prost(int32, tag = "6")]
357 pub relative_lock_time: i32,
358 #[prost(int32, tag = "7")]
360 pub script_version: i32,
361 #[prost(bytes = "vec", tag = "9")]
363 pub script_key: ::prost::alloc::vec::Vec<u8>,
364 #[prost(bool, tag = "10")]
367 pub script_key_is_local: bool,
368 #[prost(message, optional, tag = "11")]
370 pub asset_group: ::core::option::Option<AssetGroup>,
371 #[prost(message, optional, tag = "12")]
373 pub chain_anchor: ::core::option::Option<AnchorInfo>,
374 #[prost(message, repeated, tag = "13")]
378 pub prev_witnesses: ::prost::alloc::vec::Vec<PrevWitness>,
379 #[prost(bool, tag = "14")]
381 pub is_spent: bool,
382 #[prost(bytes = "vec", tag = "15")]
385 pub lease_owner: ::prost::alloc::vec::Vec<u8>,
386 #[prost(int64, tag = "16")]
389 pub lease_expiry: i64,
390 #[prost(bool, tag = "17")]
393 pub is_burn: bool,
394 #[prost(bool, tag = "18")]
404 pub script_key_declared_known: bool,
405 #[prost(bool, tag = "19")]
413 pub script_key_has_script_path: bool,
414 #[prost(message, optional, tag = "20")]
418 pub decimal_display: ::core::option::Option<DecimalDisplay>,
419 #[prost(enumeration = "ScriptKeyType", tag = "21")]
424 pub script_key_type: i32,
425}
426#[derive(Clone, PartialEq, ::prost::Message)]
427pub struct PrevWitness {
428 #[prost(message, optional, tag = "1")]
430 pub prev_id: ::core::option::Option<PrevInputAsset>,
431 #[prost(bytes = "vec", repeated, tag = "2")]
435 pub tx_witness: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
436 #[prost(message, optional, tag = "3")]
439 pub split_commitment: ::core::option::Option<SplitCommitment>,
440}
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct SplitCommitment {
443 #[prost(message, optional, tag = "1")]
446 pub root_asset: ::core::option::Option<Asset>,
447}
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct ListAssetResponse {
450 #[prost(message, repeated, tag = "1")]
453 pub assets: ::prost::alloc::vec::Vec<Asset>,
454 #[prost(uint64, tag = "2")]
457 pub unconfirmed_transfers: u64,
458 #[prost(uint64, tag = "3")]
462 pub unconfirmed_mints: u64,
463}
464#[derive(Clone, Copy, PartialEq, ::prost::Message)]
465pub struct ListUtxosRequest {
466 #[prost(bool, tag = "1")]
470 pub include_leased: bool,
471 #[prost(message, optional, tag = "2")]
475 pub script_key_type: ::core::option::Option<ScriptKeyTypeQuery>,
476}
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct ManagedUtxo {
479 #[prost(string, tag = "1")]
481 pub out_point: ::prost::alloc::string::String,
482 #[prost(int64, tag = "2")]
484 pub amt_sat: i64,
485 #[prost(bytes = "vec", tag = "3")]
487 pub internal_key: ::prost::alloc::vec::Vec<u8>,
488 #[prost(bytes = "vec", tag = "4")]
490 pub taproot_asset_root: ::prost::alloc::vec::Vec<u8>,
491 #[prost(bytes = "vec", tag = "5")]
496 pub merkle_root: ::prost::alloc::vec::Vec<u8>,
497 #[prost(message, repeated, tag = "6")]
499 pub assets: ::prost::alloc::vec::Vec<Asset>,
500 #[prost(bytes = "vec", tag = "7")]
502 pub lease_owner: ::prost::alloc::vec::Vec<u8>,
503 #[prost(int64, tag = "8")]
506 pub lease_expiry_unix: i64,
507}
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct ListUtxosResponse {
510 #[prost(map = "string, message", tag = "1")]
512 pub managed_utxos: ::std::collections::HashMap<
513 ::prost::alloc::string::String,
514 ManagedUtxo,
515 >,
516}
517#[derive(Clone, Copy, PartialEq, ::prost::Message)]
518pub struct ListGroupsRequest {}
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct AssetHumanReadable {
521 #[prost(bytes = "vec", tag = "1")]
523 pub id: ::prost::alloc::vec::Vec<u8>,
524 #[prost(uint64, tag = "2")]
526 pub amount: u64,
527 #[prost(int32, tag = "3")]
529 pub lock_time: i32,
530 #[prost(int32, tag = "4")]
532 pub relative_lock_time: i32,
533 #[prost(string, tag = "5")]
535 pub tag: ::prost::alloc::string::String,
536 #[prost(bytes = "vec", tag = "6")]
538 pub meta_hash: ::prost::alloc::vec::Vec<u8>,
539 #[prost(enumeration = "AssetType", tag = "7")]
541 pub r#type: i32,
542 #[prost(enumeration = "AssetVersion", tag = "8")]
544 pub version: i32,
545}
546#[derive(Clone, PartialEq, ::prost::Message)]
547pub struct GroupedAssets {
548 #[prost(message, repeated, tag = "1")]
550 pub assets: ::prost::alloc::vec::Vec<AssetHumanReadable>,
551}
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct ListGroupsResponse {
554 #[prost(map = "string, message", tag = "1")]
556 pub groups: ::std::collections::HashMap<
557 ::prost::alloc::string::String,
558 GroupedAssets,
559 >,
560}
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct ListBalancesRequest {
563 #[prost(bytes = "vec", tag = "3")]
566 pub asset_filter: ::prost::alloc::vec::Vec<u8>,
567 #[prost(bytes = "vec", tag = "4")]
571 pub group_key_filter: ::prost::alloc::vec::Vec<u8>,
572 #[prost(bool, tag = "5")]
574 pub include_leased: bool,
575 #[prost(message, optional, tag = "6")]
582 pub script_key_type: ::core::option::Option<ScriptKeyTypeQuery>,
583 #[prost(oneof = "list_balances_request::GroupBy", tags = "1, 2")]
584 pub group_by: ::core::option::Option<list_balances_request::GroupBy>,
585}
586pub mod list_balances_request {
588 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
589 pub enum GroupBy {
590 #[prost(bool, tag = "1")]
592 AssetId(bool),
593 #[prost(bool, tag = "2")]
595 GroupKey(bool),
596 }
597}
598#[derive(Clone, PartialEq, ::prost::Message)]
599pub struct AssetBalance {
600 #[prost(message, optional, tag = "1")]
602 pub asset_genesis: ::core::option::Option<GenesisInfo>,
603 #[prost(uint64, tag = "3")]
605 pub balance: u64,
606 #[prost(bytes = "vec", tag = "4")]
608 pub group_key: ::prost::alloc::vec::Vec<u8>,
609}
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct AssetGroupBalance {
612 #[prost(bytes = "vec", tag = "1")]
614 pub group_key: ::prost::alloc::vec::Vec<u8>,
615 #[prost(uint64, tag = "2")]
617 pub balance: u64,
618}
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct ListBalancesResponse {
621 #[prost(map = "string, message", tag = "1")]
625 pub asset_balances: ::std::collections::HashMap<
626 ::prost::alloc::string::String,
627 AssetBalance,
628 >,
629 #[prost(map = "string, message", tag = "2")]
633 pub asset_group_balances: ::std::collections::HashMap<
634 ::prost::alloc::string::String,
635 AssetGroupBalance,
636 >,
637 #[prost(uint64, tag = "3")]
641 pub unconfirmed_transfers: u64,
642}
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct ListTransfersRequest {
645 #[prost(string, tag = "1")]
649 pub anchor_txid: ::prost::alloc::string::String,
650}
651#[derive(Clone, PartialEq, ::prost::Message)]
652pub struct ListTransfersResponse {
653 #[prost(message, repeated, tag = "1")]
655 pub transfers: ::prost::alloc::vec::Vec<AssetTransfer>,
656}
657#[derive(Clone, PartialEq, ::prost::Message)]
664pub struct ChainHash {
665 #[prost(bytes = "vec", tag = "1")]
671 pub hash: ::prost::alloc::vec::Vec<u8>,
672 #[prost(string, tag = "2")]
678 pub hash_str: ::prost::alloc::string::String,
679}
680#[derive(Clone, PartialEq, ::prost::Message)]
681pub struct AssetTransfer {
682 #[prost(int64, tag = "1")]
684 pub transfer_timestamp: i64,
685 #[prost(bytes = "vec", tag = "2")]
691 pub anchor_tx_hash: ::prost::alloc::vec::Vec<u8>,
692 #[prost(uint32, tag = "3")]
696 pub anchor_tx_height_hint: u32,
697 #[prost(int64, tag = "4")]
699 pub anchor_tx_chain_fees: i64,
700 #[prost(message, repeated, tag = "5")]
702 pub inputs: ::prost::alloc::vec::Vec<TransferInput>,
703 #[prost(message, repeated, tag = "6")]
705 pub outputs: ::prost::alloc::vec::Vec<TransferOutput>,
706 #[prost(message, optional, tag = "7")]
710 pub anchor_tx_block_hash: ::core::option::Option<ChainHash>,
711 #[prost(uint32, tag = "8")]
715 pub anchor_tx_block_height: u32,
716 #[prost(string, tag = "9")]
720 pub label: ::prost::alloc::string::String,
721 #[prost(bytes = "vec", tag = "10")]
724 pub anchor_tx: ::prost::alloc::vec::Vec<u8>,
725}
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct TransferInput {
728 #[prost(string, tag = "1")]
731 pub anchor_point: ::prost::alloc::string::String,
732 #[prost(bytes = "vec", tag = "2")]
734 pub asset_id: ::prost::alloc::vec::Vec<u8>,
735 #[prost(bytes = "vec", tag = "3")]
737 pub script_key: ::prost::alloc::vec::Vec<u8>,
738 #[prost(uint64, tag = "4")]
740 pub amount: u64,
741}
742#[derive(Clone, PartialEq, ::prost::Message)]
743pub struct TransferOutputAnchor {
744 #[prost(string, tag = "1")]
747 pub outpoint: ::prost::alloc::string::String,
748 #[prost(int64, tag = "2")]
750 pub value: i64,
751 #[prost(bytes = "vec", tag = "3")]
754 pub internal_key: ::prost::alloc::vec::Vec<u8>,
755 #[prost(bytes = "vec", tag = "4")]
758 pub taproot_asset_root: ::prost::alloc::vec::Vec<u8>,
759 #[prost(bytes = "vec", tag = "5")]
765 pub merkle_root: ::prost::alloc::vec::Vec<u8>,
766 #[prost(bytes = "vec", tag = "6")]
770 pub tapscript_sibling: ::prost::alloc::vec::Vec<u8>,
771 #[prost(uint32, tag = "7")]
776 pub num_passive_assets: u32,
777 #[prost(bytes = "vec", tag = "8")]
780 pub pk_script: ::prost::alloc::vec::Vec<u8>,
781}
782#[derive(Clone, PartialEq, ::prost::Message)]
783pub struct TransferOutput {
784 #[prost(message, optional, tag = "1")]
788 pub anchor: ::core::option::Option<TransferOutputAnchor>,
789 #[prost(bytes = "vec", tag = "2")]
791 pub script_key: ::prost::alloc::vec::Vec<u8>,
792 #[prost(bool, tag = "3")]
796 pub script_key_is_local: bool,
797 #[prost(uint64, tag = "4")]
799 pub amount: u64,
800 #[prost(bytes = "vec", tag = "5")]
803 pub new_proof_blob: ::prost::alloc::vec::Vec<u8>,
804 #[prost(bytes = "vec", tag = "6")]
809 pub split_commit_root_hash: ::prost::alloc::vec::Vec<u8>,
810 #[prost(enumeration = "OutputType", tag = "7")]
815 pub output_type: i32,
816 #[prost(enumeration = "AssetVersion", tag = "8")]
819 pub asset_version: i32,
820 #[prost(uint64, tag = "9")]
823 pub lock_time: u64,
824 #[prost(uint64, tag = "10")]
828 pub relative_lock_time: u64,
829 #[prost(enumeration = "ProofDeliveryStatus", tag = "11")]
831 pub proof_delivery_status: i32,
832 #[prost(bytes = "vec", tag = "12")]
834 pub asset_id: ::prost::alloc::vec::Vec<u8>,
835 #[prost(string, tag = "13")]
838 pub proof_courier_addr: ::prost::alloc::string::String,
839 #[prost(string, tag = "14")]
843 pub tap_addr: ::prost::alloc::string::String,
844}
845#[derive(Clone, Copy, PartialEq, ::prost::Message)]
846pub struct StopRequest {}
847#[derive(Clone, Copy, PartialEq, ::prost::Message)]
848pub struct StopResponse {}
849#[derive(Clone, PartialEq, ::prost::Message)]
850pub struct DebugLevelRequest {
851 #[prost(bool, tag = "1")]
853 pub show: bool,
854 #[prost(string, tag = "2")]
860 pub level_spec: ::prost::alloc::string::String,
861}
862#[derive(Clone, PartialEq, ::prost::Message)]
863pub struct DebugLevelResponse {
864 #[prost(string, tag = "1")]
867 pub sub_systems: ::prost::alloc::string::String,
868}
869#[derive(Clone, PartialEq, ::prost::Message)]
870pub struct Addr {
871 #[prost(string, tag = "1")]
873 pub encoded: ::prost::alloc::string::String,
874 #[prost(bytes = "vec", tag = "2")]
877 pub asset_id: ::prost::alloc::vec::Vec<u8>,
878 #[prost(enumeration = "AssetType", tag = "3")]
880 pub asset_type: i32,
881 #[prost(uint64, tag = "4")]
886 pub amount: u64,
887 #[prost(bytes = "vec", tag = "5")]
892 pub group_key: ::prost::alloc::vec::Vec<u8>,
893 #[prost(bytes = "vec", tag = "6")]
897 pub script_key: ::prost::alloc::vec::Vec<u8>,
898 #[prost(bytes = "vec", tag = "7")]
900 pub internal_key: ::prost::alloc::vec::Vec<u8>,
901 #[prost(bytes = "vec", tag = "8")]
907 pub tapscript_sibling: ::prost::alloc::vec::Vec<u8>,
908 #[prost(bytes = "vec", tag = "9")]
913 pub taproot_output_key: ::prost::alloc::vec::Vec<u8>,
914 #[prost(string, tag = "10")]
918 pub proof_courier_addr: ::prost::alloc::string::String,
919 #[prost(enumeration = "AssetVersion", tag = "11")]
921 pub asset_version: i32,
922 #[prost(enumeration = "AddrVersion", tag = "12")]
924 pub address_version: i32,
925}
926#[derive(Clone, Copy, PartialEq, ::prost::Message)]
927pub struct QueryAddrRequest {
928 #[prost(int64, tag = "1")]
932 pub created_after: i64,
933 #[prost(int64, tag = "2")]
937 pub created_before: i64,
938 #[prost(int32, tag = "3")]
940 pub limit: i32,
941 #[prost(int32, tag = "4")]
943 pub offset: i32,
944}
945#[derive(Clone, PartialEq, ::prost::Message)]
946pub struct QueryAddrResponse {
947 #[prost(message, repeated, tag = "1")]
949 pub addrs: ::prost::alloc::vec::Vec<Addr>,
950}
951#[derive(Clone, PartialEq, ::prost::Message)]
952pub struct NewAddrRequest {
953 #[prost(bytes = "vec", tag = "1")]
958 pub asset_id: ::prost::alloc::vec::Vec<u8>,
959 #[prost(uint64, tag = "2")]
964 pub amt: u64,
965 #[prost(message, optional, tag = "3")]
973 pub script_key: ::core::option::Option<ScriptKey>,
974 #[prost(message, optional, tag = "4")]
982 pub internal_key: ::core::option::Option<KeyDescriptor>,
983 #[prost(bytes = "vec", tag = "5")]
989 pub tapscript_sibling: ::prost::alloc::vec::Vec<u8>,
990 #[prost(string, tag = "6")]
994 pub proof_courier_addr: ::prost::alloc::string::String,
995 #[prost(enumeration = "AssetVersion", tag = "7")]
998 pub asset_version: i32,
999 #[prost(enumeration = "AddrVersion", tag = "8")]
1002 pub address_version: i32,
1003 #[prost(bytes = "vec", tag = "9")]
1007 pub group_key: ::prost::alloc::vec::Vec<u8>,
1008 #[prost(bool, tag = "10")]
1013 pub skip_proof_courier_conn_check: bool,
1014}
1015#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1016pub struct ScriptKeyTypeQuery {
1017 #[prost(oneof = "script_key_type_query::Type", tags = "1, 2")]
1018 pub r#type: ::core::option::Option<script_key_type_query::Type>,
1019}
1020pub mod script_key_type_query {
1022 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1023 pub enum Type {
1024 #[prost(enumeration = "super::ScriptKeyType", tag = "1")]
1026 ExplicitType(i32),
1027 #[prost(bool, tag = "2")]
1029 AllTypes(bool),
1030 }
1031}
1032#[derive(Clone, PartialEq, ::prost::Message)]
1033pub struct ScriptKey {
1034 #[prost(bytes = "vec", tag = "1")]
1039 pub pub_key: ::prost::alloc::vec::Vec<u8>,
1040 #[prost(message, optional, tag = "2")]
1043 pub key_desc: ::core::option::Option<KeyDescriptor>,
1044 #[prost(bytes = "vec", tag = "3")]
1048 pub tap_tweak: ::prost::alloc::vec::Vec<u8>,
1049 #[prost(enumeration = "ScriptKeyType", tag = "4")]
1055 pub r#type: i32,
1056}
1057#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1058pub struct KeyLocator {
1059 #[prost(int32, tag = "1")]
1062 pub key_family: i32,
1063 #[prost(int32, tag = "2")]
1066 pub key_index: i32,
1067}
1068#[derive(Clone, PartialEq, ::prost::Message)]
1069pub struct KeyDescriptor {
1070 #[prost(bytes = "vec", tag = "1")]
1073 pub raw_key_bytes: ::prost::alloc::vec::Vec<u8>,
1074 #[prost(message, optional, tag = "2")]
1077 pub key_loc: ::core::option::Option<KeyLocator>,
1078}
1079#[derive(Clone, PartialEq, ::prost::Message)]
1080pub struct TapscriptFullTree {
1081 #[prost(message, repeated, tag = "1")]
1084 pub all_leaves: ::prost::alloc::vec::Vec<TapLeaf>,
1085}
1086#[derive(Clone, PartialEq, ::prost::Message)]
1087pub struct TapLeaf {
1088 #[prost(bytes = "vec", tag = "2")]
1090 pub script: ::prost::alloc::vec::Vec<u8>,
1091}
1092#[derive(Clone, PartialEq, ::prost::Message)]
1093pub struct TapBranch {
1094 #[prost(bytes = "vec", tag = "1")]
1096 pub left_taphash: ::prost::alloc::vec::Vec<u8>,
1097 #[prost(bytes = "vec", tag = "2")]
1099 pub right_taphash: ::prost::alloc::vec::Vec<u8>,
1100}
1101#[derive(Clone, PartialEq, ::prost::Message)]
1102pub struct DecodeAddrRequest {
1103 #[prost(string, tag = "1")]
1105 pub addr: ::prost::alloc::string::String,
1106}
1107#[derive(Clone, PartialEq, ::prost::Message)]
1108pub struct ProofFile {
1109 #[prost(bytes = "vec", tag = "1")]
1112 pub raw_proof_file: ::prost::alloc::vec::Vec<u8>,
1113 #[prost(string, tag = "2")]
1116 pub genesis_point: ::prost::alloc::string::String,
1117}
1118#[derive(Clone, PartialEq, ::prost::Message)]
1119pub struct DecodedProof {
1120 #[prost(uint32, tag = "1")]
1122 pub proof_at_depth: u32,
1123 #[prost(uint32, tag = "2")]
1127 pub number_of_proofs: u32,
1128 #[prost(message, optional, tag = "3")]
1130 pub asset: ::core::option::Option<Asset>,
1131 #[prost(message, optional, tag = "4")]
1133 pub meta_reveal: ::core::option::Option<AssetMeta>,
1134 #[prost(bytes = "vec", tag = "5")]
1137 pub tx_merkle_proof: ::prost::alloc::vec::Vec<u8>,
1138 #[prost(bytes = "vec", tag = "6")]
1141 pub inclusion_proof: ::prost::alloc::vec::Vec<u8>,
1142 #[prost(bytes = "vec", repeated, tag = "7")]
1145 pub exclusion_proofs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1146 #[prost(bytes = "vec", tag = "8")]
1150 pub split_root_proof: ::prost::alloc::vec::Vec<u8>,
1151 #[prost(uint32, tag = "9")]
1154 pub num_additional_inputs: u32,
1155 #[prost(bytes = "vec", repeated, tag = "10")]
1162 pub challenge_witness: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1163 #[prost(bool, tag = "11")]
1167 pub is_burn: bool,
1168 #[prost(message, optional, tag = "12")]
1171 pub genesis_reveal: ::core::option::Option<GenesisReveal>,
1172 #[prost(message, optional, tag = "13")]
1175 pub group_key_reveal: ::core::option::Option<GroupKeyReveal>,
1176 #[prost(bytes = "vec", tag = "14")]
1181 pub alt_leaves: ::prost::alloc::vec::Vec<u8>,
1182}
1183#[derive(Clone, PartialEq, ::prost::Message)]
1184pub struct VerifyProofResponse {
1185 #[prost(bool, tag = "1")]
1187 pub valid: bool,
1188 #[prost(message, optional, tag = "2")]
1190 pub decoded_proof: ::core::option::Option<DecodedProof>,
1191}
1192#[derive(Clone, PartialEq, ::prost::Message)]
1193pub struct DecodeProofRequest {
1194 #[prost(bytes = "vec", tag = "1")]
1199 pub raw_proof: ::prost::alloc::vec::Vec<u8>,
1200 #[prost(uint32, tag = "2")]
1204 pub proof_at_depth: u32,
1205 #[prost(bool, tag = "3")]
1207 pub with_prev_witnesses: bool,
1208 #[prost(bool, tag = "4")]
1210 pub with_meta_reveal: bool,
1211}
1212#[derive(Clone, PartialEq, ::prost::Message)]
1213pub struct DecodeProofResponse {
1214 #[prost(message, optional, tag = "1")]
1216 pub decoded_proof: ::core::option::Option<DecodedProof>,
1217}
1218#[derive(Clone, PartialEq, ::prost::Message)]
1219pub struct ExportProofRequest {
1220 #[prost(bytes = "vec", tag = "1")]
1222 pub asset_id: ::prost::alloc::vec::Vec<u8>,
1223 #[prost(bytes = "vec", tag = "2")]
1225 pub script_key: ::prost::alloc::vec::Vec<u8>,
1226 #[prost(message, optional, tag = "3")]
1228 pub outpoint: ::core::option::Option<OutPoint>,
1229}
1230#[derive(Clone, PartialEq, ::prost::Message)]
1231pub struct UnpackProofFileRequest {
1232 #[prost(bytes = "vec", tag = "1")]
1235 pub raw_proof_file: ::prost::alloc::vec::Vec<u8>,
1236}
1237#[derive(Clone, PartialEq, ::prost::Message)]
1238pub struct UnpackProofFileResponse {
1239 #[prost(bytes = "vec", repeated, tag = "1")]
1243 pub raw_proofs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1244}
1245#[derive(Clone, PartialEq, ::prost::Message)]
1246pub struct AddrEvent {
1247 #[prost(uint64, tag = "1")]
1249 pub creation_time_unix_seconds: u64,
1250 #[prost(message, optional, tag = "2")]
1252 pub addr: ::core::option::Option<Addr>,
1253 #[prost(enumeration = "AddrEventStatus", tag = "3")]
1255 pub status: i32,
1256 #[prost(string, tag = "4")]
1258 pub outpoint: ::prost::alloc::string::String,
1259 #[prost(uint64, tag = "5")]
1264 pub utxo_amt_sat: u64,
1265 #[prost(bytes = "vec", tag = "6")]
1268 pub taproot_sibling: ::prost::alloc::vec::Vec<u8>,
1269 #[prost(uint32, tag = "7")]
1273 pub confirmation_height: u32,
1274 #[prost(bool, tag = "8")]
1278 pub has_proof: bool,
1279}
1280#[derive(Clone, PartialEq, ::prost::Message)]
1281pub struct AddrReceivesRequest {
1282 #[prost(string, tag = "1")]
1284 pub filter_addr: ::prost::alloc::string::String,
1285 #[prost(enumeration = "AddrEventStatus", tag = "2")]
1287 pub filter_status: i32,
1288 #[prost(uint64, tag = "3")]
1291 pub start_timestamp: u64,
1292 #[prost(uint64, tag = "4")]
1295 pub end_timestamp: u64,
1296 #[prost(int32, tag = "5")]
1298 pub offset: i32,
1299 #[prost(int32, tag = "6")]
1301 pub limit: i32,
1302 #[prost(enumeration = "SortDirection", tag = "7")]
1304 pub direction: i32,
1305}
1306#[derive(Clone, PartialEq, ::prost::Message)]
1307pub struct AddrReceivesResponse {
1308 #[prost(message, repeated, tag = "1")]
1310 pub events: ::prost::alloc::vec::Vec<AddrEvent>,
1311}
1312#[derive(Clone, PartialEq, ::prost::Message)]
1313pub struct SendAssetRequest {
1314 #[prost(string, repeated, tag = "1")]
1322 pub tap_addrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1323 #[prost(uint32, tag = "2")]
1325 pub fee_rate: u32,
1326 #[prost(string, tag = "3")]
1330 pub label: ::prost::alloc::string::String,
1331 #[prost(bool, tag = "4")]
1335 pub skip_proof_courier_ping_check: bool,
1336 #[prost(message, repeated, tag = "5")]
1343 pub addresses_with_amounts: ::prost::alloc::vec::Vec<AddressWithAmount>,
1344}
1345#[derive(Clone, PartialEq, ::prost::Message)]
1346pub struct AddressWithAmount {
1347 #[prost(string, tag = "1")]
1349 pub tap_addr: ::prost::alloc::string::String,
1350 #[prost(uint64, tag = "2")]
1356 pub amount: u64,
1357}
1358#[derive(Clone, PartialEq, ::prost::Message)]
1359pub struct PrevInputAsset {
1360 #[prost(string, tag = "1")]
1363 pub anchor_point: ::prost::alloc::string::String,
1364 #[prost(bytes = "vec", tag = "2")]
1366 pub asset_id: ::prost::alloc::vec::Vec<u8>,
1367 #[prost(bytes = "vec", tag = "3")]
1369 pub script_key: ::prost::alloc::vec::Vec<u8>,
1370 #[prost(uint64, tag = "4")]
1372 pub amount: u64,
1373}
1374#[derive(Clone, PartialEq, ::prost::Message)]
1375pub struct SendAssetResponse {
1376 #[prost(message, optional, tag = "1")]
1378 pub transfer: ::core::option::Option<AssetTransfer>,
1379}
1380#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1381pub struct GetInfoRequest {}
1382#[derive(Clone, PartialEq, ::prost::Message)]
1383pub struct GetInfoResponse {
1384 #[prost(string, tag = "1")]
1386 pub version: ::prost::alloc::string::String,
1387 #[prost(string, tag = "2")]
1389 pub lnd_version: ::prost::alloc::string::String,
1390 #[prost(string, tag = "3")]
1393 pub network: ::prost::alloc::string::String,
1394 #[prost(string, tag = "4")]
1396 pub lnd_identity_pubkey: ::prost::alloc::string::String,
1397 #[prost(string, tag = "5")]
1399 pub node_alias: ::prost::alloc::string::String,
1400 #[prost(uint32, tag = "6")]
1403 pub block_height: u32,
1404 #[prost(string, tag = "7")]
1407 pub block_hash: ::prost::alloc::string::String,
1408 #[prost(bool, tag = "8")]
1411 pub sync_to_chain: bool,
1412}
1413#[derive(Clone, PartialEq, ::prost::Message)]
1414pub struct FetchAssetMetaRequest {
1415 #[prost(oneof = "fetch_asset_meta_request::Asset", tags = "1, 2, 3, 4")]
1416 pub asset: ::core::option::Option<fetch_asset_meta_request::Asset>,
1417}
1418pub mod fetch_asset_meta_request {
1420 #[derive(Clone, PartialEq, ::prost::Oneof)]
1421 pub enum Asset {
1422 #[prost(bytes, tag = "1")]
1424 AssetId(::prost::alloc::vec::Vec<u8>),
1425 #[prost(bytes, tag = "2")]
1427 MetaHash(::prost::alloc::vec::Vec<u8>),
1428 #[prost(string, tag = "3")]
1430 AssetIdStr(::prost::alloc::string::String),
1431 #[prost(string, tag = "4")]
1433 MetaHashStr(::prost::alloc::string::String),
1434 }
1435}
1436#[derive(Clone, PartialEq, ::prost::Message)]
1437pub struct FetchAssetMetaResponse {
1438 #[prost(bytes = "vec", tag = "1")]
1443 pub data: ::prost::alloc::vec::Vec<u8>,
1444 #[prost(enumeration = "AssetMetaType", tag = "2")]
1446 pub r#type: i32,
1447 #[prost(bytes = "vec", tag = "3")]
1451 pub meta_hash: ::prost::alloc::vec::Vec<u8>,
1452 #[prost(map = "uint64, bytes", tag = "4")]
1456 pub unknown_odd_types: ::std::collections::HashMap<
1457 u64,
1458 ::prost::alloc::vec::Vec<u8>,
1459 >,
1460 #[prost(uint32, tag = "5")]
1464 pub decimal_display: u32,
1465 #[prost(bool, tag = "6")]
1469 pub universe_commitments: bool,
1470 #[prost(string, repeated, tag = "7")]
1474 pub canonical_universe_urls: ::prost::alloc::vec::Vec<
1475 ::prost::alloc::string::String,
1476 >,
1477 #[prost(bytes = "vec", tag = "8")]
1481 pub delegation_key: ::prost::alloc::vec::Vec<u8>,
1482}
1483#[derive(Clone, PartialEq, ::prost::Message)]
1484pub struct BurnAssetRequest {
1485 #[prost(uint64, tag = "3")]
1487 pub amount_to_burn: u64,
1488 #[prost(string, tag = "4")]
1492 pub confirmation_text: ::prost::alloc::string::String,
1493 #[prost(string, tag = "5")]
1495 pub note: ::prost::alloc::string::String,
1496 #[prost(oneof = "burn_asset_request::Asset", tags = "1, 2")]
1497 pub asset: ::core::option::Option<burn_asset_request::Asset>,
1498}
1499pub mod burn_asset_request {
1501 #[derive(Clone, PartialEq, ::prost::Oneof)]
1502 pub enum Asset {
1503 #[prost(bytes, tag = "1")]
1505 AssetId(::prost::alloc::vec::Vec<u8>),
1506 #[prost(string, tag = "2")]
1508 AssetIdStr(::prost::alloc::string::String),
1509 }
1510}
1511#[derive(Clone, PartialEq, ::prost::Message)]
1512pub struct BurnAssetResponse {
1513 #[prost(message, optional, tag = "1")]
1515 pub burn_transfer: ::core::option::Option<AssetTransfer>,
1516 #[prost(message, optional, tag = "2")]
1518 pub burn_proof: ::core::option::Option<DecodedProof>,
1519}
1520#[derive(Clone, PartialEq, ::prost::Message)]
1521pub struct ListBurnsRequest {
1522 #[prost(bytes = "vec", tag = "1")]
1524 pub asset_id: ::prost::alloc::vec::Vec<u8>,
1525 #[prost(bytes = "vec", tag = "3")]
1527 pub tweaked_group_key: ::prost::alloc::vec::Vec<u8>,
1528 #[prost(bytes = "vec", tag = "4")]
1530 pub anchor_txid: ::prost::alloc::vec::Vec<u8>,
1531}
1532#[derive(Clone, PartialEq, ::prost::Message)]
1533pub struct AssetBurn {
1534 #[prost(string, tag = "1")]
1536 pub note: ::prost::alloc::string::String,
1537 #[prost(bytes = "vec", tag = "2")]
1539 pub asset_id: ::prost::alloc::vec::Vec<u8>,
1540 #[prost(bytes = "vec", tag = "3")]
1542 pub tweaked_group_key: ::prost::alloc::vec::Vec<u8>,
1543 #[prost(uint64, tag = "4")]
1545 pub amount: u64,
1546 #[prost(bytes = "vec", tag = "5")]
1548 pub anchor_txid: ::prost::alloc::vec::Vec<u8>,
1549}
1550#[derive(Clone, PartialEq, ::prost::Message)]
1551pub struct ListBurnsResponse {
1552 #[prost(message, repeated, tag = "1")]
1554 pub burns: ::prost::alloc::vec::Vec<AssetBurn>,
1555}
1556#[derive(Clone, PartialEq, ::prost::Message)]
1557pub struct SubscribeReceiveEventsRequest {
1558 #[prost(string, tag = "1")]
1561 pub filter_addr: ::prost::alloc::string::String,
1562 #[prost(int64, tag = "2")]
1565 pub start_timestamp: i64,
1566}
1567#[derive(Clone, PartialEq, ::prost::Message)]
1568pub struct ReceiveEvent {
1569 #[prost(int64, tag = "1")]
1571 pub timestamp: i64,
1572 #[prost(message, optional, tag = "2")]
1574 pub address: ::core::option::Option<Addr>,
1575 #[prost(string, tag = "3")]
1577 pub outpoint: ::prost::alloc::string::String,
1578 #[prost(enumeration = "AddrEventStatus", tag = "4")]
1581 pub status: i32,
1582 #[prost(uint32, tag = "5")]
1586 pub confirmation_height: u32,
1587 #[prost(string, tag = "6")]
1589 pub error: ::prost::alloc::string::String,
1590}
1591#[derive(Clone, PartialEq, ::prost::Message)]
1592pub struct SubscribeSendEventsRequest {
1593 #[prost(bytes = "vec", tag = "1")]
1596 pub filter_script_key: ::prost::alloc::vec::Vec<u8>,
1597 #[prost(string, tag = "2")]
1600 pub filter_label: ::prost::alloc::string::String,
1601 #[prost(int64, tag = "3")]
1604 pub start_timestamp: i64,
1605}
1606#[derive(Clone, PartialEq, ::prost::Message)]
1607pub struct SendEvent {
1608 #[prost(int64, tag = "1")]
1610 pub timestamp: i64,
1611 #[prost(string, tag = "2")]
1615 pub send_state: ::prost::alloc::string::String,
1616 #[prost(enumeration = "ParcelType", tag = "3")]
1618 pub parcel_type: i32,
1619 #[prost(message, repeated, tag = "4")]
1623 pub addresses: ::prost::alloc::vec::Vec<Addr>,
1624 #[prost(bytes = "vec", repeated, tag = "5")]
1626 pub virtual_packets: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1627 #[prost(bytes = "vec", repeated, tag = "6")]
1631 pub passive_virtual_packets: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
1632 #[prost(message, optional, tag = "7")]
1635 pub anchor_transaction: ::core::option::Option<AnchorTransaction>,
1636 #[prost(message, optional, tag = "8")]
1639 pub transfer: ::core::option::Option<AssetTransfer>,
1640 #[prost(string, tag = "9")]
1642 pub error: ::prost::alloc::string::String,
1643 #[prost(string, tag = "10")]
1645 pub transfer_label: ::prost::alloc::string::String,
1646 #[prost(string, tag = "11")]
1648 pub next_send_state: ::prost::alloc::string::String,
1649}
1650#[derive(Clone, PartialEq, ::prost::Message)]
1651pub struct AnchorTransaction {
1652 #[prost(bytes = "vec", tag = "1")]
1655 pub anchor_psbt: ::prost::alloc::vec::Vec<u8>,
1656 #[prost(int32, tag = "2")]
1659 pub change_output_index: i32,
1660 #[prost(int64, tag = "3")]
1664 pub chain_fees_sats: i64,
1665 #[prost(int32, tag = "4")]
1668 pub target_fee_rate_sat_kw: i32,
1669 #[prost(message, repeated, tag = "5")]
1674 pub lnd_locked_utxos: ::prost::alloc::vec::Vec<OutPoint>,
1675 #[prost(bytes = "vec", tag = "6")]
1678 pub final_tx: ::prost::alloc::vec::Vec<u8>,
1679}
1680#[derive(Clone, PartialEq, ::prost::Message)]
1681pub struct RegisterTransferRequest {
1682 #[prost(bytes = "vec", tag = "1")]
1684 pub asset_id: ::prost::alloc::vec::Vec<u8>,
1685 #[prost(bytes = "vec", tag = "2")]
1687 pub group_key: ::prost::alloc::vec::Vec<u8>,
1688 #[prost(bytes = "vec", tag = "3")]
1690 pub script_key: ::prost::alloc::vec::Vec<u8>,
1691 #[prost(message, optional, tag = "4")]
1693 pub outpoint: ::core::option::Option<OutPoint>,
1694}
1695#[derive(Clone, PartialEq, ::prost::Message)]
1696pub struct RegisterTransferResponse {
1697 #[prost(message, optional, tag = "1")]
1699 pub registered_asset: ::core::option::Option<Asset>,
1700}
1701#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1702#[repr(i32)]
1703pub enum AssetType {
1704 Normal = 0,
1709 Collectible = 1,
1714}
1715impl AssetType {
1716 pub fn as_str_name(&self) -> &'static str {
1721 match self {
1722 Self::Normal => "NORMAL",
1723 Self::Collectible => "COLLECTIBLE",
1724 }
1725 }
1726 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1728 match value {
1729 "NORMAL" => Some(Self::Normal),
1730 "COLLECTIBLE" => Some(Self::Collectible),
1731 _ => None,
1732 }
1733 }
1734}
1735#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1736#[repr(i32)]
1737pub enum AssetMetaType {
1738 MetaTypeOpaque = 0,
1742 MetaTypeJson = 1,
1746}
1747impl AssetMetaType {
1748 pub fn as_str_name(&self) -> &'static str {
1753 match self {
1754 Self::MetaTypeOpaque => "META_TYPE_OPAQUE",
1755 Self::MetaTypeJson => "META_TYPE_JSON",
1756 }
1757 }
1758 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1760 match value {
1761 "META_TYPE_OPAQUE" => Some(Self::MetaTypeOpaque),
1762 "META_TYPE_JSON" => Some(Self::MetaTypeJson),
1763 _ => None,
1764 }
1765 }
1766}
1767#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1768#[repr(i32)]
1769pub enum AssetVersion {
1770 V0 = 0,
1773 V1 = 1,
1776}
1777impl AssetVersion {
1778 pub fn as_str_name(&self) -> &'static str {
1783 match self {
1784 Self::V0 => "ASSET_VERSION_V0",
1785 Self::V1 => "ASSET_VERSION_V1",
1786 }
1787 }
1788 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1790 match value {
1791 "ASSET_VERSION_V0" => Some(Self::V0),
1792 "ASSET_VERSION_V1" => Some(Self::V1),
1793 _ => None,
1794 }
1795 }
1796}
1797#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1798#[repr(i32)]
1799pub enum OutputType {
1800 Simple = 0,
1804 SplitRoot = 1,
1808}
1809impl OutputType {
1810 pub fn as_str_name(&self) -> &'static str {
1815 match self {
1816 Self::Simple => "OUTPUT_TYPE_SIMPLE",
1817 Self::SplitRoot => "OUTPUT_TYPE_SPLIT_ROOT",
1818 }
1819 }
1820 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1822 match value {
1823 "OUTPUT_TYPE_SIMPLE" => Some(Self::Simple),
1824 "OUTPUT_TYPE_SPLIT_ROOT" => Some(Self::SplitRoot),
1825 _ => None,
1826 }
1827 }
1828}
1829#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1832#[repr(i32)]
1833pub enum ProofDeliveryStatus {
1834 NotApplicable = 0,
1836 Complete = 1,
1838 Pending = 2,
1842}
1843impl ProofDeliveryStatus {
1844 pub fn as_str_name(&self) -> &'static str {
1849 match self {
1850 Self::NotApplicable => "PROOF_DELIVERY_STATUS_NOT_APPLICABLE",
1851 Self::Complete => "PROOF_DELIVERY_STATUS_COMPLETE",
1852 Self::Pending => "PROOF_DELIVERY_STATUS_PENDING",
1853 }
1854 }
1855 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1857 match value {
1858 "PROOF_DELIVERY_STATUS_NOT_APPLICABLE" => Some(Self::NotApplicable),
1859 "PROOF_DELIVERY_STATUS_COMPLETE" => Some(Self::Complete),
1860 "PROOF_DELIVERY_STATUS_PENDING" => Some(Self::Pending),
1861 _ => None,
1862 }
1863 }
1864}
1865#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1866#[repr(i32)]
1867pub enum AddrVersion {
1868 Unspecified = 0,
1871 V0 = 1,
1873 V1 = 2,
1876 V2 = 3,
1879}
1880impl AddrVersion {
1881 pub fn as_str_name(&self) -> &'static str {
1886 match self {
1887 Self::Unspecified => "ADDR_VERSION_UNSPECIFIED",
1888 Self::V0 => "ADDR_VERSION_V0",
1889 Self::V1 => "ADDR_VERSION_V1",
1890 Self::V2 => "ADDR_VERSION_V2",
1891 }
1892 }
1893 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1895 match value {
1896 "ADDR_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
1897 "ADDR_VERSION_V0" => Some(Self::V0),
1898 "ADDR_VERSION_V1" => Some(Self::V1),
1899 "ADDR_VERSION_V2" => Some(Self::V2),
1900 _ => None,
1901 }
1902 }
1903}
1904#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1905#[repr(i32)]
1906pub enum ScriptKeyType {
1907 ScriptKeyUnknown = 0,
1912 ScriptKeyBip86 = 1,
1916 ScriptKeyScriptPathExternal = 2,
1922 ScriptKeyBurn = 3,
1927 ScriptKeyTombstone = 4,
1932 ScriptKeyChannel = 5,
1940 ScriptKeyUniquePedersen = 6,
1949}
1950impl ScriptKeyType {
1951 pub fn as_str_name(&self) -> &'static str {
1956 match self {
1957 Self::ScriptKeyUnknown => "SCRIPT_KEY_UNKNOWN",
1958 Self::ScriptKeyBip86 => "SCRIPT_KEY_BIP86",
1959 Self::ScriptKeyScriptPathExternal => "SCRIPT_KEY_SCRIPT_PATH_EXTERNAL",
1960 Self::ScriptKeyBurn => "SCRIPT_KEY_BURN",
1961 Self::ScriptKeyTombstone => "SCRIPT_KEY_TOMBSTONE",
1962 Self::ScriptKeyChannel => "SCRIPT_KEY_CHANNEL",
1963 Self::ScriptKeyUniquePedersen => "SCRIPT_KEY_UNIQUE_PEDERSEN",
1964 }
1965 }
1966 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1968 match value {
1969 "SCRIPT_KEY_UNKNOWN" => Some(Self::ScriptKeyUnknown),
1970 "SCRIPT_KEY_BIP86" => Some(Self::ScriptKeyBip86),
1971 "SCRIPT_KEY_SCRIPT_PATH_EXTERNAL" => Some(Self::ScriptKeyScriptPathExternal),
1972 "SCRIPT_KEY_BURN" => Some(Self::ScriptKeyBurn),
1973 "SCRIPT_KEY_TOMBSTONE" => Some(Self::ScriptKeyTombstone),
1974 "SCRIPT_KEY_CHANNEL" => Some(Self::ScriptKeyChannel),
1975 "SCRIPT_KEY_UNIQUE_PEDERSEN" => Some(Self::ScriptKeyUniquePedersen),
1976 _ => None,
1977 }
1978 }
1979}
1980#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1981#[repr(i32)]
1982pub enum AddrEventStatus {
1983 Unknown = 0,
1984 TransactionDetected = 1,
1985 TransactionConfirmed = 2,
1986 ProofReceived = 3,
1987 Completed = 4,
1988}
1989impl AddrEventStatus {
1990 pub fn as_str_name(&self) -> &'static str {
1995 match self {
1996 Self::Unknown => "ADDR_EVENT_STATUS_UNKNOWN",
1997 Self::TransactionDetected => "ADDR_EVENT_STATUS_TRANSACTION_DETECTED",
1998 Self::TransactionConfirmed => "ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED",
1999 Self::ProofReceived => "ADDR_EVENT_STATUS_PROOF_RECEIVED",
2000 Self::Completed => "ADDR_EVENT_STATUS_COMPLETED",
2001 }
2002 }
2003 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2005 match value {
2006 "ADDR_EVENT_STATUS_UNKNOWN" => Some(Self::Unknown),
2007 "ADDR_EVENT_STATUS_TRANSACTION_DETECTED" => Some(Self::TransactionDetected),
2008 "ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED" => Some(Self::TransactionConfirmed),
2009 "ADDR_EVENT_STATUS_PROOF_RECEIVED" => Some(Self::ProofReceived),
2010 "ADDR_EVENT_STATUS_COMPLETED" => Some(Self::Completed),
2011 _ => None,
2012 }
2013 }
2014}
2015#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2016#[repr(i32)]
2017pub enum SendState {
2018 VirtualInputSelect = 0,
2021 VirtualSign = 1,
2023 AnchorSign = 2,
2025 LogCommitment = 3,
2029 Broadcast = 4,
2032 WaitConfirmation = 5,
2035 StoreProofs = 6,
2038 TransferProofs = 7,
2041 Completed = 8,
2043}
2044impl SendState {
2045 pub fn as_str_name(&self) -> &'static str {
2050 match self {
2051 Self::VirtualInputSelect => "SEND_STATE_VIRTUAL_INPUT_SELECT",
2052 Self::VirtualSign => "SEND_STATE_VIRTUAL_SIGN",
2053 Self::AnchorSign => "SEND_STATE_ANCHOR_SIGN",
2054 Self::LogCommitment => "SEND_STATE_LOG_COMMITMENT",
2055 Self::Broadcast => "SEND_STATE_BROADCAST",
2056 Self::WaitConfirmation => "SEND_STATE_WAIT_CONFIRMATION",
2057 Self::StoreProofs => "SEND_STATE_STORE_PROOFS",
2058 Self::TransferProofs => "SEND_STATE_TRANSFER_PROOFS",
2059 Self::Completed => "SEND_STATE_COMPLETED",
2060 }
2061 }
2062 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2064 match value {
2065 "SEND_STATE_VIRTUAL_INPUT_SELECT" => Some(Self::VirtualInputSelect),
2066 "SEND_STATE_VIRTUAL_SIGN" => Some(Self::VirtualSign),
2067 "SEND_STATE_ANCHOR_SIGN" => Some(Self::AnchorSign),
2068 "SEND_STATE_LOG_COMMITMENT" => Some(Self::LogCommitment),
2069 "SEND_STATE_BROADCAST" => Some(Self::Broadcast),
2070 "SEND_STATE_WAIT_CONFIRMATION" => Some(Self::WaitConfirmation),
2071 "SEND_STATE_STORE_PROOFS" => Some(Self::StoreProofs),
2072 "SEND_STATE_TRANSFER_PROOFS" => Some(Self::TransferProofs),
2073 "SEND_STATE_COMPLETED" => Some(Self::Completed),
2074 _ => None,
2075 }
2076 }
2077}
2078#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2079#[repr(i32)]
2080pub enum ParcelType {
2081 Address = 0,
2083 PreSigned = 1,
2087 Pending = 2,
2092 PreAnchored = 3,
2096}
2097impl ParcelType {
2098 pub fn as_str_name(&self) -> &'static str {
2103 match self {
2104 Self::Address => "PARCEL_TYPE_ADDRESS",
2105 Self::PreSigned => "PARCEL_TYPE_PRE_SIGNED",
2106 Self::Pending => "PARCEL_TYPE_PENDING",
2107 Self::PreAnchored => "PARCEL_TYPE_PRE_ANCHORED",
2108 }
2109 }
2110 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2112 match value {
2113 "PARCEL_TYPE_ADDRESS" => Some(Self::Address),
2114 "PARCEL_TYPE_PRE_SIGNED" => Some(Self::PreSigned),
2115 "PARCEL_TYPE_PENDING" => Some(Self::Pending),
2116 "PARCEL_TYPE_PRE_ANCHORED" => Some(Self::PreAnchored),
2117 _ => None,
2118 }
2119 }
2120}
2121pub mod taproot_assets_client {
2123 #![allow(
2124 unused_variables,
2125 dead_code,
2126 missing_docs,
2127 clippy::wildcard_imports,
2128 clippy::let_unit_value,
2129 )]
2130 use tonic::codegen::*;
2131 use tonic::codegen::http::Uri;
2132 #[derive(Debug, Clone)]
2133 pub struct TaprootAssetsClient<T> {
2134 inner: tonic::client::Grpc<T>,
2135 }
2136 impl TaprootAssetsClient<tonic::transport::Channel> {
2137 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2139 where
2140 D: TryInto<tonic::transport::Endpoint>,
2141 D::Error: Into<StdError>,
2142 {
2143 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2144 Ok(Self::new(conn))
2145 }
2146 }
2147 impl<T> TaprootAssetsClient<T>
2148 where
2149 T: tonic::client::GrpcService<tonic::body::Body>,
2150 T::Error: Into<StdError>,
2151 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2152 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2153 {
2154 pub fn new(inner: T) -> Self {
2155 let inner = tonic::client::Grpc::new(inner);
2156 Self { inner }
2157 }
2158 pub fn with_origin(inner: T, origin: Uri) -> Self {
2159 let inner = tonic::client::Grpc::with_origin(inner, origin);
2160 Self { inner }
2161 }
2162 pub fn with_interceptor<F>(
2163 inner: T,
2164 interceptor: F,
2165 ) -> TaprootAssetsClient<InterceptedService<T, F>>
2166 where
2167 F: tonic::service::Interceptor,
2168 T::ResponseBody: Default,
2169 T: tonic::codegen::Service<
2170 http::Request<tonic::body::Body>,
2171 Response = http::Response<
2172 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2173 >,
2174 >,
2175 <T as tonic::codegen::Service<
2176 http::Request<tonic::body::Body>,
2177 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2178 {
2179 TaprootAssetsClient::new(InterceptedService::new(inner, interceptor))
2180 }
2181 #[must_use]
2186 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2187 self.inner = self.inner.send_compressed(encoding);
2188 self
2189 }
2190 #[must_use]
2192 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2193 self.inner = self.inner.accept_compressed(encoding);
2194 self
2195 }
2196 #[must_use]
2200 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2201 self.inner = self.inner.max_decoding_message_size(limit);
2202 self
2203 }
2204 #[must_use]
2208 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2209 self.inner = self.inner.max_encoding_message_size(limit);
2210 self
2211 }
2212 pub async fn list_assets(
2215 &mut self,
2216 request: impl tonic::IntoRequest<super::ListAssetRequest>,
2217 ) -> std::result::Result<
2218 tonic::Response<super::ListAssetResponse>,
2219 tonic::Status,
2220 > {
2221 self.inner
2222 .ready()
2223 .await
2224 .map_err(|e| {
2225 tonic::Status::unknown(
2226 format!("Service was not ready: {}", e.into()),
2227 )
2228 })?;
2229 let codec = tonic::codec::ProstCodec::default();
2230 let path = http::uri::PathAndQuery::from_static(
2231 "/taprpc.TaprootAssets/ListAssets",
2232 );
2233 let mut req = request.into_request();
2234 req.extensions_mut()
2235 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ListAssets"));
2236 self.inner.unary(req, path, codec).await
2237 }
2238 pub async fn list_utxos(
2242 &mut self,
2243 request: impl tonic::IntoRequest<super::ListUtxosRequest>,
2244 ) -> std::result::Result<
2245 tonic::Response<super::ListUtxosResponse>,
2246 tonic::Status,
2247 > {
2248 self.inner
2249 .ready()
2250 .await
2251 .map_err(|e| {
2252 tonic::Status::unknown(
2253 format!("Service was not ready: {}", e.into()),
2254 )
2255 })?;
2256 let codec = tonic::codec::ProstCodec::default();
2257 let path = http::uri::PathAndQuery::from_static(
2258 "/taprpc.TaprootAssets/ListUtxos",
2259 );
2260 let mut req = request.into_request();
2261 req.extensions_mut()
2262 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ListUtxos"));
2263 self.inner.unary(req, path, codec).await
2264 }
2265 pub async fn list_groups(
2269 &mut self,
2270 request: impl tonic::IntoRequest<super::ListGroupsRequest>,
2271 ) -> std::result::Result<
2272 tonic::Response<super::ListGroupsResponse>,
2273 tonic::Status,
2274 > {
2275 self.inner
2276 .ready()
2277 .await
2278 .map_err(|e| {
2279 tonic::Status::unknown(
2280 format!("Service was not ready: {}", e.into()),
2281 )
2282 })?;
2283 let codec = tonic::codec::ProstCodec::default();
2284 let path = http::uri::PathAndQuery::from_static(
2285 "/taprpc.TaprootAssets/ListGroups",
2286 );
2287 let mut req = request.into_request();
2288 req.extensions_mut()
2289 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ListGroups"));
2290 self.inner.unary(req, path, codec).await
2291 }
2292 pub async fn list_balances(
2295 &mut self,
2296 request: impl tonic::IntoRequest<super::ListBalancesRequest>,
2297 ) -> std::result::Result<
2298 tonic::Response<super::ListBalancesResponse>,
2299 tonic::Status,
2300 > {
2301 self.inner
2302 .ready()
2303 .await
2304 .map_err(|e| {
2305 tonic::Status::unknown(
2306 format!("Service was not ready: {}", e.into()),
2307 )
2308 })?;
2309 let codec = tonic::codec::ProstCodec::default();
2310 let path = http::uri::PathAndQuery::from_static(
2311 "/taprpc.TaprootAssets/ListBalances",
2312 );
2313 let mut req = request.into_request();
2314 req.extensions_mut()
2315 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ListBalances"));
2316 self.inner.unary(req, path, codec).await
2317 }
2318 pub async fn list_transfers(
2321 &mut self,
2322 request: impl tonic::IntoRequest<super::ListTransfersRequest>,
2323 ) -> std::result::Result<
2324 tonic::Response<super::ListTransfersResponse>,
2325 tonic::Status,
2326 > {
2327 self.inner
2328 .ready()
2329 .await
2330 .map_err(|e| {
2331 tonic::Status::unknown(
2332 format!("Service was not ready: {}", e.into()),
2333 )
2334 })?;
2335 let codec = tonic::codec::ProstCodec::default();
2336 let path = http::uri::PathAndQuery::from_static(
2337 "/taprpc.TaprootAssets/ListTransfers",
2338 );
2339 let mut req = request.into_request();
2340 req.extensions_mut()
2341 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ListTransfers"));
2342 self.inner.unary(req, path, codec).await
2343 }
2344 pub async fn stop_daemon(
2348 &mut self,
2349 request: impl tonic::IntoRequest<super::StopRequest>,
2350 ) -> std::result::Result<tonic::Response<super::StopResponse>, tonic::Status> {
2351 self.inner
2352 .ready()
2353 .await
2354 .map_err(|e| {
2355 tonic::Status::unknown(
2356 format!("Service was not ready: {}", e.into()),
2357 )
2358 })?;
2359 let codec = tonic::codec::ProstCodec::default();
2360 let path = http::uri::PathAndQuery::from_static(
2361 "/taprpc.TaprootAssets/StopDaemon",
2362 );
2363 let mut req = request.into_request();
2364 req.extensions_mut()
2365 .insert(GrpcMethod::new("taprpc.TaprootAssets", "StopDaemon"));
2366 self.inner.unary(req, path, codec).await
2367 }
2368 pub async fn debug_level(
2374 &mut self,
2375 request: impl tonic::IntoRequest<super::DebugLevelRequest>,
2376 ) -> std::result::Result<
2377 tonic::Response<super::DebugLevelResponse>,
2378 tonic::Status,
2379 > {
2380 self.inner
2381 .ready()
2382 .await
2383 .map_err(|e| {
2384 tonic::Status::unknown(
2385 format!("Service was not ready: {}", e.into()),
2386 )
2387 })?;
2388 let codec = tonic::codec::ProstCodec::default();
2389 let path = http::uri::PathAndQuery::from_static(
2390 "/taprpc.TaprootAssets/DebugLevel",
2391 );
2392 let mut req = request.into_request();
2393 req.extensions_mut()
2394 .insert(GrpcMethod::new("taprpc.TaprootAssets", "DebugLevel"));
2395 self.inner.unary(req, path, codec).await
2396 }
2397 pub async fn query_addrs(
2401 &mut self,
2402 request: impl tonic::IntoRequest<super::QueryAddrRequest>,
2403 ) -> std::result::Result<
2404 tonic::Response<super::QueryAddrResponse>,
2405 tonic::Status,
2406 > {
2407 self.inner
2408 .ready()
2409 .await
2410 .map_err(|e| {
2411 tonic::Status::unknown(
2412 format!("Service was not ready: {}", e.into()),
2413 )
2414 })?;
2415 let codec = tonic::codec::ProstCodec::default();
2416 let path = http::uri::PathAndQuery::from_static(
2417 "/taprpc.TaprootAssets/QueryAddrs",
2418 );
2419 let mut req = request.into_request();
2420 req.extensions_mut()
2421 .insert(GrpcMethod::new("taprpc.TaprootAssets", "QueryAddrs"));
2422 self.inner.unary(req, path, codec).await
2423 }
2424 pub async fn new_addr(
2427 &mut self,
2428 request: impl tonic::IntoRequest<super::NewAddrRequest>,
2429 ) -> std::result::Result<tonic::Response<super::Addr>, tonic::Status> {
2430 self.inner
2431 .ready()
2432 .await
2433 .map_err(|e| {
2434 tonic::Status::unknown(
2435 format!("Service was not ready: {}", e.into()),
2436 )
2437 })?;
2438 let codec = tonic::codec::ProstCodec::default();
2439 let path = http::uri::PathAndQuery::from_static(
2440 "/taprpc.TaprootAssets/NewAddr",
2441 );
2442 let mut req = request.into_request();
2443 req.extensions_mut()
2444 .insert(GrpcMethod::new("taprpc.TaprootAssets", "NewAddr"));
2445 self.inner.unary(req, path, codec).await
2446 }
2447 pub async fn decode_addr(
2451 &mut self,
2452 request: impl tonic::IntoRequest<super::DecodeAddrRequest>,
2453 ) -> std::result::Result<tonic::Response<super::Addr>, tonic::Status> {
2454 self.inner
2455 .ready()
2456 .await
2457 .map_err(|e| {
2458 tonic::Status::unknown(
2459 format!("Service was not ready: {}", e.into()),
2460 )
2461 })?;
2462 let codec = tonic::codec::ProstCodec::default();
2463 let path = http::uri::PathAndQuery::from_static(
2464 "/taprpc.TaprootAssets/DecodeAddr",
2465 );
2466 let mut req = request.into_request();
2467 req.extensions_mut()
2468 .insert(GrpcMethod::new("taprpc.TaprootAssets", "DecodeAddr"));
2469 self.inner.unary(req, path, codec).await
2470 }
2471 pub async fn addr_receives(
2475 &mut self,
2476 request: impl tonic::IntoRequest<super::AddrReceivesRequest>,
2477 ) -> std::result::Result<
2478 tonic::Response<super::AddrReceivesResponse>,
2479 tonic::Status,
2480 > {
2481 self.inner
2482 .ready()
2483 .await
2484 .map_err(|e| {
2485 tonic::Status::unknown(
2486 format!("Service was not ready: {}", e.into()),
2487 )
2488 })?;
2489 let codec = tonic::codec::ProstCodec::default();
2490 let path = http::uri::PathAndQuery::from_static(
2491 "/taprpc.TaprootAssets/AddrReceives",
2492 );
2493 let mut req = request.into_request();
2494 req.extensions_mut()
2495 .insert(GrpcMethod::new("taprpc.TaprootAssets", "AddrReceives"));
2496 self.inner.unary(req, path, codec).await
2497 }
2498 pub async fn verify_proof(
2502 &mut self,
2503 request: impl tonic::IntoRequest<super::ProofFile>,
2504 ) -> std::result::Result<
2505 tonic::Response<super::VerifyProofResponse>,
2506 tonic::Status,
2507 > {
2508 self.inner
2509 .ready()
2510 .await
2511 .map_err(|e| {
2512 tonic::Status::unknown(
2513 format!("Service was not ready: {}", e.into()),
2514 )
2515 })?;
2516 let codec = tonic::codec::ProstCodec::default();
2517 let path = http::uri::PathAndQuery::from_static(
2518 "/taprpc.TaprootAssets/VerifyProof",
2519 );
2520 let mut req = request.into_request();
2521 req.extensions_mut()
2522 .insert(GrpcMethod::new("taprpc.TaprootAssets", "VerifyProof"));
2523 self.inner.unary(req, path, codec).await
2524 }
2525 pub async fn decode_proof(
2529 &mut self,
2530 request: impl tonic::IntoRequest<super::DecodeProofRequest>,
2531 ) -> std::result::Result<
2532 tonic::Response<super::DecodeProofResponse>,
2533 tonic::Status,
2534 > {
2535 self.inner
2536 .ready()
2537 .await
2538 .map_err(|e| {
2539 tonic::Status::unknown(
2540 format!("Service was not ready: {}", e.into()),
2541 )
2542 })?;
2543 let codec = tonic::codec::ProstCodec::default();
2544 let path = http::uri::PathAndQuery::from_static(
2545 "/taprpc.TaprootAssets/DecodeProof",
2546 );
2547 let mut req = request.into_request();
2548 req.extensions_mut()
2549 .insert(GrpcMethod::new("taprpc.TaprootAssets", "DecodeProof"));
2550 self.inner.unary(req, path, codec).await
2551 }
2552 pub async fn export_proof(
2556 &mut self,
2557 request: impl tonic::IntoRequest<super::ExportProofRequest>,
2558 ) -> std::result::Result<tonic::Response<super::ProofFile>, tonic::Status> {
2559 self.inner
2560 .ready()
2561 .await
2562 .map_err(|e| {
2563 tonic::Status::unknown(
2564 format!("Service was not ready: {}", e.into()),
2565 )
2566 })?;
2567 let codec = tonic::codec::ProstCodec::default();
2568 let path = http::uri::PathAndQuery::from_static(
2569 "/taprpc.TaprootAssets/ExportProof",
2570 );
2571 let mut req = request.into_request();
2572 req.extensions_mut()
2573 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ExportProof"));
2574 self.inner.unary(req, path, codec).await
2575 }
2576 pub async fn unpack_proof_file(
2580 &mut self,
2581 request: impl tonic::IntoRequest<super::UnpackProofFileRequest>,
2582 ) -> std::result::Result<
2583 tonic::Response<super::UnpackProofFileResponse>,
2584 tonic::Status,
2585 > {
2586 self.inner
2587 .ready()
2588 .await
2589 .map_err(|e| {
2590 tonic::Status::unknown(
2591 format!("Service was not ready: {}", e.into()),
2592 )
2593 })?;
2594 let codec = tonic::codec::ProstCodec::default();
2595 let path = http::uri::PathAndQuery::from_static(
2596 "/taprpc.TaprootAssets/UnpackProofFile",
2597 );
2598 let mut req = request.into_request();
2599 req.extensions_mut()
2600 .insert(GrpcMethod::new("taprpc.TaprootAssets", "UnpackProofFile"));
2601 self.inner.unary(req, path, codec).await
2602 }
2603 pub async fn send_asset(
2609 &mut self,
2610 request: impl tonic::IntoRequest<super::SendAssetRequest>,
2611 ) -> std::result::Result<
2612 tonic::Response<super::SendAssetResponse>,
2613 tonic::Status,
2614 > {
2615 self.inner
2616 .ready()
2617 .await
2618 .map_err(|e| {
2619 tonic::Status::unknown(
2620 format!("Service was not ready: {}", e.into()),
2621 )
2622 })?;
2623 let codec = tonic::codec::ProstCodec::default();
2624 let path = http::uri::PathAndQuery::from_static(
2625 "/taprpc.TaprootAssets/SendAsset",
2626 );
2627 let mut req = request.into_request();
2628 req.extensions_mut()
2629 .insert(GrpcMethod::new("taprpc.TaprootAssets", "SendAsset"));
2630 self.inner.unary(req, path, codec).await
2631 }
2632 pub async fn burn_asset(
2639 &mut self,
2640 request: impl tonic::IntoRequest<super::BurnAssetRequest>,
2641 ) -> std::result::Result<
2642 tonic::Response<super::BurnAssetResponse>,
2643 tonic::Status,
2644 > {
2645 self.inner
2646 .ready()
2647 .await
2648 .map_err(|e| {
2649 tonic::Status::unknown(
2650 format!("Service was not ready: {}", e.into()),
2651 )
2652 })?;
2653 let codec = tonic::codec::ProstCodec::default();
2654 let path = http::uri::PathAndQuery::from_static(
2655 "/taprpc.TaprootAssets/BurnAsset",
2656 );
2657 let mut req = request.into_request();
2658 req.extensions_mut()
2659 .insert(GrpcMethod::new("taprpc.TaprootAssets", "BurnAsset"));
2660 self.inner.unary(req, path, codec).await
2661 }
2662 pub async fn list_burns(
2667 &mut self,
2668 request: impl tonic::IntoRequest<super::ListBurnsRequest>,
2669 ) -> std::result::Result<
2670 tonic::Response<super::ListBurnsResponse>,
2671 tonic::Status,
2672 > {
2673 self.inner
2674 .ready()
2675 .await
2676 .map_err(|e| {
2677 tonic::Status::unknown(
2678 format!("Service was not ready: {}", e.into()),
2679 )
2680 })?;
2681 let codec = tonic::codec::ProstCodec::default();
2682 let path = http::uri::PathAndQuery::from_static(
2683 "/taprpc.TaprootAssets/ListBurns",
2684 );
2685 let mut req = request.into_request();
2686 req.extensions_mut()
2687 .insert(GrpcMethod::new("taprpc.TaprootAssets", "ListBurns"));
2688 self.inner.unary(req, path, codec).await
2689 }
2690 pub async fn get_info(
2693 &mut self,
2694 request: impl tonic::IntoRequest<super::GetInfoRequest>,
2695 ) -> std::result::Result<
2696 tonic::Response<super::GetInfoResponse>,
2697 tonic::Status,
2698 > {
2699 self.inner
2700 .ready()
2701 .await
2702 .map_err(|e| {
2703 tonic::Status::unknown(
2704 format!("Service was not ready: {}", e.into()),
2705 )
2706 })?;
2707 let codec = tonic::codec::ProstCodec::default();
2708 let path = http::uri::PathAndQuery::from_static(
2709 "/taprpc.TaprootAssets/GetInfo",
2710 );
2711 let mut req = request.into_request();
2712 req.extensions_mut()
2713 .insert(GrpcMethod::new("taprpc.TaprootAssets", "GetInfo"));
2714 self.inner.unary(req, path, codec).await
2715 }
2716 pub async fn fetch_asset_meta(
2720 &mut self,
2721 request: impl tonic::IntoRequest<super::FetchAssetMetaRequest>,
2722 ) -> std::result::Result<
2723 tonic::Response<super::FetchAssetMetaResponse>,
2724 tonic::Status,
2725 > {
2726 self.inner
2727 .ready()
2728 .await
2729 .map_err(|e| {
2730 tonic::Status::unknown(
2731 format!("Service was not ready: {}", e.into()),
2732 )
2733 })?;
2734 let codec = tonic::codec::ProstCodec::default();
2735 let path = http::uri::PathAndQuery::from_static(
2736 "/taprpc.TaprootAssets/FetchAssetMeta",
2737 );
2738 let mut req = request.into_request();
2739 req.extensions_mut()
2740 .insert(GrpcMethod::new("taprpc.TaprootAssets", "FetchAssetMeta"));
2741 self.inner.unary(req, path, codec).await
2742 }
2743 pub async fn subscribe_receive_events(
2747 &mut self,
2748 request: impl tonic::IntoRequest<super::SubscribeReceiveEventsRequest>,
2749 ) -> std::result::Result<
2750 tonic::Response<tonic::codec::Streaming<super::ReceiveEvent>>,
2751 tonic::Status,
2752 > {
2753 self.inner
2754 .ready()
2755 .await
2756 .map_err(|e| {
2757 tonic::Status::unknown(
2758 format!("Service was not ready: {}", e.into()),
2759 )
2760 })?;
2761 let codec = tonic::codec::ProstCodec::default();
2762 let path = http::uri::PathAndQuery::from_static(
2763 "/taprpc.TaprootAssets/SubscribeReceiveEvents",
2764 );
2765 let mut req = request.into_request();
2766 req.extensions_mut()
2767 .insert(
2768 GrpcMethod::new("taprpc.TaprootAssets", "SubscribeReceiveEvents"),
2769 );
2770 self.inner.server_streaming(req, path, codec).await
2771 }
2772 pub async fn subscribe_send_events(
2776 &mut self,
2777 request: impl tonic::IntoRequest<super::SubscribeSendEventsRequest>,
2778 ) -> std::result::Result<
2779 tonic::Response<tonic::codec::Streaming<super::SendEvent>>,
2780 tonic::Status,
2781 > {
2782 self.inner
2783 .ready()
2784 .await
2785 .map_err(|e| {
2786 tonic::Status::unknown(
2787 format!("Service was not ready: {}", e.into()),
2788 )
2789 })?;
2790 let codec = tonic::codec::ProstCodec::default();
2791 let path = http::uri::PathAndQuery::from_static(
2792 "/taprpc.TaprootAssets/SubscribeSendEvents",
2793 );
2794 let mut req = request.into_request();
2795 req.extensions_mut()
2796 .insert(GrpcMethod::new("taprpc.TaprootAssets", "SubscribeSendEvents"));
2797 self.inner.server_streaming(req, path, codec).await
2798 }
2799 pub async fn register_transfer(
2809 &mut self,
2810 request: impl tonic::IntoRequest<super::RegisterTransferRequest>,
2811 ) -> std::result::Result<
2812 tonic::Response<super::RegisterTransferResponse>,
2813 tonic::Status,
2814 > {
2815 self.inner
2816 .ready()
2817 .await
2818 .map_err(|e| {
2819 tonic::Status::unknown(
2820 format!("Service was not ready: {}", e.into()),
2821 )
2822 })?;
2823 let codec = tonic::codec::ProstCodec::default();
2824 let path = http::uri::PathAndQuery::from_static(
2825 "/taprpc.TaprootAssets/RegisterTransfer",
2826 );
2827 let mut req = request.into_request();
2828 req.extensions_mut()
2829 .insert(GrpcMethod::new("taprpc.TaprootAssets", "RegisterTransfer"));
2830 self.inner.unary(req, path, codec).await
2831 }
2832 }
2833}
2834pub mod taproot_assets_server {
2836 #![allow(
2837 unused_variables,
2838 dead_code,
2839 missing_docs,
2840 clippy::wildcard_imports,
2841 clippy::let_unit_value,
2842 )]
2843 use tonic::codegen::*;
2844 #[async_trait]
2846 pub trait TaprootAssets: std::marker::Send + std::marker::Sync + 'static {
2847 async fn list_assets(
2850 &self,
2851 request: tonic::Request<super::ListAssetRequest>,
2852 ) -> std::result::Result<
2853 tonic::Response<super::ListAssetResponse>,
2854 tonic::Status,
2855 >;
2856 async fn list_utxos(
2860 &self,
2861 request: tonic::Request<super::ListUtxosRequest>,
2862 ) -> std::result::Result<
2863 tonic::Response<super::ListUtxosResponse>,
2864 tonic::Status,
2865 >;
2866 async fn list_groups(
2870 &self,
2871 request: tonic::Request<super::ListGroupsRequest>,
2872 ) -> std::result::Result<
2873 tonic::Response<super::ListGroupsResponse>,
2874 tonic::Status,
2875 >;
2876 async fn list_balances(
2879 &self,
2880 request: tonic::Request<super::ListBalancesRequest>,
2881 ) -> std::result::Result<
2882 tonic::Response<super::ListBalancesResponse>,
2883 tonic::Status,
2884 >;
2885 async fn list_transfers(
2888 &self,
2889 request: tonic::Request<super::ListTransfersRequest>,
2890 ) -> std::result::Result<
2891 tonic::Response<super::ListTransfersResponse>,
2892 tonic::Status,
2893 >;
2894 async fn stop_daemon(
2898 &self,
2899 request: tonic::Request<super::StopRequest>,
2900 ) -> std::result::Result<tonic::Response<super::StopResponse>, tonic::Status>;
2901 async fn debug_level(
2907 &self,
2908 request: tonic::Request<super::DebugLevelRequest>,
2909 ) -> std::result::Result<
2910 tonic::Response<super::DebugLevelResponse>,
2911 tonic::Status,
2912 >;
2913 async fn query_addrs(
2917 &self,
2918 request: tonic::Request<super::QueryAddrRequest>,
2919 ) -> std::result::Result<
2920 tonic::Response<super::QueryAddrResponse>,
2921 tonic::Status,
2922 >;
2923 async fn new_addr(
2926 &self,
2927 request: tonic::Request<super::NewAddrRequest>,
2928 ) -> std::result::Result<tonic::Response<super::Addr>, tonic::Status>;
2929 async fn decode_addr(
2933 &self,
2934 request: tonic::Request<super::DecodeAddrRequest>,
2935 ) -> std::result::Result<tonic::Response<super::Addr>, tonic::Status>;
2936 async fn addr_receives(
2940 &self,
2941 request: tonic::Request<super::AddrReceivesRequest>,
2942 ) -> std::result::Result<
2943 tonic::Response<super::AddrReceivesResponse>,
2944 tonic::Status,
2945 >;
2946 async fn verify_proof(
2950 &self,
2951 request: tonic::Request<super::ProofFile>,
2952 ) -> std::result::Result<
2953 tonic::Response<super::VerifyProofResponse>,
2954 tonic::Status,
2955 >;
2956 async fn decode_proof(
2960 &self,
2961 request: tonic::Request<super::DecodeProofRequest>,
2962 ) -> std::result::Result<
2963 tonic::Response<super::DecodeProofResponse>,
2964 tonic::Status,
2965 >;
2966 async fn export_proof(
2970 &self,
2971 request: tonic::Request<super::ExportProofRequest>,
2972 ) -> std::result::Result<tonic::Response<super::ProofFile>, tonic::Status>;
2973 async fn unpack_proof_file(
2977 &self,
2978 request: tonic::Request<super::UnpackProofFileRequest>,
2979 ) -> std::result::Result<
2980 tonic::Response<super::UnpackProofFileResponse>,
2981 tonic::Status,
2982 >;
2983 async fn send_asset(
2989 &self,
2990 request: tonic::Request<super::SendAssetRequest>,
2991 ) -> std::result::Result<
2992 tonic::Response<super::SendAssetResponse>,
2993 tonic::Status,
2994 >;
2995 async fn burn_asset(
3002 &self,
3003 request: tonic::Request<super::BurnAssetRequest>,
3004 ) -> std::result::Result<
3005 tonic::Response<super::BurnAssetResponse>,
3006 tonic::Status,
3007 >;
3008 async fn list_burns(
3013 &self,
3014 request: tonic::Request<super::ListBurnsRequest>,
3015 ) -> std::result::Result<
3016 tonic::Response<super::ListBurnsResponse>,
3017 tonic::Status,
3018 >;
3019 async fn get_info(
3022 &self,
3023 request: tonic::Request<super::GetInfoRequest>,
3024 ) -> std::result::Result<tonic::Response<super::GetInfoResponse>, tonic::Status>;
3025 async fn fetch_asset_meta(
3029 &self,
3030 request: tonic::Request<super::FetchAssetMetaRequest>,
3031 ) -> std::result::Result<
3032 tonic::Response<super::FetchAssetMetaResponse>,
3033 tonic::Status,
3034 >;
3035 type SubscribeReceiveEventsStream: tonic::codegen::tokio_stream::Stream<
3037 Item = std::result::Result<super::ReceiveEvent, tonic::Status>,
3038 >
3039 + std::marker::Send
3040 + 'static;
3041 async fn subscribe_receive_events(
3045 &self,
3046 request: tonic::Request<super::SubscribeReceiveEventsRequest>,
3047 ) -> std::result::Result<
3048 tonic::Response<Self::SubscribeReceiveEventsStream>,
3049 tonic::Status,
3050 >;
3051 type SubscribeSendEventsStream: tonic::codegen::tokio_stream::Stream<
3053 Item = std::result::Result<super::SendEvent, tonic::Status>,
3054 >
3055 + std::marker::Send
3056 + 'static;
3057 async fn subscribe_send_events(
3061 &self,
3062 request: tonic::Request<super::SubscribeSendEventsRequest>,
3063 ) -> std::result::Result<
3064 tonic::Response<Self::SubscribeSendEventsStream>,
3065 tonic::Status,
3066 >;
3067 async fn register_transfer(
3077 &self,
3078 request: tonic::Request<super::RegisterTransferRequest>,
3079 ) -> std::result::Result<
3080 tonic::Response<super::RegisterTransferResponse>,
3081 tonic::Status,
3082 >;
3083 }
3084 #[derive(Debug)]
3085 pub struct TaprootAssetsServer<T> {
3086 inner: Arc<T>,
3087 accept_compression_encodings: EnabledCompressionEncodings,
3088 send_compression_encodings: EnabledCompressionEncodings,
3089 max_decoding_message_size: Option<usize>,
3090 max_encoding_message_size: Option<usize>,
3091 }
3092 impl<T> TaprootAssetsServer<T> {
3093 pub fn new(inner: T) -> Self {
3094 Self::from_arc(Arc::new(inner))
3095 }
3096 pub fn from_arc(inner: Arc<T>) -> Self {
3097 Self {
3098 inner,
3099 accept_compression_encodings: Default::default(),
3100 send_compression_encodings: Default::default(),
3101 max_decoding_message_size: None,
3102 max_encoding_message_size: None,
3103 }
3104 }
3105 pub fn with_interceptor<F>(
3106 inner: T,
3107 interceptor: F,
3108 ) -> InterceptedService<Self, F>
3109 where
3110 F: tonic::service::Interceptor,
3111 {
3112 InterceptedService::new(Self::new(inner), interceptor)
3113 }
3114 #[must_use]
3116 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3117 self.accept_compression_encodings.enable(encoding);
3118 self
3119 }
3120 #[must_use]
3122 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3123 self.send_compression_encodings.enable(encoding);
3124 self
3125 }
3126 #[must_use]
3130 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3131 self.max_decoding_message_size = Some(limit);
3132 self
3133 }
3134 #[must_use]
3138 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3139 self.max_encoding_message_size = Some(limit);
3140 self
3141 }
3142 }
3143 impl<T, B> tonic::codegen::Service<http::Request<B>> for TaprootAssetsServer<T>
3144 where
3145 T: TaprootAssets,
3146 B: Body + std::marker::Send + 'static,
3147 B::Error: Into<StdError> + std::marker::Send + 'static,
3148 {
3149 type Response = http::Response<tonic::body::Body>;
3150 type Error = std::convert::Infallible;
3151 type Future = BoxFuture<Self::Response, Self::Error>;
3152 fn poll_ready(
3153 &mut self,
3154 _cx: &mut Context<'_>,
3155 ) -> Poll<std::result::Result<(), Self::Error>> {
3156 Poll::Ready(Ok(()))
3157 }
3158 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3159 match req.uri().path() {
3160 "/taprpc.TaprootAssets/ListAssets" => {
3161 #[allow(non_camel_case_types)]
3162 struct ListAssetsSvc<T: TaprootAssets>(pub Arc<T>);
3163 impl<
3164 T: TaprootAssets,
3165 > tonic::server::UnaryService<super::ListAssetRequest>
3166 for ListAssetsSvc<T> {
3167 type Response = super::ListAssetResponse;
3168 type Future = BoxFuture<
3169 tonic::Response<Self::Response>,
3170 tonic::Status,
3171 >;
3172 fn call(
3173 &mut self,
3174 request: tonic::Request<super::ListAssetRequest>,
3175 ) -> Self::Future {
3176 let inner = Arc::clone(&self.0);
3177 let fut = async move {
3178 <T as TaprootAssets>::list_assets(&inner, request).await
3179 };
3180 Box::pin(fut)
3181 }
3182 }
3183 let accept_compression_encodings = self.accept_compression_encodings;
3184 let send_compression_encodings = self.send_compression_encodings;
3185 let max_decoding_message_size = self.max_decoding_message_size;
3186 let max_encoding_message_size = self.max_encoding_message_size;
3187 let inner = self.inner.clone();
3188 let fut = async move {
3189 let method = ListAssetsSvc(inner);
3190 let codec = tonic::codec::ProstCodec::default();
3191 let mut grpc = tonic::server::Grpc::new(codec)
3192 .apply_compression_config(
3193 accept_compression_encodings,
3194 send_compression_encodings,
3195 )
3196 .apply_max_message_size_config(
3197 max_decoding_message_size,
3198 max_encoding_message_size,
3199 );
3200 let res = grpc.unary(method, req).await;
3201 Ok(res)
3202 };
3203 Box::pin(fut)
3204 }
3205 "/taprpc.TaprootAssets/ListUtxos" => {
3206 #[allow(non_camel_case_types)]
3207 struct ListUtxosSvc<T: TaprootAssets>(pub Arc<T>);
3208 impl<
3209 T: TaprootAssets,
3210 > tonic::server::UnaryService<super::ListUtxosRequest>
3211 for ListUtxosSvc<T> {
3212 type Response = super::ListUtxosResponse;
3213 type Future = BoxFuture<
3214 tonic::Response<Self::Response>,
3215 tonic::Status,
3216 >;
3217 fn call(
3218 &mut self,
3219 request: tonic::Request<super::ListUtxosRequest>,
3220 ) -> Self::Future {
3221 let inner = Arc::clone(&self.0);
3222 let fut = async move {
3223 <T as TaprootAssets>::list_utxos(&inner, request).await
3224 };
3225 Box::pin(fut)
3226 }
3227 }
3228 let accept_compression_encodings = self.accept_compression_encodings;
3229 let send_compression_encodings = self.send_compression_encodings;
3230 let max_decoding_message_size = self.max_decoding_message_size;
3231 let max_encoding_message_size = self.max_encoding_message_size;
3232 let inner = self.inner.clone();
3233 let fut = async move {
3234 let method = ListUtxosSvc(inner);
3235 let codec = tonic::codec::ProstCodec::default();
3236 let mut grpc = tonic::server::Grpc::new(codec)
3237 .apply_compression_config(
3238 accept_compression_encodings,
3239 send_compression_encodings,
3240 )
3241 .apply_max_message_size_config(
3242 max_decoding_message_size,
3243 max_encoding_message_size,
3244 );
3245 let res = grpc.unary(method, req).await;
3246 Ok(res)
3247 };
3248 Box::pin(fut)
3249 }
3250 "/taprpc.TaprootAssets/ListGroups" => {
3251 #[allow(non_camel_case_types)]
3252 struct ListGroupsSvc<T: TaprootAssets>(pub Arc<T>);
3253 impl<
3254 T: TaprootAssets,
3255 > tonic::server::UnaryService<super::ListGroupsRequest>
3256 for ListGroupsSvc<T> {
3257 type Response = super::ListGroupsResponse;
3258 type Future = BoxFuture<
3259 tonic::Response<Self::Response>,
3260 tonic::Status,
3261 >;
3262 fn call(
3263 &mut self,
3264 request: tonic::Request<super::ListGroupsRequest>,
3265 ) -> Self::Future {
3266 let inner = Arc::clone(&self.0);
3267 let fut = async move {
3268 <T as TaprootAssets>::list_groups(&inner, request).await
3269 };
3270 Box::pin(fut)
3271 }
3272 }
3273 let accept_compression_encodings = self.accept_compression_encodings;
3274 let send_compression_encodings = self.send_compression_encodings;
3275 let max_decoding_message_size = self.max_decoding_message_size;
3276 let max_encoding_message_size = self.max_encoding_message_size;
3277 let inner = self.inner.clone();
3278 let fut = async move {
3279 let method = ListGroupsSvc(inner);
3280 let codec = tonic::codec::ProstCodec::default();
3281 let mut grpc = tonic::server::Grpc::new(codec)
3282 .apply_compression_config(
3283 accept_compression_encodings,
3284 send_compression_encodings,
3285 )
3286 .apply_max_message_size_config(
3287 max_decoding_message_size,
3288 max_encoding_message_size,
3289 );
3290 let res = grpc.unary(method, req).await;
3291 Ok(res)
3292 };
3293 Box::pin(fut)
3294 }
3295 "/taprpc.TaprootAssets/ListBalances" => {
3296 #[allow(non_camel_case_types)]
3297 struct ListBalancesSvc<T: TaprootAssets>(pub Arc<T>);
3298 impl<
3299 T: TaprootAssets,
3300 > tonic::server::UnaryService<super::ListBalancesRequest>
3301 for ListBalancesSvc<T> {
3302 type Response = super::ListBalancesResponse;
3303 type Future = BoxFuture<
3304 tonic::Response<Self::Response>,
3305 tonic::Status,
3306 >;
3307 fn call(
3308 &mut self,
3309 request: tonic::Request<super::ListBalancesRequest>,
3310 ) -> Self::Future {
3311 let inner = Arc::clone(&self.0);
3312 let fut = async move {
3313 <T as TaprootAssets>::list_balances(&inner, request).await
3314 };
3315 Box::pin(fut)
3316 }
3317 }
3318 let accept_compression_encodings = self.accept_compression_encodings;
3319 let send_compression_encodings = self.send_compression_encodings;
3320 let max_decoding_message_size = self.max_decoding_message_size;
3321 let max_encoding_message_size = self.max_encoding_message_size;
3322 let inner = self.inner.clone();
3323 let fut = async move {
3324 let method = ListBalancesSvc(inner);
3325 let codec = tonic::codec::ProstCodec::default();
3326 let mut grpc = tonic::server::Grpc::new(codec)
3327 .apply_compression_config(
3328 accept_compression_encodings,
3329 send_compression_encodings,
3330 )
3331 .apply_max_message_size_config(
3332 max_decoding_message_size,
3333 max_encoding_message_size,
3334 );
3335 let res = grpc.unary(method, req).await;
3336 Ok(res)
3337 };
3338 Box::pin(fut)
3339 }
3340 "/taprpc.TaprootAssets/ListTransfers" => {
3341 #[allow(non_camel_case_types)]
3342 struct ListTransfersSvc<T: TaprootAssets>(pub Arc<T>);
3343 impl<
3344 T: TaprootAssets,
3345 > tonic::server::UnaryService<super::ListTransfersRequest>
3346 for ListTransfersSvc<T> {
3347 type Response = super::ListTransfersResponse;
3348 type Future = BoxFuture<
3349 tonic::Response<Self::Response>,
3350 tonic::Status,
3351 >;
3352 fn call(
3353 &mut self,
3354 request: tonic::Request<super::ListTransfersRequest>,
3355 ) -> Self::Future {
3356 let inner = Arc::clone(&self.0);
3357 let fut = async move {
3358 <T as TaprootAssets>::list_transfers(&inner, request).await
3359 };
3360 Box::pin(fut)
3361 }
3362 }
3363 let accept_compression_encodings = self.accept_compression_encodings;
3364 let send_compression_encodings = self.send_compression_encodings;
3365 let max_decoding_message_size = self.max_decoding_message_size;
3366 let max_encoding_message_size = self.max_encoding_message_size;
3367 let inner = self.inner.clone();
3368 let fut = async move {
3369 let method = ListTransfersSvc(inner);
3370 let codec = tonic::codec::ProstCodec::default();
3371 let mut grpc = tonic::server::Grpc::new(codec)
3372 .apply_compression_config(
3373 accept_compression_encodings,
3374 send_compression_encodings,
3375 )
3376 .apply_max_message_size_config(
3377 max_decoding_message_size,
3378 max_encoding_message_size,
3379 );
3380 let res = grpc.unary(method, req).await;
3381 Ok(res)
3382 };
3383 Box::pin(fut)
3384 }
3385 "/taprpc.TaprootAssets/StopDaemon" => {
3386 #[allow(non_camel_case_types)]
3387 struct StopDaemonSvc<T: TaprootAssets>(pub Arc<T>);
3388 impl<
3389 T: TaprootAssets,
3390 > tonic::server::UnaryService<super::StopRequest>
3391 for StopDaemonSvc<T> {
3392 type Response = super::StopResponse;
3393 type Future = BoxFuture<
3394 tonic::Response<Self::Response>,
3395 tonic::Status,
3396 >;
3397 fn call(
3398 &mut self,
3399 request: tonic::Request<super::StopRequest>,
3400 ) -> Self::Future {
3401 let inner = Arc::clone(&self.0);
3402 let fut = async move {
3403 <T as TaprootAssets>::stop_daemon(&inner, request).await
3404 };
3405 Box::pin(fut)
3406 }
3407 }
3408 let accept_compression_encodings = self.accept_compression_encodings;
3409 let send_compression_encodings = self.send_compression_encodings;
3410 let max_decoding_message_size = self.max_decoding_message_size;
3411 let max_encoding_message_size = self.max_encoding_message_size;
3412 let inner = self.inner.clone();
3413 let fut = async move {
3414 let method = StopDaemonSvc(inner);
3415 let codec = tonic::codec::ProstCodec::default();
3416 let mut grpc = tonic::server::Grpc::new(codec)
3417 .apply_compression_config(
3418 accept_compression_encodings,
3419 send_compression_encodings,
3420 )
3421 .apply_max_message_size_config(
3422 max_decoding_message_size,
3423 max_encoding_message_size,
3424 );
3425 let res = grpc.unary(method, req).await;
3426 Ok(res)
3427 };
3428 Box::pin(fut)
3429 }
3430 "/taprpc.TaprootAssets/DebugLevel" => {
3431 #[allow(non_camel_case_types)]
3432 struct DebugLevelSvc<T: TaprootAssets>(pub Arc<T>);
3433 impl<
3434 T: TaprootAssets,
3435 > tonic::server::UnaryService<super::DebugLevelRequest>
3436 for DebugLevelSvc<T> {
3437 type Response = super::DebugLevelResponse;
3438 type Future = BoxFuture<
3439 tonic::Response<Self::Response>,
3440 tonic::Status,
3441 >;
3442 fn call(
3443 &mut self,
3444 request: tonic::Request<super::DebugLevelRequest>,
3445 ) -> Self::Future {
3446 let inner = Arc::clone(&self.0);
3447 let fut = async move {
3448 <T as TaprootAssets>::debug_level(&inner, request).await
3449 };
3450 Box::pin(fut)
3451 }
3452 }
3453 let accept_compression_encodings = self.accept_compression_encodings;
3454 let send_compression_encodings = self.send_compression_encodings;
3455 let max_decoding_message_size = self.max_decoding_message_size;
3456 let max_encoding_message_size = self.max_encoding_message_size;
3457 let inner = self.inner.clone();
3458 let fut = async move {
3459 let method = DebugLevelSvc(inner);
3460 let codec = tonic::codec::ProstCodec::default();
3461 let mut grpc = tonic::server::Grpc::new(codec)
3462 .apply_compression_config(
3463 accept_compression_encodings,
3464 send_compression_encodings,
3465 )
3466 .apply_max_message_size_config(
3467 max_decoding_message_size,
3468 max_encoding_message_size,
3469 );
3470 let res = grpc.unary(method, req).await;
3471 Ok(res)
3472 };
3473 Box::pin(fut)
3474 }
3475 "/taprpc.TaprootAssets/QueryAddrs" => {
3476 #[allow(non_camel_case_types)]
3477 struct QueryAddrsSvc<T: TaprootAssets>(pub Arc<T>);
3478 impl<
3479 T: TaprootAssets,
3480 > tonic::server::UnaryService<super::QueryAddrRequest>
3481 for QueryAddrsSvc<T> {
3482 type Response = super::QueryAddrResponse;
3483 type Future = BoxFuture<
3484 tonic::Response<Self::Response>,
3485 tonic::Status,
3486 >;
3487 fn call(
3488 &mut self,
3489 request: tonic::Request<super::QueryAddrRequest>,
3490 ) -> Self::Future {
3491 let inner = Arc::clone(&self.0);
3492 let fut = async move {
3493 <T as TaprootAssets>::query_addrs(&inner, request).await
3494 };
3495 Box::pin(fut)
3496 }
3497 }
3498 let accept_compression_encodings = self.accept_compression_encodings;
3499 let send_compression_encodings = self.send_compression_encodings;
3500 let max_decoding_message_size = self.max_decoding_message_size;
3501 let max_encoding_message_size = self.max_encoding_message_size;
3502 let inner = self.inner.clone();
3503 let fut = async move {
3504 let method = QueryAddrsSvc(inner);
3505 let codec = tonic::codec::ProstCodec::default();
3506 let mut grpc = tonic::server::Grpc::new(codec)
3507 .apply_compression_config(
3508 accept_compression_encodings,
3509 send_compression_encodings,
3510 )
3511 .apply_max_message_size_config(
3512 max_decoding_message_size,
3513 max_encoding_message_size,
3514 );
3515 let res = grpc.unary(method, req).await;
3516 Ok(res)
3517 };
3518 Box::pin(fut)
3519 }
3520 "/taprpc.TaprootAssets/NewAddr" => {
3521 #[allow(non_camel_case_types)]
3522 struct NewAddrSvc<T: TaprootAssets>(pub Arc<T>);
3523 impl<
3524 T: TaprootAssets,
3525 > tonic::server::UnaryService<super::NewAddrRequest>
3526 for NewAddrSvc<T> {
3527 type Response = super::Addr;
3528 type Future = BoxFuture<
3529 tonic::Response<Self::Response>,
3530 tonic::Status,
3531 >;
3532 fn call(
3533 &mut self,
3534 request: tonic::Request<super::NewAddrRequest>,
3535 ) -> Self::Future {
3536 let inner = Arc::clone(&self.0);
3537 let fut = async move {
3538 <T as TaprootAssets>::new_addr(&inner, request).await
3539 };
3540 Box::pin(fut)
3541 }
3542 }
3543 let accept_compression_encodings = self.accept_compression_encodings;
3544 let send_compression_encodings = self.send_compression_encodings;
3545 let max_decoding_message_size = self.max_decoding_message_size;
3546 let max_encoding_message_size = self.max_encoding_message_size;
3547 let inner = self.inner.clone();
3548 let fut = async move {
3549 let method = NewAddrSvc(inner);
3550 let codec = tonic::codec::ProstCodec::default();
3551 let mut grpc = tonic::server::Grpc::new(codec)
3552 .apply_compression_config(
3553 accept_compression_encodings,
3554 send_compression_encodings,
3555 )
3556 .apply_max_message_size_config(
3557 max_decoding_message_size,
3558 max_encoding_message_size,
3559 );
3560 let res = grpc.unary(method, req).await;
3561 Ok(res)
3562 };
3563 Box::pin(fut)
3564 }
3565 "/taprpc.TaprootAssets/DecodeAddr" => {
3566 #[allow(non_camel_case_types)]
3567 struct DecodeAddrSvc<T: TaprootAssets>(pub Arc<T>);
3568 impl<
3569 T: TaprootAssets,
3570 > tonic::server::UnaryService<super::DecodeAddrRequest>
3571 for DecodeAddrSvc<T> {
3572 type Response = super::Addr;
3573 type Future = BoxFuture<
3574 tonic::Response<Self::Response>,
3575 tonic::Status,
3576 >;
3577 fn call(
3578 &mut self,
3579 request: tonic::Request<super::DecodeAddrRequest>,
3580 ) -> Self::Future {
3581 let inner = Arc::clone(&self.0);
3582 let fut = async move {
3583 <T as TaprootAssets>::decode_addr(&inner, request).await
3584 };
3585 Box::pin(fut)
3586 }
3587 }
3588 let accept_compression_encodings = self.accept_compression_encodings;
3589 let send_compression_encodings = self.send_compression_encodings;
3590 let max_decoding_message_size = self.max_decoding_message_size;
3591 let max_encoding_message_size = self.max_encoding_message_size;
3592 let inner = self.inner.clone();
3593 let fut = async move {
3594 let method = DecodeAddrSvc(inner);
3595 let codec = tonic::codec::ProstCodec::default();
3596 let mut grpc = tonic::server::Grpc::new(codec)
3597 .apply_compression_config(
3598 accept_compression_encodings,
3599 send_compression_encodings,
3600 )
3601 .apply_max_message_size_config(
3602 max_decoding_message_size,
3603 max_encoding_message_size,
3604 );
3605 let res = grpc.unary(method, req).await;
3606 Ok(res)
3607 };
3608 Box::pin(fut)
3609 }
3610 "/taprpc.TaprootAssets/AddrReceives" => {
3611 #[allow(non_camel_case_types)]
3612 struct AddrReceivesSvc<T: TaprootAssets>(pub Arc<T>);
3613 impl<
3614 T: TaprootAssets,
3615 > tonic::server::UnaryService<super::AddrReceivesRequest>
3616 for AddrReceivesSvc<T> {
3617 type Response = super::AddrReceivesResponse;
3618 type Future = BoxFuture<
3619 tonic::Response<Self::Response>,
3620 tonic::Status,
3621 >;
3622 fn call(
3623 &mut self,
3624 request: tonic::Request<super::AddrReceivesRequest>,
3625 ) -> Self::Future {
3626 let inner = Arc::clone(&self.0);
3627 let fut = async move {
3628 <T as TaprootAssets>::addr_receives(&inner, request).await
3629 };
3630 Box::pin(fut)
3631 }
3632 }
3633 let accept_compression_encodings = self.accept_compression_encodings;
3634 let send_compression_encodings = self.send_compression_encodings;
3635 let max_decoding_message_size = self.max_decoding_message_size;
3636 let max_encoding_message_size = self.max_encoding_message_size;
3637 let inner = self.inner.clone();
3638 let fut = async move {
3639 let method = AddrReceivesSvc(inner);
3640 let codec = tonic::codec::ProstCodec::default();
3641 let mut grpc = tonic::server::Grpc::new(codec)
3642 .apply_compression_config(
3643 accept_compression_encodings,
3644 send_compression_encodings,
3645 )
3646 .apply_max_message_size_config(
3647 max_decoding_message_size,
3648 max_encoding_message_size,
3649 );
3650 let res = grpc.unary(method, req).await;
3651 Ok(res)
3652 };
3653 Box::pin(fut)
3654 }
3655 "/taprpc.TaprootAssets/VerifyProof" => {
3656 #[allow(non_camel_case_types)]
3657 struct VerifyProofSvc<T: TaprootAssets>(pub Arc<T>);
3658 impl<T: TaprootAssets> tonic::server::UnaryService<super::ProofFile>
3659 for VerifyProofSvc<T> {
3660 type Response = super::VerifyProofResponse;
3661 type Future = BoxFuture<
3662 tonic::Response<Self::Response>,
3663 tonic::Status,
3664 >;
3665 fn call(
3666 &mut self,
3667 request: tonic::Request<super::ProofFile>,
3668 ) -> Self::Future {
3669 let inner = Arc::clone(&self.0);
3670 let fut = async move {
3671 <T as TaprootAssets>::verify_proof(&inner, request).await
3672 };
3673 Box::pin(fut)
3674 }
3675 }
3676 let accept_compression_encodings = self.accept_compression_encodings;
3677 let send_compression_encodings = self.send_compression_encodings;
3678 let max_decoding_message_size = self.max_decoding_message_size;
3679 let max_encoding_message_size = self.max_encoding_message_size;
3680 let inner = self.inner.clone();
3681 let fut = async move {
3682 let method = VerifyProofSvc(inner);
3683 let codec = tonic::codec::ProstCodec::default();
3684 let mut grpc = tonic::server::Grpc::new(codec)
3685 .apply_compression_config(
3686 accept_compression_encodings,
3687 send_compression_encodings,
3688 )
3689 .apply_max_message_size_config(
3690 max_decoding_message_size,
3691 max_encoding_message_size,
3692 );
3693 let res = grpc.unary(method, req).await;
3694 Ok(res)
3695 };
3696 Box::pin(fut)
3697 }
3698 "/taprpc.TaprootAssets/DecodeProof" => {
3699 #[allow(non_camel_case_types)]
3700 struct DecodeProofSvc<T: TaprootAssets>(pub Arc<T>);
3701 impl<
3702 T: TaprootAssets,
3703 > tonic::server::UnaryService<super::DecodeProofRequest>
3704 for DecodeProofSvc<T> {
3705 type Response = super::DecodeProofResponse;
3706 type Future = BoxFuture<
3707 tonic::Response<Self::Response>,
3708 tonic::Status,
3709 >;
3710 fn call(
3711 &mut self,
3712 request: tonic::Request<super::DecodeProofRequest>,
3713 ) -> Self::Future {
3714 let inner = Arc::clone(&self.0);
3715 let fut = async move {
3716 <T as TaprootAssets>::decode_proof(&inner, request).await
3717 };
3718 Box::pin(fut)
3719 }
3720 }
3721 let accept_compression_encodings = self.accept_compression_encodings;
3722 let send_compression_encodings = self.send_compression_encodings;
3723 let max_decoding_message_size = self.max_decoding_message_size;
3724 let max_encoding_message_size = self.max_encoding_message_size;
3725 let inner = self.inner.clone();
3726 let fut = async move {
3727 let method = DecodeProofSvc(inner);
3728 let codec = tonic::codec::ProstCodec::default();
3729 let mut grpc = tonic::server::Grpc::new(codec)
3730 .apply_compression_config(
3731 accept_compression_encodings,
3732 send_compression_encodings,
3733 )
3734 .apply_max_message_size_config(
3735 max_decoding_message_size,
3736 max_encoding_message_size,
3737 );
3738 let res = grpc.unary(method, req).await;
3739 Ok(res)
3740 };
3741 Box::pin(fut)
3742 }
3743 "/taprpc.TaprootAssets/ExportProof" => {
3744 #[allow(non_camel_case_types)]
3745 struct ExportProofSvc<T: TaprootAssets>(pub Arc<T>);
3746 impl<
3747 T: TaprootAssets,
3748 > tonic::server::UnaryService<super::ExportProofRequest>
3749 for ExportProofSvc<T> {
3750 type Response = super::ProofFile;
3751 type Future = BoxFuture<
3752 tonic::Response<Self::Response>,
3753 tonic::Status,
3754 >;
3755 fn call(
3756 &mut self,
3757 request: tonic::Request<super::ExportProofRequest>,
3758 ) -> Self::Future {
3759 let inner = Arc::clone(&self.0);
3760 let fut = async move {
3761 <T as TaprootAssets>::export_proof(&inner, request).await
3762 };
3763 Box::pin(fut)
3764 }
3765 }
3766 let accept_compression_encodings = self.accept_compression_encodings;
3767 let send_compression_encodings = self.send_compression_encodings;
3768 let max_decoding_message_size = self.max_decoding_message_size;
3769 let max_encoding_message_size = self.max_encoding_message_size;
3770 let inner = self.inner.clone();
3771 let fut = async move {
3772 let method = ExportProofSvc(inner);
3773 let codec = tonic::codec::ProstCodec::default();
3774 let mut grpc = tonic::server::Grpc::new(codec)
3775 .apply_compression_config(
3776 accept_compression_encodings,
3777 send_compression_encodings,
3778 )
3779 .apply_max_message_size_config(
3780 max_decoding_message_size,
3781 max_encoding_message_size,
3782 );
3783 let res = grpc.unary(method, req).await;
3784 Ok(res)
3785 };
3786 Box::pin(fut)
3787 }
3788 "/taprpc.TaprootAssets/UnpackProofFile" => {
3789 #[allow(non_camel_case_types)]
3790 struct UnpackProofFileSvc<T: TaprootAssets>(pub Arc<T>);
3791 impl<
3792 T: TaprootAssets,
3793 > tonic::server::UnaryService<super::UnpackProofFileRequest>
3794 for UnpackProofFileSvc<T> {
3795 type Response = super::UnpackProofFileResponse;
3796 type Future = BoxFuture<
3797 tonic::Response<Self::Response>,
3798 tonic::Status,
3799 >;
3800 fn call(
3801 &mut self,
3802 request: tonic::Request<super::UnpackProofFileRequest>,
3803 ) -> Self::Future {
3804 let inner = Arc::clone(&self.0);
3805 let fut = async move {
3806 <T as TaprootAssets>::unpack_proof_file(&inner, request)
3807 .await
3808 };
3809 Box::pin(fut)
3810 }
3811 }
3812 let accept_compression_encodings = self.accept_compression_encodings;
3813 let send_compression_encodings = self.send_compression_encodings;
3814 let max_decoding_message_size = self.max_decoding_message_size;
3815 let max_encoding_message_size = self.max_encoding_message_size;
3816 let inner = self.inner.clone();
3817 let fut = async move {
3818 let method = UnpackProofFileSvc(inner);
3819 let codec = tonic::codec::ProstCodec::default();
3820 let mut grpc = tonic::server::Grpc::new(codec)
3821 .apply_compression_config(
3822 accept_compression_encodings,
3823 send_compression_encodings,
3824 )
3825 .apply_max_message_size_config(
3826 max_decoding_message_size,
3827 max_encoding_message_size,
3828 );
3829 let res = grpc.unary(method, req).await;
3830 Ok(res)
3831 };
3832 Box::pin(fut)
3833 }
3834 "/taprpc.TaprootAssets/SendAsset" => {
3835 #[allow(non_camel_case_types)]
3836 struct SendAssetSvc<T: TaprootAssets>(pub Arc<T>);
3837 impl<
3838 T: TaprootAssets,
3839 > tonic::server::UnaryService<super::SendAssetRequest>
3840 for SendAssetSvc<T> {
3841 type Response = super::SendAssetResponse;
3842 type Future = BoxFuture<
3843 tonic::Response<Self::Response>,
3844 tonic::Status,
3845 >;
3846 fn call(
3847 &mut self,
3848 request: tonic::Request<super::SendAssetRequest>,
3849 ) -> Self::Future {
3850 let inner = Arc::clone(&self.0);
3851 let fut = async move {
3852 <T as TaprootAssets>::send_asset(&inner, request).await
3853 };
3854 Box::pin(fut)
3855 }
3856 }
3857 let accept_compression_encodings = self.accept_compression_encodings;
3858 let send_compression_encodings = self.send_compression_encodings;
3859 let max_decoding_message_size = self.max_decoding_message_size;
3860 let max_encoding_message_size = self.max_encoding_message_size;
3861 let inner = self.inner.clone();
3862 let fut = async move {
3863 let method = SendAssetSvc(inner);
3864 let codec = tonic::codec::ProstCodec::default();
3865 let mut grpc = tonic::server::Grpc::new(codec)
3866 .apply_compression_config(
3867 accept_compression_encodings,
3868 send_compression_encodings,
3869 )
3870 .apply_max_message_size_config(
3871 max_decoding_message_size,
3872 max_encoding_message_size,
3873 );
3874 let res = grpc.unary(method, req).await;
3875 Ok(res)
3876 };
3877 Box::pin(fut)
3878 }
3879 "/taprpc.TaprootAssets/BurnAsset" => {
3880 #[allow(non_camel_case_types)]
3881 struct BurnAssetSvc<T: TaprootAssets>(pub Arc<T>);
3882 impl<
3883 T: TaprootAssets,
3884 > tonic::server::UnaryService<super::BurnAssetRequest>
3885 for BurnAssetSvc<T> {
3886 type Response = super::BurnAssetResponse;
3887 type Future = BoxFuture<
3888 tonic::Response<Self::Response>,
3889 tonic::Status,
3890 >;
3891 fn call(
3892 &mut self,
3893 request: tonic::Request<super::BurnAssetRequest>,
3894 ) -> Self::Future {
3895 let inner = Arc::clone(&self.0);
3896 let fut = async move {
3897 <T as TaprootAssets>::burn_asset(&inner, request).await
3898 };
3899 Box::pin(fut)
3900 }
3901 }
3902 let accept_compression_encodings = self.accept_compression_encodings;
3903 let send_compression_encodings = self.send_compression_encodings;
3904 let max_decoding_message_size = self.max_decoding_message_size;
3905 let max_encoding_message_size = self.max_encoding_message_size;
3906 let inner = self.inner.clone();
3907 let fut = async move {
3908 let method = BurnAssetSvc(inner);
3909 let codec = tonic::codec::ProstCodec::default();
3910 let mut grpc = tonic::server::Grpc::new(codec)
3911 .apply_compression_config(
3912 accept_compression_encodings,
3913 send_compression_encodings,
3914 )
3915 .apply_max_message_size_config(
3916 max_decoding_message_size,
3917 max_encoding_message_size,
3918 );
3919 let res = grpc.unary(method, req).await;
3920 Ok(res)
3921 };
3922 Box::pin(fut)
3923 }
3924 "/taprpc.TaprootAssets/ListBurns" => {
3925 #[allow(non_camel_case_types)]
3926 struct ListBurnsSvc<T: TaprootAssets>(pub Arc<T>);
3927 impl<
3928 T: TaprootAssets,
3929 > tonic::server::UnaryService<super::ListBurnsRequest>
3930 for ListBurnsSvc<T> {
3931 type Response = super::ListBurnsResponse;
3932 type Future = BoxFuture<
3933 tonic::Response<Self::Response>,
3934 tonic::Status,
3935 >;
3936 fn call(
3937 &mut self,
3938 request: tonic::Request<super::ListBurnsRequest>,
3939 ) -> Self::Future {
3940 let inner = Arc::clone(&self.0);
3941 let fut = async move {
3942 <T as TaprootAssets>::list_burns(&inner, request).await
3943 };
3944 Box::pin(fut)
3945 }
3946 }
3947 let accept_compression_encodings = self.accept_compression_encodings;
3948 let send_compression_encodings = self.send_compression_encodings;
3949 let max_decoding_message_size = self.max_decoding_message_size;
3950 let max_encoding_message_size = self.max_encoding_message_size;
3951 let inner = self.inner.clone();
3952 let fut = async move {
3953 let method = ListBurnsSvc(inner);
3954 let codec = tonic::codec::ProstCodec::default();
3955 let mut grpc = tonic::server::Grpc::new(codec)
3956 .apply_compression_config(
3957 accept_compression_encodings,
3958 send_compression_encodings,
3959 )
3960 .apply_max_message_size_config(
3961 max_decoding_message_size,
3962 max_encoding_message_size,
3963 );
3964 let res = grpc.unary(method, req).await;
3965 Ok(res)
3966 };
3967 Box::pin(fut)
3968 }
3969 "/taprpc.TaprootAssets/GetInfo" => {
3970 #[allow(non_camel_case_types)]
3971 struct GetInfoSvc<T: TaprootAssets>(pub Arc<T>);
3972 impl<
3973 T: TaprootAssets,
3974 > tonic::server::UnaryService<super::GetInfoRequest>
3975 for GetInfoSvc<T> {
3976 type Response = super::GetInfoResponse;
3977 type Future = BoxFuture<
3978 tonic::Response<Self::Response>,
3979 tonic::Status,
3980 >;
3981 fn call(
3982 &mut self,
3983 request: tonic::Request<super::GetInfoRequest>,
3984 ) -> Self::Future {
3985 let inner = Arc::clone(&self.0);
3986 let fut = async move {
3987 <T as TaprootAssets>::get_info(&inner, request).await
3988 };
3989 Box::pin(fut)
3990 }
3991 }
3992 let accept_compression_encodings = self.accept_compression_encodings;
3993 let send_compression_encodings = self.send_compression_encodings;
3994 let max_decoding_message_size = self.max_decoding_message_size;
3995 let max_encoding_message_size = self.max_encoding_message_size;
3996 let inner = self.inner.clone();
3997 let fut = async move {
3998 let method = GetInfoSvc(inner);
3999 let codec = tonic::codec::ProstCodec::default();
4000 let mut grpc = tonic::server::Grpc::new(codec)
4001 .apply_compression_config(
4002 accept_compression_encodings,
4003 send_compression_encodings,
4004 )
4005 .apply_max_message_size_config(
4006 max_decoding_message_size,
4007 max_encoding_message_size,
4008 );
4009 let res = grpc.unary(method, req).await;
4010 Ok(res)
4011 };
4012 Box::pin(fut)
4013 }
4014 "/taprpc.TaprootAssets/FetchAssetMeta" => {
4015 #[allow(non_camel_case_types)]
4016 struct FetchAssetMetaSvc<T: TaprootAssets>(pub Arc<T>);
4017 impl<
4018 T: TaprootAssets,
4019 > tonic::server::UnaryService<super::FetchAssetMetaRequest>
4020 for FetchAssetMetaSvc<T> {
4021 type Response = super::FetchAssetMetaResponse;
4022 type Future = BoxFuture<
4023 tonic::Response<Self::Response>,
4024 tonic::Status,
4025 >;
4026 fn call(
4027 &mut self,
4028 request: tonic::Request<super::FetchAssetMetaRequest>,
4029 ) -> Self::Future {
4030 let inner = Arc::clone(&self.0);
4031 let fut = async move {
4032 <T as TaprootAssets>::fetch_asset_meta(&inner, request)
4033 .await
4034 };
4035 Box::pin(fut)
4036 }
4037 }
4038 let accept_compression_encodings = self.accept_compression_encodings;
4039 let send_compression_encodings = self.send_compression_encodings;
4040 let max_decoding_message_size = self.max_decoding_message_size;
4041 let max_encoding_message_size = self.max_encoding_message_size;
4042 let inner = self.inner.clone();
4043 let fut = async move {
4044 let method = FetchAssetMetaSvc(inner);
4045 let codec = tonic::codec::ProstCodec::default();
4046 let mut grpc = tonic::server::Grpc::new(codec)
4047 .apply_compression_config(
4048 accept_compression_encodings,
4049 send_compression_encodings,
4050 )
4051 .apply_max_message_size_config(
4052 max_decoding_message_size,
4053 max_encoding_message_size,
4054 );
4055 let res = grpc.unary(method, req).await;
4056 Ok(res)
4057 };
4058 Box::pin(fut)
4059 }
4060 "/taprpc.TaprootAssets/SubscribeReceiveEvents" => {
4061 #[allow(non_camel_case_types)]
4062 struct SubscribeReceiveEventsSvc<T: TaprootAssets>(pub Arc<T>);
4063 impl<
4064 T: TaprootAssets,
4065 > tonic::server::ServerStreamingService<
4066 super::SubscribeReceiveEventsRequest,
4067 > for SubscribeReceiveEventsSvc<T> {
4068 type Response = super::ReceiveEvent;
4069 type ResponseStream = T::SubscribeReceiveEventsStream;
4070 type Future = BoxFuture<
4071 tonic::Response<Self::ResponseStream>,
4072 tonic::Status,
4073 >;
4074 fn call(
4075 &mut self,
4076 request: tonic::Request<super::SubscribeReceiveEventsRequest>,
4077 ) -> Self::Future {
4078 let inner = Arc::clone(&self.0);
4079 let fut = async move {
4080 <T as TaprootAssets>::subscribe_receive_events(
4081 &inner,
4082 request,
4083 )
4084 .await
4085 };
4086 Box::pin(fut)
4087 }
4088 }
4089 let accept_compression_encodings = self.accept_compression_encodings;
4090 let send_compression_encodings = self.send_compression_encodings;
4091 let max_decoding_message_size = self.max_decoding_message_size;
4092 let max_encoding_message_size = self.max_encoding_message_size;
4093 let inner = self.inner.clone();
4094 let fut = async move {
4095 let method = SubscribeReceiveEventsSvc(inner);
4096 let codec = tonic::codec::ProstCodec::default();
4097 let mut grpc = tonic::server::Grpc::new(codec)
4098 .apply_compression_config(
4099 accept_compression_encodings,
4100 send_compression_encodings,
4101 )
4102 .apply_max_message_size_config(
4103 max_decoding_message_size,
4104 max_encoding_message_size,
4105 );
4106 let res = grpc.server_streaming(method, req).await;
4107 Ok(res)
4108 };
4109 Box::pin(fut)
4110 }
4111 "/taprpc.TaprootAssets/SubscribeSendEvents" => {
4112 #[allow(non_camel_case_types)]
4113 struct SubscribeSendEventsSvc<T: TaprootAssets>(pub Arc<T>);
4114 impl<
4115 T: TaprootAssets,
4116 > tonic::server::ServerStreamingService<
4117 super::SubscribeSendEventsRequest,
4118 > for SubscribeSendEventsSvc<T> {
4119 type Response = super::SendEvent;
4120 type ResponseStream = T::SubscribeSendEventsStream;
4121 type Future = BoxFuture<
4122 tonic::Response<Self::ResponseStream>,
4123 tonic::Status,
4124 >;
4125 fn call(
4126 &mut self,
4127 request: tonic::Request<super::SubscribeSendEventsRequest>,
4128 ) -> Self::Future {
4129 let inner = Arc::clone(&self.0);
4130 let fut = async move {
4131 <T as TaprootAssets>::subscribe_send_events(&inner, request)
4132 .await
4133 };
4134 Box::pin(fut)
4135 }
4136 }
4137 let accept_compression_encodings = self.accept_compression_encodings;
4138 let send_compression_encodings = self.send_compression_encodings;
4139 let max_decoding_message_size = self.max_decoding_message_size;
4140 let max_encoding_message_size = self.max_encoding_message_size;
4141 let inner = self.inner.clone();
4142 let fut = async move {
4143 let method = SubscribeSendEventsSvc(inner);
4144 let codec = tonic::codec::ProstCodec::default();
4145 let mut grpc = tonic::server::Grpc::new(codec)
4146 .apply_compression_config(
4147 accept_compression_encodings,
4148 send_compression_encodings,
4149 )
4150 .apply_max_message_size_config(
4151 max_decoding_message_size,
4152 max_encoding_message_size,
4153 );
4154 let res = grpc.server_streaming(method, req).await;
4155 Ok(res)
4156 };
4157 Box::pin(fut)
4158 }
4159 "/taprpc.TaprootAssets/RegisterTransfer" => {
4160 #[allow(non_camel_case_types)]
4161 struct RegisterTransferSvc<T: TaprootAssets>(pub Arc<T>);
4162 impl<
4163 T: TaprootAssets,
4164 > tonic::server::UnaryService<super::RegisterTransferRequest>
4165 for RegisterTransferSvc<T> {
4166 type Response = super::RegisterTransferResponse;
4167 type Future = BoxFuture<
4168 tonic::Response<Self::Response>,
4169 tonic::Status,
4170 >;
4171 fn call(
4172 &mut self,
4173 request: tonic::Request<super::RegisterTransferRequest>,
4174 ) -> Self::Future {
4175 let inner = Arc::clone(&self.0);
4176 let fut = async move {
4177 <T as TaprootAssets>::register_transfer(&inner, request)
4178 .await
4179 };
4180 Box::pin(fut)
4181 }
4182 }
4183 let accept_compression_encodings = self.accept_compression_encodings;
4184 let send_compression_encodings = self.send_compression_encodings;
4185 let max_decoding_message_size = self.max_decoding_message_size;
4186 let max_encoding_message_size = self.max_encoding_message_size;
4187 let inner = self.inner.clone();
4188 let fut = async move {
4189 let method = RegisterTransferSvc(inner);
4190 let codec = tonic::codec::ProstCodec::default();
4191 let mut grpc = tonic::server::Grpc::new(codec)
4192 .apply_compression_config(
4193 accept_compression_encodings,
4194 send_compression_encodings,
4195 )
4196 .apply_max_message_size_config(
4197 max_decoding_message_size,
4198 max_encoding_message_size,
4199 );
4200 let res = grpc.unary(method, req).await;
4201 Ok(res)
4202 };
4203 Box::pin(fut)
4204 }
4205 _ => {
4206 Box::pin(async move {
4207 let mut response = http::Response::new(
4208 tonic::body::Body::default(),
4209 );
4210 let headers = response.headers_mut();
4211 headers
4212 .insert(
4213 tonic::Status::GRPC_STATUS,
4214 (tonic::Code::Unimplemented as i32).into(),
4215 );
4216 headers
4217 .insert(
4218 http::header::CONTENT_TYPE,
4219 tonic::metadata::GRPC_CONTENT_TYPE,
4220 );
4221 Ok(response)
4222 })
4223 }
4224 }
4225 }
4226 }
4227 impl<T> Clone for TaprootAssetsServer<T> {
4228 fn clone(&self) -> Self {
4229 let inner = self.inner.clone();
4230 Self {
4231 inner,
4232 accept_compression_encodings: self.accept_compression_encodings,
4233 send_compression_encodings: self.send_compression_encodings,
4234 max_decoding_message_size: self.max_decoding_message_size,
4235 max_encoding_message_size: self.max_encoding_message_size,
4236 }
4237 }
4238 }
4239 pub const SERVICE_NAME: &str = "taprpc.TaprootAssets";
4241 impl<T> tonic::server::NamedService for TaprootAssetsServer<T> {
4242 const NAME: &'static str = SERVICE_NAME;
4243 }
4244}