Documentation
¶
Index ¶
- Constants
- Variables
- func CROStrToCoin(cro string) (*big.Int, error)
- func CROToCoin(cro *big.Float) (*big.Int, error)
- func MustCROStrToCoin(cro string) *big.Int
- func MustCROToCoin(cro *big.Float) *big.Int
- type Activity
- type ActivityType
- type Block
- type BlockReward
- type BlockSignature
- type CouncilNode
- type CouncilNodeRepository
- type CouncilNodeUpdate
- type CouncilNodeUpdateType
- type EventType
- type PubKeyType
- type PunishmentKind
- type StakingAccount
- type StakingAccountRepository
- type TransactionOutput
- type TransactionType
- type TxInput
Constants ¶
View Source
const (
COUNCIL_NODE_UPDATE_TYPE_LEFT = iota
)
View Source
const (
MAX_COIN_DECIMALS = 1_0000_0000
)
Variables ¶
View Source
var (
MAX_COIN_DECIMALS_BIGFLOAT = big.NewFloat(MAX_COIN_DECIMALS)
)
Functions ¶
func MustCROStrToCoin ¶
Types ¶
type Activity ¶
type Activity struct {
BlockHeight uint64
Type ActivityType
MaybeTxID *string
MaybeEventPosition *uint32
MaybeFee *big.Int
MaybeTxInputs []TxInput
MaybeOutputCount *uint32
MaybeStakingAccountAddress *string
MaybeStakingAccountNonce *uint64
MaybeBonded *big.Int
MaybeUnbonded *big.Int
MaybeUnbondedFrom *time.Time
MaybeCouncilNodeMeta *CouncilNode
MaybeAffectedCouncilNode *CouncilNode
MaybeJailedUntil *time.Time
MaybePunishmentKind *PunishmentKind
}
type ActivityType ¶
type ActivityType = uint8
const ( ACTIVITY_GENESIS ActivityType = iota ACTIVITY_TRANSFER ACTIVITY_DEPOSIT ACTIVITY_UNBOND ACTIVITY_WITHDRAW ACTIVITY_NODEJOIN ACTIVITY_UNJAIL ACTIVITY_REWARD ACTIVITY_SLASH ACTIVITY_JAIL ACTIVITY_NODEKICKED )
type BlockReward ¶
func (*BlockReward) String ¶
func (reward *BlockReward) String() string
type BlockSignature ¶
type BlockSignature struct {
BlockHeight uint64
CouncilNodeAddress string
Signature string
IsProposer bool
}
func (*BlockSignature) String ¶
func (signature *BlockSignature) String() string
type CouncilNode ¶
type CouncilNode struct {
Id *uint64
Name string
MaybeSecurityContact *string
PubKeyType PubKeyType
PubKey string
Address string
CreatedAtBlockHeight uint64
MaybeLastLeftAtBlockHeight *uint64
}
func (*CouncilNode) String ¶
func (node *CouncilNode) String() string
type CouncilNodeRepository ¶
type CouncilNodeRepository interface {
Store(*CouncilNode) (id uint32, err error)
FindById(id uint32) (*CouncilNode, error)
}
type CouncilNodeUpdate ¶
func (*CouncilNodeUpdate) String ¶
func (update *CouncilNodeUpdate) String() string
type CouncilNodeUpdateType ¶
type CouncilNodeUpdateType = uint8
type PunishmentKind ¶
type PunishmentKind = uint8
const ( PUNISHMENT_KIND_NON_LIVE PunishmentKind = iota PUNISHMENT_KIND_BYZANTINE_FAULT )
type StakingAccount ¶
type StakingAccount struct {
Address string
Nonce uint64
Bonded *big.Int
Unbonded *big.Int
MaybeUnbondedFrom *time.Time
MaybePunishmentKind *PunishmentKind
MaybeJailedUntil *time.Time
MaybeCurrentCouncilNode *CouncilNode
}
func (*StakingAccount) String ¶
func (account *StakingAccount) String() string
type StakingAccountRepository ¶
type StakingAccountRepository interface {
Store(*StakingAccount) error
FindByAddress(string) (*StakingAccount, error)
}
type TransactionOutput ¶
func (*TransactionOutput) String ¶
func (output *TransactionOutput) String() string
type TransactionType ¶
type TransactionType = int8
const ( TRANSACTION_TRANSFER TransactionType = iota TRANSACTION_DEPOSIT TRANSACTION_UNBOND TRANSACTION_WITHDRAW TRANSACTION_NODEJOIN TRANSACTION_UNJAIL )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package adapter is an alias of the interface concept in domain driven development.
|
Package adapter is an alias of the interface concept in domain driven development. |
|
cmd
|
|
|
chainindex
command
|
|
|
internal
|
|
|
test
|
|
Click to show internal directories.
Click to hide internal directories.