package
0.4.33
Repository: https://github.com/p9c/pod.git
Documentation: pkg.go.dev

# README

votingpool

[Build Status] (https://travis-ci.org/btcsuite/btcwallet)

Package votingpool provides voting pool functionality for btcwallet as described here: Voting Pools.

A suite of tests is provided to ensure proper functionality. See test_coverage.txt for the gocov coverage report. Alternatively, if you are running a POSIX OS, you can run the cov_report.sh script for a real-time report. Package votingpool is licensed under the liberal ISC license.

Note that this is still a work in progress.

Feature Overview

  • Create/Load pools
  • Create series
  • Replace series
  • Create deposit addresses
  • Comprehensive test coverage

Documentation

[GoDoc] (http://godoc.org/github.com/p9c/pod/walletmain/votingpool)

Full go doc style documentation for the project can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/p9c/pod/walletmain/votingpool

You can also view the documentation locally once the package is installed with the godoc tool by running godoc -http=":6060" and pointing your browser to http://localhost:6060/pkg/github.com/p9c/pod/walletmain/votingpool

Package votingpool is licensed under the copyfree ISC License.

# Functions

CanonicalKeyOrder will return a copy of the input canonically ordered which is defined to be lexicographical.
No description provided by the author
Create creates a new entry in the database with the given ID and returns the Pool representing it.
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
Load fetches the entry in the database with the given ID and returns the Pool representing it.
LoadAndCreateSeries loads the Pool with the given ID, creating a new one if it doesn't yet exist, and then creates and returns a Series with the given seriesID, rawPubKeys and reqSigs.
LoadAndEmpowerSeries loads the voting pool with the given ID and calls EmpowerSeries, passing the given series ID and private key to it.
LoadAndGetDepositScript generates and returns a deposit script for the given seriesID, branch and index of the Pool identified by poolID.
LoadAndReplaceSeries loads the voting pool with the given ID and calls ReplaceSeries, passing the given series ID, public keys and reqSigs to it.
NewCredit is.
SignTx signs every input of the given MsgTx by looking up (on the addr manager) the redeem script for each of them and constructing the signature script using that and the given raw signatures.
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

# Constants

CurrentVersion is the version used for newly created Series.
ErrCrypto indicates an error with the cryptography related operations such as decrypting or encrypting data, parsing an EC public key, or deriving a secret key from a password.
ErrDatabase indicates an error with the underlying database.
ErrInputSelection indicates an error in the input selection algorithm.
ErrInvalidBranch indicates that the given branch number is not valid for a given set of public keys.
ErrInvalidScriptHash indicates an invalid P2SH.
ErrInvalidValue indicates that the value of a given function argument is invalid.
ErrKeyChain indicates an error with the key chain typically either due to the inability to create an extended key or deriving a child extended key.
ErrKeyDuplicate indicates that a key is duplicated.
ErrKeyIsPrivate indicates that a private key was used where a public one was expected.
ErrKeyIsPublic indicates that a public key was used where a private one was expected.
ErrKeyMismatch indicates that the key is not the expected one.
ErrKeyNeuter indicates a problem when trying to neuter a private key.
ErrKeysPrivatePublicMismatch indicates that the number of private and public keys is not the same.
ErrPoolAlreadyExists indicates that an attempt has been made to create a voting pool that already exists.
ErrPoolNotExists indicates that an attempt has been made to access a voting pool that does not exist.
ErrPreconditionNotMet indicates a programming error since a precondition has not been met.
ErrRawSigning indicates an error in the process of generating raw signatures for a transaction input.
ErrScriptCreation indicates that the creation of a deposit script failed.
ErrSeriesAlreadyEmpowered indicates that an already empowered series was used where a not empowered one was expected.
ErrSeriesAlreadyExists indicates that an attempt has been made to create a series that already exists.
ErrSeriesIDInvalid indicates an attempt to create a series with an invalid ID.
ErrSeriesIDNotSequential indicates an attempt to create a series with an ID that is not sequential.
ErrSeriesNotActive indicates that an active series was needed but the selected one is not.
ErrSeriesNotExists indicates that an attempt has been made to access a series that does not exist.
ErrSeriesSerialization indicates that an error occurred while serializing or deserializing one or more series for storing into the database.
ErrSeriesVersion indicates that we've been asked to deal with a series whose version is unsupported.
ErrTooFewPublicKeys indicates that a required minimum of public keys was not met.
ErrTooManyReqSignatures indicates that too many required signatures are requested.
ErrTxSigning indicates an error when signing a transaction.
ErrUnknownPubKey indicates a pubkey that does not belong to a given series.
ErrWithdrawalProcessing indicates an internal error when processing a withdrawal request.
ErrWithdrawalStorage indicates an error occurred when serializing or deserializing withdrawal information.
ErrWithdrawalTxStorage indicates an error when storing withdrawal transactions.
ErrWithdrawFromUnusedAddr indicates an attempt to withdraw funds from an address which has not been used before.

# Structs

No description provided by the author
Credit is an abstraction over wtxmgr.Credit used in the construction of voting pool withdrawal transactions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
VPError is a typed error for all errors arising during the operation of the voting pool.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
ErrorCode identifies a kind of error.
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