Documentation ¶
Index ¶
- Variables
- func BindFlagsLoadViper(cmd *cobra.Command, _ []string) error
- func ConvertValidatorAddressToBech32String(address types.Address) string
- func ConvertValidatorPubKeyToBech32String(pubKey tmcrypto.PubKey) (string, error)
- func DefaultConfigSetup(cfg Config, sdkConfig *sdk.Config)
- func GetConfigFilePath() string
- func Write(cfg Config, path string) error
- type Account
- type AccountKeyList
- type Block
- type BlockTime
- type CobraCmdFunc
- type Collection
- type CommitSig
- type Config
- type ConfigParser
- type CosmosConfig
- type CurrentTable
- type CutPercentage
- type DatabaseConfig
- type DelegatorAccount
- type DelegatorInfo
- type DelegatorInfoFromAddress
- type DelegatorNodeInfo
- type EncodingConfigBuilder
- type Event
- type Genesis
- type GrpcConfig
- type HeightQueue
- type LockedAccount
- type LockedAccountBalance
- type LockedAccountDelegator
- type LoggingConfig
- type Message
- type NodeCommittedTokens
- type NodeInfoFromAddress
- type NodeTotalCommitment
- type NodeTotalCommitmentWithoutDelegators
- type NodeUnstakingTokens
- type ParsingConfig
- type ProposedTable
- type PruningConfig
- type RPCConfig
- type SdkConfigSetup
- type StakeRequirements
- type StakerAccount
- type StakerNodeId
- type StakerNodeInfo
- type StakingTable
- type TelemetryConfig
- type Token
- type TokenPrice
- type TokenUnit
- type TotalStake
- type TotalStakeByType
- type TransactionResult
- type Tx
- type Txs
- type Validator
- type WeeklyPayout
Constants ¶
This section is empty.
Variables ¶
var (
HomePath = ""
)
Functions ¶
func BindFlagsLoadViper ¶
BindFlagsLoadViper binds all flags and read the config into viper
func ConvertValidatorAddressToBech32String ¶
ConvertValidatorAddressToBech32String converts the given validator address to its Bech32 string representation
func ConvertValidatorPubKeyToBech32String ¶
ConvertValidatorPubKeyToBech32String converts the given pubKey to a Bech32 string
func DefaultConfigSetup ¶
DefaultConfigSetup represents a handy implementation of SdkConfigSetup that simply setups the prefix inside the configuration
func GetConfigFilePath ¶
func GetConfigFilePath() string
GetConfigFilePath returns the path to the configuration file given the executable name
Types ¶
type Account ¶
type Account struct { Address string Balance uint64 Code []byte Keys []AccountKeyList Contracts []byte }
func NewAccount ¶
type AccountKeyList ¶
type Block ¶
type Block struct { Height int64 Hash string TxNum int TotalGas uint64 ProposerAddress string Timestamp time.Time }
Block contains the data of a single chain block
func NewBlock ¶
func NewBlock( height int64, hash string, txNum int, totalGas uint64, proposerAddress string, timestamp time.Time, ) *Block
NewBlock allows to build a new Block instance
func NewBlockFromTmBlock ¶
func NewBlockFromTmBlock(blk *tmctypes.ResultBlock, totalGas uint64) *Block
NewBlockFromTmBlock builds a new Block instance from a given ResultBlock object
type BlockTime ¶
func NewBlockTime ¶
BlockTime allows to build a new BlockTime
type CobraCmdFunc ¶
CobraCmdFunc represents a cobra command function
func ConcatCobraCmdFuncs ¶
func ConcatCobraCmdFuncs(fs ...CobraCmdFunc) CobraCmdFunc
ConcatCobraCmdFuncs returns a single function that calls each argument function in sequence RunE, PreRunE, PersistentPreRunE, etc. all have this same signature
type Collection ¶
func NewCollection ¶
func NewCollection( height uint64, id string, processed bool, transactionIds []flow.Identifier) Collection
Collection allows to build a new Collection
func (Collection) Equal ¶
func (v Collection) Equal(w Collection) bool
Equal tells whether v and w represent the same rows
type CommitSig ¶
type CommitSig struct { Height int64 ValidatorAddress string VotingPower int64 ProposerPriority int64 Timestamp time.Time }
CommitSig contains the data of a single validator commit signature
type Config ¶
type Config interface { GetRPCConfig() RPCConfig GetGrpcConfig() GrpcConfig GetCosmosConfig() CosmosConfig GetDatabaseConfig() DatabaseConfig GetLoggingConfig() LoggingConfig GetParsingConfig() ParsingConfig GetPruningConfig() PruningConfig GetTelemetryConfig() TelemetryConfig }
Config represents the configuration to run flowjuno
var ( // Cfg represents the configuration to be used during the execution Cfg Config )
func DefaultConfigParser ¶
DefaultConfigParser attempts to read and parse a flowjuno config from the given string bytes. An error reading or parsing the config results in a panic.
func NewConfig ¶
func NewConfig( rpcConfig RPCConfig, grpConfig GrpcConfig, cosmosConfig CosmosConfig, dbConfig DatabaseConfig, loggingConfig LoggingConfig, parsingConfig ParsingConfig, pruningConfig PruningConfig, telemetryConfig TelemetryConfig, ) Config
NewConfig builds a new Config instance
type ConfigParser ¶
ConfigParser represents a function that allows to parse a file contents as a Config object
type CosmosConfig ¶
CosmosConfig contains the data to configure the CosmosConfig SDK
func NewCosmosConfig ¶
func NewCosmosConfig(prefix string, modules []string, genesisHeight uint64) CosmosConfig
NewCosmosConfig returns a new CosmosConfig instance
type CurrentTable ¶
func NewCurrentTable ¶
func NewCurrentTable( height int64, table []string) CurrentTable
CurrentTable allows to build a new CurrentTable
type CutPercentage ¶
func NewCutPercentage ¶
func NewCutPercentage( cutPercentage uint64, height int64) CutPercentage
CutPercentage allows to build a new CutPercentage
type DatabaseConfig ¶
type DatabaseConfig interface { GetName() string GetHost() string GetPort() int64 GetUser() string GetPassword() string GetSSLMode() string GetSchema() string GetMaxOpenConnections() int GetMaxIdleConnections() int GetPartitionSize() int }
DatabaseConfig represents a generic database configuration
type DelegatorAccount ¶
func NewDelegatorAccount ¶
func NewDelegatorAccount(address string, delegatorId int64, delegatorNodeId string) DelegatorAccount
type DelegatorInfo ¶
type DelegatorInfo struct { DelegatorInfo DelegatorNodeInfo Height uint64 NodeId string DelegatorID uint32 }
func NewDelegatorInfo ¶
func NewDelegatorInfo( delegatorInfo DelegatorNodeInfo, height uint64, nodeId string, delegatorID uint32) DelegatorInfo
DelegatorInfo allows to build a new DelegatorInfo
type DelegatorInfoFromAddress ¶
type DelegatorInfoFromAddress struct { DelegatorInfo DelegatorNodeInfo Height int64 Address string }
func NewDelegatorInfoFromAddress ¶
func NewDelegatorInfoFromAddress( delegatorInfo DelegatorNodeInfo, height int64, address string) DelegatorInfoFromAddress
DelegatorInfoFromAddress allows to build a new DelegatorInfoFromAddress
type DelegatorNodeInfo ¶
type DelegatorNodeInfo struct { Id uint32 NodeID string TokensCommitted uint64 TokensStaked uint64 TokensUnstaking uint64 TokensRewarded uint64 TokensUnstaked uint64 TokensRequestedToUnstake uint64 }
func DelegatorNodeInfoArrayFromCadence ¶
func DelegatorNodeInfoArrayFromCadence(value cadence.Value) ([]DelegatorNodeInfo, error)
func DelegatorNodeInfoFromCadence ¶
func DelegatorNodeInfoFromCadence(value cadence.Value) (DelegatorNodeInfo, error)
func NewDelegatorNodeInfo ¶
func (DelegatorNodeInfo) Equal ¶
func (v DelegatorNodeInfo) Equal(w DelegatorNodeInfo) bool
type EncodingConfigBuilder ¶
type EncodingConfigBuilder func() params.EncodingConfig
EncodingConfigBuilder represents a function that is used to return the proper encoding config.
type Event ¶
type Genesis ¶
Genesis contains the useful information about the genesis
func NewGenesis ¶
NewGenesis allows to build a new Genesis instance
type GrpcConfig ¶
GrpcConfig contains the configuration of the gRPC endpoint
func NewGrpcConfig ¶
func NewGrpcConfig(address string, insecure bool) GrpcConfig
NewGrpcConfig allows to build a new GrpcConfig instance
type HeightQueue ¶
type HeightQueue chan int64
HeightQueue is a simple type alias for a (buffered) channel of block heights.
func NewQueue ¶
func NewQueue(size int) HeightQueue
type LockedAccount ¶
func NewLockedAccount ¶
func NewLockedAccount( address string, lockedAddress string, ) LockedAccount
LockedAccount allows to build a new LockedAccount
type LockedAccountBalance ¶
type LockedAccountBalance struct { LockedAddress string Balance uint64 UnlockLimit uint64 Height uint64 }
func NewLockedAccountBalance ¶
func NewLockedAccountBalance(lockedAddress string, balance, unlockLimit uint64, height uint64) LockedAccountBalance
type LockedAccountDelegator ¶
func NewLockedAccountDelegator ¶
func NewLockedAccountDelegator(lockedAddress string, nodeId string, delegatorId uint64) LockedAccountDelegator
LockedAccount allows to build a new LockedAccount
type LoggingConfig ¶
LoggingConfig represents the configuration for the logging part
func NewLoggingConfig ¶
func NewLoggingConfig(level, format string) LoggingConfig
NewLoggingConfig returns a new LoggingConfig instance
type NodeCommittedTokens ¶
func NewNodeCommittedTokens ¶
func NewNodeCommittedTokens( nodeId string, committedTokens uint64, height int64) NodeCommittedTokens
NodeCommittedTokens allows to build a new NodeCommittedTokens
type NodeInfoFromAddress ¶
type NodeInfoFromAddress struct { Address string NodeInfo StakerNodeInfo Height int64 }
func NewNodeInfoFromAddress ¶
func NewNodeInfoFromAddress( address string, nodeInfo StakerNodeInfo, height int64) NodeInfoFromAddress
NodeInfoFromNodeIDs allows to build a new NodeInfoFromNodeIDs
type NodeTotalCommitment ¶
func NewNodeTotalCommitment ¶
func NewNodeTotalCommitment( nodeId string, totalCommitment uint64, height int64) NodeTotalCommitment
NodeTotalCommitment allows to build a new NodeTotalCommitment
func (NodeTotalCommitment) Equal ¶
func (v NodeTotalCommitment) Equal(w NodeTotalCommitment) bool
Equal tells whether v and w represent the same rows
type NodeTotalCommitmentWithoutDelegators ¶
type NodeTotalCommitmentWithoutDelegators struct { NodeId string TotalCommitmentWithoutDelegators uint64 Height int64 }
func NewNodeTotalCommitmentWithoutDelegators ¶
func NewNodeTotalCommitmentWithoutDelegators( nodeId string, totalCommitmentWithoutDelegators uint64, height int64) NodeTotalCommitmentWithoutDelegators
NodeTotalCommitmentWithoutDelegators allows to build a new NodeTotalCommitmentWithoutDelegators
func (NodeTotalCommitmentWithoutDelegators) Equal ¶
func (v NodeTotalCommitmentWithoutDelegators) Equal(w NodeTotalCommitmentWithoutDelegators) bool
Equal tells whether v and w represent the same rows
type NodeUnstakingTokens ¶
func NewNodeUnstakingTokens ¶
func NewNodeUnstakingTokens( nodeId string, tokenUnstaking uint64, height int64) NodeUnstakingTokens
NodeUnstakingTokens allows to build a new NodeUnstakingTokens
func (NodeUnstakingTokens) Equal ¶
func (v NodeUnstakingTokens) Equal(w NodeUnstakingTokens) bool
Equal tells whether v and w represent the same rows
type ParsingConfig ¶
type ParsingConfig interface { GetWorkers() int64 ShouldParseNewBlocks() bool ShouldParseOldBlocks() bool ShouldParseGenesis() bool GetGenesisFilePath() string GetStartHeight() int64 UseFastSync() bool }
ParsingConfig represents the configuration of the parsing
func NewParsingConfig ¶
type ProposedTable ¶
func NewProposedTable ¶
func NewProposedTable( height int64, proposedTable []string) ProposedTable
ProposedTable allows to build a new ProposedTable
type PruningConfig ¶
PruningConfig contains the configuration of the pruning strategy
func NewPruningConfig ¶
func NewPruningConfig(keepRecent, keepEvery, interval int64) PruningConfig
NewPruningConfig returns a new PruningConfig
type RPCConfig ¶
RPCConfig contains the configuration of the RPC endpoint
func NewRPCConfig ¶
NewRPCConfig allows to build a new RPCConfig instance
type SdkConfigSetup ¶
SdkConfigSetup represents a method that allows to customize the given sdk.Config. This should be used to set custom Bech32 addresses prefixes and other app-related configurations.
type StakeRequirements ¶
func NewStakeRequirements ¶
func NewStakeRequirements( height int64, role uint8, requirement uint64) StakeRequirements
StakeRequirements allows to build a new StakeRequirements
func (StakeRequirements) Equal ¶
func (v StakeRequirements) Equal(w StakeRequirements) bool
Equal tells whether v and w represent the same rows
type StakerAccount ¶
type StakerAccount struct { Address string StakerNodeId string StakerNodeInfo StakerNodeInfo }
func NewStakerAccount ¶
func NewStakerAccount(address, stakerNodeId string, stakerNodeInfo StakerNodeInfo) StakerAccount
type StakerNodeId ¶
func NewStakerNodeId ¶
func NewStakerNodeId( address string, nodeId string) StakerNodeId
StakerNodeId allows to build a new StakerNodeId
func (StakerNodeId) Equal ¶
func (v StakerNodeId) Equal(w StakerNodeId) bool
Equal tells whether v and w represent the same rows
type StakerNodeInfo ¶
type StakerNodeInfo struct { Id string Role uint8 NetworkingAddress string NetworkingKey string StakingKey string TokensStaked uint64 TokensCommitted uint64 TokensUnstaking uint64 TokensUnstaked uint64 TokensRewarded uint64 Delegators []uint32 DelegatorIDCounter uint32 TokensRequestedToUnstake uint64 InitialWeight uint64 }
func NewStakerNodeInfo ¶
func NewStakerNodeInfo(id string, role uint8, networkingAddress string, networkingKey string, stakingKey string, tokensStaked uint64, tokensCommitted uint64, tokensUnstaking uint64, tokensUnstaked uint64, tokensRewarded uint64, delegators []uint32, delegatorIDCounter uint32, tokensRequestedToUnstake uint64, initialWeight uint64) StakerNodeInfo
func NewStakerNodeInfoArrayFromCadence ¶
func NewStakerNodeInfoArrayFromCadence(value cadence.Value) ([]StakerNodeInfo, error)
func NewStakerNodeInfoFromCadence ¶
func NewStakerNodeInfoFromCadence(value cadence.Value) (StakerNodeInfo, error)
NewNodeOperatorInfoFromInterface create a NodeOperatorInfo from []interface{}
func (StakerNodeInfo) Equals ¶
func (w StakerNodeInfo) Equals(v StakerNodeInfo) bool
type StakingTable ¶
func NewStakingTable ¶
func NewStakingTable( height int64, stakingTable []string) StakingTable
StakingTable allows to build a new StakingTable
type TelemetryConfig ¶
PruningConfig contains the configuration of the pruning strategy
func NewTelemetryConfig ¶
func NewTelemetryConfig(enabled bool, port int64) TelemetryConfig
type TokenPrice ¶
TokenPrice represents the price at a given moment in time of a token unit
func NewTokenPrice ¶
NewTokenPrice returns a new TokenPrice instance containing the given data
type TokenUnit ¶
type TokenUnit struct { Denom string `yaml:"denom"` Exponent int `yaml:"exponent"` Aliases []string `yaml:"aliases,omitempty"` PriceID string `yaml:"price_id,omitempty"` }
TokenUnit represents a unit of a token
type TotalStake ¶
func NewTotalStake ¶
func NewTotalStake( height int64, totalStake uint64) TotalStake
TotalStake allows to build a new TotalStake
func (TotalStake) Equal ¶
func (v TotalStake) Equal(w TotalStake) bool
Equal tells whether v and w represent the same rows
type TotalStakeByType ¶
func NewTotalStakeByType ¶
func NewTotalStakeByType( height int64, role int8, totalStake uint64) TotalStakeByType
TotalStake allows to build a new TotalStake
func (TotalStakeByType) Equal ¶
func (v TotalStakeByType) Equal(w TotalStakeByType) bool
Equal tells whether v and w represent the same rows
type TransactionResult ¶
func NewTransactionResult ¶
func NewTransactionResult( transactionId string, status string, error string) TransactionResult
TransactionResult allows to build a new TransactionResult
func (TransactionResult) Equal ¶
func (v TransactionResult) Equal(w TransactionResult) bool
Equal tells whether v and w represent the same rows
type Tx ¶
type Tx struct { Height uint64 TransactionID string //Transaction Details Script []byte Arguments [][]byte ReferenceBlockID string GasLimit uint64 ProposalKey string Payer string Authorizers []string PayloadSignatures []byte EnvelopeSignatures []byte }
func (Tx) Successful ¶
Successful tells whether this tx is successful or not
type Validator ¶
Validator contains the data of a single validator
func NewValidator ¶
NewValidator allows to build a new Validator instance
type WeeklyPayout ¶
func NewWeeklyPayout ¶
func NewWeeklyPayout( height int64, payout uint64) WeeklyPayout
WeeklyPayout allows to build a new WeeklyPayout
func (WeeklyPayout) Equal ¶
func (v WeeklyPayout) Equal(w WeeklyPayout) bool
Equal tells whether v and w represent the same rows