api

package
v2.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 2 Imported by: 3

Documentation

Overview

Package api ...

Index

Constants

View Source
const (
	TypeRewardEvent    = "minter/RewardEvent"
	TypeSlashEvent     = "minter/SlashEvent"
	TypeUnbondEvent    = "minter/UnbondEvent"
	TypeStakeKickEvent = "minter/StakeKickEvent"
)

Event type names

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	GetAddress() string
	GetValidatorPublicKey() string
	// contains filtered or unexported methods
}

Event interface

func ConvertToEvent

func ConvertToEvent(typeName string, value []byte) (Event, error)

type RewardEvent

type RewardEvent struct {
	Role            string `json:"role"`
	Address         string `json:"address"`
	Amount          string `json:"amount"`
	ValidatorPubKey string `json:"validator_pub_key"`
}

Events

func (*RewardEvent) GetAddress

func (e *RewardEvent) GetAddress() string

func (*RewardEvent) GetValidatorPublicKey

func (e *RewardEvent) GetValidatorPublicKey() string

type SlashEvent

type SlashEvent struct {
	Address         string `json:"address"`
	Amount          string `json:"amount"`
	Coin            string `json:"coin"`
	ValidatorPubKey string `json:"validator_pub_key"`
}

func (*SlashEvent) GetAddress

func (e *SlashEvent) GetAddress() string

func (*SlashEvent) GetValidatorPublicKey

func (e *SlashEvent) GetValidatorPublicKey() string

type StakeKickEvent

type StakeKickEvent struct {
	Address         string `json:"address"`
	Amount          string `json:"amount"`
	Coin            string `json:"coin"`
	ValidatorPubKey string `json:"validator_pub_key"`
}

func (*StakeKickEvent) GetAddress

func (e *StakeKickEvent) GetAddress() string

func (*StakeKickEvent) GetValidatorPublicKey

func (e *StakeKickEvent) GetValidatorPublicKey() string

type UnbondEvent

type UnbondEvent struct {
	Address         string `json:"address"`
	Amount          string `json:"amount"`
	Coin            string `json:"coin"`
	ValidatorPubKey string `json:"validator_pub_key"`
}

func (*UnbondEvent) GetAddress

func (e *UnbondEvent) GetAddress() string

func (*UnbondEvent) GetValidatorPublicKey

func (e *UnbondEvent) GetValidatorPublicKey() string

Directories

Path Synopsis
Package grpc_client is the interface for uses gRPC methods.
Package grpc_client is the interface for uses gRPC methods.
Package http_client is the interface for uses API v2 methods.
Package http_client is the interface for uses API v2 methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL