runes_indexer_interface/
lib.rs1use candid::{CandidType, Deserialize};
2
3#[derive(Debug, CandidType, Deserialize)]
4pub struct RuneBalance {
5 pub confirmations: u32,
6 pub rune_id: String,
7 pub amount: u128,
8 pub divisibility: u8,
9 pub symbol: Option<String>,
10}
11
12#[derive(Debug, CandidType, Deserialize)]
13pub struct GetEtchingResult {
14 pub confirmations: u32,
15 pub rune_id: String,
16}
17
18#[derive(Debug, CandidType, Deserialize)]
19pub struct Terms {
20 pub amount: Option<u128>,
21 pub cap: Option<u128>,
22 pub height: (Option<u64>, Option<u64>),
23 pub offset: (Option<u64>, Option<u64>),
24}
25
26#[derive(Debug, CandidType, Deserialize)]
27pub struct RuneEntry {
28 pub confirmations: u32,
29 pub rune_id: String,
30 pub block: u64,
31 pub burned: u128,
32 pub divisibility: u8,
33 pub etching: String,
34 pub mints: u128,
35 pub number: u64,
36 pub premine: u128,
37 pub spaced_rune: String,
38 pub symbol: Option<String>,
39 pub terms: Option<Terms>,
40 pub timestamp: u64,
41 pub turbo: bool,
42}
43
44#[derive(Debug, CandidType, Deserialize)]
45pub enum Error {
46 MaxOutpointsExceeded,
47}