1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct RpcStatus {
5 #[prost(string, tag = "1")]
7 pub version: ::prost::alloc::string::String,
8 #[prost(message, optional, tag = "2")]
10 pub genesis_commitment: ::core::option::Option<super::primitives::Digest>,
11 #[prost(message, optional, tag = "3")]
13 pub store: ::core::option::Option<StoreStatus>,
14 #[prost(message, optional, tag = "4")]
16 pub block_producer: ::core::option::Option<BlockProducerStatus>,
17}
18#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
20pub struct BlockProducerStatus {
21 #[prost(string, tag = "1")]
23 pub version: ::prost::alloc::string::String,
24 #[prost(string, tag = "2")]
26 pub status: ::prost::alloc::string::String,
27 #[prost(fixed32, tag = "4")]
32 pub chain_tip: u32,
33 #[prost(message, optional, tag = "3")]
35 pub mempool_stats: ::core::option::Option<MempoolStats>,
36}
37#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
39pub struct MempoolStats {
40 #[prost(uint64, tag = "1")]
42 pub unbatched_transactions: u64,
43 #[prost(uint64, tag = "2")]
45 pub proposed_batches: u64,
46 #[prost(uint64, tag = "3")]
48 pub proven_batches: u64,
49}
50#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
52pub struct StoreStatus {
53 #[prost(string, tag = "1")]
55 pub version: ::prost::alloc::string::String,
56 #[prost(string, tag = "2")]
58 pub status: ::prost::alloc::string::String,
59 #[prost(fixed32, tag = "3")]
61 pub chain_tip: u32,
62}
63#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
68pub struct BlockHeaderByNumberRequest {
69 #[prost(uint32, optional, tag = "1")]
71 pub block_num: ::core::option::Option<u32>,
72 #[prost(bool, optional, tag = "2")]
74 pub include_mmr_proof: ::core::option::Option<bool>,
75}
76#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct BlockHeaderByNumberResponse {
79 #[prost(message, optional, tag = "1")]
81 pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
82 #[prost(message, optional, tag = "2")]
84 pub mmr_path: ::core::option::Option<super::primitives::MerklePath>,
85 #[prost(fixed32, optional, tag = "3")]
87 pub chain_length: ::core::option::Option<u32>,
88}
89#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
91pub struct MaybeNoteScript {
92 #[prost(message, optional, tag = "1")]
94 pub script: ::core::option::Option<super::note::NoteScript>,
95}
96#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct AccountRequest {
99 #[prost(message, optional, tag = "1")]
101 pub account_id: ::core::option::Option<super::account::AccountId>,
102 #[prost(message, optional, tag = "2")]
106 pub block_num: ::core::option::Option<super::blockchain::BlockNumber>,
107 #[prost(message, optional, tag = "3")]
109 pub details: ::core::option::Option<account_request::AccountDetailRequest>,
110}
111pub mod account_request {
113 #[derive(Clone, PartialEq, ::prost::Message)]
115 pub struct AccountDetailRequest {
116 #[prost(message, optional, tag = "1")]
121 pub code_commitment: ::core::option::Option<super::super::primitives::Digest>,
122 #[prost(message, optional, tag = "2")]
128 pub asset_vault_commitment: ::core::option::Option<
129 super::super::primitives::Digest,
130 >,
131 #[prost(message, repeated, tag = "3")]
133 pub storage_maps: ::prost::alloc::vec::Vec<
134 account_detail_request::StorageMapDetailRequest,
135 >,
136 }
137 pub mod account_detail_request {
139 #[derive(Clone, PartialEq, ::prost::Message)]
141 pub struct StorageMapDetailRequest {
142 #[prost(string, tag = "1")]
144 pub slot_name: ::prost::alloc::string::String,
145 #[prost(oneof = "storage_map_detail_request::SlotData", tags = "2, 3")]
146 pub slot_data: ::core::option::Option<storage_map_detail_request::SlotData>,
147 }
148 pub mod storage_map_detail_request {
150 #[derive(Clone, PartialEq, ::prost::Message)]
152 pub struct MapKeys {
153 #[prost(message, repeated, tag = "1")]
155 pub map_keys: ::prost::alloc::vec::Vec<
156 super::super::super::super::primitives::Digest,
157 >,
158 }
159 #[derive(Clone, PartialEq, ::prost::Oneof)]
160 pub enum SlotData {
161 #[prost(bool, tag = "2")]
164 AllEntries(bool),
165 #[prost(message, tag = "3")]
167 MapKeys(MapKeys),
168 }
169 }
170 }
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct AccountResponse {
175 #[prost(message, optional, tag = "1")]
177 pub block_num: ::core::option::Option<super::blockchain::BlockNumber>,
178 #[prost(message, optional, tag = "2")]
180 pub witness: ::core::option::Option<super::account::AccountWitness>,
181 #[prost(message, optional, tag = "3")]
183 pub details: ::core::option::Option<account_response::AccountDetails>,
184}
185pub mod account_response {
187 #[derive(Clone, PartialEq, ::prost::Message)]
188 pub struct AccountDetails {
189 #[prost(message, optional, tag = "1")]
191 pub header: ::core::option::Option<super::super::account::AccountHeader>,
192 #[prost(message, optional, tag = "2")]
194 pub storage_details: ::core::option::Option<super::AccountStorageDetails>,
195 #[prost(bytes = "vec", optional, tag = "3")]
197 pub code: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
198 #[prost(message, optional, tag = "4")]
201 pub vault_details: ::core::option::Option<super::AccountVaultDetails>,
202 }
203}
204#[derive(Clone, PartialEq, ::prost::Message)]
206pub struct AccountVaultDetails {
207 #[prost(bool, tag = "1")]
211 pub too_many_assets: bool,
212 #[prost(message, repeated, tag = "2")]
215 pub assets: ::prost::alloc::vec::Vec<super::primitives::Asset>,
216}
217#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct AccountStorageDetails {
220 #[prost(message, optional, tag = "1")]
222 pub header: ::core::option::Option<super::account::AccountStorageHeader>,
223 #[prost(message, repeated, tag = "2")]
225 pub map_details: ::prost::alloc::vec::Vec<
226 account_storage_details::AccountStorageMapDetails,
227 >,
228}
229pub mod account_storage_details {
231 #[derive(Clone, PartialEq, ::prost::Message)]
232 pub struct AccountStorageMapDetails {
233 #[prost(string, tag = "1")]
235 pub slot_name: ::prost::alloc::string::String,
236 #[prost(bool, tag = "2")]
239 pub too_many_entries: bool,
240 #[prost(oneof = "account_storage_map_details::Entries", tags = "3, 4")]
242 pub entries: ::core::option::Option<account_storage_map_details::Entries>,
243 }
244 pub mod account_storage_map_details {
246 #[derive(Clone, PartialEq, ::prost::Message)]
249 pub struct MapEntriesWithProofs {
250 #[prost(message, repeated, tag = "1")]
251 pub entries: ::prost::alloc::vec::Vec<
252 map_entries_with_proofs::StorageMapEntryWithProof,
253 >,
254 }
255 pub mod map_entries_with_proofs {
257 #[derive(Clone, PartialEq, ::prost::Message)]
259 pub struct StorageMapEntryWithProof {
260 #[prost(message, optional, tag = "1")]
261 pub key: ::core::option::Option<
262 super::super::super::super::primitives::Digest,
263 >,
264 #[prost(message, optional, tag = "2")]
265 pub value: ::core::option::Option<
266 super::super::super::super::primitives::Digest,
267 >,
268 #[prost(message, optional, tag = "3")]
269 pub proof: ::core::option::Option<
270 super::super::super::super::primitives::SmtOpening,
271 >,
272 }
273 }
274 #[derive(Clone, PartialEq, ::prost::Message)]
277 pub struct AllMapEntries {
278 #[prost(message, repeated, tag = "1")]
279 pub entries: ::prost::alloc::vec::Vec<all_map_entries::StorageMapEntry>,
280 }
281 pub mod all_map_entries {
283 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
285 pub struct StorageMapEntry {
286 #[prost(message, optional, tag = "1")]
287 pub key: ::core::option::Option<
288 super::super::super::super::primitives::Digest,
289 >,
290 #[prost(message, optional, tag = "2")]
291 pub value: ::core::option::Option<
292 super::super::super::super::primitives::Digest,
293 >,
294 }
295 }
296 #[derive(Clone, PartialEq, ::prost::Oneof)]
298 pub enum Entries {
299 #[prost(message, tag = "3")]
301 AllEntries(AllMapEntries),
302 #[prost(message, tag = "4")]
304 EntriesWithProofs(MapEntriesWithProofs),
305 }
306 }
307}
308#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct NullifierList {
311 #[prost(message, repeated, tag = "1")]
313 pub nullifiers: ::prost::alloc::vec::Vec<super::primitives::Digest>,
314}
315#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct CheckNullifiersResponse {
318 #[prost(message, repeated, tag = "1")]
320 pub proofs: ::prost::alloc::vec::Vec<super::primitives::SmtOpening>,
321}
322#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
324pub struct SyncNullifiersRequest {
325 #[prost(message, optional, tag = "1")]
327 pub block_range: ::core::option::Option<BlockRange>,
328 #[prost(uint32, tag = "2")]
330 pub prefix_len: u32,
331 #[prost(uint32, repeated, tag = "3")]
334 pub nullifiers: ::prost::alloc::vec::Vec<u32>,
335}
336#[derive(Clone, PartialEq, ::prost::Message)]
338pub struct SyncNullifiersResponse {
339 #[prost(message, optional, tag = "1")]
341 pub pagination_info: ::core::option::Option<PaginationInfo>,
342 #[prost(message, repeated, tag = "2")]
344 pub nullifiers: ::prost::alloc::vec::Vec<sync_nullifiers_response::NullifierUpdate>,
345}
346pub mod sync_nullifiers_response {
348 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
350 pub struct NullifierUpdate {
351 #[prost(message, optional, tag = "1")]
353 pub nullifier: ::core::option::Option<super::super::primitives::Digest>,
354 #[prost(fixed32, tag = "2")]
356 pub block_num: u32,
357 }
358}
359#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
363pub struct SyncAccountVaultRequest {
364 #[prost(message, optional, tag = "1")]
369 pub block_range: ::core::option::Option<BlockRange>,
370 #[prost(message, optional, tag = "2")]
372 pub account_id: ::core::option::Option<super::account::AccountId>,
373}
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct SyncAccountVaultResponse {
376 #[prost(message, optional, tag = "1")]
378 pub pagination_info: ::core::option::Option<PaginationInfo>,
379 #[prost(message, repeated, tag = "2")]
384 pub updates: ::prost::alloc::vec::Vec<AccountVaultUpdate>,
385}
386#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
387pub struct AccountVaultUpdate {
388 #[prost(message, optional, tag = "1")]
390 pub vault_key: ::core::option::Option<super::primitives::Digest>,
391 #[prost(message, optional, tag = "2")]
394 pub asset: ::core::option::Option<super::primitives::Asset>,
395 #[prost(fixed32, tag = "3")]
397 pub block_num: u32,
398}
399#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
404pub struct SyncNotesRequest {
405 #[prost(message, optional, tag = "1")]
407 pub block_range: ::core::option::Option<BlockRange>,
408 #[prost(fixed32, repeated, tag = "2")]
410 pub note_tags: ::prost::alloc::vec::Vec<u32>,
411}
412#[derive(Clone, PartialEq, ::prost::Message)]
414pub struct SyncNotesResponse {
415 #[prost(message, optional, tag = "1")]
417 pub pagination_info: ::core::option::Option<PaginationInfo>,
418 #[prost(message, optional, tag = "2")]
420 pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
421 #[prost(message, optional, tag = "3")]
426 pub mmr_path: ::core::option::Option<super::primitives::MerklePath>,
427 #[prost(message, repeated, tag = "4")]
429 pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
430}
431#[derive(Clone, PartialEq, ::prost::Message)]
437pub struct SyncStateRequest {
438 #[prost(fixed32, tag = "1")]
442 pub block_num: u32,
443 #[prost(message, repeated, tag = "2")]
449 pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
450 #[prost(fixed32, repeated, tag = "3")]
452 pub note_tags: ::prost::alloc::vec::Vec<u32>,
453}
454#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct SyncStateResponse {
457 #[prost(fixed32, tag = "1")]
459 pub chain_tip: u32,
460 #[prost(message, optional, tag = "2")]
462 pub block_header: ::core::option::Option<super::blockchain::BlockHeader>,
463 #[prost(message, optional, tag = "3")]
465 pub mmr_delta: ::core::option::Option<super::primitives::MmrDelta>,
466 #[prost(message, repeated, tag = "5")]
468 pub accounts: ::prost::alloc::vec::Vec<super::account::AccountSummary>,
469 #[prost(message, repeated, tag = "6")]
472 pub transactions: ::prost::alloc::vec::Vec<super::transaction::TransactionSummary>,
473 #[prost(message, repeated, tag = "7")]
475 pub notes: ::prost::alloc::vec::Vec<super::note::NoteSyncRecord>,
476}
477#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
482pub struct SyncAccountStorageMapsRequest {
483 #[prost(message, optional, tag = "1")]
488 pub block_range: ::core::option::Option<BlockRange>,
489 #[prost(message, optional, tag = "3")]
491 pub account_id: ::core::option::Option<super::account::AccountId>,
492}
493#[derive(Clone, PartialEq, ::prost::Message)]
494pub struct SyncAccountStorageMapsResponse {
495 #[prost(message, optional, tag = "1")]
497 pub pagination_info: ::core::option::Option<PaginationInfo>,
498 #[prost(message, repeated, tag = "2")]
503 pub updates: ::prost::alloc::vec::Vec<StorageMapUpdate>,
504}
505#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
507pub struct StorageMapUpdate {
508 #[prost(fixed32, tag = "1")]
510 pub block_num: u32,
511 #[prost(string, tag = "2")]
513 pub slot_name: ::prost::alloc::string::String,
514 #[prost(message, optional, tag = "3")]
516 pub key: ::core::option::Option<super::primitives::Digest>,
517 #[prost(message, optional, tag = "4")]
519 pub value: ::core::option::Option<super::primitives::Digest>,
520}
521#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
523pub struct BlockRange {
524 #[prost(fixed32, tag = "1")]
526 pub block_from: u32,
527 #[prost(fixed32, optional, tag = "2")]
529 pub block_to: ::core::option::Option<u32>,
530}
531#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
540pub struct PaginationInfo {
541 #[prost(fixed32, tag = "1")]
543 pub chain_tip: u32,
544 #[prost(fixed32, tag = "2")]
550 pub block_num: u32,
551}
552#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct SyncTransactionsRequest {
557 #[prost(message, optional, tag = "1")]
559 pub block_range: ::core::option::Option<BlockRange>,
560 #[prost(message, repeated, tag = "2")]
562 pub account_ids: ::prost::alloc::vec::Vec<super::account::AccountId>,
563}
564#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct SyncTransactionsResponse {
567 #[prost(message, optional, tag = "1")]
569 pub pagination_info: ::core::option::Option<PaginationInfo>,
570 #[prost(message, repeated, tag = "2")]
572 pub transactions: ::prost::alloc::vec::Vec<TransactionRecord>,
573}
574#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct TransactionRecord {
577 #[prost(fixed32, tag = "1")]
579 pub block_num: u32,
580 #[prost(message, optional, tag = "2")]
582 pub header: ::core::option::Option<super::transaction::TransactionHeader>,
583}
584#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct RpcLimits {
587 #[prost(map = "string, message", tag = "1")]
591 pub endpoints: ::std::collections::HashMap<
592 ::prost::alloc::string::String,
593 EndpointLimits,
594 >,
595}
596#[derive(Clone, PartialEq, ::prost::Message)]
598pub struct EndpointLimits {
599 #[prost(map = "string, uint32", tag = "1")]
603 pub parameters: ::std::collections::HashMap<::prost::alloc::string::String, u32>,
604}
605pub mod api_client {
607 #![allow(
608 unused_variables,
609 dead_code,
610 missing_docs,
611 clippy::wildcard_imports,
612 clippy::let_unit_value,
613 )]
614 use tonic::codegen::*;
615 use tonic::codegen::http::Uri;
616 #[derive(Debug, Clone)]
618 pub struct ApiClient<T> {
619 inner: tonic::client::Grpc<T>,
620 }
621 impl ApiClient<tonic::transport::Channel> {
622 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
624 where
625 D: TryInto<tonic::transport::Endpoint>,
626 D::Error: Into<StdError>,
627 {
628 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
629 Ok(Self::new(conn))
630 }
631 }
632 impl<T> ApiClient<T>
633 where
634 T: tonic::client::GrpcService<tonic::body::Body>,
635 T::Error: Into<StdError>,
636 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
637 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
638 {
639 pub fn new(inner: T) -> Self {
640 let inner = tonic::client::Grpc::new(inner);
641 Self { inner }
642 }
643 pub fn with_origin(inner: T, origin: Uri) -> Self {
644 let inner = tonic::client::Grpc::with_origin(inner, origin);
645 Self { inner }
646 }
647 pub fn with_interceptor<F>(
648 inner: T,
649 interceptor: F,
650 ) -> ApiClient<InterceptedService<T, F>>
651 where
652 F: tonic::service::Interceptor,
653 T::ResponseBody: Default,
654 T: tonic::codegen::Service<
655 http::Request<tonic::body::Body>,
656 Response = http::Response<
657 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
658 >,
659 >,
660 <T as tonic::codegen::Service<
661 http::Request<tonic::body::Body>,
662 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
663 {
664 ApiClient::new(InterceptedService::new(inner, interceptor))
665 }
666 #[must_use]
671 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
672 self.inner = self.inner.send_compressed(encoding);
673 self
674 }
675 #[must_use]
677 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
678 self.inner = self.inner.accept_compressed(encoding);
679 self
680 }
681 #[must_use]
685 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
686 self.inner = self.inner.max_decoding_message_size(limit);
687 self
688 }
689 #[must_use]
693 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
694 self.inner = self.inner.max_encoding_message_size(limit);
695 self
696 }
697 pub async fn status(
699 &mut self,
700 request: impl tonic::IntoRequest<()>,
701 ) -> std::result::Result<tonic::Response<super::RpcStatus>, tonic::Status> {
702 self.inner
703 .ready()
704 .await
705 .map_err(|e| {
706 tonic::Status::unknown(
707 format!("Service was not ready: {}", e.into()),
708 )
709 })?;
710 let codec = tonic_prost::ProstCodec::default();
711 let path = http::uri::PathAndQuery::from_static("/rpc.Api/Status");
712 let mut req = request.into_request();
713 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "Status"));
714 self.inner.unary(req, path, codec).await
715 }
716 pub async fn check_nullifiers(
730 &mut self,
731 request: impl tonic::IntoRequest<super::NullifierList>,
732 ) -> std::result::Result<
733 tonic::Response<super::CheckNullifiersResponse>,
734 tonic::Status,
735 > {
736 self.inner
737 .ready()
738 .await
739 .map_err(|e| {
740 tonic::Status::unknown(
741 format!("Service was not ready: {}", e.into()),
742 )
743 })?;
744 let codec = tonic_prost::ProstCodec::default();
745 let path = http::uri::PathAndQuery::from_static("/rpc.Api/CheckNullifiers");
746 let mut req = request.into_request();
747 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "CheckNullifiers"));
748 self.inner.unary(req, path, codec).await
749 }
750 pub async fn get_account(
752 &mut self,
753 request: impl tonic::IntoRequest<super::AccountRequest>,
754 ) -> std::result::Result<
755 tonic::Response<super::AccountResponse>,
756 tonic::Status,
757 > {
758 self.inner
759 .ready()
760 .await
761 .map_err(|e| {
762 tonic::Status::unknown(
763 format!("Service was not ready: {}", e.into()),
764 )
765 })?;
766 let codec = tonic_prost::ProstCodec::default();
767 let path = http::uri::PathAndQuery::from_static("/rpc.Api/GetAccount");
768 let mut req = request.into_request();
769 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "GetAccount"));
770 self.inner.unary(req, path, codec).await
771 }
772 pub async fn get_block_by_number(
774 &mut self,
775 request: impl tonic::IntoRequest<super::super::blockchain::BlockNumber>,
776 ) -> std::result::Result<
777 tonic::Response<super::super::blockchain::MaybeBlock>,
778 tonic::Status,
779 > {
780 self.inner
781 .ready()
782 .await
783 .map_err(|e| {
784 tonic::Status::unknown(
785 format!("Service was not ready: {}", e.into()),
786 )
787 })?;
788 let codec = tonic_prost::ProstCodec::default();
789 let path = http::uri::PathAndQuery::from_static("/rpc.Api/GetBlockByNumber");
790 let mut req = request.into_request();
791 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "GetBlockByNumber"));
792 self.inner.unary(req, path, codec).await
793 }
794 pub async fn get_block_header_by_number(
797 &mut self,
798 request: impl tonic::IntoRequest<super::BlockHeaderByNumberRequest>,
799 ) -> std::result::Result<
800 tonic::Response<super::BlockHeaderByNumberResponse>,
801 tonic::Status,
802 > {
803 self.inner
804 .ready()
805 .await
806 .map_err(|e| {
807 tonic::Status::unknown(
808 format!("Service was not ready: {}", e.into()),
809 )
810 })?;
811 let codec = tonic_prost::ProstCodec::default();
812 let path = http::uri::PathAndQuery::from_static(
813 "/rpc.Api/GetBlockHeaderByNumber",
814 );
815 let mut req = request.into_request();
816 req.extensions_mut()
817 .insert(GrpcMethod::new("rpc.Api", "GetBlockHeaderByNumber"));
818 self.inner.unary(req, path, codec).await
819 }
820 pub async fn get_notes_by_id(
822 &mut self,
823 request: impl tonic::IntoRequest<super::super::note::NoteIdList>,
824 ) -> std::result::Result<
825 tonic::Response<super::super::note::CommittedNoteList>,
826 tonic::Status,
827 > {
828 self.inner
829 .ready()
830 .await
831 .map_err(|e| {
832 tonic::Status::unknown(
833 format!("Service was not ready: {}", e.into()),
834 )
835 })?;
836 let codec = tonic_prost::ProstCodec::default();
837 let path = http::uri::PathAndQuery::from_static("/rpc.Api/GetNotesById");
838 let mut req = request.into_request();
839 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "GetNotesById"));
840 self.inner.unary(req, path, codec).await
841 }
842 pub async fn get_note_script_by_root(
844 &mut self,
845 request: impl tonic::IntoRequest<super::super::note::NoteRoot>,
846 ) -> std::result::Result<
847 tonic::Response<super::MaybeNoteScript>,
848 tonic::Status,
849 > {
850 self.inner
851 .ready()
852 .await
853 .map_err(|e| {
854 tonic::Status::unknown(
855 format!("Service was not ready: {}", e.into()),
856 )
857 })?;
858 let codec = tonic_prost::ProstCodec::default();
859 let path = http::uri::PathAndQuery::from_static(
860 "/rpc.Api/GetNoteScriptByRoot",
861 );
862 let mut req = request.into_request();
863 req.extensions_mut()
864 .insert(GrpcMethod::new("rpc.Api", "GetNoteScriptByRoot"));
865 self.inner.unary(req, path, codec).await
866 }
867 pub async fn submit_proven_transaction(
869 &mut self,
870 request: impl tonic::IntoRequest<
871 super::super::transaction::ProvenTransaction,
872 >,
873 ) -> std::result::Result<
874 tonic::Response<super::super::blockchain::BlockNumber>,
875 tonic::Status,
876 > {
877 self.inner
878 .ready()
879 .await
880 .map_err(|e| {
881 tonic::Status::unknown(
882 format!("Service was not ready: {}", e.into()),
883 )
884 })?;
885 let codec = tonic_prost::ProstCodec::default();
886 let path = http::uri::PathAndQuery::from_static(
887 "/rpc.Api/SubmitProvenTransaction",
888 );
889 let mut req = request.into_request();
890 req.extensions_mut()
891 .insert(GrpcMethod::new("rpc.Api", "SubmitProvenTransaction"));
892 self.inner.unary(req, path, codec).await
893 }
894 pub async fn submit_proven_batch(
907 &mut self,
908 request: impl tonic::IntoRequest<
909 super::super::transaction::ProvenTransactionBatch,
910 >,
911 ) -> std::result::Result<
912 tonic::Response<super::super::blockchain::BlockNumber>,
913 tonic::Status,
914 > {
915 self.inner
916 .ready()
917 .await
918 .map_err(|e| {
919 tonic::Status::unknown(
920 format!("Service was not ready: {}", e.into()),
921 )
922 })?;
923 let codec = tonic_prost::ProstCodec::default();
924 let path = http::uri::PathAndQuery::from_static(
925 "/rpc.Api/SubmitProvenBatch",
926 );
927 let mut req = request.into_request();
928 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SubmitProvenBatch"));
929 self.inner.unary(req, path, codec).await
930 }
931 pub async fn sync_nullifiers(
935 &mut self,
936 request: impl tonic::IntoRequest<super::SyncNullifiersRequest>,
937 ) -> std::result::Result<
938 tonic::Response<super::SyncNullifiersResponse>,
939 tonic::Status,
940 > {
941 self.inner
942 .ready()
943 .await
944 .map_err(|e| {
945 tonic::Status::unknown(
946 format!("Service was not ready: {}", e.into()),
947 )
948 })?;
949 let codec = tonic_prost::ProstCodec::default();
950 let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncNullifiers");
951 let mut req = request.into_request();
952 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncNullifiers"));
953 self.inner.unary(req, path, codec).await
954 }
955 pub async fn sync_account_vault(
957 &mut self,
958 request: impl tonic::IntoRequest<super::SyncAccountVaultRequest>,
959 ) -> std::result::Result<
960 tonic::Response<super::SyncAccountVaultResponse>,
961 tonic::Status,
962 > {
963 self.inner
964 .ready()
965 .await
966 .map_err(|e| {
967 tonic::Status::unknown(
968 format!("Service was not ready: {}", e.into()),
969 )
970 })?;
971 let codec = tonic_prost::ProstCodec::default();
972 let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncAccountVault");
973 let mut req = request.into_request();
974 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncAccountVault"));
975 self.inner.unary(req, path, codec).await
976 }
977 pub async fn sync_notes(
987 &mut self,
988 request: impl tonic::IntoRequest<super::SyncNotesRequest>,
989 ) -> std::result::Result<
990 tonic::Response<super::SyncNotesResponse>,
991 tonic::Status,
992 > {
993 self.inner
994 .ready()
995 .await
996 .map_err(|e| {
997 tonic::Status::unknown(
998 format!("Service was not ready: {}", e.into()),
999 )
1000 })?;
1001 let codec = tonic_prost::ProstCodec::default();
1002 let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncNotes");
1003 let mut req = request.into_request();
1004 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncNotes"));
1005 self.inner.unary(req, path, codec).await
1006 }
1007 pub async fn sync_state(
1023 &mut self,
1024 request: impl tonic::IntoRequest<super::SyncStateRequest>,
1025 ) -> std::result::Result<
1026 tonic::Response<super::SyncStateResponse>,
1027 tonic::Status,
1028 > {
1029 self.inner
1030 .ready()
1031 .await
1032 .map_err(|e| {
1033 tonic::Status::unknown(
1034 format!("Service was not ready: {}", e.into()),
1035 )
1036 })?;
1037 let codec = tonic_prost::ProstCodec::default();
1038 let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncState");
1039 let mut req = request.into_request();
1040 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncState"));
1041 self.inner.unary(req, path, codec).await
1042 }
1043 pub async fn sync_account_storage_maps(
1045 &mut self,
1046 request: impl tonic::IntoRequest<super::SyncAccountStorageMapsRequest>,
1047 ) -> std::result::Result<
1048 tonic::Response<super::SyncAccountStorageMapsResponse>,
1049 tonic::Status,
1050 > {
1051 self.inner
1052 .ready()
1053 .await
1054 .map_err(|e| {
1055 tonic::Status::unknown(
1056 format!("Service was not ready: {}", e.into()),
1057 )
1058 })?;
1059 let codec = tonic_prost::ProstCodec::default();
1060 let path = http::uri::PathAndQuery::from_static(
1061 "/rpc.Api/SyncAccountStorageMaps",
1062 );
1063 let mut req = request.into_request();
1064 req.extensions_mut()
1065 .insert(GrpcMethod::new("rpc.Api", "SyncAccountStorageMaps"));
1066 self.inner.unary(req, path, codec).await
1067 }
1068 pub async fn sync_transactions(
1070 &mut self,
1071 request: impl tonic::IntoRequest<super::SyncTransactionsRequest>,
1072 ) -> std::result::Result<
1073 tonic::Response<super::SyncTransactionsResponse>,
1074 tonic::Status,
1075 > {
1076 self.inner
1077 .ready()
1078 .await
1079 .map_err(|e| {
1080 tonic::Status::unknown(
1081 format!("Service was not ready: {}", e.into()),
1082 )
1083 })?;
1084 let codec = tonic_prost::ProstCodec::default();
1085 let path = http::uri::PathAndQuery::from_static("/rpc.Api/SyncTransactions");
1086 let mut req = request.into_request();
1087 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "SyncTransactions"));
1088 self.inner.unary(req, path, codec).await
1089 }
1090 pub async fn get_limits(
1096 &mut self,
1097 request: impl tonic::IntoRequest<()>,
1098 ) -> std::result::Result<tonic::Response<super::RpcLimits>, tonic::Status> {
1099 self.inner
1100 .ready()
1101 .await
1102 .map_err(|e| {
1103 tonic::Status::unknown(
1104 format!("Service was not ready: {}", e.into()),
1105 )
1106 })?;
1107 let codec = tonic_prost::ProstCodec::default();
1108 let path = http::uri::PathAndQuery::from_static("/rpc.Api/GetLimits");
1109 let mut req = request.into_request();
1110 req.extensions_mut().insert(GrpcMethod::new("rpc.Api", "GetLimits"));
1111 self.inner.unary(req, path, codec).await
1112 }
1113 }
1114}