Documentation ¶
Index ¶
- Variables
- func NewGetByHeightHttpHandler(c *client.Client, syncablesDb store.FindMostRecenter) *getByHeightHttpHandler
- func NewGetByHeightUseCase(c *client.Client, syncablesDb store.FindMostRecenter) *getByHeightUseCase
- func NewGetDetailsHttpHandler(c *client.Client, accountEraSeqDb store.AccountEraSeq, ...) *getDetailsHttpHandler
- func NewGetDetailsUseCase(c *client.Client, accountEraSeqDb store.AccountEraSeq, ...) *getDetailsUseCase
- func NewGetRewardsHttpHandler(eventSeqDb store.EventSeq, syncablesDb store.Syncables) *getRewardsHttpHandler
- func NewGetRewardsUseCase(eventSeqDb store.EventSeq, syncablesDb store.Syncables) *getRewardsUseCase
- type Account
- type BalanceDeposit
- type BalanceTransfer
- type Bonded
- type DetailsView
- type EventData
- type GetByHeightRequest
- type GetDetailsRequest
- type HeightDetailsView
- type Identity
- type Reward
- type RewardsView
- type Unbonded
- type Withdrawn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCouldNotMarshalJSON = errors.New("could not marshal data to JSON") ErrUnmarshalingEventData = errors.New("error when trying to unmarshal event data") )
Functions ¶
func NewGetByHeightHttpHandler ¶
func NewGetByHeightHttpHandler(c *client.Client, syncablesDb store.FindMostRecenter) *getByHeightHttpHandler
func NewGetByHeightUseCase ¶
func NewGetByHeightUseCase(c *client.Client, syncablesDb store.FindMostRecenter) *getByHeightUseCase
func NewGetDetailsUseCase ¶
func NewGetRewardsHttpHandler ¶ added in v0.7.0
Types ¶
type Account ¶ added in v0.5.0
type BalanceDeposit ¶
type BalanceDeposit struct { Amount string `json:"amount"` Hash string `json:"transaction_hash"` Height int64 `json:"height"` }
func ToBalanceDeposits ¶
func ToBalanceDeposits(balanceDepositsEvents []model.EventSeqWithTxHash) ([]*BalanceDeposit, error)
type BalanceTransfer ¶
type BalanceTransfer struct { Hash string `json:"transaction_hash"` Height int64 `json:"height"` Amount string `json:"amount"` Kind string `json:"kind"` Participant string `json:"participant"` }
func ToBalanceTransfers ¶
func ToBalanceTransfers(forAddress string, balanceTransferEvents []model.EventSeqWithTxHash) ([]*BalanceTransfer, error)
type Bonded ¶
type Bonded struct { Amount string `json:"amount"` Receiver string `json:"receiver"` Hash string `json:"transaction_hash"` Height int64 `json:"height"` }
func ToBondedList ¶
func ToBondedList(bondedEvents []model.EventSeqWithTxHash) ([]*Bonded, error)
type DetailsView ¶
type DetailsView struct { Address string `json:"address"` Account *Account `json:"account"` *Identity Transfers []*BalanceTransfer `json:"transfers"` Deposits []*BalanceDeposit `json:"deposits"` Bonded []*Bonded `json:"bonded"` Unbonded []*Unbonded `json:"unbonded"` Withdrawn []*Withdrawn `json:"withdrawn"` Delegations []*common.Delegation `json:"delegations"` }
func ToDetailsView ¶
func ToDetailsView(address string, rawAccountIdentity *accountpb.AccountIdentity, rawAccount *accountpb.Account, accountEraSeqs []model.AccountEraSeq, balanceTransferModels, balanceDepositModels, bondedModels, unbondedModels, withdrawnModels []model.EventSeqWithTxHash) (DetailsView, error)
type GetByHeightRequest ¶ added in v0.2.0
type GetDetailsRequest ¶
type GetDetailsRequest struct {
StashAccount string `uri:"stash_account" binding:"required"`
}
type HeightDetailsView ¶
type HeightDetailsView struct { Nonce int64 `json:"nonce"` ReferendumCount int64 `json:"referendum_count"` Free string `json:"free"` Reserved string `json:"reserved"` MiscFrozen string `json:"misc_frozen"` FeeFrozen string `json:"fee_frozen"` }
func ToHeightDetailsView ¶
func ToHeightDetailsView(rawAccount *accountpb.Account) *HeightDetailsView
type Identity ¶
type Identity struct { Deposit string `json:"deposit"` DisplayName string `json:"display_name"` LegalName string `json:"legal_name"` WebName string `json:"web_name"` RiotName string `json:"riot_name"` EmailName string `json:"email_name"` TwitterName string `json:"twitter_name"` Image string `json:"image"` }
func ToIdentity ¶
func ToIdentity(rawAccountIdentity *accountpb.AccountIdentity) *Identity
type RewardsView ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.