-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
61 lines (50 loc) · 1.66 KB
/
types.go
File metadata and controls
61 lines (50 loc) · 1.66 KB
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
package eos_go_trace_api_plugin_wrapper
import (
"github.com/eoscanada/eos-go"
"github.com/eoscanada/eos-go/ecc"
)
type BlockHeader struct {
Timestamp eos.BlockTimestamp `json:"timestamp"`
Producer eos.AccountName `json:"producer"`
Status string `json:"status"`
Previous eos.Checksum256 `json:"previous_id"`
TransactionMRoot eos.Checksum256 `json:"transaction_mroot"`
ActionMRoot eos.Checksum256 `json:"action_mroot"`
ScheduleVersion uint32 `json:"schedule_version"`
}
type SignedTransactionHeader struct {
Status eos.TransactionStatus `json:"status"`
CPUUsageMicroSeconds uint32 `json:"cpu_usage_us"`
NetUsageWords eos.Varuint32 `json:"net_usage_words"`
}
type PermissionLevel struct {
Actor eos.AccountName `json:"account"`
Permission eos.PermissionName `json:"permission"`
}
type Action struct {
Account eos.AccountName `json:"account"`
Name eos.ActionName `json:"action"`
Receiver eos.AccountName `json:"receiver"`
GlobalSequence eos.Uint64 `json:"global_sequence,omitempty"`
Authorization []PermissionLevel `json:"authorization,omitempty"`
eos.ActionData
}
type Transaction struct {
eos.TransactionHeader
ID eos.Checksum256 `json:"id"`
Actions []*Action `json:"actions"`
}
type SignedTransaction struct {
SignedTransactionHeader
*Transaction
Signatures []ecc.Signature `json:"signatures"`
}
type Block struct {
BlockHeader
Transactions []SignedTransaction `json:"transactions"`
}
type BlockResp struct {
Block
ID eos.Checksum256 `json:"id"`
BlockNum uint32 `json:"number"`
}