-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefine.go
109 lines (93 loc) · 1.96 KB
/
define.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
96
97
98
99
100
101
102
103
104
105
106
107
108
package dnasdk
import (
. "DNA/common"
. "DNA/core/asset"
"DNA/core/transaction"
"DNA/net/httpjsonrpc"
"encoding/json"
)
type BlockInfo struct {
Hash string
BlockData *BlockHead
Transactions []*Transactions
}
type BlockHead struct {
Version uint32
PrevBlockHash string
TransactionsRoot string
Timestamp uint32
Height uint32
ConsensusData uint64
NextBookKeeper string
Program ProgramInfo
Hash string
}
type TxAttributeInfo struct {
Usage byte
Data string
}
type UTXOTxInputInfo struct {
ReferTxID string
ReferTxOutputIndex uint16
}
type BalanceTxInputInfo struct {
AssetID string
Value Fixed64
ProgramHash string
}
type TxoutputInfo struct {
AssetID string
Value Fixed64
ProgramHash string
}
type ProgramInfo struct {
Code string
Parameter string
}
type TxoutputMap struct {
Key Uint256
Txout []TxoutputInfo
}
type AmountMap struct {
Key Uint256
Value Fixed64
}
type Transactions struct {
TxType transaction.TransactionType
PayloadVersion byte
Payload json.RawMessage
Attributes []TxAttributeInfo
UTXOInputs []UTXOTxInputInfo
BalanceInputs []BalanceTxInputInfo
Outputs []TxoutputInfo
Programs []ProgramInfo
AssetOutputs []TxoutputMap
AssetInputAmount []AmountMap
AssetOutputAmount []AmountMap
Hash string
}
type PayloadRegisterAssetInfo struct {
Asset *Asset
Amount Fixed64
Issuer httpjsonrpc.IssuerInfo
Controller string
}
type PayloadRecord struct {
RecordType string
RecordData string
}
type PayloadDeployCodeInfo struct {
Code *httpjsonrpc.FunctionCodeInfo
Name string
CodeVersion string
Author string
Email string
Description string
}
type UnspendUTXO struct {
ReferTxID Uint256
ReferTxOutputIndex uint16
AssetID Uint256
Value Fixed64
ProgramHash Uint160
}