Skip to content

Commit 5d21735

Browse files
Feature: tzkt API transaction parser
1 parent 0a6a812 commit 5d21735

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

tzkt/api/data.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,21 @@ const (
2121

2222
// Operation -
2323
type Operation struct {
24-
ID uint64 `json:"id" mapstructure:"id"`
25-
Level uint64 `json:"level" mapstructure:"level"`
26-
Hash string `json:"hash" mapstructure:"hash"`
27-
Kind string `json:"type" mapstructure:"type"`
28-
Block string `json:"block" mapstructure:"block"`
29-
Delegate *Address `json:"delegate,omitempty" mapstructure:"delegate,omitempty"`
30-
GasUsed *uint64 `json:"gasUsed,omitempty" mapstructure:"gasUsed,omitempty"`
31-
BakerFee *uint64 `json:"bakerFee,omitempty" mapstructure:"bakerFee,omitempty"`
24+
ID uint64 `json:"id" mapstructure:"id"`
25+
Level uint64 `json:"level" mapstructure:"level"`
26+
Hash string `json:"hash" mapstructure:"hash"`
27+
Kind string `json:"type" mapstructure:"type"`
28+
Block string `json:"block" mapstructure:"block"`
29+
Delegate *Address `json:"delegate,omitempty" mapstructure:"delegate,omitempty"`
30+
GasUsed *uint64 `json:"gasUsed,omitempty" mapstructure:"gasUsed,omitempty"`
31+
BakerFee *uint64 `json:"bakerFee,omitempty" mapstructure:"bakerFee,omitempty"`
32+
Parameters *Parameters `json:"parameter,omitempty" mapstructure:"parameter,omitempty"`
33+
}
34+
35+
// Parameters -
36+
type Parameters struct {
37+
Entrypoint string `json:"entrypoint"`
38+
Value stdJSON.RawMessage `json:"value"`
3239
}
3340

3441
// Address -

0 commit comments

Comments
 (0)