Skip to content

Commit b50e3b1

Browse files
Fix: tzkt API bigmap updates
1 parent 5d21735 commit b50e3b1

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

tzkt/api/bigmaps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (tzkt *API) GetBigmapKey(id uint64, key string, filters map[string]string)
3838
}
3939

4040
// GetBigmapKeyUpdates -
41-
func (tzkt *API) GetBigmapKeyUpdates(id uint64, key string, filters map[string]string) (response []BigMapUpdate, err error) {
41+
func (tzkt *API) GetBigmapKeyUpdates(id uint64, key string, filters map[string]string) (response []BigMapKeyUpdate, err error) {
4242
err = tzkt.json(fmt.Sprintf("/v1/bigmaps/%d/keys/%s/updates", id, key), filters, &response)
4343
return
4444
}

tzkt/api/data.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ type BigMapUpdate struct {
103103
Content *BigMapUpdateContent `json:"content,omitempty"`
104104
}
105105

106+
// BigMapKeyUpdate -
107+
type BigMapKeyUpdate struct {
108+
ID uint64 `json:"id"`
109+
Level uint64 `json:"level"`
110+
Timestamp time.Time `json:"timestamp"`
111+
Action string `json:"action"`
112+
Value stdJSON.RawMessage `json:"value"`
113+
}
114+
106115
// BigMapUpdateContent -
107116
type BigMapUpdateContent struct {
108117
Hash string `json:"hash"`

0 commit comments

Comments
 (0)