Documentation ¶
Index ¶
- Constants
- Variables
- func Bool(b bool) *bool
- type AccountID
- type BigInt
- func (i *BigInt) Add(x *BigInt, y *BigInt) *BigInt
- func (i *BigInt) Bytes() []byte
- func (i *BigInt) Equal(j *BigInt) bool
- func (i *BigInt) GobDecode(buf []byte) error
- func (i *BigInt) GobEncode() ([]byte, error)
- func (i BigInt) MarshalText() ([]byte, error)
- func (i *BigInt) MathBigInt() *big.Int
- func (i *BigInt) Mul(x *BigInt, y *BigInt) *BigInt
- func (i *BigInt) SetBytes(buf []byte) *BigInt
- func (i *BigInt) SetString(s string) (*BigInt, error)
- func (i *BigInt) SetUint64(x uint64) *BigInt
- func (i *BigInt) String() string
- func (i *BigInt) Sub(x *BigInt, y *BigInt) *BigInt
- func (i *BigInt) UnmarshalText(data []byte) error
- type CensusRoot
- type DataStore
- type EncodedProtoBuf
- type EntityID
- type Hash
- type HexBytes
- type Nullifier
- type ProcessID
Constants ¶
View Source
const ( // ModeOracle starts vocdoninode as an oracle ModeOracle = "oracle" // ModeMiner starts vocdoninode as a miner ModeMiner = "miner" // ModeSeed starts vocdoninode as a seed node ModeSeed = "seed" // ModeGateway starts the vocdoninode as a gateway ModeGateway = "gateway" // ProcessIDsize is the size of a process id ProcessIDsize = 32 // EthereumAddressSize is the size of an ethereum address EthereumAddressSize = 20 // EntityIDsizeV2 legacy: in the past we used hash(addr) // this is a temporal work around to support both EntityIDsize = 20 // VoteNullifierSize is the size of a vote nullifier VoteNullifierSize = 32 // KeyIndexSeparator is the default char used to split keys KeyIndexSeparator = ":" // EthereumConfirmationsThreshold is the minimum amout of blocks // that should pass before considering a tx final EthereumConfirmationsThreshold = 6 // ENTITY RESOLVER // EntityResolverDomain is the default entity resolver ENS domain EntityResolverDomain = "entities.voc.eth" // EntityResolverStageDomain is the default entity resolver ENS domain EntityResolverStageDomain = "entities.stg.voc.eth" // EntityResolverDevelopmentDomain is the default entity resolver ENS domain EntityResolverDevelopmentDomain = "entities.dev.voc.eth" // PROCESSES // ProcessesDomain ProcessesDomain = "processes.voc.eth" // ProcessesStageDomain ProcessesStageDomain = "processes.stg.voc.eth" // ProcessesDevelopmentDomain ProcessesDevelopmentDomain = "processes.dev.voc.eth" // NAMESPACES // NamespacesDomain NamespacesDomain = "namespaces.voc.eth" // NamespacesStageDomain NamespacesStageDomain = "namespaces.stg.voc.eth" // NamespacesDevelopmentDomain NamespacesDevelopmentDomain = "namespaces.dev.voc.eth" // ERC20 PROOFS // ERC20ProofsDomain ERC20ProofsDomain = "erc20.proofs.voc.eth" // ERC20ProofsStageDomain ERC20ProofsStageDomain = "erc20.proofs.stg.voc.eth" // ERC20ProofsDevelopmentDomain ERC20ProofsDevelopmentDomain = "erc20.proofs.dev.voc.eth" // GENESIS // GenesisDomain GenesisDomain = "genesis.voc.eth" // GenesisStageDomain GenesisStageDomain = "genesis.stg.voc.eth" // GenesisDevelopmentDomain GenesisDevelopmentDomain = "genesis.dev.voc.eth" // RESULTS // ResultsDomain ResultsDomain = "results.voc.eth" // ResultsStageDomain ResultsStageDomain = "results.stg.voc.eth" // ResultsDevelopmentDomain ResultsDevelopmentDomain = "results.dev.voc.eth" // EntityMetaKey is the key of an ENS text record for the entity metadata EntityMetaKey = "vnd.vocdoni.meta" // EthereumReadTimeout is the max amount of time for reading anything on // the Ethereum network to wait until canceling it's context EthereumReadTimeout = 1 * time.Minute // EthereumWriteTimeout is the max amount of time for writing anything on // the Ethereum network to wait until canceling it's context EthereumWriteTimeout = 1 * time.Minute // EthereumDialMaxRetry is the max number of attempts an ethereum client will // make in order to dial to an endpoint before considering the endpoint unreachable EthereumDialMaxRetry = 10 // IndexerLiveProcessPrefix is used for sotring temporary results on live IndexerLiveProcessPrefix = byte(0x21) // IndexerEntityPrefix is the prefix for the storage entity keys IndexerEntityPrefix = byte(0x22) // IndexerResultsPrefix is the prefix of the storage results summary keys IndexerResultsPrefix = byte(0x24) // IndexerProcessEndingPrefix is the prefix for keep track of the processes ending // on a specific block IndexerProcessEndingPrefix = byte(0x25) // PetitionSign contains the string that needs to match with the received vote type // for petition-sign PetitionSign = "petition-sign" // PollVote contains the string that needs to match with the received vote type for poll-vote PollVote = "poll-vote" // EncryptedPoll contains the string that needs to match with the received vote type // for encrypted-poll EncryptedPoll = "encrypted-poll" // SnarkVote contains the string that needs to match with the received vote type for snark-vote SnarkVote = "snark-vote" // KeyKeeperMaxKeyIndex is the maxim number of allowed encryption keys KeyKeeperMaxKeyIndex = 16 TxVote = "vote" TxNewProcess = "newProcess" TxCancelProcess = "cancelProcess" // legacy TxSetProcess = "setProcess" TxAddValidator = "addValidator" TxRemoveValidator = "removeValidator" TxAddOracle = "addOracle" TxRemoveOracle = "removeOracle" TxAddProcessKeys = "addProcessKeys" TxRevealProcessKeys = "revealProcessKeys" // ProcessesContractMaxProcessMode represents the max value that a uint8 can have // with the current smart contract bitmask describing the supported process mode ProcessesContractMaxProcessMode = 31 // ProcessesContractMaxEnvelopeType represents the max value that a uint8 can have // with the current smart contract bitmask describing the supported envelope types ProcessesContractMaxEnvelopeType = 31 // ProcessesContractMinBlockCount represents the minimum number of vochain blocks // that a process should last ProcessesContractMinBlockCount = 2 // ProcessesParamsSignatureSize represents the size of a signature on ethereum ProcessesParamsSignatureSize = 32 VochainWsReadLimit = 20 << 20 // tendermint requires 20 MiB minimum Web3WsReadLimit = 5 << 20 // go-ethereum accepts maximum 5 MiB MaxURLLength = 2083 )
Variables ¶
View Source
var ( False = Bool(false) True = Bool(true) )
These exported variables should be treated as constants, to be used in API responses which require *bool fields.
Functions ¶
Types ¶
type BigInt ¶ added in v1.3.0
BigInt is a big.Int wrapper which marshals JSON to a string representation of the big number
func (BigInt) MarshalText ¶ added in v1.3.0
func (*BigInt) MathBigInt ¶ added in v1.4.0
MathBigInt converts b to a math/big *Int.
func (*BigInt) UnmarshalText ¶ added in v1.3.0
type CensusRoot ¶ added in v1.3.0
type CensusRoot = []byte
type EncodedProtoBuf ¶ added in v1.3.0
type EncodedProtoBuf = []byte
type HexBytes ¶
type HexBytes []byte
HexBytes is a []byte which encodes as hexadecimal in json, as opposed to the base64 default.
func HexStringToHexBytes ¶ added in v1.6.0
HexStringToHexBytes converts a hex string to a HexBytes. It strips a leading '0x' or '0X' if found, for backwards compatibility. Panics if the string is not a valid hex string.
func (HexBytes) MarshalJSON ¶
func (*HexBytes) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.