account

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetByHeightHttpHandler

func NewGetByHeightHttpHandler(db *psql.Store, c figmentclient.Client) *getByHeightHttpHandler

func NewGetByHeightUseCase

func NewGetByHeightUseCase(db *psql.Store, c figmentclient.Client) *getByHeightUseCase

func NewGetDetailsHttpHandler added in v0.1.0

func NewGetDetailsHttpHandler(db *psql.Store, c figmentclient.Client) *getDetailsHttpHandler

func NewGetDetailsUseCase added in v0.1.0

func NewGetDetailsUseCase(c figmentclient.Client, db *psql.Store) *getDetailsUseCase

Types

type BalanceDetails added in v0.1.0

type BalanceDetails struct {
	GoldBalance string `json:"gold_balance"`

	TotalLockedGold          string `json:"total_locked_gold"`
	TotalNonvotingLockedGold string `json:"total_nonvoting_locked_gold"`
	StableTokenBalance       string `json:"stable_token_balance"`
}

func ToBalanceDetails added in v0.1.0

func ToBalanceDetails(rawAccountInfo *figmentclient.AccountInfo) *BalanceDetails

type DetailsView added in v0.1.0

type DetailsView struct {
	Address string `json:"address"`

	*IdentityDetails
	*BalanceDetails

	InternalTransfersSent          []model.AccountActivitySeq `json:"internal_transfers_sent"`
	ValidatorGroupVoteCastReceived []model.AccountActivitySeq `json:"validator_group_vote_cast_received"`
	ValidatorGroupVoteCastSent     []model.AccountActivitySeq `json:"validator_group_vote_cast_sent"`
	GoldLocked                     []model.AccountActivitySeq `json:"gold_locked"`
	GoldUnlocked                   []model.AccountActivitySeq `json:"gold_unlocked"`
	GoldWithdrawn                  []model.AccountActivitySeq `json:"gold_withdrawn"`
	AccountSlashed                 []model.AccountActivitySeq `json:"account_slashed"`
	RewardReceived                 []model.AccountActivitySeq `json:"reward_received"`
}

func ToDetailsView added in v0.1.0

func ToDetailsView(address string, rawAccountInfo *figmentclient.AccountInfo, internalTransfersSent, validatorGroupVoteCastReceived, validatorGroupVoteCastSent, goldLocked, goldUnlocked, goldWithdrawn, accountSlashed, rewardReceived []model.AccountActivitySeq) (*DetailsView, error)

type GetByHeightRequest

type GetByHeightRequest struct {
	Address string `uri:"address" binding:"required"`
	Height  *int64 `form:"height" binding:"-"`
}

type HeightDetailsView

type HeightDetailsView struct {
	*IdentityDetails
	*BalanceDetails

	Activity []model.AccountActivitySeq `json:"activity"`
}

func ToHeightDetailsView

func ToHeightDetailsView(rawAccountInfo *figmentclient.AccountInfo, accountActivitySeqs []model.AccountActivitySeq) *HeightDetailsView

type IdentityDetails added in v0.1.0

type IdentityDetails struct {
	Name        string `json:"name"`
	MetadataUrl string `json:"metadata_url"`
}

func ToIdentityDetails added in v0.1.0

func ToIdentityDetails(rawAccountInfo *figmentclient.AccountInfo) *IdentityDetails

Jump to

Keyboard shortcuts

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