mirror of
https://github.com/luxfi/sdk.git
synced 2026-10-30 15:19:23 +00:00
github.com/luxfi/utils is now github.com/luxfi/util. Import paths and the module requirement follow the rename. The json types cross the platformvm and exchangevm client boundary, so this also takes luxfi/vm v1.3.18, where those API structs already speak the renamed types. Co-authored-by: Hanzo Dev <[email protected]>
61 lines
1.4 KiB
Go
61 lines
1.4 KiB
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package indexer
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/luxfi/formatting"
|
|
"github.com/luxfi/ids"
|
|
json "github.com/luxfi/util/json"
|
|
)
|
|
|
|
type FormattedContainer struct {
|
|
ID ids.ID `json:"id"`
|
|
Bytes string `json:"bytes"`
|
|
Timestamp time.Time `json:"timestamp"`
|
|
Encoding formatting.Encoding `json:"encoding"`
|
|
Index json.Uint64 `json:"index"`
|
|
}
|
|
|
|
type GetLastAcceptedArgs struct {
|
|
Encoding formatting.Encoding `json:"encoding"`
|
|
}
|
|
|
|
type GetContainerByIndexArgs struct {
|
|
Index json.Uint64 `json:"index"`
|
|
Encoding formatting.Encoding `json:"encoding"`
|
|
}
|
|
|
|
type GetContainerRangeArgs struct {
|
|
StartIndex json.Uint64 `json:"startIndex"`
|
|
NumToFetch json.Uint64 `json:"numToFetch"`
|
|
Encoding formatting.Encoding `json:"encoding"`
|
|
}
|
|
|
|
type GetContainerRangeResponse struct {
|
|
Containers []FormattedContainer `json:"containers"`
|
|
}
|
|
|
|
type GetIndexArgs struct {
|
|
ID ids.ID `json:"id"`
|
|
}
|
|
|
|
type GetIndexResponse struct {
|
|
Index json.Uint64 `json:"index"`
|
|
}
|
|
|
|
type IsAcceptedArgs struct {
|
|
ID ids.ID `json:"id"`
|
|
}
|
|
|
|
type IsAcceptedResponse struct {
|
|
IsAccepted bool `json:"isAccepted"`
|
|
}
|
|
|
|
type GetContainerByIDArgs struct {
|
|
ID ids.ID `json:"id"`
|
|
Encoding formatting.Encoding `json:"encoding"`
|
|
}
|