generated from mrz1836/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
definitions.go
82 lines (65 loc) · 1.96 KB
/
definitions.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
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
82
package nownodes
const (
// version is the current version
version = "v0.1.0"
// defaultUserAgent is the default user agent for all requests
defaultUserAgent string = "go-nownodes: " + version
// apiVersion is the current NOWNodes API version
apiVersion = "v2"
nowNodesURL = "nownodes.io"
// Appends all requests with this protocol
httpProtocol = "https://"
// API header key for NOWNodes API
apiHeaderKey = "api-key"
// Coin specific values
bitcoinCashPrefix = "bitcoincash:"
// Bitcoin transaction length
bitcoinCashMaxAddressLength = 42
bitcoinMaxAddressLength = 35
bitcoinMinAddressLength = 26
bitcoinTransactionLength = 64
ethereumMaxAddressLength = 44
ethereumTransactionLength = 66
liteCoinMaxAddressLength = 43
maxTxHexLengthOnSend = 2000
// Blockchains
blockchainBCH = "bch"
blockchainBSV = "bsv"
blockchainBTC = "btc"
blockchainBTCTestnet = "btc-testnet"
blockchainBTG = "btg"
blockchainDASH = "dash"
blockchainDOGE = "doge"
blockchainETH = "eth"
blockchainLTC = "ltc"
// Routes
routeGetAddress = "/address/"
routeGetTx = "/tx/"
routeSendTx = "/sendtx/"
// NodeAPI methods
nodeMethodGetMempoolEntry = "getmempoolentry"
nodeMethodSendRawTx = "sendrawtransaction"
)
var (
// All blockchains (used in tests and listing methods)
allBlockchains = []Blockchain{
BCH,
BSV,
BTC,
BTCTestnet,
BTG,
DASH,
DOGE,
LTC,
}
// Supported blockchains for the method GetTransaction()
getTransactionBlockchains = allBlockchains
// Supported blockchains for the method GetAddress()
getAddressBlockchains = allBlockchains
// Supported blockchains for the method SendTransaction()
sendTransactionBlockchains = allBlockchains
// Supported blockchains for the method SendRawTransaction()
sendRawTransactionBlockchains = allBlockchains
// Supported blockchains for the method GetMempoolEntry()
getMempoolEntryBlockchains = allBlockchains
)