forked from ygcool/go-hdwallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enum.go
55 lines (48 loc) · 1.04 KB
/
enum.go
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
package hdwallet
// mnemonic language
const (
English = "english"
ChineseSimplified = "chinese_simplified"
ChineseTraditional = "chinese_traditional"
)
// zero is deafult of uint32
const (
Zero uint32 = 0
ZeroQuote uint32 = 0x80000000
BTCToken uint32 = 0x10000000
ETHToken uint32 = 0x20000000
)
// wallet type from bip44
const (
// https://github.com/satoshilabs/slips/blob/master/slip-0044.md#registered-coin-types
BTC = ZeroQuote + 0
BTCTestnet = ZeroQuote + 1
LTC = ZeroQuote + 2
DOGE = ZeroQuote + 3
DASH = ZeroQuote + 5
ETH = ZeroQuote + 60
ETC = ZeroQuote + 61
BCH = ZeroQuote + 145
QTUM = ZeroQuote + 2301
TRX = ZeroQuote + 195
BNB = ZeroQuote + 714
FIL = ZeroQuote + 461
// btc token
USDT = BTCToken + 1
// eth token
IOST = ETHToken + 1
USDC = ETHToken + 2
)
// network
const (
MAINNET = "mainnet"
TESTNET = "testnet"
)
var coinTypes = map[uint32]uint32{
USDT: BTC,
IOST: ETH,
USDC: ETH,
TRX: TRX,
BNB: BNB,
FIL: FIL,
}