-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathcommon.proto
81 lines (66 loc) · 1.69 KB
/
common.proto
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
syntax = "proto3";
package emerald;
option java_package = "io.emeraldpay.api.proto";
message Chain {
ChainRef type = 1;
}
enum ChainRef {
CHAIN_UNSPECIFIED = 0;
CHAIN_BITCOIN = 1;
// CHAIN_GRIN = 2;
CHAIN_ETHEREUM = 100;
CHAIN_ETHEREUM_CLASSIC = 101;
CHAIN_FANTOM = 102; // Fantom, https://fantom.foundation/
// Sidechains and state channels start with 1_000
// CHAIN_LIGHTNING = 1001;
CHAIN_MATIC = 1002; // Matic PoS Ethereum sidechain based on Polygon
CHAIN_RSK = 1003; // RSK sidechain, https://www.rsk.co/
// Testnets start with 10_000
CHAIN_MORDEN = 10001;
CHAIN_KOVAN = 10002;
CHAIN_TESTNET_BITCOIN = 10003;
// CHAIN_FLOONET = 10004;
CHAIN_GOERLI = 10005;
CHAIN_ROPSTEN = 10006;
CHAIN_RINKEBY = 10007;
CHAIN_HOLESKY = 10008;
CHAIN_SEPOLIA = 10009;
// Non-standard starts from 20_000
}
message SingleAddress {
string address = 1;
}
message XpubAddress {
// base58 encoded string for xpub, https://en.bitcoin.it/wiki/BIP_0032#Serialization_format
string xpub = 1;
uint64 start = 3;
uint64 limit = 4;
uint64 unused_limit = 5;
}
message MultiAddress {
repeated SingleAddress addresses = 1;
}
message ReferenceAddress {
uint64 refid = 1;
}
message AnyAddress {
oneof addr_type {
SingleAddress address_single = 1;
MultiAddress address_multi = 2;
XpubAddress address_xpub = 3;
ReferenceAddress address_ref = 4;
}
}
message Asset {
ChainRef chain = 1;
string code = 2;
}
message Erc20Asset {
ChainRef chain = 1;
string contract_address = 2;
}
message BlockInfo {
uint64 height = 1;
string block_id = 2;
uint64 timestamp = 3;
}