forked from omnilaboratory/obd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase_bean.go
38 lines (33 loc) · 1.01 KB
/
base_bean.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
package bean
import (
"github.com/asdine/storm"
"github.com/omnilaboratory/obd/bean/chainhash"
"github.com/tyler-smith/go-bip32"
)
// OutPoint defines a bitcoin data type that is used to track previous transaction outputs.
type OutPoint struct {
Hash chainhash.Hash
Index uint32
}
type User struct {
P2PLocalAddress string `json:"p2p_local_address"`
P2PLocalPeerId string `json:"p2p_local_peer_id"`
PeerId string `json:"peer_id"`
Mnemonic string `json:"mnemonic"`
State UserState `json:"state"`
IsAdmin bool `json:"is_admin"`
ChangeExtKey *bip32.Key
CurrAddrIndex int `json:"curr_addr_index"`
Db *storm.DB //db
}
type TransactionInputItem struct {
Txid string `json:"txid"`
ScriptPubKey string `json:"scriptPubKey"`
RedeemScript string `json:"redeem_script"`
Vout uint32 `json:"vout"`
Amount float64 `json:"value"`
}
type TransactionOutputItem struct {
ToBitCoinAddress string
Amount float64
}