package
0.2501.0
Repository: https://github.com/oasisprotocol/oasis-core.git
Documentation: pkg.go.dev

# Packages

Package token implements the token-related parts of the staking API.

# Functions

GlobalStakeThreshold creates a new global StakeThreshold.
GlobalStakeThresholds creates a new list of global StakeThresholds.
NewAddEscrowTx creates a new add escrow transaction.
NewAddress creates a new address from the given public key, i.e.
NewAllowTx creates a new beneficiary allowance configuration transaction.
NewAmendCommissionScheduleTx creates a new amend commission schedule transaction.
NewBurnTx creates a new burn transaction.
NewClient creates a new gRPC staking client.
NewModuleAddress creates a new module address for the given module and address kind.
NewReclaimEscrowTx creates a new reclaim escrow transaction.
NewReservedAddress creates a new reserved address from the given public key or panics.
NewRuntimeAddress creates a new runtime address for the given runtime ID.
NewTransferTx creates a new transfer transaction.
NewWithdrawTx creates a new beneficiary allowance configuration transaction.
PrettyPrintCommissionRatePercentage returns the string representing the commission rate (bound) in percentage for the given commission rate (bound) numerator.
PrettyPrintCommissionScheduleIndexInfixes returns two infixes: - indexInfix holds the infix to use to pretty print the given commission schedule rate (bound) index - emptyInfix holds the infix to use to pretty print an empty string of an equivalent length.
RegisterService registers a new staking backend service with the given gRPC server.
SanityCheckAccount examines an account's balances.
SanityCheckAccountShares examines an account's share pools.
SanityCheckDebondingDelegations examines an account's debonding delegations.
SanityCheckDelegations examines an account's delegations.
SanityCheckStake compares generated escrow accounts with actual ones.

# Constants

GasOpAddEscrow is the gas operation identifier for add escrow.
GasOpAllow is the gas operation identifier for allow.
GasOpAmendCommissionSchedule is the gas operation identifier for amend commission schedule.
GasOpBurn is the gas operation identifier for burn.
GasOpReclaimEscrow is the gas operation identifier for reclaim escrow.
GasOpTransfer is the gas operation identifier for transfer.
GasOpWithdraw is the gas operation identifier for withdraw.
HookKindWithdraw is the hook kind invoked during withdrawals.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
nolint: revive.
LogEventGeneralAdjustment is a log event value that signals adjustment of an account's general balance due to a roothash message.
ModuleName is a unique module name for the staking module.
SlashBeaconInvalidCommit is slashing due to invalid commit behavior.
SlashBeaconInvalidReveal is slashing due to invalid reveal behavior.
SlashBeaconNonparticipation is slashing due to nonparticipation.
SlashConsensusEquivocation is slashing due to equivocation.
SlashConsensusEquivocationName is the string representation of SlashConsensusEquivocation.
SlashConsensusLightClientAttack is slashing due to light client attacks.
SlashConsensusLightClientAttackName is the string representation of SlashConsensusLightClientAttack.
SlashRuntimeEquivocation is slashing due to signing two different executor commits or proposed batches for the same round.
SlashRuntimeEquivocationName is the string representation of SlashRuntimeEquivocation.
SlashRuntimeIncorrectResults is slashing due to submission of incorrect results in runtime executor commitments.
SlashRuntimeIncorrectResultsName is the string representation of SlashRuntimeIncorrectResultsName.
SlashRuntimeLiveness is slashing due to not doing the required work.
SlashRuntimeLivenessName is the string representation of SlashRuntimeLiveness.

# Variables

AddressBech32HRP is the unique human readable part of Bech32 encoded staking account addresses.
AddressModuleV0Context is the unique context for v0 module account addresses.
AddressRuntimeV0Context is the unique context for v0 runtime account addresses.
AddressV0Context is the unique context for v0 staking account addresses.
BurnAddress is the burn address.
CommissionRateDenominator is the denominator for the commission rate.
CommonPoolAddress is the common pool address.
ErrAllowanceGreaterThanSupply is the error returned when the allowance amount exceeds the total supply value.
ErrBalanceTooLow is the error returned when an account's balance is below the minimum allowed amount.
ErrForbidden is the error returned when an operation is forbidden by policy.
ErrInsufficientBalance is the error returned when an operation fails due to insufficient balance.
ErrInsufficientStake is the error returned when an operation fails due to insufficient stake.
ErrInvalidArgument is the error returned on malformed arguments.
ErrInvalidSignature is the error returned on invalid signature.
ErrInvalidThreshold is the error returned when an invalid threshold kind is specified in a query.
ErrTooManyAllowances is the error returned when the number of allowances per account would exceed the maximum allowed number.
ErrUnderMinDelegationAmount is the error returned when the given escrow amount is lower than the minimum delegation amount specified in the consensus parameters.
ErrUnderMinTransferAmount is the error returned when the given transfer or burn or withdrawal amount is lower than the minimum transfer amount specified in the consensus parameters.
FeeAccumulatorAddress is the per-block fee accumulator address.
GovernanceDepositsAddress is the governance deposits address.
MethodAddEscrow is the method name for escrows.
MethodAllow is the method name for setting a beneficiary allowance.
MethodAmendCommissionSchedule is the method name for amending commission schedules.
MethodBurn is the method name for burns.
MethodReclaimEscrow is the method name for escrow reclamations.
Methods is the list of all methods supported by the staking backend.
MethodTransfer is the method name for transfers.
MethodWithdraw is the method name for.
RewardAmountDenominator is the denominator for the reward rate.
ThresholdKinds are the valid threshold kinds.

# Structs

Account is an entry in the staking ledger.
AddEscrowEvent is the event emitted when stake is transferred into an escrow account.
AddEscrowResult is the result of add escrow.
Allow is a beneficiary allowance configuration.
AllowanceChangeEvent is the event emitted when allowance is changed for a beneficiary.
AllowanceQuery is an allowance query.
AmendCommissionSchedule is an amendment to a commission schedule.
Burn is a stake burn (destruction).
BurnEvent is the event emitted when stake is destroyed via a call to Burn.
Client is a gRPC staking client.
CommissionRateBoundStep sets a commission rate bound (i.e.
CommissionRateStep sets a commission rate and its starting time.
CommissionSchedule defines a list of commission rates and commission rate bounds and their starting times.
CommissionScheduleRules controls how commission schedule rates and rate bounds are allowed to be changed.
ConsensusParameterChanges are allowed staking consensus parameter changes.
ConsensusParameters are the staking consensus parameters.
DebondingDelegation is a debonding delegation descriptor.
DebondingDelegationInfo is a debonding delegation descriptor with additional information.
DebondingStartEscrowEvent is the event emitted when the debonding process has started and the given number of active shares have been moved into the debonding pool and started debonding.
Delegation is a delegation descriptor.
DelegationInfo is a delegation descriptor with additional information.
Escrow is a stake escrow.
EscrowAccount is an escrow account the balance of which is subject to special delegation provisions and a debonding period.
EscrowEvent is an escrow event.
Event signifies a staking event, returned via GetEvents.
GeneralAccount is a general-purpose account.
Genesis is the initial staking state for use in the genesis block.
HookDestination describes a hook destination.
OwnerQuery is an owner query.
ReclaimEscrow is a reclamation of stake from an escrow.
ReclaimEscrowEvent is the event emitted when stake is reclaimed from an escrow account back into owner's general account.
ReclaimEscrowResult is the result of reclaim escrow.
RewardStep is one of the time periods in the reward schedule.
SharePool is a combined balance of several entries, the relative sizes of which are tracked through shares.
Slash is the per-reason slashing configuration.
StakeAccumulator is a per-escrow-account stake accumulator.
StakeThreshold is a stake threshold as used in the stake accumulator.
TakeEscrowEvent is the event emitted when stake is taken from an escrow account (i.e.
ThresholdQuery is a threshold query.
Transfer is a stake transfer.
TransferEvent is the event emitted when stake is transferred, either by a call to Transfer or Withdraw.
TransferResult is the result of staking transfer.
Withdraw is a withdrawal from an account.
WithdrawResult is the result of withdraw.

# Interfaces

Backend is a staking implementation.

# Type aliases

Address is the staking account address.
HookKind is an account hook kind.
SlashReason is the reason why a node was slashed.
StakeClaim is a unique stake claim identifier.
ThresholdKind is the kind of staking threshold.