Documentation ¶
Index ¶
- Constants
- func NewLegacyQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (q Keeper) Beacon(c context.Context, req *types.QueryBeaconRequest) (*types.QueryBeaconResponse, error)
- func (q Keeper) BeaconStorage(c context.Context, req *types.QueryBeaconStorageRequest) (*types.QueryBeaconStorageResponse, error)
- func (q Keeper) BeaconTimestamp(c context.Context, req *types.QueryBeaconTimestampRequest) (*types.QueryBeaconTimestampResponse, error)
- func (q Keeper) BeaconsFiltered(c context.Context, req *types.QueryBeaconsFilteredRequest) (*types.QueryBeaconsFilteredResponse, error)
- func (k Keeper) Cdc() codec.BinaryCodec
- func (k Keeper) GetAllBeaconTimestamps(ctx sdk.Context, beaconID uint64) (timestamps []types.BeaconTimestamp)
- func (k Keeper) GetAllBeaconTimestampsForExport(ctx sdk.Context, beaconID uint64) (timestamps types.BeaconTimestampGenesisExports)
- func (k Keeper) GetAllBeacons(ctx sdk.Context) (beacons []types.Beacon)
- func (k Keeper) GetBeacon(ctx sdk.Context, beaconID uint64) (types.Beacon, bool)
- func (k Keeper) GetBeaconOwner(ctx sdk.Context, beaconID uint64) sdk.AccAddress
- func (k Keeper) GetBeaconStorageLimit(ctx sdk.Context, beaconID uint64) (types.BeaconStorageLimit, bool)
- func (k Keeper) GetBeaconTimestampByID(ctx sdk.Context, beaconID uint64, timestampID uint64) (types.BeaconTimestamp, bool)
- func (k Keeper) GetBeaconsFiltered(ctx sdk.Context, params types.QueryBeaconsFilteredRequest) []types.Beacon
- func (k Keeper) GetBeaconsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetHighestBeaconID(ctx sdk.Context) (beaconID uint64, err error)
- func (k Keeper) GetMaxPurchasableSlots(ctx sdk.Context, beaconId uint64) uint64
- func (k Keeper) GetParamDefaultStorageLimit(ctx sdk.Context) uint64
- func (k Keeper) GetParamDenom(ctx sdk.Context) string
- func (k Keeper) GetParamMaxStorageLimit(ctx sdk.Context) uint64
- func (k Keeper) GetParamPurchaseStorageFee(ctx sdk.Context) uint64
- func (k Keeper) GetParamRecordFee(ctx sdk.Context) uint64
- func (k Keeper) GetParamRegistrationFee(ctx sdk.Context) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPurchaseStorageFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetPurchaseStorageFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetRecordFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetRecordFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetRegistrationFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetRegistrationFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetZeroFeeAsCoin(ctx sdk.Context) sdk.Coin
- func (k Keeper) GetZeroFeeAsCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) HasBeaconStorageLimit(ctx sdk.Context, beaconID uint64) bool
- func (k Keeper) IncreaseInStateStorage(ctx sdk.Context, beaconId, amount uint64) error
- func (k Keeper) IsAuthorisedToRecord(ctx sdk.Context, beaconID uint64, recorder sdk.AccAddress) bool
- func (k Keeper) IsBeaconRegistered(ctx sdk.Context, beaconID uint64) bool
- func (k Keeper) IsBeaconTimestampRecordedByID(ctx sdk.Context, beaconID uint64, timestampID uint64) bool
- func (k Keeper) IterateBeaconTimestamps(ctx sdk.Context, beaconID uint64, ...)
- func (k Keeper) IterateBeaconTimestampsReverse(ctx sdk.Context, beaconID uint64, ...)
- func (k Keeper) IterateBeacons(ctx sdk.Context, cb func(beacon types.Beacon) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RecordNewBeaconTimestamp(ctx sdk.Context, beaconId uint64, hash string, submitTime uint64) (uint64, uint64, error)
- func (k Keeper) RegisterNewBeacon(ctx sdk.Context, beacon types.Beacon) (uint64, error)
- func (k Keeper) SetBeacon(ctx sdk.Context, beacon types.Beacon) error
- func (k Keeper) SetBeaconStorageLimit(ctx sdk.Context, beaconId, limit uint64) error
- func (k Keeper) SetBeaconTimestamp(ctx sdk.Context, beaconId uint64, beaconTimestamp types.BeaconTimestamp) error
- func (k Keeper) SetHighestBeaconID(ctx sdk.Context, beaconID uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- type Migrator
Constants ¶
const ( QueryParameters = "params" QueryBeacon = "beacon" QueryBeacons = "beacons" QueryBeaconTimestamp = "timestamp" )
query endpoints supported by the beacon Querier
Variables ¶
This section is empty.
Functions ¶
func NewLegacyQuerier ¶
func NewLegacyQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier is the module level router for state queries
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the gov MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper(storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, cdc codec.BinaryCodec) Keeper
NewKeeper creates new instances of the beacon Keeper
func (Keeper) Beacon ¶
func (q Keeper) Beacon(c context.Context, req *types.QueryBeaconRequest) (*types.QueryBeaconResponse, error)
func (Keeper) BeaconStorage ¶ added in v1.6.1
func (q Keeper) BeaconStorage(c context.Context, req *types.QueryBeaconStorageRequest) (*types.QueryBeaconStorageResponse, error)
func (Keeper) BeaconTimestamp ¶
func (q Keeper) BeaconTimestamp(c context.Context, req *types.QueryBeaconTimestampRequest) (*types.QueryBeaconTimestampResponse, error)
func (Keeper) BeaconsFiltered ¶
func (q Keeper) BeaconsFiltered(c context.Context, req *types.QueryBeaconsFilteredRequest) (*types.QueryBeaconsFilteredResponse, error)
func (Keeper) Cdc ¶
func (k Keeper) Cdc() codec.BinaryCodec
func (Keeper) GetAllBeaconTimestamps ¶
func (k Keeper) GetAllBeaconTimestamps(ctx sdk.Context, beaconID uint64) (timestamps []types.BeaconTimestamp)
GetAllBeaconTimestamps Get an iterator over all a Beacon's timestamps in which the keys are the beaconID and the values are the BeaconTimestamps
func (Keeper) GetAllBeaconTimestampsForExport ¶
func (k Keeper) GetAllBeaconTimestampsForExport(ctx sdk.Context, beaconID uint64) (timestamps types.BeaconTimestampGenesisExports)
GetAllBeaconTimestampsForExport Get an iterator over all a Beacon's timestamps in which an optimised version of the timestamp data is returned for genesis export
func (Keeper) GetAllBeacons ¶
GetAllBeacons returns all the registered BEACON metadata from store
func (Keeper) GetBeaconOwner ¶
GetBeaconOwner - get the current owner of a BEACON
func (Keeper) GetBeaconStorageLimit ¶ added in v1.6.1
func (Keeper) GetBeaconTimestampByID ¶
func (k Keeper) GetBeaconTimestampByID(ctx sdk.Context, beaconID uint64, timestampID uint64) (types.BeaconTimestamp, bool)
GetBeaconTimestampByID Gets the beacon timestamp data for a beaconID and timestampID
func (Keeper) GetBeaconsFiltered ¶
func (k Keeper) GetBeaconsFiltered(ctx sdk.Context, params types.QueryBeaconsFilteredRequest) []types.Beacon
GetBeaconsFiltered retrieves BEACONs filtered by a given set of params which include pagination parameters along a moniker and owner address.
NOTE: If no filters are provided, all proposals will be returned in paginated form.
func (Keeper) GetBeaconsIterator ¶
GetBeaconsIterator Get an iterator over all BEACONs in which the keys are the BEACON Ids and the values are the BEACONs
func (Keeper) GetHighestBeaconID ¶
GetHighestBeaconID gets the highest BEACON ID
func (Keeper) GetMaxPurchasableSlots ¶ added in v1.6.1
func (Keeper) GetParamDefaultStorageLimit ¶ added in v1.6.1
func (Keeper) GetParamMaxStorageLimit ¶ added in v1.6.1
func (Keeper) GetParamPurchaseStorageFee ¶ added in v1.6.1
func (Keeper) GetParamRegistrationFee ¶
func (Keeper) GetPurchaseStorageFeeAsCoin ¶ added in v1.6.1
func (Keeper) GetPurchaseStorageFeeAsCoins ¶ added in v1.6.1
func (Keeper) GetRegistrationFeeAsCoin ¶
func (Keeper) GetRegistrationFeeAsCoins ¶
func (Keeper) HasBeaconStorageLimit ¶ added in v1.6.1
func (Keeper) IncreaseInStateStorage ¶ added in v1.6.1
func (Keeper) IsAuthorisedToRecord ¶
func (k Keeper) IsAuthorisedToRecord(ctx sdk.Context, beaconID uint64, recorder sdk.AccAddress) bool
IsAuthorisedToRecord ensures only the BEACON owner is recording hashes
func (Keeper) IsBeaconRegistered ¶
IsBeaconRegistered Checks if the BEACON is present in the store or not
func (Keeper) IsBeaconTimestampRecordedByID ¶
func (k Keeper) IsBeaconTimestampRecordedByID(ctx sdk.Context, beaconID uint64, timestampID uint64) bool
IsBeaconTimestampRecordedByID Deep Check if the BEACON timestamp is present in the store or not, given the beaconID and timestampID
func (Keeper) IterateBeaconTimestamps ¶
func (k Keeper) IterateBeaconTimestamps(ctx sdk.Context, beaconID uint64, cb func(beaconTimestamp types.BeaconTimestamp) (stop bool))
IterateBeacons iterates over the all the BEACON's timestamps and performs a callback function
func (Keeper) IterateBeaconTimestampsReverse ¶
func (k Keeper) IterateBeaconTimestampsReverse(ctx sdk.Context, beaconID uint64, cb func(beaconTimestamp types.BeaconTimestamp) (stop bool))
IterateBeaconTimestampsReverse iterates over the all the BEACON's timestamps in reverse order and performs a callback function
func (Keeper) IterateBeacons ¶
IterateBeacons iterates over the all the BEACON metadata and performs a callback function
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RecordNewBeaconTimestamp ¶
func (k Keeper) RecordNewBeaconTimestamp( ctx sdk.Context, beaconId uint64, hash string, submitTime uint64) (uint64, uint64, error)
RecordBeaconTimestamp records a BEACON timestamp hash for a registered BEACON
func (Keeper) RegisterNewBeacon ¶
RegisterBeacon registers a BEACON in the store
func (Keeper) SetBeaconStorageLimit ¶ added in v1.6.1
func (Keeper) SetBeaconTimestamp ¶
func (k Keeper) SetBeaconTimestamp(ctx sdk.Context, beaconId uint64, beaconTimestamp types.BeaconTimestamp) error
SetBeaconTimestamp Sets the Beacon timestamp struct for a beaconID + timestampID
func (Keeper) SetHighestBeaconID ¶
SetHighestBeaconID sets the new highest BEACON ID to the store