1use serde::{Deserialize as SerdeDeserialize, Serialize};
8use serde_json::Value as JsonValue;
9use std::path::PathBuf;
10
11#[derive(Clone, Debug, Eq, PartialEq)]
18pub struct IcrcTokenRequest {
19 pub source_endpoint: String,
20 pub now_unix_secs: u64,
21 pub ledger_canister_id: String,
22}
23
24impl IcrcTokenRequest {
25 #[must_use]
26 pub fn new(
27 source_endpoint: impl Into<String>,
28 now_unix_secs: u64,
29 ledger_canister_id: impl Into<String>,
30 ) -> Self {
31 Self {
32 source_endpoint: source_endpoint.into(),
33 now_unix_secs,
34 ledger_canister_id: ledger_canister_id.into(),
35 }
36 }
37}
38
39#[derive(Clone, Debug, Eq, PartialEq)]
46pub struct IcrcBalanceRequest {
47 pub source_endpoint: String,
48 pub now_unix_secs: u64,
49 pub ledger_canister_id: String,
50 pub account_owner: String,
51 pub subaccount_hex: Option<String>,
52}
53
54impl IcrcBalanceRequest {
55 #[must_use]
56 pub fn new(
57 source_endpoint: impl Into<String>,
58 now_unix_secs: u64,
59 ledger_canister_id: impl Into<String>,
60 account_owner: impl Into<String>,
61 ) -> Self {
62 Self {
63 source_endpoint: source_endpoint.into(),
64 now_unix_secs,
65 ledger_canister_id: ledger_canister_id.into(),
66 account_owner: account_owner.into(),
67 subaccount_hex: None,
68 }
69 }
70
71 #[must_use]
72 pub fn with_subaccount_hex(mut self, subaccount_hex: impl Into<String>) -> Self {
73 self.subaccount_hex = Some(subaccount_hex.into());
74 self
75 }
76}
77
78#[derive(Clone, Debug, Eq, PartialEq)]
85pub struct IcrcAllowanceRequest {
86 pub source_endpoint: String,
87 pub now_unix_secs: u64,
88 pub ledger_canister_id: String,
89 pub account_owner: String,
90 pub account_subaccount_hex: Option<String>,
91 pub spender_owner: String,
92 pub spender_subaccount_hex: Option<String>,
93}
94
95impl IcrcAllowanceRequest {
96 #[must_use]
97 pub fn new(
98 source_endpoint: impl Into<String>,
99 now_unix_secs: u64,
100 ledger_canister_id: impl Into<String>,
101 account_owner: impl Into<String>,
102 spender_owner: impl Into<String>,
103 ) -> Self {
104 Self {
105 source_endpoint: source_endpoint.into(),
106 now_unix_secs,
107 ledger_canister_id: ledger_canister_id.into(),
108 account_owner: account_owner.into(),
109 account_subaccount_hex: None,
110 spender_owner: spender_owner.into(),
111 spender_subaccount_hex: None,
112 }
113 }
114
115 #[must_use]
116 pub fn with_account_subaccount_hex(
117 mut self,
118 account_subaccount_hex: impl Into<String>,
119 ) -> Self {
120 self.account_subaccount_hex = Some(account_subaccount_hex.into());
121 self
122 }
123
124 #[must_use]
125 pub fn with_spender_subaccount_hex(
126 mut self,
127 spender_subaccount_hex: impl Into<String>,
128 ) -> Self {
129 self.spender_subaccount_hex = Some(spender_subaccount_hex.into());
130 self
131 }
132}
133
134#[derive(Clone, Debug, Eq, PartialEq)]
141pub struct IcrcAccountTransactionPageRequest {
142 pub source_endpoint: String,
144 pub now_unix_secs: u64,
146 pub ledger_canister_id: String,
148 pub index_canister_id: Option<String>,
150 pub account_owner: String,
152 pub subaccount_hex: Option<String>,
154 pub start: Option<String>,
156 pub limit: u32,
158}
159
160impl IcrcAccountTransactionPageRequest {
161 #[must_use]
163 pub fn new(
164 source_endpoint: impl Into<String>,
165 now_unix_secs: u64,
166 ledger_canister_id: impl Into<String>,
167 account_owner: impl Into<String>,
168 limit: u32,
169 ) -> Self {
170 Self {
171 source_endpoint: source_endpoint.into(),
172 now_unix_secs,
173 ledger_canister_id: ledger_canister_id.into(),
174 index_canister_id: None,
175 account_owner: account_owner.into(),
176 subaccount_hex: None,
177 start: None,
178 limit,
179 }
180 }
181
182 #[must_use]
184 pub fn with_index_canister_id(mut self, index_canister_id: impl Into<String>) -> Self {
185 self.index_canister_id = Some(index_canister_id.into());
186 self
187 }
188
189 #[must_use]
191 pub fn with_subaccount_hex(mut self, subaccount_hex: impl Into<String>) -> Self {
192 self.subaccount_hex = Some(subaccount_hex.into());
193 self
194 }
195
196 #[must_use]
198 pub fn with_start(mut self, start: impl Into<String>) -> Self {
199 self.start = Some(start.into());
200 self
201 }
202}
203
204#[derive(Clone, Debug, Eq, PartialEq)]
211pub struct IcrcAccountTransactionCacheRequest {
212 pub icp_root: PathBuf,
214 pub source_endpoint: String,
216 pub ledger_canister_id: String,
218 pub account_owner: String,
220 pub subaccount_hex: Option<String>,
222}
223
224impl IcrcAccountTransactionCacheRequest {
225 #[must_use]
227 pub fn new(
228 icp_root: impl Into<PathBuf>,
229 source_endpoint: impl Into<String>,
230 ledger_canister_id: impl Into<String>,
231 account_owner: impl Into<String>,
232 ) -> Self {
233 Self {
234 icp_root: icp_root.into(),
235 source_endpoint: source_endpoint.into(),
236 ledger_canister_id: ledger_canister_id.into(),
237 account_owner: account_owner.into(),
238 subaccount_hex: None,
239 }
240 }
241
242 #[must_use]
244 pub fn with_subaccount_hex(mut self, subaccount_hex: impl Into<String>) -> Self {
245 self.subaccount_hex = Some(subaccount_hex.into());
246 self
247 }
248}
249
250#[derive(Clone, Debug, Eq, PartialEq)]
257pub struct IcrcAccountTransactionRefreshRequest {
258 pub cache: IcrcAccountTransactionCacheRequest,
260 pub now_unix_secs: u64,
262 pub index_canister_id: Option<String>,
264 pub page_size: u32,
266 pub max_pages: Option<u32>,
268 pub lock_stale_after_seconds: u64,
270}
271
272impl IcrcAccountTransactionRefreshRequest {
273 #[must_use]
275 pub const fn new(
276 cache: IcrcAccountTransactionCacheRequest,
277 now_unix_secs: u64,
278 page_size: u32,
279 lock_stale_after_seconds: u64,
280 ) -> Self {
281 Self {
282 cache,
283 now_unix_secs,
284 index_canister_id: None,
285 page_size,
286 max_pages: None,
287 lock_stale_after_seconds,
288 }
289 }
290
291 #[must_use]
293 pub fn with_index_canister_id(mut self, index_canister_id: impl Into<String>) -> Self {
294 self.index_canister_id = Some(index_canister_id.into());
295 self
296 }
297
298 #[must_use]
300 pub const fn with_max_pages(mut self, max_pages: Option<u32>) -> Self {
301 self.max_pages = max_pages;
302 self
303 }
304}
305
306#[derive(Clone, Copy, Debug, Eq, PartialEq)]
313pub enum IcrcAccountTransactionSort {
314 Newest,
316 Oldest,
318}
319
320impl IcrcAccountTransactionSort {
321 #[must_use]
323 pub const fn as_str(self) -> &'static str {
324 match self {
325 Self::Newest => "newest",
326 Self::Oldest => "oldest",
327 }
328 }
329}
330
331#[derive(Clone, Debug, Eq, PartialEq)]
338pub struct IcrcAccountTransactionListRequest {
339 pub cache: IcrcAccountTransactionCacheRequest,
341 pub limit: u32,
343 pub sort: IcrcAccountTransactionSort,
345}
346
347impl IcrcAccountTransactionListRequest {
348 #[must_use]
350 pub const fn new(cache: IcrcAccountTransactionCacheRequest, limit: u32) -> Self {
351 Self {
352 cache,
353 limit,
354 sort: IcrcAccountTransactionSort::Newest,
355 }
356 }
357
358 #[must_use]
360 pub const fn with_sort(mut self, sort: IcrcAccountTransactionSort) -> Self {
361 self.sort = sort;
362 self
363 }
364}
365
366#[derive(Clone, Debug, Eq, PartialEq)]
373pub struct IcrcIndexRequest {
374 pub source_endpoint: String,
375 pub now_unix_secs: u64,
376 pub ledger_canister_id: String,
377}
378
379impl IcrcIndexRequest {
380 #[must_use]
381 pub fn new(
382 source_endpoint: impl Into<String>,
383 now_unix_secs: u64,
384 ledger_canister_id: impl Into<String>,
385 ) -> Self {
386 Self {
387 source_endpoint: source_endpoint.into(),
388 now_unix_secs,
389 ledger_canister_id: ledger_canister_id.into(),
390 }
391 }
392}
393
394#[derive(Clone, Debug, Eq, PartialEq)]
401pub struct IcrcTransactionsRequest {
402 pub source_endpoint: String,
403 pub now_unix_secs: u64,
404 pub ledger_canister_id: String,
405 pub start: u64,
406 pub limit: u32,
407 pub follow_archives: bool,
408}
409
410impl IcrcTransactionsRequest {
411 #[must_use]
412 pub fn new(
413 source_endpoint: impl Into<String>,
414 now_unix_secs: u64,
415 ledger_canister_id: impl Into<String>,
416 start: u64,
417 limit: u32,
418 ) -> Self {
419 Self {
420 source_endpoint: source_endpoint.into(),
421 now_unix_secs,
422 ledger_canister_id: ledger_canister_id.into(),
423 start,
424 limit,
425 follow_archives: false,
426 }
427 }
428
429 #[must_use]
430 pub const fn with_follow_archives(mut self, follow_archives: bool) -> Self {
431 self.follow_archives = follow_archives;
432 self
433 }
434}
435
436#[derive(Clone, Debug, Eq, PartialEq)]
443pub struct IcrcBlockTypesRequest {
444 pub source_endpoint: String,
445 pub now_unix_secs: u64,
446 pub ledger_canister_id: String,
447}
448
449impl IcrcBlockTypesRequest {
450 #[must_use]
451 pub fn new(
452 source_endpoint: impl Into<String>,
453 now_unix_secs: u64,
454 ledger_canister_id: impl Into<String>,
455 ) -> Self {
456 Self {
457 source_endpoint: source_endpoint.into(),
458 now_unix_secs,
459 ledger_canister_id: ledger_canister_id.into(),
460 }
461 }
462}
463
464#[derive(Clone, Debug, Eq, PartialEq)]
471pub struct IcrcArchivesRequest {
472 pub source_endpoint: String,
473 pub now_unix_secs: u64,
474 pub ledger_canister_id: String,
475 pub from_canister_id: Option<String>,
476}
477
478impl IcrcArchivesRequest {
479 #[must_use]
480 pub fn new(
481 source_endpoint: impl Into<String>,
482 now_unix_secs: u64,
483 ledger_canister_id: impl Into<String>,
484 ) -> Self {
485 Self {
486 source_endpoint: source_endpoint.into(),
487 now_unix_secs,
488 ledger_canister_id: ledger_canister_id.into(),
489 from_canister_id: None,
490 }
491 }
492
493 #[must_use]
494 pub fn with_from_canister_id(mut self, from_canister_id: impl Into<String>) -> Self {
495 self.from_canister_id = Some(from_canister_id.into());
496 self
497 }
498}
499
500#[derive(Clone, Debug, Eq, PartialEq)]
507pub struct IcrcTipCertificateRequest {
508 pub source_endpoint: String,
509 pub now_unix_secs: u64,
510 pub ledger_canister_id: String,
511}
512
513impl IcrcTipCertificateRequest {
514 #[must_use]
515 pub fn new(
516 source_endpoint: impl Into<String>,
517 now_unix_secs: u64,
518 ledger_canister_id: impl Into<String>,
519 ) -> Self {
520 Self {
521 source_endpoint: source_endpoint.into(),
522 now_unix_secs,
523 ledger_canister_id: ledger_canister_id.into(),
524 }
525 }
526}
527
528#[derive(Clone, Debug, Eq, PartialEq)]
535pub struct IcrcCapabilitiesRequest {
536 pub source_endpoint: String,
537 pub now_unix_secs: u64,
538 pub ledger_canister_id: String,
539}
540
541impl IcrcCapabilitiesRequest {
542 #[must_use]
543 pub fn new(
544 source_endpoint: impl Into<String>,
545 now_unix_secs: u64,
546 ledger_canister_id: impl Into<String>,
547 ) -> Self {
548 Self {
549 source_endpoint: source_endpoint.into(),
550 now_unix_secs,
551 ledger_canister_id: ledger_canister_id.into(),
552 }
553 }
554}
555
556#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
563pub struct IcrcTokenReport {
564 pub schema_version: u32,
565 pub ledger_canister_id: String,
566 pub fetched_at: String,
567 pub source_endpoint: String,
568 pub fetched_by: String,
569 pub token_name: String,
570 pub token_symbol: String,
571 pub decimals: u8,
572 pub transfer_fee: String,
573 pub total_supply: String,
574 pub minting_account_owner: Option<String>,
575 pub minting_account_subaccount_hex: Option<String>,
576 pub supported_standards: Vec<IcrcTokenStandardRow>,
577 pub metadata: Vec<IcrcTokenMetadataRow>,
578}
579
580#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
587pub struct IcrcBalanceReport {
588 pub schema_version: u32,
589 pub ledger_canister_id: String,
590 pub account_owner: String,
591 pub subaccount_hex: Option<String>,
592 pub fetched_at: String,
593 pub source_endpoint: String,
594 pub fetched_by: String,
595 pub token_symbol: String,
596 pub decimals: u8,
597 pub balance: String,
598}
599
600#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
607pub struct IcrcAllowanceReport {
608 pub schema_version: u32,
609 pub ledger_canister_id: String,
610 pub account_owner: String,
611 pub account_subaccount_hex: Option<String>,
612 pub spender_owner: String,
613 pub spender_subaccount_hex: Option<String>,
614 pub fetched_at: String,
615 pub source_endpoint: String,
616 pub fetched_by: String,
617 pub token_symbol: String,
618 pub decimals: u8,
619 pub allowance: String,
620 pub expires_at_unix_nanos: Option<String>,
621}
622
623#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
630pub struct IcrcAccountTransactionPageReport {
631 pub schema_version: u32,
633 pub ledger_canister_id: String,
635 pub index_canister_id: String,
637 pub account_owner: String,
639 pub subaccount_hex: Option<String>,
641 pub requested_start: Option<String>,
643 pub requested_limit: u32,
645 pub next_start: Option<String>,
647 pub oldest_transaction_id: Option<String>,
649 pub balance: String,
651 pub token_symbol: String,
653 pub decimals: u8,
655 pub fetched_at: String,
657 pub source_endpoint: String,
659 pub fetched_by: String,
661 pub transactions: Vec<IcrcAccountTransactionRow>,
663}
664
665#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
672pub struct IcrcAccountTransactionCompleteness {
673 pub status: String,
675 pub page_size: u32,
677 pub page_count: u32,
679 pub row_count: usize,
681 pub point_in_time_guaranteed: bool,
683}
684
685#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
692pub struct IcrcAccountTransactionSnapshot {
693 pub schema_version: u32,
695 pub source_endpoint: String,
697 pub collection_started_at: String,
699 pub collection_completed_at: String,
701 pub fetched_by: String,
703 pub ledger_canister_id: String,
705 pub index_canister_id: String,
707 pub account_owner: String,
709 pub subaccount_hex: Option<String>,
711 pub balance: String,
713 pub token_symbol: String,
715 pub decimals: u8,
717 pub newest_transaction_id: Option<String>,
719 pub oldest_transaction_id: Option<String>,
721 pub completeness: IcrcAccountTransactionCompleteness,
723 pub transactions: Vec<IcrcAccountTransactionRow>,
725}
726
727#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
734pub struct IcrcAccountTransactionRefreshReport {
735 pub schema_version: u32,
737 pub ledger_canister_id: String,
739 pub index_canister_id: String,
741 pub account_owner: String,
743 pub subaccount_hex: Option<String>,
745 pub transaction_count: usize,
747 pub newest_transaction_id: Option<String>,
749 pub oldest_transaction_id: Option<String>,
751 pub page_size: u32,
753 pub page_count: u32,
755 pub point_in_time_guaranteed: bool,
757 pub replaced_existing_cache: bool,
759 pub attempt_finalization_error: Option<String>,
761 pub collection_started_at: String,
763 pub collection_completed_at: String,
765 pub source_endpoint: String,
767 pub fetched_by: String,
769 pub cache_path: String,
771 pub refresh_attempt_path: String,
773 pub refresh_lock_path: String,
775}
776
777#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
784pub struct IcrcAccountTransactionListReport {
785 pub schema_version: u32,
787 pub ledger_canister_id: String,
789 pub index_canister_id: String,
791 pub account_owner: String,
793 pub subaccount_hex: Option<String>,
795 pub requested_limit: u32,
797 pub sort: String,
799 pub total_transaction_count: usize,
801 pub returned_transaction_count: usize,
803 pub newest_transaction_id: Option<String>,
805 pub oldest_transaction_id: Option<String>,
807 pub balance: String,
809 pub token_symbol: String,
811 pub decimals: u8,
813 pub collection_started_at: String,
815 pub collection_completed_at: String,
817 pub source_endpoint: String,
819 pub fetched_by: String,
821 pub complete: bool,
823 pub point_in_time_guaranteed: bool,
825 pub page_size: u32,
827 pub page_count: u32,
829 pub cache_path: String,
831 pub transactions: Vec<IcrcAccountTransactionRow>,
833}
834
835#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
842pub struct IcrcAccountTransactionCacheStatusReport {
843 pub schema_version: u32,
845 pub ledger_canister_id: String,
847 pub account_owner: String,
849 pub subaccount_hex: Option<String>,
851 pub source_endpoint: String,
853 pub found: bool,
855 pub cache: Option<IcrcAccountTransactionCacheSummary>,
857 pub expected_cache_path: String,
859 pub refresh_attempt_path: String,
861 pub refresh_lock_path: String,
863 pub latest_attempt: Option<IcrcAccountTransactionRefreshAttemptStatus>,
865}
866
867#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
874pub struct IcrcAccountTransactionCacheSummary {
875 pub cache_status: String,
877 pub cache_error: Option<String>,
879 pub index_canister_id: Option<String>,
881 pub transaction_count: usize,
883 pub newest_transaction_id: Option<String>,
885 pub oldest_transaction_id: Option<String>,
887 pub page_size: u32,
889 pub page_count: u32,
891 pub complete: bool,
893 pub point_in_time_guaranteed: bool,
895 pub collection_started_at: String,
897 pub collection_completed_at: String,
899 pub cache_path: String,
901}
902
903#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
910pub struct IcrcAccountTransactionRefreshAttemptStatus {
911 pub status: String,
913 pub started_at: String,
915 pub updated_at: String,
917 pub index_canister_id: Option<String>,
919 pub page_size: u32,
921 pub pages_fetched: u32,
923 pub rows_fetched: usize,
925 pub last_cursor: Option<String>,
927 pub last_error: Option<String>,
929}
930
931#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
938pub struct IcrcIndexReport {
939 pub schema_version: u32,
940 pub ledger_canister_id: String,
941 pub fetched_at: String,
942 pub source_endpoint: String,
943 pub fetched_by: String,
944 pub index_canister_id: Option<String>,
945 pub index_error: Option<String>,
946}
947
948#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
955pub struct IcrcTransactionsReport {
956 pub schema_version: u32,
957 pub ledger_canister_id: String,
958 pub fetched_at: String,
959 pub source_endpoint: String,
960 pub fetched_by: String,
961 pub requested_start: String,
962 pub requested_limit: u32,
963 pub follow_archives: bool,
964 pub log_length: Option<String>,
965 pub blocks: Vec<IcrcTransactionBlockRow>,
966 pub archived_blocks: Vec<IcrcArchivedBlocksRow>,
967 pub followed_archive_blocks: Vec<IcrcFollowedArchiveBlockRow>,
968 pub archive_follow_errors: Vec<IcrcArchiveFollowErrorRow>,
969}
970
971#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
978pub struct IcrcBlockTypesReport {
979 pub schema_version: u32,
980 pub ledger_canister_id: String,
981 pub fetched_at: String,
982 pub source_endpoint: String,
983 pub fetched_by: String,
984 pub block_types: Vec<IcrcBlockTypeRow>,
985}
986
987#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
994pub struct IcrcArchivesReport {
995 pub schema_version: u32,
996 pub ledger_canister_id: String,
997 pub from_canister_id: Option<String>,
998 pub fetched_at: String,
999 pub source_endpoint: String,
1000 pub fetched_by: String,
1001 pub archives: Vec<IcrcArchiveRow>,
1002}
1003
1004#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1011pub struct IcrcTipCertificateReport {
1012 pub schema_version: u32,
1013 pub ledger_canister_id: String,
1014 pub fetched_at: String,
1015 pub source_endpoint: String,
1016 pub fetched_by: String,
1017 pub certificate_present: bool,
1018 pub certificate_hex: Option<String>,
1019 pub certificate_bytes: Option<usize>,
1020 pub hash_tree_hex: Option<String>,
1021 pub hash_tree_bytes: Option<usize>,
1022}
1023
1024#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1031pub struct IcrcCapabilitiesReport {
1032 pub schema_version: u32,
1033 pub ledger_canister_id: String,
1034 pub fetched_at: String,
1035 pub source_endpoint: String,
1036 pub fetched_by: String,
1037 pub supported_standards: Vec<IcrcTokenStandardRow>,
1038 pub capabilities: Vec<IcrcCapabilityRow>,
1039}
1040
1041#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1048pub struct IcrcCapabilityRow {
1049 pub capability: String,
1050 pub method: String,
1051 pub status: String,
1052 pub details: Option<String>,
1053 pub error: Option<String>,
1054}
1055
1056#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1063pub struct IcrcTokenStandardRow {
1064 pub name: String,
1065 pub url: String,
1066}
1067
1068#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1075pub struct IcrcTokenMetadataRow {
1076 pub key: String,
1077 pub value_type: String,
1078 pub value: JsonValue,
1079}
1080
1081#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
1088pub struct IcrcAccountRow {
1089 pub owner: Option<String>,
1091 pub subaccount_hex: Option<String>,
1093 pub account_identifier: Option<String>,
1095}
1096
1097#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
1104pub struct IcrcAccountTransactionRow {
1105 pub id: String,
1107 pub kind: String,
1109 pub timestamp_unix_nanos: Option<String>,
1111 pub amount_base_units: Option<String>,
1113 pub fee_base_units: Option<String>,
1115 pub from: Option<IcrcAccountRow>,
1117 pub to: Option<IcrcAccountRow>,
1119 pub spender: Option<IcrcAccountRow>,
1121 pub memo_hex: Option<String>,
1123 pub created_at_time_unix_nanos: Option<String>,
1125 pub expires_at_unix_nanos: Option<String>,
1127 pub expected_allowance_base_units: Option<String>,
1129 pub raw_transaction: JsonValue,
1131}
1132
1133#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1140pub struct IcrcTransactionBlockRow {
1141 pub index: String,
1142 pub block_type: Option<String>,
1143 pub transaction_kind: Option<String>,
1144 pub timestamp_unix_nanos: Option<String>,
1145 pub amount_base_units: Option<String>,
1146 pub raw_block: JsonValue,
1147}
1148
1149#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1156pub struct IcrcArchivedBlocksRow {
1157 pub callback_canister_id: String,
1158 pub callback_method: String,
1159 pub ranges: Vec<IcrcArchivedRangeRow>,
1160}
1161
1162#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1169pub struct IcrcArchivedRangeRow {
1170 pub start: String,
1171 pub length: String,
1172}
1173
1174#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1181pub struct IcrcFollowedArchiveBlockRow {
1182 pub archive_canister_id: String,
1183 pub callback_method: String,
1184 pub index: String,
1185 pub block_type: Option<String>,
1186 pub transaction_kind: Option<String>,
1187 pub timestamp_unix_nanos: Option<String>,
1188 pub amount_base_units: Option<String>,
1189 pub raw_block: JsonValue,
1190}
1191
1192#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1199pub struct IcrcArchiveFollowErrorRow {
1200 pub callback_canister_id: String,
1201 pub callback_method: String,
1202 pub ranges: Vec<IcrcArchivedRangeRow>,
1203 pub error: String,
1204}
1205
1206#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1213pub struct IcrcBlockTypeRow {
1214 pub block_type: String,
1215 pub url: String,
1216}
1217
1218#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
1225pub struct IcrcArchiveRow {
1226 pub canister_id: String,
1227 pub start: String,
1228 pub end: String,
1229}