Documentation
¶
Index ¶
- func CountRPC(ctx context.Context)
- func RPCCount(ctx context.Context) int64
- func WithRPCCounter(ctx context.Context) context.Context
- type BlockInfo
- type NTon
- type NominatorReward
- type Output
- type RoundInfo
- type RoundRewardsOutput
- type RoundRewardsQuery
- type RoundsQuery
- type ValidationRound
- type ValidationRoundsOutput
- type ValidatorReward
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NTon ¶
NTon represents a value in Nano TON (1 TON = 1e9 NTon). It wraps *big.Int and serializes to JSON as a quoted string to preserve precision for consumers.
func (NTon) MarshalJSON ¶
type NominatorReward ¶
type NominatorReward struct {
Address string `json:"address"`
Weight float64 `json:"weight"`
Reward *NTon `json:"reward"`
EffectiveStake *NTon `json:"effective_stake"`
Stake *NTon `json:"stake"`
}
NominatorReward holds per-nominator reward data for a finished round.
type Output ¶
type Output struct {
ResponseTimeMs int64 `json:"response_time_ms"`
Block BlockInfo `json:"block"`
ValidationRound RoundInfo `json:"validation_round"`
ElectionID int64 `json:"election_id"`
PrevElectionID *int64 `json:"prev_election_id,omitempty"`
NextElectionID *int64 `json:"next_election_id,omitempty"`
ElectorBalance *NTon `json:"elector_balance"`
TotalStake *NTon `json:"total_stake"`
RewardPerBlock *NTon `json:"reward_per_block"`
PrevBlockTotalBonuses *NTon `json:"prev_block_total_bonuses"`
CurrBlockTotalBonuses *NTon `json:"curr_block_total_bonuses"`
Validators []ValidatorReward `json:"validators"`
}
type RoundRewardsOutput ¶
type RoundRewardsOutput struct {
ResponseTimeMs int64 `json:"response_time_ms"`
ElectionID int64 `json:"election_id"`
PrevElectionID *int64 `json:"prev_election_id,omitempty"`
NextElectionID *int64 `json:"next_election_id,omitempty"`
RoundStart time.Time `json:"round_start"`
RoundEnd time.Time `json:"round_end"`
StartBlock uint32 `json:"start_block"`
EndBlock uint32 `json:"end_block"`
TotalBonuses *NTon `json:"total_bonuses"`
TotalStake *NTon `json:"total_stake"`
Validators []ValidatorReward `json:"validators"`
Error string `json:"error,omitempty"`
}
RoundRewardsOutput is the response for the round-rewards endpoint.
type RoundRewardsQuery ¶
RoundRewardsQuery holds query parameters for the round-rewards endpoint.
type RoundsQuery ¶
RoundsQuery holds query parameters for the validation-rounds endpoint.
type ValidationRound ¶
type ValidationRound struct {
ElectionID int64 `json:"election_id"`
Start time.Time `json:"start"`
End time.Time `json:"end"`
StartBlock uint32 `json:"start_block"`
EndBlock uint32 `json:"end_block,omitempty"`
Finished bool `json:"finished"`
PrevElectionID *int64 `json:"prev_election_id,omitempty"`
NextElectionID *int64 `json:"next_election_id,omitempty"`
Error string `json:"error,omitempty"`
}
type ValidationRoundsOutput ¶
type ValidationRoundsOutput struct {
ResponseTimeMs int64 `json:"response_time_ms"`
Rounds []ValidationRound `json:"rounds"`
Error string `json:"error,omitempty"`
}
type ValidatorReward ¶
type ValidatorReward struct {
Rank int `json:"rank"`
Pubkey string `json:"pubkey"`
EffectiveStake *NTon `json:"effective_stake"`
Weight float64 `json:"weight"`
Reward *NTon `json:"reward"`
Pool string `json:"pool,omitempty"`
OwnerAddress string `json:"owner_address,omitempty"`
ValidatorAddress string `json:"validator_address,omitempty"`
PoolType string `json:"pool_type,omitempty"`
ValidatorStake *NTon `json:"validator_stake,omitempty"`
NominatorsStake *NTon `json:"nominators_stake,omitempty"`
TotalStake *NTon `json:"total_stake,omitempty"`
NominatorsCount uint32 `json:"nominators_count,omitempty"`
Nominators []NominatorReward `json:"nominators,omitempty"`
}
ValidatorReward holds per-validator reward data for a finished round.
Click to show internal directories.
Click to hide internal directories.