Documentation ¶
Overview ¶
Package wallettx provides ... TODO: Flesh out this section
Overview
Index ¶
- Constants
- Variables
- func Create(db walletdb.DB, pubPass, privPass, seed []byte, params *chaincfg.Params, ...) error
- func UnstableAPI(w *Wallet) unstableAPI
- func UseLogger(logger *cl.SubSystem)
- type AccountBalance
- type AccountBalanceResult
- type AccountNotification
- type AccountNotificationsClient
- type AccountResult
- type AccountTotalReceivedResult
- type AccountsResult
- type Balances
- type Block
- type BlockIdentifier
- type BlockIdentity
- type BranchRecoveryState
- func (brs *BranchRecoveryState) AddAddr(index uint32, addr util.Address)
- func (brs *BranchRecoveryState) Addrs() map[uint32]util.Address
- func (brs *BranchRecoveryState) ExtendHorizon() (uint32, uint32)
- func (brs *BranchRecoveryState) GetAddr(index uint32) util.Address
- func (brs *BranchRecoveryState) MarkInvalidChild(index uint32)
- func (brs *BranchRecoveryState) NextUnfound() uint32
- func (brs *BranchRecoveryState) NumInvalidInHorizon() uint32
- func (brs *BranchRecoveryState) ReportFound(index uint32)
- type CreditCategory
- type GetTransactionsResult
- type Loader
- func (l *Loader) CreateNewWallet(pubPassphrase, privPassphrase, seed []byte, bday time.Time) (*Wallet, error)
- func (l *Loader) LoadedWallet() (*Wallet, bool)
- func (l *Loader) OpenExistingWallet(pubPassphrase []byte, canConsolePrompt bool) (*Wallet, error)
- func (l *Loader) RunAfterLoad(fn func(*Wallet))
- func (l *Loader) UnloadWallet() error
- func (l *Loader) WalletExists() (bool, error)
- type NotificationServer
- type OutputKind
- type OutputRedeemer
- type OutputSelectionPolicy
- type P2SHMultiSigOutput
- type RecoveryManager
- func (rm *RecoveryManager) AddToBlockBatch(hash *chainhash.Hash, height int32, timestamp time.Time)
- func (rm *RecoveryManager) BlockBatch() []wtxmgr.BlockMeta
- func (rm *RecoveryManager) ResetBlockBatch()
- func (rm *RecoveryManager) Resurrect(ns walletdb.ReadBucket, ...) error
- func (rm *RecoveryManager) State() *RecoveryState
- type RecoveryState
- type RescanFinishedMsg
- type RescanJob
- type RescanProgressMsg
- type ScopeRecoveryState
- type SignatureError
- type SpentnessNotifications
- type SpentnessNotificationsClient
- type TransactionNotifications
- type TransactionNotificationsClient
- type TransactionOutput
- type TransactionSummary
- type TransactionSummaryInput
- type TransactionSummaryOutput
- type Wallet
- func (w *Wallet) AccountAddresses(account uint32) (addrs []util.Address, err error)
- func (w *Wallet) AccountBalances(scope waddrmgr.KeyScope, requiredConfs int32) ([]AccountBalanceResult, error)
- func (w *Wallet) AccountName(scope waddrmgr.KeyScope, accountNumber uint32) (string, error)
- func (w *Wallet) AccountNumber(scope waddrmgr.KeyScope, accountName string) (uint32, error)
- func (w *Wallet) AccountOfAddress(a util.Address) (uint32, error)
- func (w *Wallet) AccountProperties(scope waddrmgr.KeyScope, acct uint32) (*waddrmgr.AccountProperties, error)
- func (w *Wallet) Accounts(scope waddrmgr.KeyScope) (*AccountsResult, error)
- func (w *Wallet) AddressInfo(a util.Address) (waddrmgr.ManagedAddress, error)
- func (w *Wallet) CalculateAccountBalances(account uint32, confirms int32) (Balances, error)
- func (w *Wallet) CalculateBalance(confirms int32) (util.Amount, error)
- func (w *Wallet) ChainClient() chain.Interface
- func (w *Wallet) ChainParams() *chaincfg.Params
- func (w *Wallet) ChainSynced() bool
- func (w *Wallet) ChangePassphrases(publicOld, publicNew, privateOld, privateNew []byte) error
- func (w *Wallet) ChangePrivatePassphrase(old, new []byte) error
- func (w *Wallet) ChangePublicPassphrase(old, new []byte) error
- func (w *Wallet) CreateSimpleTx(account uint32, outputs []*wire.TxOut, minconf int32, satPerKb util.Amount) (*txauthor.AuthoredTx, error)
- func (w *Wallet) CurrentAddress(account uint32, scope waddrmgr.KeyScope) (util.Address, error)
- func (w *Wallet) Database() walletdb.DB
- func (w *Wallet) DumpPrivKeys() ([]string, error)
- func (w *Wallet) DumpWIFPrivateKey(addr util.Address) (string, error)
- func (w *Wallet) GetTransactions(startBlock, endBlock *BlockIdentifier, cancel <-chan struct{}) (*GetTransactionsResult, error)
- func (w *Wallet) HaveAddress(a util.Address) (bool, error)
- func (w *Wallet) ImportP2SHRedeemScript(script []byte) (*util.AddressScriptHash, error)
- func (w *Wallet) ImportPrivateKey(scope waddrmgr.KeyScope, wif *util.WIF, bs *waddrmgr.BlockStamp, rescan bool) (string, error)
- func (w *Wallet) ListAddressTransactions(pkHashes map[string]struct{}) ([]json.ListTransactionsResult, error)
- func (w *Wallet) ListAllTransactions() ([]json.ListTransactionsResult, error)
- func (w *Wallet) ListSinceBlock(start, end, syncHeight int32) ([]json.ListTransactionsResult, error)
- func (w *Wallet) ListTransactions(from, count int) ([]json.ListTransactionsResult, error)
- func (w *Wallet) ListUnspent(minconf, maxconf int32, addresses map[string]struct{}) ([]*json.ListUnspentResult, 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() []json.TransactionInput
- func (w *Wallet) MakeMultiSigScript(addrs []util.Address, nRequired int) ([]byte, error)
- func (w *Wallet) NewAddress(account uint32, scope waddrmgr.KeyScope) (util.Address, error)
- func (w *Wallet) NewChangeAddress(account uint32, scope waddrmgr.KeyScope) (util.Address, error)
- func (w *Wallet) NextAccount(scope waddrmgr.KeyScope, name string) (uint32, error)
- func (w *Wallet) PrivKeyForAddress(a util.Address) (*ec.PrivateKey, error)
- func (w *Wallet) PubKeyForAddress(a util.Address) (*ec.PublicKey, error)
- func (w *Wallet) PublishTransaction(tx *wire.MsgTx) error
- func (w *Wallet) RenameAccount(scope waddrmgr.KeyScope, account uint32, newName string) error
- func (w *Wallet) Rescan(addrs []util.Address, unspent []wtxmgr.Credit) error
- func (w *Wallet) ResetLockedOutpoints()
- func (w *Wallet) SendOutputs(outputs []*wire.TxOut, account uint32, minconf int32, satPerKb util.Amount) (*chainhash.Hash, error)
- func (w *Wallet) SetChainSynced(synced bool)
- func (w *Wallet) ShuttingDown() bool
- func (w *Wallet) SignTransaction(tx *wire.MsgTx, hashType txscript.SigHashType, ...) ([]SignatureError, error)
- func (w *Wallet) SortedActivePaymentAddresses() ([]string, error)
- func (w *Wallet) Start()
- func (w *Wallet) Stop()
- func (w *Wallet) SubmitRescan(job *RescanJob) <-chan error
- func (w *Wallet) SynchronizeRPC(chainClient chain.Interface)
- func (w *Wallet) SynchronizingToNetwork() bool
- func (w *Wallet) TotalReceivedForAccounts(scope waddrmgr.KeyScope, minConf int32) ([]AccountTotalReceivedResult, error)
- func (w *Wallet) TotalReceivedForAddr(addr util.Address, minConf int32) (util.Amount, 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) WaitForShutdown()
Constants ¶
const (
// data in the waddrmgr namespace. Transactions are not yet encrypted.
InsecurePubPassphrase = ""
)
const (
WalletDbName = "wallet.db"
)
Variables ¶
var ( // create a wallet when the loader has already done so. ErrLoaded = errors.New("wallet already loaded") // loaded wallet when a wallet has not been loaded. ErrNotLoaded = errors.New("wallet is not loaded") // wallet when one exists already. ErrExists = errors.New("wallet already exists") )
var ErrNotSynced = errors.New("wallet is not synchronized with the chain server")
the remote chain server.
var Log = cl.NewSubSystem("chain/tx", ll.DEFAULT)
Log is the logger for the peer package
Functions ¶
func Create ¶
func Create( db walletdb.DB, pubPass, privPass, seed []byte, params *chaincfg.Params, birthday time.Time) error
recommended length is generated.
func UnstableAPI ¶
func UnstableAPI( w *Wallet) unstableAPI
UnstableAPI exposes additional unstable public APIs for a Wallet. These APIs may be changed or removed at any time. Currently this type exists to ease the transation (particularly for the legacy JSON-RPC server) from using exported manager packages to a unified wallet package that exposes all functionality by itself. New code should not be written using this API.
Types ¶
type AccountBalance ¶
type AccountBalanceResult ¶
type AccountNotification ¶
type AccountNotificationsClient ¶
type AccountNotificationsClient struct { C chan *AccountNotification // contains filtered or unexported fields }
func (*AccountNotificationsClient) Done ¶
func (c *AccountNotificationsClient) Done()
receiving notifications.
type AccountResult ¶
type AccountResult struct { waddrmgr.AccountProperties TotalBalance util.Amount }
type AccountsResult ¶
type AccountsResult struct { Accounts []AccountResult CurrentBlockHash *chainhash.Hash CurrentBlockHeight int32 }
type Block ¶
type Block struct { Hash *chainhash.Hash Height int32 Timestamp int64 Transactions []TransactionSummary }
type BlockIdentifier ¶
type BlockIdentifier struct {
// contains filtered or unexported fields
}
func NewBlockIdentifierFromHash ¶
func NewBlockIdentifierFromHash( hash *chainhash.Hash) *BlockIdentifier
NewBlockIdentifierFromHash constructs a BlockIdentifier for a block hash.
func NewBlockIdentifierFromHeight ¶
func NewBlockIdentifierFromHeight( height int32) *BlockIdentifier
NewBlockIdentifierFromHeight constructs a BlockIdentifier for a block height.
type BlockIdentity ¶
func (*BlockIdentity) None ¶
func (b *BlockIdentity) None() bool
associated with a transaction, this indicates the transaction is unmined.
type BranchRecoveryState ¶
type BranchRecoveryState struct {
// contains filtered or unexported fields
}
func NewBranchRecoveryState ¶
func NewBranchRecoveryState( recoveryWindow uint32) *BranchRecoveryState
track either the external or internal branch of an account's derivation path.
func (*BranchRecoveryState) AddAddr ¶
func (brs *BranchRecoveryState) AddAddr(index uint32, addr util.Address)
known addresses for this branch.
func (*BranchRecoveryState) Addrs ¶
func (brs *BranchRecoveryState) Addrs() map[uint32]util.Address
corresponding addresses.
func (*BranchRecoveryState) ExtendHorizon ¶
func (brs *BranchRecoveryState) ExtendHorizon() (uint32, uint32)
must be derived in order to maintain the desired recovery window.
func (*BranchRecoveryState) GetAddr ¶
func (brs *BranchRecoveryState) GetAddr(index uint32) util.Address
GetAddr returns the address derived from a given child index.
func (*BranchRecoveryState) MarkInvalidChild ¶
func (brs *BranchRecoveryState) MarkInvalidChild(index uint32)
invalid child is encountered.
func (*BranchRecoveryState) NextUnfound ¶
func (brs *BranchRecoveryState) NextUnfound() uint32
child index.
func (*BranchRecoveryState) NumInvalidInHorizon ¶
func (brs *BranchRecoveryState) NumInvalidInHorizon() uint32
within our horizon.
func (*BranchRecoveryState) ReportFound ¶
func (brs *BranchRecoveryState) ReportFound(index uint32)
current value.
type CreditCategory ¶
type CreditCategory byte
const ( CreditReceive CreditCategory = iota CreditGenerate CreditImmature )
These constants define the possible credit categories.
func RecvCategory ¶
func RecvCategory( details *wtxmgr.TxDetails, syncHeight int32, net *chaincfg.Params) CreditCategory
this package at a later time.
type GetTransactionsResult ¶
type GetTransactionsResult struct { MinedTransactions []Block UnminedTransactions []TransactionSummary }
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) CreateNewWallet ¶
func (l *Loader) CreateNewWallet(pubPassphrase, privPassphrase, seed []byte, bday time.Time) (*Wallet, error)
this seed. If nil, a secure random seed is generated.
func (*Loader) OpenExistingWallet ¶
canConsolePrompt will enables these prompts.
func (*Loader) WalletExists ¶
This may return an error for unexpected I/O failures.
type NotificationServer ¶
type NotificationServer struct {
// contains filtered or unexported fields
}
func (*NotificationServer) AccountNotifications ¶
func (s *NotificationServer) AccountNotifications() AccountNotificationsClient
method should be called to disassociate the client from the server.
func (*NotificationServer) AccountSpentnessNotifications ¶
func (s *NotificationServer) AccountSpentnessNotifications(account uint32) SpentnessNotificationsClient
outputs controlled by the account.
func (*NotificationServer) TransactionNotifications ¶
func (s *NotificationServer) TransactionNotifications() TransactionNotificationsClient
it from the server.
type OutputKind ¶
type OutputKind byte
const ( OutputKindNormal OutputKind = iota OutputKindCoinbase )
Defined OutputKind constants
type OutputRedeemer ¶
type OutputSelectionPolicy ¶
type P2SHMultiSigOutput ¶
type P2SHMultiSigOutput struct { // multisig info. OutPoint wire.OutPoint OutputAmount util.Amount ContainingBlock BlockIdentity P2SHAddress *util.AddressScriptHash RedeemScript []byte M, N uint8 // M of N signatures required to redeem Redeemer *OutputRedeemer // nil unless spent }
type RecoveryManager ¶
type RecoveryManager struct {
// contains filtered or unexported fields
}
func NewRecoveryManager ¶
func NewRecoveryManager( recoveryWindow, batchSize uint32, chainParams *chaincfg.Params) *RecoveryManager
array for `batchSize` blocks to scan at once.
func (*RecoveryManager) AddToBlockBatch ¶
to the batch of blocks to be searched.
func (*RecoveryManager) BlockBatch ¶
func (rm *RecoveryManager) BlockBatch() []wtxmgr.BlockMeta
BlockBatch returns a buffer of blocks that have not yet been searched.
func (*RecoveryManager) ResetBlockBatch ¶
func (rm *RecoveryManager) ResetBlockBatch()
ResetBlockBatch resets the internal block buffer to conserve memory.
func (*RecoveryManager) Resurrect ¶
func (rm *RecoveryManager) Resurrect(ns walletdb.ReadBucket, scopedMgrs map[waddrmgr.KeyScope]*waddrmgr.ScopedKeyManager, credits []wtxmgr.Credit) error
attempt.
func (*RecoveryManager) State ¶
func (rm *RecoveryManager) State() *RecoveryState
State returns the current RecoveryState.
type RecoveryState ¶
type RecoveryState struct {
// contains filtered or unexported fields
}
func NewRecoveryState ¶
func NewRecoveryState( recoveryWindow uint32) *RecoveryState
particular key scope will receive the same recoveryWindow.
func (*RecoveryState) AddWatchedOutPoint ¶
func (rs *RecoveryState) AddWatchedOutPoint(outPoint *wire.OutPoint, addr util.Address)
we will monitor for spends during recovery.
func (*RecoveryState) StateForScope ¶
func (rs *RecoveryState) StateForScope( keyScope waddrmgr.KeyScope) *ScopeRecoveryState
recoveryWindow.
func (*RecoveryState) WatchedOutPoints ¶
func (rs *RecoveryState) WatchedOutPoints() map[wire.OutPoint]util.Address
to the wallet during recovery.
type RescanFinishedMsg ¶
type RescanFinishedMsg struct { Addresses []util.Address Notification *chain.RescanFinished }
type RescanProgressMsg ¶
type RescanProgressMsg struct { Addresses []util.Address Notification *chain.RescanProgress }
type ScopeRecoveryState ¶
type ScopeRecoveryState struct { // external use, i.e. receiving addresses. ExternalBranch *BranchRecoveryState // internal use, i.e. change addresses. InternalBranch *BranchRecoveryState }
func NewScopeRecoveryState ¶
func NewScopeRecoveryState( recoveryWindow uint32) *ScopeRecoveryState
recovery window.
type SignatureError ¶
type SpentnessNotifications ¶
type SpentnessNotifications struct {
// contains filtered or unexported fields
}
func (*SpentnessNotifications) Hash ¶
func (n *SpentnessNotifications) Hash() *chainhash.Hash
Hash returns the transaction hash of the spent output.
func (*SpentnessNotifications) Index ¶
func (n *SpentnessNotifications) Index() uint32
Index returns the transaction output index of the spent output.
type SpentnessNotificationsClient ¶
type SpentnessNotificationsClient struct { C <-chan *SpentnessNotifications // contains filtered or unexported fields }
func (*SpentnessNotificationsClient) Done ¶
func (c *SpentnessNotificationsClient) Done()
receiving notifications.
type TransactionNotifications ¶
type TransactionNotifications struct { AttachedBlocks []Block DetachedBlocks []*chainhash.Hash UnminedTransactions []TransactionSummary UnminedTransactionHashes []*chainhash.Hash NewBalances []AccountBalance }
type TransactionNotificationsClient ¶
type TransactionNotificationsClient struct { C <-chan *TransactionNotifications // contains filtered or unexported fields }
func (*TransactionNotificationsClient) Done ¶
func (c *TransactionNotificationsClient) Done()
receiving notifications.
type TransactionOutput ¶
type TransactionOutput struct { OutPoint wire.OutPoint Output wire.TxOut OutputKind OutputKind //TxExpiry uint32 ContainingBlock BlockIdentity ReceiveTime time.Time }
type TransactionSummary ¶
type TransactionSummary struct { Hash *chainhash.Hash Transaction []byte MyInputs []TransactionSummaryInput MyOutputs []TransactionSummaryOutput Fee util.Amount Timestamp int64 }
type TransactionSummaryInput ¶
type Wallet ¶
type Wallet struct { Manager *waddrmgr.Manager TxStore *wtxmgr.Store NtfnServer *NotificationServer // contains filtered or unexported fields }
func Open ¶
func Open( db walletdb.DB, pubPass []byte, cbs *waddrmgr.OpenCallbacks, params *chaincfg.Params, recoveryWindow uint32) (*Wallet, error)
Open loads an already-created wallet from the passed database and namespaces.
func (*Wallet) AccountAddresses ¶
account.
func (*Wallet) AccountBalances ¶
func (w *Wallet) AccountBalances(scope waddrmgr.KeyScope, requiredConfs int32) ([]AccountBalanceResult, error)
requiredConfs confirmations.
func (*Wallet) AccountName ¶
AccountName returns the name of an account.
func (*Wallet) AccountNumber ¶
particular key scope.
func (*Wallet) AccountOfAddress ¶
AccountOfAddress finds the account that an address is associated with.
func (*Wallet) AccountProperties ¶
func (w *Wallet) AccountProperties(scope waddrmgr.KeyScope, acct uint32) (*waddrmgr.AccountProperties, error)
manager, then updates the indexes based on the address pools.
func (*Wallet) Accounts ¶
func (w *Wallet) Accounts(scope waddrmgr.KeyScope) (*AccountsResult, error)
are included?
func (*Wallet) AddressInfo ¶
AddressInfo returns detailed information regarding a wallet address.
func (*Wallet) CalculateAccountBalances ¶
outputs must be iterated.
func (*Wallet) CalculateBalance ¶
include a UTXO.
func (*Wallet) ChainSynced ¶
and synced up to the best block on the main chain.
func (*Wallet) ChangePassphrases ¶
atomically.
func (*Wallet) ChangePrivatePassphrase ¶
before the password change.
func (*Wallet) ChangePublicPassphrase ¶
ChangePublicPassphrase modifies the public passphrase of the wallet.
func (*Wallet) CreateSimpleTx ¶
func (w *Wallet) CreateSimpleTx(account uint32, outputs []*wire.TxOut, minconf int32, satPerKb util.Amount) (*txauthor.AuthoredTx, error)
spend the same outputs.
func (*Wallet) CurrentAddress ¶
blockchain or pod mempool), the next chained address is returned.
func (*Wallet) DumpPrivKeys ¶
private keys in a wallet.
func (*Wallet) DumpWIFPrivateKey ¶
single wallet address.
func (*Wallet) GetTransactions ¶
func (w *Wallet) GetTransactions(startBlock, endBlock *BlockIdentifier, cancel <-chan struct{}) (*GetTransactionsResult, error)
Block structure which records properties about the block.
func (*Wallet) HaveAddress ¶
HaveAddress returns whether the wallet is the owner of the address a.
func (*Wallet) ImportP2SHRedeemScript ¶
func (w *Wallet) ImportP2SHRedeemScript(script []byte) (*util.AddressScriptHash, error)
ImportP2SHRedeemScript adds a P2SH redeem script to the wallet.
func (*Wallet) ImportPrivateKey ¶
func (w *Wallet) ImportPrivateKey(scope waddrmgr.KeyScope, wif *util.WIF, bs *waddrmgr.BlockStamp, rescan bool) (string, error)
wallet to disk.
func (*Wallet) ListAddressTransactions ¶
func (w *Wallet) ListAddressTransactions(pkHashes map[string]struct{}) ([]json.ListTransactionsResult, error)
intended to be used for listaddresstransactions RPC replies.
func (*Wallet) ListAllTransactions ¶
func (w *Wallet) ListAllTransactions() ([]json.ListTransactionsResult, error)
replies.
func (*Wallet) ListSinceBlock ¶
func (w *Wallet) ListSinceBlock(start, end, syncHeight int32) ([]json.ListTransactionsResult, error)
This is intended to be used for listsinceblock RPC replies.
func (*Wallet) ListTransactions ¶
func (w *Wallet) ListTransactions(from, count int) ([]json.ListTransactionsResult, error)
replies.
func (*Wallet) ListUnspent ¶
func (w *Wallet) ListUnspent(minconf, maxconf int32, addresses map[string]struct{}) ([]*json.ListUnspentResult, error)
transaction an empty array will be returned.
func (*Wallet) LockOutpoint ¶
an input for newly created transactions.
func (*Wallet) LockedOutpoint ¶
should not be used as an input for created transactions.
func (*Wallet) LockedOutpoints ¶
func (w *Wallet) LockedOutpoints() []json.TransactionInput
listlockunspent RPC results.
func (*Wallet) MakeMultiSigScript ¶
This function only works with pubkeys and P2PKH addresses derived from them.
func (*Wallet) NewAddress ¶
NewAddress returns the next external chained address for a wallet.
func (*Wallet) NewChangeAddress ¶
NewChangeAddress returns a new change address for a wallet.
func (*Wallet) NextAccount ¶
spec, which allows no unused account gaps).
func (*Wallet) PrivKeyForAddress ¶
address.
func (*Wallet) PubKeyForAddress ¶
PubKeyForAddress looks up the associated public key for a P2PKH address.
func (*Wallet) PublishTransaction ¶
of the wallet.
func (*Wallet) RenameAccount ¶
RenameAccount sets the name for an account number to newName.
func (*Wallet) ResetLockedOutpoints ¶
func (w *Wallet) ResetLockedOutpoints()
as inputs for new transactions.
func (*Wallet) SendOutputs ¶
func (w *Wallet) SendOutputs(outputs []*wire.TxOut, account uint32, minconf int32, satPerKb util.Amount) (*chainhash.Hash, error)
transaction hash upon success.
func (*Wallet) SetChainSynced ¶
marked out of sync again until after the next rescan completes.
func (*Wallet) SignTransaction ¶
func (w *Wallet) SignTransaction(tx *wire.MsgTx, hashType txscript.SigHashType, additionalPrevScripts map[wire.OutPoint][]byte, additionalKeysByAddress map[string]*util.WIF, p2shRedeemScriptsByAddress map[string][]byte) ([]SignatureError, error)
The transaction pointed to by tx is modified by this function.
func (*Wallet) SortedActivePaymentAddresses ¶
addresses in a wallet.
func (*Wallet) Start ¶
func (w *Wallet) Start()
Start starts the goroutines necessary to manage a wallet.
func (*Wallet) SubmitRescan ¶
and does not need to be read to prevent a deadlock.
func (*Wallet) SynchronizeRPC ¶
outside of the wallet package.
func (*Wallet) SynchronizingToNetwork ¶
with the Bitcoin network.
func (*Wallet) TotalReceivedForAccounts ¶
func (w *Wallet) TotalReceivedForAccounts(scope waddrmgr.KeyScope, minConf int32) ([]AccountTotalReceivedResult, error)
returning the total amount of Bitcoin received for all accounts.
func (*Wallet) TotalReceivedForAddr ¶
address.
func (*Wallet) UnlockOutpoint ¶
input for newly created transactions.
func (*Wallet) UnspentOutputs ¶
func (w *Wallet) UnspentOutputs(policy OutputSelectionPolicy) ([]*TransactionOutput, error)
UnspentOutputs fetches all unspent outputs from the wallet that match rules described in the passed policy.
func (*Wallet) WaitForShutdown ¶
func (w *Wallet) WaitForShutdown()
WaitForShutdown blocks until all wallet goroutines have finished executing.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package txauthor provides transaction creation code for wallets.
|
Package txauthor provides transaction creation code for wallets. |
Package wtxmgr provides an implementation of a transaction database handling spend tracking for a bitcoin wallet.
|
Package wtxmgr provides an implementation of a transaction database handling spend tracking for a bitcoin wallet. |
Package txrules provides transaction rules that should be followed by transaction authors for wide mempool acceptance and quick mining.
|
Package txrules provides transaction rules that should be followed by transaction authors for wide mempool acceptance and quick mining. |
Package txscript implements the bitcoin transaction script language.
|
Package txscript implements the bitcoin transaction script language. |
Package txsort provides the transaction sorting according to BIP 69.
|
Package txsort provides the transaction sorting according to BIP 69. |