-
Notifications
You must be signed in to change notification settings - Fork 2
/
ord-canister.did
66 lines (66 loc) · 1.99 KB
/
ord-canister.did
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
type MintError = variant { Cap : nat; End : nat64; Start : nat64; Unmintable };
type OrdError = variant {
Rpc : RpcError;
Overflow;
Params : text;
NotEnoughConfirmations;
RuneNotFound;
Index : MintError;
WrongBlockHash : text;
Unrecoverable;
OutPointNotFound;
Recoverable : record { height : nat32; depth : nat32 };
WrongBlockMerkleRoot : text;
};
type OrdEtching = record { confirmations : nat32; rune_id : text };
type OrdRuneBalance = record {
id : text;
confirmations : nat32;
divisibility : nat8;
amount : nat;
symbol : opt text;
};
type OrdRuneEntry = record {
confirmations : nat32;
mints : nat;
terms : opt OrdTerms;
etching : text;
turbo : bool;
premine : nat;
divisibility : nat8;
spaced_rune : text;
number : nat64;
timestamp : nat64;
block : nat64;
burned : nat;
symbol : opt text;
};
type OrdTerms = record {
cap : opt nat;
height : record { opt nat64; opt nat64 };
offset : record { opt nat64; opt nat64 };
amount : opt nat;
};
type Result = variant { Ok; Err : text };
type Result_1 = variant { Ok : opt OrdEtching; Err : OrdError };
type Result_2 = variant { Ok : record { nat32; text }; Err : OrdError };
type Result_3 = variant { Ok : OrdRuneEntry; Err : OrdError };
type Result_4 = variant { Ok : vec RuneBalance; Err : OrdError };
type Result_5 = variant { Ok : vec opt vec OrdRuneBalance; Err : OrdError };
type RpcError = variant {
Io : record { text; text; text };
Endpoint : record { text; text; text };
Decode : record { text; text; text };
};
type RuneBalance = record { id : RuneId; balance : nat };
type RuneId = record { tx : nat32; block : nat64 };
service : (text) -> {
add_subscriber : (text) -> (Result);
get_etching : (text) -> (Result_1) query;
get_height : () -> (Result_2) query;
get_rune_entry_by_rune_id : (text) -> (Result_3) query;
get_runes_by_utxo : (text, nat32) -> (Result_4) query;
get_subscribers : () -> (vec text) query;
query_runes : (vec text) -> (Result_5) query;
set_url : (text) -> (Result);
}