package
0.0.0-20250128221834-b70a5daccdb4
Repository: https://github.com/canopy-network/canopy.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultParams() returns the developer set params.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
filterAndSort() removes zero and nil elements from the pool slice and then sorts the slice by amount finally setting the result to the pointer from the parameter.
FormatParamSpace() converts a user inputted ParamSpace string into the proper ParamSpace name.
No description provided by the author
No description provided by the author
IsStringParam() validates if the param is a string by space and key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewBuyOrderTx() reserves a sell order using a send-tx and the memo field.
NewCertificateResultsTx() creates a CertificateResultsTransaction object in the interface form of TransactionI.
NewChangeParamTxString() creates a ChangeParamTransaction object (for strings) in the interface form of TransactionI.
NewChangeParamTxUint64() creates a ChangeParamTransaction object (for uint64s) in the interface form of TransactionI.
NewCreateOrderTx() creates a CreateOrderTransaction object in the interface form of TransactionI.
NewDAOTransferTx() creates a DAOTransferTransaction object in the interface form of TransactionI.
NewDeleteOrderTx() creates an DeleteOrderTransaction object in the interface form of TransactionI.
NewEditOrderTx() creates an EditOrderTransaction object in the interface form of TransactionI.
NewEditStakeTx() creates a EditStakeTransaction object in the interface form of TransactionI.
NewPauseTx() creates a PauseTransaction object in the interface form of TransactionI.
NewProposalFromBytes() creates a GovProposal object from json bytes.
NewProtocolVersion() creates a properly formatted protocol version string.
NewSendTransaction() creates a SendTransaction object in the interface form of TransactionI.
No description provided by the author
NewStakeTx() creates a StakeTransaction object in the interface form of TransactionI.
NewStartPollTransaction() isn't an actual transaction type - rather it's a protocol built on top of send transactions to allow simple straw polling on Canopy.
NewSubsidyTx() creates a SubsidyTransaction object in the interface form of TransactionI.
NewTransaction() creates a Transaction object from a message in the interface form of TransactionI.
NewUnpauseTx() creates a UnpauseTransaction object in the interface form of TransactionI.
NewUnstakeTx() creates a UnstakeTransaction object in the interface form of TransactionI.
NewVotePollTransaction() isn't an actual transaction type - rather it's a protocol built on top of send transactions to allow simple straw polling on Canopy.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
name for page of 'Accounts'.
No description provided by the author
name for page of 'Consensus Validators' (only essential val info needed for consensus).
No description provided by the author
standard delimiter for protocol version.
No description provided by the author
accept_all is the default mode for 'non-consensus' where all inbound governance proposals are accepted.
approve_list is the default mode for Validators who are active in BFT.
reject_all is a mode that turns on if problems are detected during the consensus process, ensuring the proposal process doesn't contribute to a chain halt.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Names for each Transaction Message (payload) type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
size of the block - header.
percent of rewards the DAO fund receives.
transaction fee for MessageCertificateResults.
transaction fee for MessageChangeParameter.
transaction fee for MessageCreateOrder.
transaction fee for MessageDAOTransfer.
transaction fee for MessageDeleteOrder.
transaction fee for MessageEditOrder.
transaction fee for MessageEditStake.
transaction fee for MessagePause.
transaction fee for MessageSend.
transaction fee for MessageStake.
transaction fee for MessageSubsidy.
transaction fee for MessageUnpause.
transaction fee for MessageUnstake.
store key prefix for Consensus param space.
store key prefix for Fee param space.
store key prefix for Gov param space.
store key prefix for Validators param space.
current protocol version (upgrade enforcement).
name of Consensus param space.
name of Fee param space.
name of Governance param space.
name of Validator param space.
the amount of blocks a 'buyer' has to complete an order they reserved.
the fee multiplier of the 'send' fee that is required to execute a buy order.
the percentage of the block reward that is awarded to the delegates.
number of blocks a delegator must be 'unstaking' for.
how much a double signer is slashed (% of stake).
reduction percentage of non-compounded rewards.
maximum number of committees a single validator may participate in.
maximum number of members a committee may have.
how much a committee member can not sign before being slashed.
maximum blocks a validator may be paused for before force-unstaking.
the maximum validator slash per committee per block.
minimum sell tokens in a sell order.
how much a non-signer is slashed if exceeds threshold in window (% of stake).
how frequently the non-sign-count is reset.
the minimum percentage of total stake needed to be a 'paid committee'.
number of blocks a committee member must be 'unstaking' for.
name for page of 'Pools'.
No description provided by the author
No description provided by the author
name for page of 'Validators'.

# Variables

the number of blocks between each halvening (block reward is cut in half) event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Enum value maps for GovProposalVoteConfig.
Enum value maps for GovProposalVoteConfig.
50 CNPY.
No description provided by the author

# Structs

***************************************************************************************************** This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf) Protobuf is a language-neutral, platform-neutral serialization format.
ActivePolls is the in-memory representation of the polls.json file Contains a list of all active polls.
ConsensusParams is the parameter space that defines how nodes in the blockchain agree on the state of the ledger.
FeeParams is the parameter space that defines various amounts for transaction fees.
***************************************************************************************************** This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf) Protobuf is a language-neutral, platform-neutral serialization format.
GovernanceParams is the parameter space that define the rules that enable decentralized and autonomous governing of the network.
GovProposalWithVote is a wrapper over a GovProposal but contains an approval / disapproval boolean.
MessageCertificateResults is a summary from the Leader of a recently completed BFT process in the form of a Quorum Certificate signed by a super-majority of the committee members at a given height.
MessageChangeParameter is a governance proposal message used to modify a governance parameter This type of message must be manually pre-approved by +2/3rds of the Validators via their APPROVE_LIST In short, a 'proposer' generates the message JSON, communicates the JSON to Validators, Validators vote by populating their APPROVE_LIST which configures how they'll vote during the consensus process when a block includes this transaction in it.
MessageCreateOrder creates a new token swap 'sell order', removing tokens from the sender account and transferring them to an escrow pool while awaiting a buyer.
MessageDAOTransfer is a governance proposal message used to send funds from the DAO pool to an account This type of message must be manually pre-approved by +2/3rds of the Validators via their APPROVE_LIST In short, a 'proposer' generates the message JSON, communicates the JSON to Validators, Validators vote by populating their APPROVE_LIST which configures how they'll vote during the consensus process when a block includes this transaction in it.
MessageDeleteOrder: deletes an un-claimed token swap 'sell order' If an order is already 'claimed' or 'bought', the order may not be deleted.
MessageEditOrder modifies an un-claimed token swap 'sell order', token amount may be increased or decreased as well as the recipient address If an order is already 'claimed' or 'bought', the order may not be modified.
MessageStake is the Validator modification message, it allows an increase locking up a certain amount of tokens, a change to the committees, the p2p address, the output address, and auto-compounding status To leave fields un-edited, simply use the previous value.
MessagePause is the Validator break message, it temporarily removes the Validator from active duty This allows operators a path to gracefully maintain their Validators without fully exiting.
***************************************************************************************************** This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf) Protobuf is a language-neutral, platform-neutral serialization format.
MessageStake is the Validator registration message, locking up a certain amount of tokens.
MessageSubsidy is an account to committee treasury pool transfer transaction At economic maturity without inflation, this is how the network continues to offer its Validation services.
MessageUnpause is the Validator return message, it re-enlists the Validator to active duty.
MessageUnstake is the Validator leave message, it begins the process of a Validator exiting the network The block when the funds will be returned may be found in the Validator structure after submitting this transaction.
NonSignerInfo is information that tracks the number of blocks not signed by the Validator within the Non-Sign-Window.
Params are are configurable settings in a blockchain or decentralized network that control various aspects of the system's operation and rules, such as transaction fees, block sizes, and validator behaviors.
PollResult is a structure that represents the current state of a 'Poll' for a 'Proposal'.
A pool is like an account without an owner, holding funds that are managed directly by the blockchain protocol It's very similar to an account but instead of an address it has a unique ID and operates based on predefined blockchain rules rather than individual control.
The ProtocolVersion is a string that marks the particular version of rules governing how nodes communicate and validate data in a network.
StartPoll represents the structure for initiating a new poll It is used to encode data into JSON format for storing in memo fields.
A supply structure keeps track of the total amount of tokens or funds available across the entire blockchain It provides a single source of truth for the overall token supply managed by the network It conveniently buckets the tokens into useful categories allowing transparency and consistency NOTE: 'staked' includes delegations, to calculate stake without delegations, simply staked - delegated_only.
***************************************************************************************************** This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf) Protobuf is a language-neutral, platform-neutral serialization format.
ValidatorParams is the parameter space that defines the rules and criteria for validators in the blockchain.
VotePoll represents the structure of a voting action on a poll It is used to encode data into JSON format for storing in memo fields.
VoteStats: are demonstrative statistics about poll voting.

# Interfaces

GovProposal is an interface that all proposals that may be polled for and voted on must conform to.
ParamSpace is a distinct, isolated category within the overarching Params structure.

# Type aliases

No description provided by the author
No description provided by the author
GovProposals is a list of GovProposalsWithVote keyed by hash of the underlying ProposalJSON.
***************************************************************************************************** This file is auto-generated from source files in `/lib/.proto/*` using Protocol Buffers (protobuf) Protobuf is a language-neutral, platform-neutral serialization format.
No description provided by the author
Poll is a list of PollResults keyed by the hash of the proposal.
No description provided by the author
SlashTracker is a map of address -> committee -> slash percentage which is used to ensure no committee exceeds max slash within a single block NOTE: this slash tracker is naive and doesn't account for the consecutive reduction of a slash percentage impact i.e.
No description provided by the author
No description provided by the author