Versions in this module Expand all Collapse all v0 v0.9.3-Beta Dec 18, 2017 v0.9.2-Beta Dec 18, 2017 v0.9.1 Oct 29, 2017 v0.9.0 Oct 29, 2017 Changes in this version + var CoinbaseBits = 0x8 + var ReceiveBits = 0x10 + var RevocationBits = 0x1 + var SendBits = 0x20 + var TicketBits = 0x4 + var VotesBits = 0x2 type StakeInfoData + LiveTicketDetails []hcashjson.LiveTicket type Wallet + func (w *Wallet) CalcOutputs(outputs []*wire.TxOut, account uint32, minconf int32) (string, error) + func (w *Wallet) CalcPowSubsidy(from, count int) (*float64, error) + func (w *Wallet) ListTxs(txType int, from, count int64) (hcashjson.ListTxsResult, error) v0.8.6 Oct 1, 2017 Changes in this version + const DefaultGapLimit + const EstMaxTicketFeeAmount + const InsecurePubPassphrase + const OutputSelectionAlgorithmAll + const OutputSelectionAlgorithmDefault + var ErrBlockchainReorganizing = errors.New(...) + var ErrNegativeFee = errors.New("fee is negative") + var ErrNoOutsToConsolidate = errors.New("no outputs to consolidate") + var ErrNonPositiveAmount = errors.New("amount is not positive") + var ErrSStxNotEnoughFunds = errors.New("not enough to purchase sstx") + var ErrSStxPriceExceedsSpendLimit = errors.New("ticket price exceeds spend limit") + var ErrTicketPriceNotSet = errors.New("ticket price not yet established") + var ErrUnsupportedTransactionType = errors.New(...) + var SimulationPassphrase = []byte("password") + func Create(db walletdb.DB, pubPass, privPass, seed []byte, params *chaincfg.Params) error + func CreateWatchOnly(db walletdb.DB, extendedPubKey string, pubPass []byte, params *chaincfg.Params) error + func CurrentAgendas(params *chaincfg.Params) (version uint32, agendas []chaincfg.ConsensusDeployment) + func DisableLog() + func EstimateTxSize(numInputs, numOutputs int) int + func FeeForSize(incr hcashutil.Amount, sz int) hcashutil.Amount + func UnstableAPI(w *Wallet) unstableAPI + func UseLogger(logger btclog.Logger) + func VerifyMessage(msg string, addr hcashutil.Address, sig []byte) (bool, error) + type AccountBalance struct + Account uint32 + TotalBalance hcashutil.Amount + type AccountNotification struct + AccountName string + AccountNumber uint32 + ExternalKeyCount uint32 + ImportedKeyCount uint32 + InternalKeyCount uint32 + type AccountNotificationsClient struct + C chan *AccountNotification + func (c *AccountNotificationsClient) Done() + type AccountResult struct + TotalBalance hcashutil.Amount + type AccountTotalReceivedResult struct + AccountName string + AccountNumber uint32 + LastConfirmation int32 + TotalReceived hcashutil.Amount + type AccountsResult struct + Accounts []AccountResult + CurrentBlockHash *chainhash.Hash + CurrentBlockHeight int32 + type AgendaChoice struct + AgendaID string + ChoiceID string + type Block struct + Hash *chainhash.Hash + Height int32 + Timestamp int64 + Transactions []TransactionSummary + type BlockIdentifier struct + func NewBlockIdentifierFromHash(hash *chainhash.Hash) *BlockIdentifier + func NewBlockIdentifierFromHeight(height int32) *BlockIdentifier + type BlockIdentity struct + Hash chainhash.Hash + Height int32 + func (b *BlockIdentity) None() bool + type BlockInfo struct + Confirmations int32 + Hash chainhash.Hash + Header []byte + Height int32 + StakeInvalidated bool + Timestamp int64 + type ConfirmationNotification struct + BlockHash *chainhash.Hash + BlockHeight int32 + Confirmations int32 + TxHash *chainhash.Hash + type ConfirmationNotificationsClient struct + func (c *ConfirmationNotificationsClient) Recv() ([]ConfirmationNotification, error) + func (c *ConfirmationNotificationsClient) Watch(txHashes []*chainhash.Hash, stopAfter int32) + type CreatedTx struct + ChangeAddr hcashutil.Address + ChangeIndex int + Fee hcashutil.Amount + MsgTx *wire.MsgTx + type CreditCategory byte + const CreditGenerate + const CreditImmature + const CreditReceive + func RecvCategory(details *udb.TxDetails, syncHeight int32, syncKeyHeight int32, ...) CreditCategory + func (c CreditCategory) String() string + type GetTransactionsResult struct + MinedTransactions []Block + UnminedTransactions []TransactionSummary + type MainTipChangedNotification struct + AttachedBlocks []*chainhash.Hash + DetachedBlocks []*chainhash.Hash + IsKeyBlock bool + KeyIncrease int32 + NewHeight int32 + NewKeyHeight int32 + type MainTipChangedNotificationsClient struct + C chan *MainTipChangedNotification + func (c *MainTipChangedNotificationsClient) Done() + type NextAddressCallOption func(*nextAddressCallOptions) + func WithGapPolicyError() NextAddressCallOption + func WithGapPolicyIgnore() NextAddressCallOption + func WithGapPolicyWrap() NextAddressCallOption + type NotificationServer struct + func (s *NotificationServer) AccountNotifications() AccountNotificationsClient + func (s *NotificationServer) ConfirmationNotifications(ctx context.Context) *ConfirmationNotificationsClient + func (s *NotificationServer) MainTipChangedNotifications() MainTipChangedNotificationsClient + func (s *NotificationServer) TransactionNotifications() TransactionNotificationsClient + type OutputInfo struct + Amount hcashutil.Amount + FromCoinbase bool + Received time.Time + type OutputKind byte + const OutputKindCoinbase + const OutputKindNormal + const OutputKindStakebase + type OutputRedeemer struct + InputIndex uint32 + TxHash chainhash.Hash + type OutputSelectionAlgorithm uint + type OutputSelectionPolicy struct + Account uint32 + RequiredConfirmations int32 + type P2SHMultiSigOutput struct + ContainingBlock BlockIdentity + M uint8 + N uint8 + OutPoint wire.OutPoint + OutputAmount hcashutil.Amount + P2SHAddress *hcashutil.AddressScriptHash + RedeemScript []byte + Redeemer *OutputRedeemer + type RescanProgress struct + Err error + ScannedThrough int32 + type SignatureError struct + Error error + InputIndex uint32 + type StakeDifficultyInfo struct + BlockHash *chainhash.Hash + BlockHeight int64 + StakeDifficulty int64 + type StakeInfoData struct + AllMempoolTix uint32 + BlockHeight int64 + Expired uint32 + Immature uint32 + Live uint32 + Missed uint32 + OwnMempoolTix uint32 + PoolSize uint32 + Revoked uint32 + TotalSubsidy hcashutil.Amount + Voted uint32 + type TransactionNotifications struct + AttachedBlocks []Block + DetachedBlocks []*chainhash.Hash + NewBalances []AccountBalance + UnminedTransactionHashes []*chainhash.Hash + UnminedTransactions []TransactionSummary + type TransactionNotificationsClient struct + C <-chan *TransactionNotifications + func (c *TransactionNotificationsClient) Done() + type TransactionOutput struct + ContainingBlock BlockIdentity + OutPoint wire.OutPoint + Output wire.TxOut + OutputKind OutputKind + ReceiveTime time.Time + type TransactionSummary struct + Fee hcashutil.Amount + Hash *chainhash.Hash + MyInputs []TransactionSummaryInput + MyOutputs []TransactionSummaryOutput + Timestamp int64 + Transaction []byte + Type TransactionType + type TransactionSummaryInput struct + Index uint32 + PreviousAccount uint32 + PreviousAmount hcashutil.Amount + type TransactionSummaryOutput struct + Account uint32 + Address hcashutil.Address + Amount hcashutil.Amount + Index uint32 + Internal bool + OutputScript []byte + type TransactionType int8 + const TransactionTypeCoinbase + const TransactionTypeRegular + const TransactionTypeRevocation + const TransactionTypeTicketPurchase + const TransactionTypeVote + type Wallet struct + AllowHighFees bool + DisallowFree bool + Manager *udb.Manager + NtfnServer *NotificationServer + StakeMgr *udb.StakeStore + TxStore *udb.Store + func Open(db walletdb.DB, pubPass []byte, votingEnabled bool, addressReuse bool, ...) (*Wallet, error) + func (w *Wallet) AccountBranchAddressRange(account, branch, start, end uint32) ([]hcashutil.Address, error) + func (w *Wallet) AccountName(accountNumber uint32) (string, error) + func (w *Wallet) AccountNumber(accountName string) (uint32, error) + func (w *Wallet) AccountOfAddress(a hcashutil.Address) (uint32, error) + func (w *Wallet) AccountProperties(acct uint32) (*udb.AccountProperties, error) + func (w *Wallet) Accounts() (*AccountsResult, error) + func (w *Wallet) AddTicket(ticket *wire.MsgTx) error + func (w *Wallet) AddressInfo(a hcashutil.Address) (udb.ManagedAddress, error) + func (w *Wallet) AgendaChoices() (choices []AgendaChoice, voteBits uint16, err error) + func (w *Wallet) AssociateConsensusRPC(chainClient *chain.RPCClient) + func (w *Wallet) BIP0044BranchNextIndexes(account uint32) (extChild, intChild uint32, err error) + func (w *Wallet) BalanceToMaintain() hcashutil.Amount + func (w *Wallet) BlockInfo(blockID *BlockIdentifier) (*BlockInfo, error) + func (w *Wallet) CalculateAccountBalance(account uint32, confirms int32) (udb.Balances, error) + func (w *Wallet) CalculateAccountBalances(confirms int32) (map[uint32]*udb.Balances, error) + func (w *Wallet) ChainClient() *chain.RPCClient + func (w *Wallet) ChainParams() *chaincfg.Params + func (w *Wallet) ChangePrivatePassphrase(old, new []byte) error + func (w *Wallet) ChangePublicPassphrase(old, new []byte) error + func (w *Wallet) Consolidate(inputs int, account uint32, address hcashutil.Address) (*chainhash.Hash, error) + func (w *Wallet) CreateMultisigTx(account uint32, amount hcashutil.Amount, ...) (*CreatedTx, hcashutil.Address, []byte, error) + func (w *Wallet) CreateSSGenTx(ticketHash chainhash.Hash, blockHash chainhash.Hash, height int64, ...) (*CreatedTx, error) + func (w *Wallet) CreateSSRtx(ticketHash chainhash.Hash) (*CreatedTx, error) + func (w *Wallet) CreateSStxTx(pair map[string]hcashutil.Amount, usedInputs []udb.Credit, ...) (*CreatedTx, error) + func (w *Wallet) CreateSimpleTx(account uint32, outputs []*wire.TxOut, minconf int32) (*txauthor.AuthoredTx, error) + func (w *Wallet) CurrentAddress(account uint32) (hcashutil.Address, error) + func (w *Wallet) DiscoverActiveAddresses(chainClient *chain.RPCClient, discoverAccts bool) error + func (w *Wallet) DumpWIFPrivateKey(addr hcashutil.Address) (string, error) + func (w *Wallet) ExistsAddressOnChain(address hcashutil.Address) (bool, error) + func (w *Wallet) ExtendWatchedAddresses(account, branch, child uint32) error + func (w *Wallet) FetchAllRedeemScripts() ([][]byte, error) + func (w *Wallet) FetchHeaders(chainClient *chain.RPCClient) (count int, rescanFrom chainhash.Hash, rescanFromHeight int32, ...) + func (w *Wallet) FetchP2SHMultiSigOutput(outPoint *wire.OutPoint) (*P2SHMultiSigOutput, error) + func (w *Wallet) FindEligibleOutputs(account uint32, minconf int32, currentHeight int32, currentKeyHeight int32) ([]udb.Credit, error) + func (w *Wallet) GenerateVoteTx(blockHash *chainhash.Hash, height int32, keyHeight int32, ...) (*wire.MsgTx, error) + func (w *Wallet) GetTransactions(startBlock, endBlock *BlockIdentifier, cancel <-chan struct{}) (*GetTransactionsResult, error) + func (w *Wallet) HaveAddress(a hcashutil.Address) (bool, error) + func (w *Wallet) ImportP2SHRedeemScript(script []byte) (*hcashutil.AddressScriptHash, error) + func (w *Wallet) ImportPrivateKey(wif *hcashutil.WIF) (string, error) + func (w *Wallet) ImportScript(rs []byte) error + func (w *Wallet) ListAddressTransactions(pkHashes map[string]struct{}) ([]hcashjson.ListTransactionsResult, error) + func (w *Wallet) ListAllTransactions() ([]hcashjson.ListTransactionsResult, error) + func (w *Wallet) ListSinceBlock(start, end, syncHeight int32, syncKeyHeight int32) ([]hcashjson.ListTransactionsResult, error) + func (w *Wallet) ListTransactions(from, count int) ([]hcashjson.ListTransactionsResult, error) + func (w *Wallet) ListUnspent(minconf, maxconf int32, addresses map[string]struct{}) ([]*hcashjson.ListUnspentResult, error) + func (w *Wallet) LiveTicketHashes(chainClient *chain.RPCClient, includeImmature bool) ([]chainhash.Hash, error) + func (w *Wallet) LoadActiveDataFilters(chainClient *chain.RPCClient) error + func (w *Wallet) Lock() + func (w *Wallet) LockOutpoint(op wire.OutPoint) + func (w *Wallet) Locked() bool + func (w *Wallet) LockedOutpoint(op wire.OutPoint) bool + func (w *Wallet) LockedOutpoints() []hcashjson.TransactionInput + func (w *Wallet) MainChainTip() (hash chainhash.Hash, height int32) + func (w *Wallet) MainChainTipKeyHeight() (keyHeight int32) + func (w *Wallet) MakeSecp256k1MultiSigScript(secp256k1Addrs []hcashutil.Address, nRequired int) ([]byte, error) + func (w *Wallet) MasterPubKey(account uint32) (string, error) + func (w *Wallet) NeedsAccountsSync() (bool, error) + func (w *Wallet) NewChangeAddress(account uint32) (hcashutil.Address, error) + func (w *Wallet) NewExternalAddress(account uint32, callOpts ...NextAddressCallOption) (hcashutil.Address, error) + func (w *Wallet) NewInternalAddress(account uint32, callOpts ...NextAddressCallOption) (hcashutil.Address, error) + func (w *Wallet) NewUnsignedTransaction(outputs []*wire.TxOut, relayFeePerKb hcashutil.Amount, account uint32, ...) (*txauthor.AuthoredTx, error) + func (w *Wallet) NextAccount(name string) (uint32, error) + func (w *Wallet) OutputInfo(op *wire.OutPoint) (OutputInfo, error) + func (w *Wallet) PoolAddress() hcashutil.Address + func (w *Wallet) PoolFees() float64 + func (w *Wallet) PubKeyForAddress(a hcashutil.Address) (chainec.PublicKey, error) + func (w *Wallet) PublishTransaction(tx *wire.MsgTx, serializedTx []byte, client *chain.RPCClient) (*chainhash.Hash, error) + func (w *Wallet) PurchaseTickets(minBalance, spendLimit hcashutil.Amount, minConf int32, ...) ([]*chainhash.Hash, error) + func (w *Wallet) RedeemScriptCopy(addr hcashutil.Address) ([]byte, error) + func (w *Wallet) RelayFee() hcashutil.Amount + func (w *Wallet) RenameAccount(account uint32, newName string) error + func (w *Wallet) Rescan(chainClient *chain.RPCClient, startHash *chainhash.Hash) <-chan error + func (w *Wallet) RescanFromHeight(chainClient *chain.RPCClient, startHeight int32) <-chan error + func (w *Wallet) RescanProgressFromHeight(chainClient *chain.RPCClient, startHeight int32, p chan<- RescanProgress, ...) + func (w *Wallet) ResetLockedOutpoints() + func (w *Wallet) RevokeTickets(chainClient *chain.RPCClient) error + func (w *Wallet) SelectInputs(targetAmount hcashutil.Amount, policy OutputSelectionPolicy) (total hcashutil.Amount, inputs []*wire.TxIn, prevScripts [][]byte, err error) + func (w *Wallet) SendOutputs(outputs []*wire.TxOut, account uint32, minconf int32) (*chainhash.Hash, error) + func (w *Wallet) SetAgendaChoices(choices ...AgendaChoice) (voteBits uint16, err error) + func (w *Wallet) SetBalanceToMaintain(balance hcashutil.Amount) + func (w *Wallet) SetInitiallyUnlocked(set bool) + func (w *Wallet) SetRelayFee(relayFee hcashutil.Amount) + func (w *Wallet) SetTicketFeeIncrement(fee hcashutil.Amount) + func (w *Wallet) SetTicketPurchasingEnabled(flag bool) + func (w *Wallet) ShuttingDown() bool + func (w *Wallet) SignMessage(msg string, addr hcashutil.Address) (sig []byte, err error) + func (w *Wallet) SignTransaction(tx *wire.MsgTx, hashType txscript.SigHashType, ...) ([]SignatureError, error) + func (w *Wallet) SortedActivePaymentAddresses() ([]string, error) + func (w *Wallet) StakeDifficulty() (hcashutil.Amount, error) + func (w *Wallet) StakeInfo(chainClient *hcashrpcclient.Client) (*StakeInfoData, error) + func (w *Wallet) StakePoolUserInfo(userAddress hcashutil.Address) (*udb.StakePoolUser, error) + func (w *Wallet) Start() + func (w *Wallet) Stop() + func (w *Wallet) SynchronizeRPC(chainClient *chain.RPCClient) + func (w *Wallet) SynchronizingToNetwork() bool + func (w *Wallet) TicketAddress() hcashutil.Address + func (w *Wallet) TicketFeeIncrement() hcashutil.Amount + func (w *Wallet) TicketHashesForVotingAddress(votingAddr hcashutil.Address) ([]chainhash.Hash, error) + func (w *Wallet) TicketPurchasingEnabled() bool + func (w *Wallet) TotalReceivedForAccounts(minConf int32) ([]AccountTotalReceivedResult, error) + func (w *Wallet) TotalReceivedForAddr(addr hcashutil.Address, minConf int32) (hcashutil.Amount, error) + func (w *Wallet) TransactionSummary(txHash *chainhash.Hash) (*TransactionSummary, error) + func (w *Wallet) Unlock(passphrase []byte, lock <-chan time.Time) error + func (w *Wallet) UnlockOutpoint(op wire.OutPoint) + func (w *Wallet) UnspentOutputs(policy OutputSelectionPolicy) ([]*TransactionOutput, error) + func (w *Wallet) VoteBits() stake.VoteBits + func (w *Wallet) VotingEnabled() bool + func (w *Wallet) WaitForShutdown()