Documentation ¶
Index ¶
- type ActivityCouncilNode
- type ActivityFilter
- type ActivityViewRepo
- type Block
- type BlockCouncilNode
- type BlockEvent
- type BlockFilter
- type BlockIdentity
- type BlockRewardRecord
- type BlockViewRepo
- type CouncilNode
- type CouncilNodeListItem
- type CouncilNodeStakingAccount
- type CouncilNodeStats
- type CouncilNodeViewRepo
- type Event
- type EventFilter
- type Pagination
- type PaginationOffsetParams
- type PaginationOffsetResult
- type PaginationResult
- type PaginationType
- type RewardViewRepo
- type StakingAccount
- type StakingAccountActivity
- type StakingAccountCouncilNode
- type StakingAccountViewRepo
- type Transaction
- type TransactionFilter
- type TransactionInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityCouncilNode ¶
type ActivityCouncilNode struct { ID uint64 `json:"id"` Name string `json:"name"` MaybeSecurityContact *string `json:"security_contact"` PubKeyType string `json:"pubkey_type"` PubKey string `json:"pubkey"` Address string `json:"address"` CreatedAtBlockHeight uint64 `json:"created_at_block_height"` MaybeLastLeftAtBlockHeight *uint64 `json:"last_left_at_block_height"` }
type ActivityFilter ¶
type ActivityFilter struct {
MaybeTypes []chainindex.ActivityType
}
type ActivityViewRepo ¶
type ActivityViewRepo interface { ListTransactions(filter TransactionFilter, pagination *Pagination) ([]Transaction, *PaginationResult, error) FindTransactionByTxId(txid string) (*Transaction, error) ListEvents(filter EventFilter, pagination *Pagination) ([]Event, *PaginationResult, error) FindEventByBlockHeightEventPosition(blockHeight uint64, eventPosition uint64) (*Event, error) TransactionsCount() (uint64, error) SearchTransactions(keyword string, pagination *Pagination) ([]Transaction, *PaginationResult, error) SearchEvents(keyword string, pagination *Pagination) ([]Event, *PaginationResult, error) }
type Block ¶
type Block struct { Hash string `json:"hash"` Height uint64 `json:"height"` Time time.Time `json:"time"` AppHash string `json:"app_hash"` MaybeProposer *BlockCouncilNode `json:"proposer"` TransactionCount uint64 `json:"transaction_count"` EventCount uint64 `json:"event_count"` MaybeCommittedCouncilNodes []BlockCouncilNode `json:"committed_council_nodes"` }
type BlockCouncilNode ¶
type BlockEvent ¶
type BlockEvent struct { Type string `json:"type"` BlockHeight uint64 `json:"block_height"` BlockTime time.Time `json:"block_time"` BlockHash string `json:"block_hash"` MaybeEventPosition *uint64 `json:"event_position"` MaybeStakingAccountAddress *string `json:"staking_account_address"` MaybeStakingAccountNonce *uint64 `json:"staking_account_nonce"` MaybeBonded *bignum.WBigInt `json:"bonded"` MaybeUnbonded *bignum.WBigInt `json:"unbonded"` MaybeRewardMinted *bignum.WBigInt `json:"reward_minted"` MaybeRewardDistribution []BlockRewardRecord `json:"reward_distribution"` MaybeJailedUntil *time.Time `json:"jailed_until"` MaybePunishmentKind *string `json:"punishment_kind"` MaybeAffectedCouncilNode *ActivityCouncilNode `json:"affected_council_node"` }
type BlockFilter ¶
type BlockFilter struct {
MaybeProposers []uint64
}
type BlockIdentity ¶
type BlockRewardRecord ¶
type BlockRewardRecord struct { EventPosition uint64 `json:"event_position"` StakingAddress string `json:"staking_address"` MaybeBonded *string `json:"bonded"` AffectedCouncilNode ActivityCouncilNode `json:"affected_council_node"` }
type BlockViewRepo ¶
type BlockViewRepo interface { LatestBlockHeight() (uint64, error) ListBlocks(filter BlockFilter, pagination *Pagination) ([]Block, *PaginationResult, error) FindBlock(BlockIdentity) (*Block, error) ListBlockTransactions(BlockIdentity, *Pagination) ([]Transaction, *PaginationResult, error) ListBlockEvents(BlockIdentity, *Pagination) ([]BlockEvent, *PaginationResult, error) Search(keyword string, pagination *Pagination) ([]Block, *PaginationResult, error) }
type CouncilNode ¶
type CouncilNode struct { Id uint64 `json:"id"` Name string `json:"name"` Status string `json:"status"` MaybeSecurityContact *string `json:"security_contact"` PubKeyType string `json:"pubkey_type"` PubKey string `json:"pubkey"` Address string `json:"address"` StakingAccount *CouncilNodeStakingAccount `json:"staking_account"` CreatedAtBlockHeight uint64 `json:"created_at_block_height"` MaybeLastLeftAtBlockHeight *uint64 `json:"last_left_at_block_height"` IsActive bool `json:"is_active"` }
type CouncilNodeListItem ¶
type CouncilNodeListItem struct { Id uint64 `json:"id"` Name string `json:"name"` Status string `json:"status"` MaybeSecurityContact *string `json:"security_contact"` PubKeyType string `json:"pubkey_type"` PubKey string `json:"pubkey"` Address string `json:"address"` StakingAccount *CouncilNodeStakingAccount `json:"staking_account"` CreatedAtBlockHeight uint64 `json:"created_at_block_height"` MaybeLastLeftAtBlockHeight *uint64 `json:"last_left_at_block_height"` }
type CouncilNodeStakingAccount ¶
type CouncilNodeStakingAccount struct { MaybeAddress *string `json:"address"` MaybeNonce *uint64 `json:"nonce"` MaybeBonded *bignum.WBigInt `json:"bonded"` MaybeUnbonded *bignum.WBigInt `json:"unbonded"` MaybeUnbondedFrom *time.Time `json:"unbonded_from"` MaybePunishmentKind *string `json:"punishment_kind"` MaybeJailedUntil *time.Time `json:"jailed_until"` }
type CouncilNodeStats ¶
type CouncilNodeViewRepo ¶
type CouncilNodeViewRepo interface { ListActive(pagination *Pagination) ([]CouncilNodeListItem, *PaginationResult, error) FindById(id uint64) (*CouncilNode, error) ListActivitiesById(id uint64, filter ActivityFilter, pagination *Pagination) ([]StakingAccountActivity, *PaginationResult, error) Stats() (*CouncilNodeStats, error) Search(keyword string, pagination *Pagination) ([]CouncilNode, *PaginationResult, error) }
type Event ¶
type Event struct { Type string `json:"type"` BlockHeight uint64 `json:"block_height"` BlockTime time.Time `json:"block_time"` BlockHash string `json:"block_hash"` EventPosition uint64 `json:"event_position"` StakingAccountAddress string `json:"staking_account_address"` MaybeStakingAccountNonce *uint64 `json:"staking_account_nonce"` MaybeBonded *bignum.WBigInt `json:"bonded"` MaybeUnbonded *bignum.WBigInt `json:"unbonded"` MaybeJailedUntil *time.Time `json:"jailed_until"` MaybePunishmentKind *string `json:"punishment_kind"` MaybeAffectedCouncilNode *ActivityCouncilNode `json:"affected_council_node"` }
type EventFilter ¶
type EventFilter struct { MaybeTypes []chainindex.EventType MaybeStakingAccountAddress *string }
type Pagination ¶
type Pagination struct {
// contains filtered or unexported fields
}
func NewOffsetPagination ¶
func NewOffsetPagination(page uint64, limit uint64) *Pagination
func (*Pagination) OffsetParams ¶
func (pagination *Pagination) OffsetParams() *PaginationOffsetParams
func (*Pagination) OffsetResult ¶
func (pagination *Pagination) OffsetResult(totalRecord uint64) *PaginationResult
func (*Pagination) Type ¶
func (pagination *Pagination) Type() PaginationType
type PaginationOffsetParams ¶
func (*PaginationOffsetParams) Offset ¶
func (params *PaginationOffsetParams) Offset() uint64
type PaginationOffsetResult ¶
func (*PaginationOffsetResult) TotalPage ¶
func (result *PaginationOffsetResult) TotalPage() uint64
type PaginationResult ¶
type PaginationResult struct {
// contains filtered or unexported fields
}
func NewOffsetPaginationResult ¶
func NewOffsetPaginationResult(totalRecord uint64, currentPage uint64, limit uint64) *PaginationResult
func (*PaginationResult) OffsetResult ¶
func (result *PaginationResult) OffsetResult() *PaginationOffsetResult
func (*PaginationResult) Type ¶
func (result *PaginationResult) Type() PaginationType
type PaginationType ¶
type PaginationType = string
const (
PAGINATION_OFFSET PaginationType = "offset"
)
type RewardViewRepo ¶
type StakingAccount ¶
type StakingAccount struct { Address string `json:"address"` Nonce uint64 `json:"nonce"` Bonded *bignum.WBigInt `json:"bonded"` MaybeUnbonded *bignum.WBigInt `json:"unbonded"` MaybeUnbondedFrom *time.Time `json:"unbonded_from"` MaybeJailedUntil *time.Time `json:"jailed_until"` MaybePunishmentKind *string `json:"punishment_kind"` MaybeCurrentCouncilNode *StakingAccountCouncilNode `json:"current_council_node"` }
type StakingAccountActivity ¶
type StakingAccountActivity struct { Type string `json:"type"` BlockHeight uint64 `json:"block_height"` BlockTime time.Time `json:"block_time"` BlockHash string `json:"block_hash"` MaybeTxID *string `json:"txid"` MaybeFee *bignum.WBigInt `json:"fee"` MaybeEventPosition *uint64 `json:"event_position"` MaybeInputs []TransactionInput `json:"inputs"` MaybeOutputCount *uint64 `json:"output_count"` MaybeStakingAccountAddress *string `json:"staking_account_address"` MaybeStakingAccountNonce *uint64 `json:"staking_account_nonce"` MaybeBonded *bignum.WBigInt `json:"bonded"` MaybeUnbonded *bignum.WBigInt `json:"unbonded"` MaybeUnbondedFrom *time.Time `json:"unbonded_from"` MaybeJoinedCouncilNode *ActivityCouncilNode `json:"joined_council_node"` MaybeJailedUntil *time.Time `json:"jailed_until"` MaybePunishmentKind *string `json:"punishment_kind"` MaybeAffectedCouncilNode *ActivityCouncilNode `json:"affected_council_node"` }
type StakingAccountCouncilNode ¶
type StakingAccountCouncilNode struct { MaybeId *uint64 `json:"id"` MaybeName *string `json:"name"` MaybeSecurityContact *string `json:"security_contact"` MaybePubKeyType *string `json:"pubkey_type"` MaybePubKey *string `json:"pubkey"` MaybeAddress *string `json:"address"` MaybeCreatedAtBlockHeight *uint64 `json:"created_at_block_height"` MaybeLastLeftAtBlockHeight *uint64 `json:"last_left_at_block_height"` }
type StakingAccountViewRepo ¶
type StakingAccountViewRepo interface {
Search(keyword string, pagination *Pagination) ([]StakingAccount, *PaginationResult, error)
}
type Transaction ¶
type Transaction struct { Type string `json:"type"` BlockHeight uint64 `json:"block_height"` BlockTime time.Time `json:"block_time"` BlockHash string `json:"block_hash"` MaybeTxID *string `json:"txid"` MaybeFee *bignum.WBigInt `json:"fee"` MaybeInputs []TransactionInput `json:"inputs"` MaybeOutputCount *uint64 `json:"output_count"` MaybeStakingAccountAddress *string `json:"staking_account_address"` MaybeStakingAccountNonce *uint64 `json:"staking_account_nonce"` MaybeBonded *bignum.WBigInt `json:"bonded"` MaybeUnbonded *bignum.WBigInt `json:"unbonded"` MaybeUnbondedFrom *time.Time `json:"unbonded_from"` MaybeJoinedCouncilNode *ActivityCouncilNode `json:"joined_council_node"` MaybeAffectedCouncilNode *ActivityCouncilNode `json:"affected_council_node"` }
type TransactionFilter ¶
type TransactionFilter struct { MaybeTypes []chainindex.TransactionType MaybeStakingAccountAddress *string }
type TransactionInput ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.