Documentation ¶
Index ¶
- func NodeInvalidResponseTypeStrings() []string
- func NodeStatusStrings() []string
- func NodeVersionStrings() []string
- type AverageTaxRateSubmission
- type AverageTaxRateSubmissionQuery
- type BatchUpdateNode
- type BridgeEvent
- type BridgeEventExporter
- type BridgeEventImporter
- type BridgeEventTransformer
- type BridgeEventType
- type BridgeEventsQuery
- type BridgeTransaction
- type BridgeTransactionExporter
- type BridgeTransactionImporter
- type BridgeTransactionQuery
- type BridgeTransactionTransformer
- type BridgeTransactionType
- type BridgeTransactionsQuery
- type Checkpoint
- type CheckpointExporter
- type CheckpointImporter
- type CheckpointTransformer
- type Epoch
- type EpochAPYSnapshot
- type EpochAPYSnapshotQuery
- type EpochTrigger
- type FindEpochsQuery
- type FindNodesQuery
- type Node
- type NodeAPYSnapshot
- type NodeAPYSnapshotQuery
- type NodeCreatedMetadata
- type NodeEvent
- type NodeEventMetadata
- type NodeEventType
- type NodeEventsQuery
- type NodeInvalidResponse
- type NodeInvalidResponseType
- func (i NodeInvalidResponseType) IsANodeInvalidResponseType() bool
- func (i NodeInvalidResponseType) MarshalJSON() ([]byte, error)
- func (i NodeInvalidResponseType) MarshalYAML() (interface{}, error)
- func (i *NodeInvalidResponseType) Scan(value interface{}) error
- func (i NodeInvalidResponseType) String() string
- func (i *NodeInvalidResponseType) UnmarshalJSON(data []byte) error
- func (i *NodeInvalidResponseType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i NodeInvalidResponseType) Value() (driver.Value, error)
- func (NodeInvalidResponseType) Values() []string
- type NodeLocation
- type NodeSnapshot
- type NodeSnapshotExporter
- type NodeSnapshotImporter
- type NodeSnapshotTransformer
- type NodeStatus
- func (i NodeStatus) IsANodeStatus() bool
- func (i NodeStatus) MarshalJSON() ([]byte, error)
- func (i NodeStatus) MarshalYAML() (interface{}, error)
- func (i *NodeStatus) Scan(value interface{}) error
- func (i NodeStatus) String() string
- func (i *NodeStatus) UnmarshalJSON(data []byte) error
- func (i *NodeStatus) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i NodeStatus) Value() (driver.Value, error)
- func (NodeStatus) Values() []string
- type NodeUpdated2PublicGoodMetadata
- type NodeUpdatedMetadata
- type NodeVersion
- func (i NodeVersion) IsANodeVersion() bool
- func (i NodeVersion) MarshalJSON() ([]byte, error)
- func (i NodeVersion) MarshalYAML() (interface{}, error)
- func (i *NodeVersion) Scan(value interface{}) error
- func (i NodeVersion) String() string
- func (i *NodeVersion) UnmarshalJSON(data []byte) error
- func (i *NodeVersion) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i NodeVersion) Value() (driver.Value, error)
- func (NodeVersion) Values() []string
- type OperatorProfitSnapshot
- type OperatorProfitSnapshotsQuery
- type RewardedNode
- type SettlementData
- type StakeChip
- type StakeChipExporter
- type StakeChipImporter
- type StakeChipQuery
- type StakeChipTransformer
- type StakeChipsQuery
- type StakeEvent
- type StakeEventChipsMergedMetadata
- type StakeEventExporter
- type StakeEventImporter
- type StakeEventQuery
- type StakeEventTransformer
- type StakeEventType
- type StakeEventsQuery
- type StakeRecentCount
- type StakeSnapshotTransformer
- type StakeStaker
- type StakeStaking
- type StakeStakingChips
- type StakeStakingExporter
- type StakeStakingTransformer
- type StakeStakingsQuery
- type StakeTransaction
- type StakeTransactionExporter
- type StakeTransactionImporter
- type StakeTransactionQuery
- type StakeTransactionTransformer
- type StakeTransactionType
- type StakeTransactionsQuery
- type StakerCountSnapshot
- type StakerCountSnapshotExporter
- type StakerCountSnapshotImporter
- type StakerProfitSnapshot
- type StakerProfitSnapshotsQuery
- type Stat
- type StatQuery
- type Worker
- type WorkerQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodeInvalidResponseTypeStrings ¶ added in v0.4.11
func NodeInvalidResponseTypeStrings() []string
NodeInvalidResponseTypeStrings returns a slice of all String values of the enum
func NodeStatusStrings ¶
func NodeStatusStrings() []string
NodeStatusStrings returns a slice of all String values of the enum
func NodeVersionStrings ¶ added in v0.6.18
func NodeVersionStrings() []string
NodeVersionStrings returns a slice of all String values of the enum
Types ¶
type BridgeEvent ¶
type BridgeEvent struct { ID common.Hash `json:"id"` Type BridgeEventType `json:"type"` TransactionHash common.Hash `json:"transaction_hash"` TransactionIndex uint `json:"transaction_index"` TransactionStatus uint64 `json:"transaction_status"` ChainID uint64 `json:"chain_id"` BlockHash common.Hash `json:"block_hash"` BlockNumber *big.Int `json:"block_number"` BlockTimestamp time.Time `json:"block_timestamp"` Finalized bool `json:"finalized"` }
func NewBridgeEvent ¶
func NewBridgeEvent(id common.Hash, eventType BridgeEventType, chainID uint64, header *types.Header, transaction *types.Transaction, receipt *types.Receipt, finalized bool) *BridgeEvent
type BridgeEventExporter ¶
type BridgeEventExporter interface {
Export() (*BridgeEvent, error)
}
type BridgeEventImporter ¶
type BridgeEventImporter interface {
Import(bridgeEvent BridgeEvent) error
}
type BridgeEventTransformer ¶
type BridgeEventTransformer interface { BridgeEventImporter BridgeEventExporter }
type BridgeEventType ¶
type BridgeEventType string
const ( BridgeEventTypeDepositInitialized BridgeEventType = "initialized" BridgeEventTypeDepositFinalized BridgeEventType = "finalized" BridgeEventTypeWithdrawalInitialized BridgeEventType = "initialized" BridgeEventTypeWithdrawalProved BridgeEventType = "proved" BridgeEventTypeWithdrawalFinalized BridgeEventType = "finalized" )
type BridgeEventsQuery ¶
type BridgeTransaction ¶
type BridgeTransaction struct { ID common.Hash `json:"id"` Type BridgeTransactionType `json:"type"` Sender common.Address `json:"sender"` Receiver common.Address `json:"receiver"` TokenAddressL1 *common.Address `json:"token_address_l1"` TokenAddressL2 *common.Address `json:"token_address_l2"` TokenValue *big.Int `json:"token_value"` Data string `json:"data"` ChainID uint64 `json:"chain_id"` BlockTimestamp time.Time `json:"block_timestamp"` BlockNumber uint64 `json:"block_number"` TransactionIndex uint `json:"transaction_index"` Finalized bool `json:"finalized"` }
type BridgeTransactionExporter ¶
type BridgeTransactionExporter interface {
Export() (*BridgeTransaction, error)
}
type BridgeTransactionImporter ¶
type BridgeTransactionImporter interface {
Import(bridgeTransaction BridgeTransaction) error
}
type BridgeTransactionQuery ¶
type BridgeTransactionTransformer ¶
type BridgeTransactionTransformer interface { BridgeTransactionImporter BridgeTransactionExporter }
type BridgeTransactionType ¶
type BridgeTransactionType string
const ( BridgeTransactionTypeDeposit BridgeTransactionType = "deposit" BridgeTransactionTypeWithdraw BridgeTransactionType = "withdraw" )
type BridgeTransactionsQuery ¶
type Checkpoint ¶
type CheckpointExporter ¶
type CheckpointExporter interface {
Export() (*Checkpoint, error)
}
type CheckpointImporter ¶
type CheckpointImporter interface {
Import(checkpoint Checkpoint) error
}
type CheckpointTransformer ¶
type CheckpointTransformer interface { CheckpointImporter CheckpointExporter }
type Epoch ¶
type Epoch struct { ID uint64 `json:"id"` // StartTimestamp when an Epoch begins. StartTimestamp int64 `json:"start_timestamp"` // EndTimestamp when an Epoch ends. EndTimestamp int64 `json:"end_timestamp"` TransactionHash common.Hash `json:"transaction_hash"` TransactionIndex uint `json:"transaction_index"` BlockHash common.Hash `json:"block_hash"` BlockNumber *big.Int `json:"block_number"` BlockTimestamp int64 `json:"block_timestamp"` // total Operation Rewards distributed. TotalOperationRewards decimal.Decimal `json:"total_operation_rewards"` // total Staking Rewards distributed. TotalStakingRewards decimal.Decimal `json:"total_staking_rewards"` // the number of Nodes that received rewards. TotalRewardedNodes int `json:"total_rewarded_nodes"` // the list of Nodes that received rewards and the amount they received. RewardedNodes []*RewardedNode `json:"rewarded_nodes,omitempty"` // the total number of DSL requests made during the Epoch. TotalRequestCounts decimal.Decimal `json:"total_request_counts"` Finalized bool `json:"-"` CreatedAt int64 `json:"-"` UpdatedAt int64 `json:"-"` }
Epoch records an Epoch and its proof of rewards distribution
type EpochAPYSnapshot ¶ added in v0.4.18
type EpochAPYSnapshotQuery ¶ added in v0.4.18
type EpochTrigger ¶
type FindEpochsQuery ¶ added in v0.6.0
type FindNodesQuery ¶
type FindNodesQuery struct { NodeAddresses []common.Address Status *NodeStatus Version *NodeVersion Cursor *string Limit *int OrderByScore bool }
type Node ¶
type Node struct { ID *big.Int `json:"id"` Address common.Address `json:"address"` Name string `json:"name"` Description string `json:"description"` TaxRateBasisPoints *uint64 `json:"tax_rate_basis_points"` HideTaxRate bool `json:"-"` IsPublicGood bool `json:"is_public_good"` OperationPoolTokens string `json:"operation_pool_tokens"` StakingPoolTokens string `json:"staking_pool_tokens"` SlashedTokens string `json:"slashed_tokens"` Alpha bool `json:"alpha"` Endpoint string `json:"-"` Stream json.RawMessage `json:"-"` Config json.RawMessage `json:"-"` Status NodeStatus `json:"status"` LastHeartbeatTimestamp int64 `json:"last_heartbeat"` Location []*NodeLocation `json:"location"` Avatar *l2.ChipsTokenMetadata `json:"avatar"` APY decimal.Decimal `json:"apy"` ActiveScore decimal.Decimal `json:"active_score"` ReliabilityScore decimal.Decimal `json:"reliability_score"` Version string `json:"version"` AccessToken string `json:"-"` CreatedAt int64 `json:"created_at"` }
type NodeAPYSnapshot ¶ added in v0.4.18
type NodeAPYSnapshotQuery ¶ added in v0.4.18
type NodeCreatedMetadata ¶
type NodeEvent ¶
type NodeEvent struct { TransactionHash common.Hash `json:"transaction_hash"` TransactionIndex uint `json:"transaction_index"` NodeID *big.Int `json:"node_id"` AddressFrom common.Address `json:"address_from"` AddressTo common.Address `json:"address_to"` Type NodeEventType `json:"type"` LogIndex uint `json:"log_index"` ChainID uint64 `json:"chain_id"` BlockHash common.Hash `json:"block_hash"` BlockNumber *big.Int `json:"block_number"` BlockTimestamp int64 `json:"block_timestamp"` Metadata NodeEventMetadata `json:"metadata"` Finalized bool `json:"finalized"` }
type NodeEventMetadata ¶
type NodeEventMetadata struct { NodeCreatedMetadata *NodeCreatedMetadata `json:"node_created,omitempty"` NodeUpdatedMetadata *NodeUpdatedMetadata `json:"node_updated,omitempty"` NodeUpdated2PublicGoodMetadata *NodeUpdated2PublicGoodMetadata `json:"node_updated_to_public_good,omitempty"` }
type NodeEventType ¶
type NodeEventType string
const ( NodeEventNodeCreated NodeEventType = "nodeCreated" NodeEventNodeUpdated NodeEventType = "nodeUpdated" )
type NodeEventsQuery ¶ added in v0.5.22
type NodeInvalidResponse ¶ added in v0.4.11
type NodeInvalidResponse struct { ID uint64 `json:"id"` EpochID uint64 `json:"epoch_id"` Type NodeInvalidResponseType `json:"type"` Request string `json:"request"` VerifierNodes []common.Address `json:"verifier_nodes"` VerifierResponse json.RawMessage `json:"verifier_response"` Node common.Address `json:"node"` Response json.RawMessage `json:"response"` CreatedAt int64 `json:"created_at"` }
NodeInvalidResponse records an alleged invalid response of a Node A group of Nodes are selected as verifiers to verify the response returned by a Node The response (with all responses from all verifiers) is saved in the database pending challenge by the penalized Node
type NodeInvalidResponseType ¶ added in v0.4.11
type NodeInvalidResponseType int64
const ( // NodeInvalidResponseTypeInconsistent when the Node's response differs from the majority of verifiers NodeInvalidResponseTypeInconsistent NodeInvalidResponseType = iota // inconsistent // NodeInvalidResponseTypeError when the Node returns an error NodeInvalidResponseTypeError // error )
func NodeInvalidResponseTypeString ¶ added in v0.4.11
func NodeInvalidResponseTypeString(s string) (NodeInvalidResponseType, error)
NodeInvalidResponseTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NodeInvalidResponseTypeValues ¶ added in v0.4.11
func NodeInvalidResponseTypeValues() []NodeInvalidResponseType
NodeInvalidResponseTypeValues returns all values of the enum
func (NodeInvalidResponseType) IsANodeInvalidResponseType ¶ added in v0.4.11
func (i NodeInvalidResponseType) IsANodeInvalidResponseType() bool
IsANodeInvalidResponseType returns "true" if the value is listed in the enum definition. "false" otherwise
func (NodeInvalidResponseType) MarshalJSON ¶ added in v0.4.11
func (i NodeInvalidResponseType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for NodeInvalidResponseType
func (NodeInvalidResponseType) MarshalYAML ¶ added in v0.4.11
func (i NodeInvalidResponseType) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for NodeInvalidResponseType
func (*NodeInvalidResponseType) Scan ¶ added in v0.4.11
func (i *NodeInvalidResponseType) Scan(value interface{}) error
func (NodeInvalidResponseType) String ¶ added in v0.4.11
func (i NodeInvalidResponseType) String() string
func (*NodeInvalidResponseType) UnmarshalJSON ¶ added in v0.4.11
func (i *NodeInvalidResponseType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for NodeInvalidResponseType
func (*NodeInvalidResponseType) UnmarshalYAML ¶ added in v0.4.11
func (i *NodeInvalidResponseType) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for NodeInvalidResponseType
func (NodeInvalidResponseType) Value ¶ added in v0.4.11
func (i NodeInvalidResponseType) Value() (driver.Value, error)
func (NodeInvalidResponseType) Values ¶ added in v0.4.11
func (NodeInvalidResponseType) Values() []string
type NodeLocation ¶ added in v0.4.4
type NodeSnapshot ¶
type NodeSnapshotExporter ¶
type NodeSnapshotExporter interface {
Export() (*NodeSnapshot, error)
}
type NodeSnapshotImporter ¶
type NodeSnapshotImporter interface {
Import(nodeSnapshot NodeSnapshot) error
}
type NodeSnapshotTransformer ¶
type NodeSnapshotTransformer interface { NodeSnapshotImporter NodeSnapshotExporter }
type NodeStatus ¶
type NodeStatus int64
const ( // NodeStatusRegistered // Node has been registered but does not meet the minimum requirements to be enter NodeStatusOnline. // Possible reasons: // - Node is not reachable by the Network. // - Node Operator has not deposited the minimum amount of tokens required. NodeStatusRegistered NodeStatus = iota // registered // NodeStatusOnline // Node is online and fully operational. NodeStatusOnline // online // NodeStatusOffline // Node was previously in NodeStatusOnline, but is currently offline. // Possible reasons: // - [Alpha only] Node missed a heartbeat. // - Node was slashed in the previous epoch, and was kicked out of the Network, the Operator did not acknowledge the slash and rejoin the Network. // - Node did not perform the mandatory upgrade before the deadline required by the Network. NodeStatusOffline // offline // NodeStatusExited // Node was previously in NodeStatusOnline, but is not anymore. // Possible reasons: // - Node announced its intention to leave the Network and gracefully exited after the mandatory waiting period. // - Node has been offline for a long time and is considered as exited. NodeStatusExited // exited // NodeStatusSlashed // Node was slashed in the current epoch, and was kicked out of the Network. NodeStatusSlashed // slashed // NodeStatusExiting // Node announced its intention to leave the Network, and is now in the mandatory waiting period. NodeStatusExiting // exiting )
func NodeStatusString ¶
func NodeStatusString(s string) (NodeStatus, error)
NodeStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NodeStatusValues ¶
func NodeStatusValues() []NodeStatus
NodeStatusValues returns all values of the enum
func (NodeStatus) IsANodeStatus ¶
func (i NodeStatus) IsANodeStatus() bool
IsANodeStatus returns "true" if the value is listed in the enum definition. "false" otherwise
func (NodeStatus) MarshalJSON ¶
func (i NodeStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for NodeStatus
func (NodeStatus) MarshalYAML ¶
func (i NodeStatus) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for NodeStatus
func (*NodeStatus) Scan ¶
func (i *NodeStatus) Scan(value interface{}) error
func (NodeStatus) String ¶
func (i NodeStatus) String() string
func (*NodeStatus) UnmarshalJSON ¶
func (i *NodeStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for NodeStatus
func (*NodeStatus) UnmarshalYAML ¶
func (i *NodeStatus) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for NodeStatus
func (NodeStatus) Values ¶
func (NodeStatus) Values() []string
type NodeUpdated2PublicGoodMetadata ¶ added in v0.4.18
type NodeUpdatedMetadata ¶ added in v0.4.18
type NodeVersion ¶ added in v0.6.18
type NodeVersion int
const ( // NodeVersionAlpha // Nodes in the alpha phase of the network will receive staking rewards, but they do not actually contribute to the information network. NodeVersionAlpha NodeVersion = iota // alpha // NodeVersionBeta // Nodes in the beta phase of the network do not require staking and will not receive rewards, but they do contribute to the information network and are referred to as public good nodes. NodeVersionBeta // beta // NodeVersionProduction // Nodes in the production phase of the network are required to contribute to the information network. All nodes, except for public good nodes that do not require staking, will receive staking and operation rewards. // Upon entering the production phase, nodes from both the alpha and beta phases are required to upgrade to production node version. NodeVersionProduction // production )
func NodeVersionString ¶ added in v0.6.18
func NodeVersionString(s string) (NodeVersion, error)
NodeVersionString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NodeVersionValues ¶ added in v0.6.18
func NodeVersionValues() []NodeVersion
NodeVersionValues returns all values of the enum
func (NodeVersion) IsANodeVersion ¶ added in v0.6.18
func (i NodeVersion) IsANodeVersion() bool
IsANodeVersion returns "true" if the value is listed in the enum definition. "false" otherwise
func (NodeVersion) MarshalJSON ¶ added in v0.6.18
func (i NodeVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for NodeVersion
func (NodeVersion) MarshalYAML ¶ added in v0.6.18
func (i NodeVersion) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for NodeVersion
func (*NodeVersion) Scan ¶ added in v0.6.18
func (i *NodeVersion) Scan(value interface{}) error
func (NodeVersion) String ¶ added in v0.6.18
func (i NodeVersion) String() string
func (*NodeVersion) UnmarshalJSON ¶ added in v0.6.18
func (i *NodeVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for NodeVersion
func (*NodeVersion) UnmarshalYAML ¶ added in v0.6.18
func (i *NodeVersion) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for NodeVersion
func (NodeVersion) Values ¶ added in v0.6.18
func (NodeVersion) Values() []string
type OperatorProfitSnapshot ¶
type RewardedNode ¶ added in v0.4.9
type RewardedNode struct { EpochID uint64 `json:"epoch_id"` Index int `json:"index"` TransactionHash common.Hash `json:"transaction_hash"` NodeAddress common.Address `json:"node_address"` OperationRewards decimal.Decimal `json:"operation_rewards"` StakingRewards decimal.Decimal `json:"staking_rewards"` TaxCollected decimal.Decimal `json:"tax_collected"` RequestCount decimal.Decimal `json:"request_count"` }
type SettlementData ¶
type StakeChip ¶
type StakeChip struct { ID *big.Int `json:"id"` Owner common.Address `json:"owner"` Node common.Address `json:"node"` Value decimal.Decimal `json:"value"` LatestValue decimal.Decimal `json:"latest_value,omitempty"` Metadata json.RawMessage `json:"metadata"` BlockNumber *big.Int `json:"block_number"` BlockTimestamp uint64 `json:"block_timestamp"` Finalized bool `json:"finalized"` }
type StakeChipExporter ¶
type StakeChipImporter ¶
type StakeChipQuery ¶
type StakeChipTransformer ¶
type StakeChipTransformer interface { StakeChipImporter StakeChipExporter }
type StakeChipsQuery ¶
type StakeEvent ¶
type StakeEvent struct { ID common.Hash `json:"id"` Type StakeEventType `json:"type"` TransactionHash common.Hash `json:"transaction_hash"` TransactionIndex uint `json:"transaction_index"` TransactionStatus uint64 `json:"transaction_status"` LogIndex uint `json:"log_index"` Metadata json.RawMessage `json:"metadata"` BlockHash common.Hash `json:"block_hash"` BlockNumber *big.Int `json:"block_number"` BlockTimestamp time.Time `json:"block_timestamp"` Finalized bool }
type StakeEventChipsMergedMetadata ¶ added in v0.6.5
type StakeEventExporter ¶
type StakeEventExporter interface {
Export() (*StakeEvent, error)
}
type StakeEventImporter ¶
type StakeEventImporter interface {
Import(stakeEvent StakeEvent) error
}
type StakeEventQuery ¶
type StakeEventTransformer ¶
type StakeEventTransformer interface { StakeEventImporter StakeEventExporter }
type StakeEventType ¶
type StakeEventType string
const ( StakeEventTypeDepositDeposited StakeEventType = "deposited" StakeEventTypeWithdrawRequested StakeEventType = "withdraw_requested" StakeEventTypeWithdrawClaimed StakeEventType = "withdraw_claimed" StakeEventTypeStakeStaked StakeEventType = "staked" StakeEventTypeChipsMerged = "merged" StakeEventTypeUnstakeRequested StakeEventType = "unstake_requested" StakeEventTypeUnstakeClaimed StakeEventType = "unstake_claimed" )
type StakeEventsQuery ¶
type StakeRecentCount ¶
type StakeSnapshotTransformer ¶
type StakeSnapshotTransformer interface { StakerCountSnapshotImporter StakerCountSnapshotExporter }
type StakeStaker ¶ added in v0.6.0
type StakeStaker struct { Address common.Address `json:"address"` TotalStakedNodes uint64 `json:"total_staked_nodes"` TotalChips uint64 `json:"total_chips"` TotalStakedTokens decimal.Decimal `json:"total_staked_tokens"` CurrentStakedTokens decimal.Decimal `json:"current_staked_tokens"` // Exclude the staked tokens that are already withdrawn. }
type StakeStaking ¶
type StakeStakingChips ¶
type StakeStakingExporter ¶ added in v0.5.27
type StakeStakingExporter interface {
Export() (*StakeStaking, error)
}
type StakeStakingTransformer ¶ added in v0.5.27
type StakeStakingTransformer interface { StakeStakingExporter }
type StakeStakingsQuery ¶
type StakeTransaction ¶
type StakeTransactionExporter ¶
type StakeTransactionExporter interface {
Export() (*StakeTransaction, error)
}
type StakeTransactionImporter ¶
type StakeTransactionImporter interface {
Import(stakeTransaction StakeTransaction) error
}
type StakeTransactionQuery ¶
type StakeTransactionTransformer ¶
type StakeTransactionTransformer interface { StakeTransactionImporter StakeTransactionExporter }
type StakeTransactionType ¶
type StakeTransactionType string
const ( StakeTransactionTypeDeposit StakeTransactionType = "deposit" StakeTransactionTypeWithdraw StakeTransactionType = "withdraw" StakeTransactionTypeStake StakeTransactionType = "stake" StakeTransactionTypeUnstake StakeTransactionType = "unstake" StakeTransactionTypeMergeChips StakeTransactionType = "merge_chips" )
type StakeTransactionsQuery ¶
type StakerCountSnapshot ¶
type StakerCountSnapshotExporter ¶
type StakerCountSnapshotExporter interface {
Export() (*StakerCountSnapshot, error)
}
type StakerCountSnapshotImporter ¶
type StakerCountSnapshotImporter interface {
Import(stakeSnapshot StakerCountSnapshot) error
}
type StakerProfitSnapshot ¶
type StakerProfitSnapshot struct { Date time.Time `json:"date"` EpochID uint64 `json:"epoch_id"` OwnerAddress common.Address `json:"owner_address"` TotalChipAmount decimal.Decimal `json:"total_chip_amount"` TotalChipValue decimal.Decimal `json:"total_chip_value"` ID uint64 `json:"-"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` }
type StakerProfitSnapshotsQuery ¶
type StakerProfitSnapshotsQuery struct { Cursor *string `json:"cursor"` Limit *int `json:"limit"` OwnerAddress *common.Address `json:"owner_address"` EpochID *uint64 `json:"epoch_id"` EpochIDs []uint64 `json:"epoch_ids"` Dates []time.Time `json:"dates"` BeforeDate *time.Time `json:"before_date"` AfterDate *time.Time `json:"after_date"` }
type Stat ¶
type Stat struct { Address common.Address `json:"address"` Endpoint string `json:"-"` AccessToken string `json:"-"` Score float64 `json:"score"` IsPublicGood bool `json:"is_public_good"` IsFullNode bool `json:"is_full_node"` IsRssNode bool `json:"is_rss_node"` Staking float64 `json:"staking"` Epoch int64 `json:"epoch"` TotalRequest int64 `json:"total_request"` EpochRequest int64 `json:"epoch_request"` EpochInvalidRequest int64 `json:"epoch_invalid_request"` DecentralizedNetwork int `json:"decentralized_network"` FederatedNetwork int `json:"federated_network"` Indexer int `json:"indexer"` ResetAt time.Time `json:"reset_at"` }
type StatQuery ¶
type StatQuery struct { Address *common.Address `query:"address" form:"address,omitempty"` Addresses []common.Address `query:"addresses" form:"addresses,omitempty"` IsFullNode *bool `query:"is_full_node" form:"is_full_node,omitempty"` IsRssNode *bool `query:"is_rss_node" form:"is_rss_node,omitempty"` PointsOrder *string `query:"points_order" form:"points_order,omitempty"` ValidRequest *int `query:"valid_request" form:"valid_request,omitempty"` Limit *int `query:"limit" form:"limit,omitempty"` Cursor *string `query:"cursor" form:"cursor,omitempty"` }
Source Files ¶
- average_tax_rate_submission.go
- bridge_event.go
- bridge_transaction.go
- checkpoint.go
- epoch.go
- epoch_apy_snapshot.go
- epoch_trigger.go
- node.go
- node_apy_snapshot.go
- node_event.go
- node_indexer.go
- node_invalid_response.go
- node_invalid_response_type_string.go
- node_snapshot.go
- node_stat.go
- node_status_string.go
- node_version_string.go
- operator_profit_snapshot.go
- stake_chip.go
- stake_event.go
- stake_staker.go
- stake_staking.go
- stake_transaction.go
- staker_count_snapshot.go
- staker_profit_snapshot.go