-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
95 lines (76 loc) · 1.52 KB
/
api.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
83
84
85
86
87
88
89
90
91
92
93
94
95
package coinharness
import (
"github.com/jfixby/coin"
)
type Network interface {
CoinbaseMaturity() int64
Params() interface{}
}
type RPCConnectionConfig struct {
Host string
Endpoint string
User string
Pass string
CertificateFile string
}
type Address interface {
String() string
IsForNet(network Network) bool
Internal() interface{}
ScriptAddress() []byte
}
type Seed interface{}
type TxIn struct {
PreviousOutPoint OutPoint
ValueIn coin.Amount
// Non-witness
Sequence uint32
// Witness
BlockHeight uint32
BlockIndex uint32
SignatureScript []byte
}
type OutPoint struct {
Hash Hash
Index uint32
Tree int8
}
type Hash interface{}
type TxOut struct {
Version uint16
PkScript []byte
Value coin.Amount
}
type MessageTx struct {
//CachedHash Hash
SerType uint16
Version int32
TxIn []*TxIn
TxOut []*TxOut
LockTime uint32
Expiry uint32
TxHash func() Hash
}
type Tx struct {
Hash Hash // Cached transaction hash
MsgTx *MessageTx // Underlying MsgTx
TxTree int8 // Indicates which tx tree the tx is found in
Index int // Position within a block or TxIndexUnknown
}
type AddNodeArguments struct {
TargetAddr string
Command interface{}
}
type CoinbaseKey interface{}
type ExtendedKey interface {
Child(u uint32) (ExtendedKey, error)
PrivateKey() (PrivateKey, error)
}
type BlockHeader interface {
Height() int64
}
type PublicKey interface {
}
type PrivateKey interface {
PublicKey() PublicKey
}