Documentation ¶
Index ¶
- Constants
- func AmountAtom(f float64) int64
- func Confirmations(bestBlock int32, tx *sharedW.Transaction) int32
- func CreateNewWallet(pass *sharedW.AuthInfo, params *sharedW.InitParams) (sharedW.Asset, error)
- func CreateWatchOnlyWallet(walletName, extendedPublicKey string, params *sharedW.InitParams) (sharedW.Asset, error)
- func LoadExisting(w *sharedW.Wallet, params *sharedW.InitParams) (sharedW.Asset, error)
- func Log(m string)
- func LogT(tag, m string)
- func PGPWordList() []string
- func RestoreWallet(seedMnemonic string, pass *sharedW.AuthInfo, params *sharedW.InitParams) (sharedW.Asset, error)
- func TicketStatus(ticketMaturity, ticketExpiry, bestBlock int32, tx *sharedW.Transaction) string
- func UseLogger(logger slog.Logger)
- type AccountMixerNotificationListener
- type AccountsIterator
- type AddressInfo
- type Agenda
- type AgendaStatusType
- type Amount
- type Asset
- func (asset *Asset) AccountMixerConfigIsSet() bool
- func (asset *Asset) AccountMixerMixChange() bool
- func (asset *Asset) AccountName(accountNumber int32) (string, error)
- func (asset *Asset) AccountNameRaw(accountNumber uint32) (string, error)
- func (asset *Asset) AccountNumber(accountName string) (int32, error)
- func (asset *Asset) AccountOfAddress(address string) (string, error)
- func (asset *Asset) AccountXPubMatches(account uint32, legacyXPub, slip044XPub string) (bool, error)
- func (asset *Asset) AccountsIterator() (*AccountsIterator, error)
- func (asset *Asset) AddAccountMixerNotificationListener(accountMixerNotificationListener *AccountMixerNotificationListener, ...) error
- func (asset *Asset) AddSendDestination(id int, address string, atomAmount int64, sendMax bool) error
- func (asset *Asset) AddSyncProgressListener(syncProgressListener *sharedW.SyncProgressListener, uniqueIdentifier string) error
- func (asset *Asset) AddTxAndBlockNotificationListener(txAndBlockNotificationListener *sharedW.TxAndBlockNotificationListener, ...) error
- func (asset *Asset) AddressInfo(address string) (*AddressInfo, error)
- func (asset *Asset) AddressPubKey(address string) (string, error)
- func (asset *Asset) AgendaChoices(txHash string) (map[string]string, error)
- func (asset *Asset) AutoTicketsBuyerConfig() *TicketBuyerConfig
- func (asset *Asset) Broadcast(privatePassphrase, transactionLabel string) ([]byte, error)
- func (asset *Asset) CancelRescan()
- func (asset *Asset) CancelSync()
- func (asset *Asset) ClearMixerConfig()
- func (asset *Asset) ClearTicketBuyerConfig(_ int) error
- func (asset *Asset) ComputeTxSizeEstimation(dstnAddress string, utxos []*sharedW.UnspentOutput) (int, error)
- func (asset *Asset) ConnectedPeers() int32
- func (asset *Asset) CountTransactions(txFilter int32) (int, error)
- func (asset *Asset) CreateMixerAccounts(mixedAccount, unmixedAccount, privPass string) error
- func (asset *Asset) CreateNewAccount(accountName, privPass string) (int32, error)
- func (asset *Asset) CurrentAddress(account int32) (string, error)
- func (asset *Asset) CurrentSyncStage() utils.SyncStage
- func (asset *Asset) DecodeTransaction(walletTx *sharedW.TxInfoFromWallet, netParams *chaincfg.Params) (*sharedW.Transaction, error)
- func (asset *Asset) DiscoverUsage(gapLimit uint32) error
- func (asset *Asset) EnableSyncLogs()
- func (asset *Asset) EstimateFeeAndSize() (*sharedW.TxFeeAndSize, error)
- func (asset *Asset) EstimateMaxSendAmount() (*sharedW.Amount, error)
- func (asset *Asset) GeneralSyncProgress() *sharedW.GeneralSyncProgress
- func (asset *Asset) GetAccount(accountNumber int32) (*sharedW.Account, error)
- func (asset *Asset) GetAccountBalance(accountNumber int32) (*sharedW.Balance, error)
- func (asset *Asset) GetAccounts() (string, error)
- func (asset *Asset) GetAccountsRaw() (*sharedW.Accounts, error)
- func (asset *Asset) GetBestBlock() *sharedW.BlockInfo
- func (asset *Asset) GetBestBlockHeight() int32
- func (asset *Asset) GetBestBlockTimeStamp() int64
- func (asset *Asset) GetExtendedPubKey(account int32) (string, error)
- func (asset *Asset) GetTransaction(txHash string) (string, error)
- func (asset *Asset) GetTransactionRaw(txHash string) (*sharedW.Transaction, error)
- func (asset *Asset) GetTransactions(offset, limit, txFilter int32, newestFirst bool) (string, error)
- func (asset *Asset) GetTransactionsRaw(offset, limit, txFilter int32, newestFirst bool, txHashSearch string) (transactions []*sharedW.Transaction, err error)
- func (asset *Asset) GetUnsignedTx() *TxAuthor
- func (asset *Asset) GetWalletBalance() (*sharedW.Balance, error)
- func (asset *Asset) GetvspPolicy(account int32) vsp.Policy
- func (asset *Asset) HDPathForAccount(accountNumber int32) (string, error)
- func (asset *Asset) HasAccount(accountName string) bool
- func (asset *Asset) HaveAddress(address string) bool
- func (asset *Asset) IndexTransactions() error
- func (asset *Asset) IsAccountMixerActive() bool
- func (asset *Asset) IsAddressDiscovering() bool
- func (asset *Asset) IsAddressValid(address string) bool
- func (asset *Asset) IsAutoTicketsPurchaseActive() bool
- func (asset *Asset) IsConnectedToDecredNetwork() bool
- func (asset *Asset) IsConnectedToNetwork() bool
- func (asset *Asset) IsRescanning() bool
- func (asset *Asset) IsSycnRescanning() bool
- func (asset *Asset) IsSyncProgressListenerRegisteredFor(uniqueIdentifier string) bool
- func (asset *Asset) IsSyncShuttingDown() bool
- func (asset *Asset) IsSynced() bool
- func (asset *Asset) IsSyncing() bool
- func (asset *Asset) IsUnsignedTxExist() bool
- func (asset *Asset) IsWaiting() bool
- func (asset *Asset) KnownVSPs() []*VSP
- func (asset *Asset) LastUsedVSP() string
- func (asset *Asset) MixedAccountNumber() int32
- func (asset *Asset) NewUnsignedTx(sourceAccountNumber int32, utxos []*sharedW.UnspentOutput) error
- func (asset *Asset) NextAccount(accountName string) (int32, error)
- func (asset *Asset) NextAddress(account int32) (string, error)
- func (asset *Asset) NextTicketPriceRemaining() (secs int64, err error)
- func (asset *Asset) PeerInfo() (string, error)
- func (asset *Asset) PeerInfoRaw() ([]sharedW.PeerInfo, error)
- func (asset *Asset) PublishLastSyncProgress(uniqueIdentifier string) error
- func (asset *Asset) PublishUnminedTransactions() error
- func (asset *Asset) PurchaseTickets(account, numTickets int32, vspHost, passphrase string, vspPubKey []byte) ([]*chainhash.Hash, error)
- func (asset *Asset) ReadyToMix(_ int) (bool, error)
- func (asset *Asset) ReloadVSPList(ctx context.Context)
- func (asset *Asset) RemoveAccountMixerNotificationListener(uniqueIdentifier string)
- func (asset *Asset) RemoveChangeDestination()
- func (asset *Asset) RemovePeers()
- func (asset *Asset) RemoveSendDestination(id int)
- func (asset *Asset) RemoveSyncProgressListener(uniqueIdentifier string)
- func (asset *Asset) RemoveTxAndBlockNotificationListener(uniqueIdentifier string)
- func (asset *Asset) RenameAccount(accountNumber int32, newName string) error
- func (asset *Asset) RescanBlocks() error
- func (asset *Asset) RescanBlocksFromHeight(startHeight int32) error
- func (asset *Asset) RestartSpvSync() error
- func (asset *Asset) SafelyCancelSync()
- func (asset *Asset) SaveLastUsedVSP(host string)
- func (asset *Asset) SaveVSP(host string) (err error)
- func (asset *Asset) SendDestination(id int) *sharedW.TransactionDestination
- func (asset *Asset) SetAccountMixerConfig(mixedAccount, unmixedAccount int32, privPass string) error
- func (asset *Asset) SetAutoTicketsBuyerConfig(vspHost string, purchaseAccount int32, amountToMaintain int64)
- func (asset *Asset) SetBlocksRescanProgressListener(blocksRescanProgressListener *sharedW.BlocksRescanProgressListener)
- func (asset *Asset) SetChangeDestination(address string)
- func (asset *Asset) SetSpecificPeer(addresses string)
- func (asset *Asset) SetTreasuryPolicy(PiKey, newVotingPolicy, tixHash string, passphrase string) error
- func (asset *Asset) SetVoteChoice(agendaID, choiceID, hash, passphrase string) error
- func (asset *Asset) SignMessage(passphrase, address, message string) ([]byte, error)
- func (asset *Asset) SpendableForAccount(account int32) (int64, error)
- func (asset *Asset) SpvSync() error
- func (asset *Asset) StakingOverview() (stOverview *StakingOverview, err error)
- func (asset *Asset) StartAccountMixer(walletPassphrase string) error
- func (asset *Asset) StartTicketBuyer(passphrase string) error
- func (asset *Asset) StopAccountMixer() error
- func (asset *Asset) StopAutoTicketsPurchase() error
- func (asset *Asset) SyncData() *SyncData
- func (asset *Asset) SyncInactiveForPeriod(totalInactiveSeconds int64)
- func (asset *Asset) Synced() bool
- func (asset *Asset) TicketBuyerConfigIsSet() bool
- func (asset *Asset) TicketExpiry() int32
- func (asset *Asset) TicketHasVotedOrRevoked(ticketHash string) (bool, error)
- func (asset *Asset) TicketMaturity() int32
- func (asset *Asset) TicketPrice() (*TicketPriceResponse, error)
- func (asset *Asset) TicketSpender(ticketHash string) (*sharedW.Transaction, error)
- func (asset *Asset) ToAmount(v int64) sharedW.AssetAmount
- func (asset *Asset) TotalSendAmount() *sharedW.Amount
- func (asset *Asset) TotalStakingRewards() (int64, error)
- func (asset *Asset) TransactionOverview() (txOverview *sharedW.TransactionOverview, err error)
- func (asset *Asset) TreasuryPolicies(PiKey, tixHash string) ([]*TreasuryKeyPolicy, error)
- func (asset *Asset) TxMatchesFilter(tx *sharedW.Transaction, txFilter int32) bool
- func (asset *Asset) TxMatchesFilter2(direction, blockHeight int32, txType, ticketSpender string, txFilter int32) bool
- func (asset *Asset) UnmixedAccountNumber() int32
- func (asset *Asset) UnspentOutputs(account int32) ([]*sharedW.UnspentOutput, error)
- func (asset *Asset) UnspentUnexpiredTickets() ([]*sharedW.Transaction, error)
- func (asset *Asset) UpdateSendDestination(id int, address string, atomAmount int64, sendMax bool) error
- func (asset *Asset) VSPClient(host string, pubKey []byte) (*vsp.Client, error)
- func (asset *Asset) VSPTicketInfo(hash string) (*VSPTicketInfo, error)
- func (asset *Asset) VerifyMessage(address, message, signatureBase64 string) (bool, error)
- type CSPPConfig
- type DEXWallet
- func (dw *DEXWallet) AccountBalance(ctx context.Context, confirms int32, accountName string) (*walletjson.GetAccountBalanceResult, error)
- func (dw *DEXWallet) AccountOwnsAddress(ctx context.Context, addr stdaddr.Address, acctName string) (bool, error)
- func (dw *DEXWallet) AccountUnlocked(_ context.Context, _ string) (bool, error)
- func (dw *DEXWallet) Accounts() dexdcr.XCWalletAccounts
- func (dw *DEXWallet) AddressInfo(ctx context.Context, address string) (*dexdcr.AddressInfo, error)
- func (dw *DEXWallet) AddressPrivKey(ctx context.Context, addr stdaddr.Address) (*secp256k1.PrivateKey, error)
- func (dw *DEXWallet) Connect(ctx context.Context) error
- func (dw *DEXWallet) Disconnect()
- func (dw *DEXWallet) ExternalAddress(ctx context.Context, accountName string) (stdaddr.Address, error)
- func (dw *DEXWallet) GetBestBlock(ctx context.Context) (*chainhash.Hash, int64, error)
- func (dw *DEXWallet) GetBlock(ctx context.Context, blockHash *chainhash.Hash) (*wire.MsgBlock, error)
- func (dw *DEXWallet) GetBlockHash(ctx context.Context, blockHeight int64) (*chainhash.Hash, error)
- func (dw *DEXWallet) GetBlockHeader(ctx context.Context, blockHash *chainhash.Hash) (*dexdcr.BlockHeader, error)
- func (dw *DEXWallet) GetRawTransaction(ctx context.Context, txHash *chainhash.Hash) (*wire.MsgTx, error)
- func (dw *DEXWallet) GetTransaction(ctx context.Context, txHash *chainhash.Hash) (*dexdcr.WalletTransaction, error)
- func (dw *DEXWallet) InternalAddress(ctx context.Context, accountName string) (stdaddr.Address, error)
- func (dw *DEXWallet) ListSinceBlock(ctx context.Context, start, end, syncHeight int32) ([]walletjson.ListTransactionsResult, error)
- func (dw *DEXWallet) LockAccount(_ context.Context, _ string) error
- func (dw *DEXWallet) LockUnspent(_ context.Context, unlock bool, ops []*wire.OutPoint) error
- func (dw *DEXWallet) LockedOutputs(ctx context.Context, accountName string) ([]chainjson.TransactionInput, error)
- func (dw *DEXWallet) MatchAnyScript(ctx context.Context, blockHash *chainhash.Hash, scripts [][]byte) (bool, error)
- func (dw *DEXWallet) NotifyOnTipChange(_ context.Context, _ dexdcr.TipChangeCallback) bool
- func (dw *DEXWallet) PeerCount(_ context.Context) (uint32, error)
- func (dw *DEXWallet) PurchaseTickets(_ context.Context, _ int, _, _ string) ([]*dexasset.Ticket, error)
- func (dw *DEXWallet) Reconfigure(_ context.Context, _ *dexasset.WalletConfig, _ dex.Network, _ string) (restart bool, err error)
- func (dw *DEXWallet) SendRawTransaction(ctx context.Context, tx *wire.MsgTx, _ bool) (*chainhash.Hash, error)
- func (dw *DEXWallet) SetTxFee(_ context.Context, _ dcrutil.Amount) error
- func (dw *DEXWallet) SetVotingPreferences(_ context.Context, _, _, _ map[string]string) error
- func (dw *DEXWallet) SignRawTransaction(ctx context.Context, baseTx *wire.MsgTx) (*wire.MsgTx, error)
- func (dw *DEXWallet) SpvMode() bool
- func (dw *DEXWallet) StakeInfo(_ context.Context) (*dcrwallet.StakeInfoData, error)
- func (dw *DEXWallet) SyncStatus(_ context.Context) (synced bool, progress float32, err error)
- func (dw *DEXWallet) Tickets(_ context.Context) ([]*dexasset.Ticket, error)
- func (dw *DEXWallet) UnlockAccount(ctx context.Context, pass []byte, _ string) error
- func (dw *DEXWallet) UnspentOutput(ctx context.Context, txHash *chainhash.Hash, index uint32, _ int8) (*dexdcr.TxOutput, error)
- func (dw *DEXWallet) Unspents(ctx context.Context, accountName string) ([]*walletjson.ListUnspentResult, error)
- func (dw *DEXWallet) VotingPreferences(_ context.Context) ([]*walletjson.VoteChoice, []*dexasset.TBTreasurySpend, ...)
- type DcrdataAgenda
- type StakingOverview
- type SyncData
- type TicketBuyerConfig
- type TicketPriceResponse
- type TreasuryKeyPolicy
- type TxAuthor
- type VSP
- type VSPFeeStatus
- type VSPTicketInfo
- type VspInfoResponse
- type WalletHelper
- type WalletsIterator
Constants ¶
const ( ShuffleServer = "mix.decred.org" MainnetShufflePort = "5760" TestnetShufflePort = "15760" MixedAccountBranch = int32(udb.ExternalBranch) )
const ( InvalidSyncStage = utils.InvalidSyncStage CFiltersFetchSyncStage = utils.CFiltersFetchSyncStage HeadersFetchSyncStage = utils.HeadersFetchSyncStage AddressDiscoverySyncStage = utils.AddressDiscoverySyncStage HeadersRescanSyncStage = utils.HeadersRescanSyncStage )
const ( // Export constants for use in mobile apps // since gomobile excludes fields from sub packages. TxFilterAll = utils.TxFilterAll TxFilterSent = utils.TxFilterSent TxFilterReceived = utils.TxFilterReceived TxFilterTransferred = utils.TxFilterTransferred TxFilterStaking = utils.TxFilterStaking TxFilterCoinBase = utils.TxFilterCoinBase TxFilterRegular = utils.TxFilterRegular TxFilterMixed = utils.TxFilterMixed TxFilterVoted = utils.TxFilterVoted TxFilterRevoked = utils.TxFilterRevoked TxFilterImmature = utils.TxFilterImmature TxFilterLive = utils.TxFilterLive TxFilterUnmined = utils.TxFilterUnmined TxFilterExpired = utils.TxFilterExpired TxFilterTickets = utils.TxFilterTickets TxDirectionInvalid = txhelper.TxDirectionInvalid TxDirectionSent = txhelper.TxDirectionSent TxDirectionReceived = txhelper.TxDirectionReceived TxDirectionTransferred = txhelper.TxDirectionTransferred TxTypeRegular = txhelper.TxTypeRegular TxTypeCoinBase = txhelper.TxTypeCoinBase TxTypeTicketPurchase = txhelper.TxTypeTicketPurchase TxTypeVote = txhelper.TxTypeVote TxTypeRevocation = txhelper.TxTypeRevocation TxTypeMixed = txhelper.TxTypeMixed TicketStatusUnmined = "unmined" TicketStatusImmature = "immature" TicketStatusLive = "live" TicketStatusVotedOrRevoked = "votedrevoked" TicketStatusExpired = "expired" )
const ( AddressGapLimit uint32 = 20 ImportedAccountNumber = udb.ImportedAddrAccount DefaultAccountNum = udb.DefaultAccountNum )
const ( TestnetHDPath = "m / 44' / 1' / " LegacyTestnetHDPath = "m / 44’ / 11’ / " MainnetHDPath = "m / 44' / 42' / " LegacyMainnetHDPath = "m / 44’ / 20’ / " )
const AlternatingWords = `` /* 4430-byte string literal not displayed */
const BlockValid = 1 << 0
Variables ¶
This section is empty.
Functions ¶
func AmountAtom ¶
func Confirmations ¶
func Confirmations(bestBlock int32, tx *sharedW.Transaction) int32
func CreateNewWallet ¶
CreateNewWallet accepts the wallet pass information and the init parameters. It validates the network type passed by fetching the chain parameters associated with it for the DCR asset. It then generates the DCR loader interface that is passed to be used upstream while creating a new wallet in the shared wallet implementation. Immediately a new wallet is created, the function to safely cancel network sync is set. There after returning the new wallet's interface.
func CreateWatchOnlyWallet ¶
func CreateWatchOnlyWallet(walletName, extendedPublicKey string, params *sharedW.InitParams) (sharedW.Asset, error)
CreateWatchOnlyWallet accepts the wallet name, extended public key and the init parameters to create a watch only wallet for the DCR asset. It validates the network type passed by fetching the chain parameters associated with it for the DCR asset. It then generates the DCR loader interface that is passed to be used upstream while creating the watch only wallet in the shared wallet implementation. Immediately a watch only wallet is created, the function to safely cancel network sync is set. There after returning the watch only wallet's interface.
func LoadExisting ¶
LoadExisting accepts the stored shared wallet information and the init parameters. It validates the network type passed by fetching the chain parameters associated with it for the DCR asset. It then generates the DCR loader interface that is passed to be used upstream while loading the existing the wallet in the shared wallet implementation. Immediately loading the existing wallet is complete, the function to safely cancel network sync is set. There after returning the loaded wallet's interface.
func PGPWordList ¶
func PGPWordList() []string
func RestoreWallet ¶
func RestoreWallet(seedMnemonic string, pass *sharedW.AuthInfo, params *sharedW.InitParams) (sharedW.Asset, error)
RestoreWallet accepts the seed, wallet pass information and the init parameters. It validates the network type passed by fetching the chain parameters associated with it for the DCR asset. It then generates the DCR loader interface that is passed to be used upstream while restoring the wallet in the shared wallet implementation. Immediately wallet restore is complete, the function to safely cancel network sync is set. There after returning the restored wallet's interface.
func TicketStatus ¶
func TicketStatus(ticketMaturity, ticketExpiry, bestBlock int32, tx *sharedW.Transaction) string
Types ¶
type AccountsIterator ¶
type AccountsIterator struct {
// contains filtered or unexported fields
}
func (*AccountsIterator) Next ¶
func (accountsInterator *AccountsIterator) Next() *sharedW.Account
func (*AccountsIterator) Reset ¶
func (accountsInterator *AccountsIterator) Reset()
type AddressInfo ¶
AddressInfo holds information about an address If the address belongs to the querying wallet, IsMine will be true and the AccountNumber and AccountName values will be populated
type Agenda ¶
type Agenda struct { AgendaID string `json:"agenda_id"` Description string `json:"description"` Mask uint32 `json:"mask"` Choices []chaincfg.Choice `json:"choices"` VotingPreference string `json:"voting_preference"` StartTime int64 `json:"start_time"` ExpireTime int64 `json:"expire_time"` Status string `json:"status"` }
Agenda contains information about a consensus deployment
func AllVoteAgendas ¶ added in v1.1.0
AllVoteAgendas returns all agendas of all stake versions for the active network and this version of the software.
type AgendaStatusType ¶
type AgendaStatusType string
AgendaStatusType defines the various agenda statuses.
const ( // AgendaStatusUpcoming used to define an agenda yet to vote. AgendaStatusUpcoming AgendaStatusType = "upcoming" // AgendaStatusInProgress used to define an agenda with voting ongoing. AgendaStatusInProgress AgendaStatusType = "in progress" // AgendaStatusFailed used to define an agenda when the votes tally does not // attain the minimum threshold set. Activation height is not set for such an // agenda. AgendaStatusFailed AgendaStatusType = "failed" // AgendaStatusLockedIn used to define an agenda that has passed after attaining // the minimum set threshold. AgendaStatusLockedIn AgendaStatusType = "locked in" // AgendaStatusFinished used to define an agenda that has finished voting. AgendaStatusFinished AgendaStatusType = "finished" // UnknownStatus is used when a status string is not recognized. UnknownStatus AgendaStatusType = "unknown" )
func AgendaStatusFromStr ¶
func AgendaStatusFromStr(status string) AgendaStatusType
AgendaStatusFromStr creates an agenda status from a string. If "UnknownStatus" is returned then an invalid status string has been passed.
func (AgendaStatusType) String ¶
func (a AgendaStatusType) String() string
type Amount ¶
type Amount dcrutil.Amount
Amount implements the Asset amount interface for the DCR asset
func (Amount) MulF64 ¶
func (a Amount) MulF64(f float64) sharedW.AssetAmount
MulF64 multiplys the Amount with the provided float64 value.
type Asset ¶
type Asset struct { *sharedW.Wallet TxAuthoredInfo *TxAuthor // contains filtered or unexported fields }
func (*Asset) AccountMixerConfigIsSet ¶
func (*Asset) AccountMixerMixChange ¶
func (*Asset) AccountNameRaw ¶
func (*Asset) AccountOfAddress ¶
func (*Asset) AccountXPubMatches ¶
func (asset *Asset) AccountXPubMatches(account uint32, legacyXPub, slip044XPub string) (bool, error)
AccountXPubMatches checks if the xpub of the provided account matches the provided legacy or SLIP0044 xpub. While both the legacy and SLIP0044 xpubs will be checked for watch-only wallets, other wallets will only check the xpub that matches the coin type key used by the asset.
func (*Asset) AccountsIterator ¶
func (asset *Asset) AccountsIterator() (*AccountsIterator, error)
func (*Asset) AddAccountMixerNotificationListener ¶
func (asset *Asset) AddAccountMixerNotificationListener(accountMixerNotificationListener *AccountMixerNotificationListener, uniqueIdentifier string) error
func (*Asset) AddSendDestination ¶
func (*Asset) AddSyncProgressListener ¶
func (asset *Asset) AddSyncProgressListener(syncProgressListener *sharedW.SyncProgressListener, uniqueIdentifier string) error
func (*Asset) AddTxAndBlockNotificationListener ¶
func (asset *Asset) AddTxAndBlockNotificationListener(txAndBlockNotificationListener *sharedW.TxAndBlockNotificationListener, uniqueIdentifier string) error
AddTxAndBlockNotificationListener registers a set of functions to be invoked when a transaction or block update is processed by the asset. If async is true, the provided callback methods will be called from separate goroutines, allowing notification senders to continue their operation without waiting for the listener to complete processing the notification. This asyncrhonous handling is especially important for cases where the wallet process that sends the notification temporarily prevents access to other wallet features until all notification handlers finish processing the notification. If a notification handler were to try to access such features, it would result in a deadlock.
func (*Asset) AddressInfo ¶
func (asset *Asset) AddressInfo(address string) (*AddressInfo, error)
func (*Asset) AgendaChoices ¶ added in v1.1.0
AgendaChoices returns saved vote preferences for the agendas of the current stake version. If a txHash is provided, the vote preferences saved for that specific tx will be returned. Vote preferences for older agendas cannot currently be retrieved.
func (*Asset) AutoTicketsBuyerConfig ¶
func (asset *Asset) AutoTicketsBuyerConfig() *TicketBuyerConfig
AutoTicketsBuyerConfig returns the previously set ticket buyer config for the asset.
func (*Asset) CancelRescan ¶
func (asset *Asset) CancelRescan()
func (*Asset) CancelSync ¶
func (asset *Asset) CancelSync()
func (*Asset) ClearMixerConfig ¶
func (asset *Asset) ClearMixerConfig()
func (*Asset) ClearTicketBuyerConfig ¶
ClearTicketBuyerConfig clears the wallet's ticket buyer config.
func (*Asset) ComputeTxSizeEstimation ¶
func (asset *Asset) ComputeTxSizeEstimation(dstnAddress string, utxos []*sharedW.UnspentOutput) (int, error)
ComputeTxSizeEstimation computes the estimated size of the final raw transaction.
func (*Asset) ConnectedPeers ¶
func (*Asset) CountTransactions ¶
func (*Asset) CreateMixerAccounts ¶
CreateMixerAccounts creates the two accounts needed for the account mixer. This function is added to ease unlocking the wallet before creating accounts. This function should be used with auto cspp mixer setup.
func (*Asset) CreateNewAccount ¶
func (*Asset) CurrentAddress ¶
CurrentAddress gets the most recently requested payment address from the asset. If that address has already been used to receive funds, the next chained address is returned.
func (*Asset) CurrentSyncStage ¶
func (*Asset) DecodeTransaction ¶
func (asset *Asset) DecodeTransaction(walletTx *sharedW.TxInfoFromWallet, netParams *chaincfg.Params) (*sharedW.Transaction, error)
DecodeTransaction uses `walletTx.Hex` to retrieve detailed information for a transaction.
func (*Asset) DiscoverUsage ¶
func (*Asset) EnableSyncLogs ¶
func (asset *Asset) EnableSyncLogs()
func (*Asset) EstimateFeeAndSize ¶
func (asset *Asset) EstimateFeeAndSize() (*sharedW.TxFeeAndSize, error)
func (*Asset) EstimateMaxSendAmount ¶
func (*Asset) GeneralSyncProgress ¶
func (asset *Asset) GeneralSyncProgress() *sharedW.GeneralSyncProgress
func (*Asset) GetAccount ¶
func (*Asset) GetAccountBalance ¶
func (*Asset) GetAccounts ¶
func (*Asset) GetBestBlock ¶
func (*Asset) GetBestBlockHeight ¶
func (*Asset) GetBestBlockTimeStamp ¶
func (*Asset) GetExtendedPubKey ¶
func (*Asset) GetTransactionRaw ¶
func (asset *Asset) GetTransactionRaw(txHash string) (*sharedW.Transaction, error)
func (*Asset) GetTransactions ¶
func (*Asset) GetTransactionsRaw ¶
func (*Asset) GetUnsignedTx ¶
func (*Asset) GetWalletBalance ¶ added in v1.1.0
GetWalletBalance returns the total balance across all accounts.
func (*Asset) GetvspPolicy ¶ added in v1.0.1
GetvspPolicy creates the VSP policy using the account number provided. Uses the user-specified instructions for processing fee payments on a ticket, rather than some default policy.
func (*Asset) HDPathForAccount ¶
func (*Asset) HasAccount ¶
func (*Asset) HaveAddress ¶
func (*Asset) IndexTransactions ¶
func (*Asset) IsAccountMixerActive ¶
IsAccountMixerActive returns true if account mixer is active
func (*Asset) IsAddressDiscovering ¶ added in v1.1.2
func (*Asset) IsAddressValid ¶
func (*Asset) IsAutoTicketsPurchaseActive ¶
IsAutoTicketsPurchaseActive returns true if ticket buyer is active.
func (*Asset) IsConnectedToDecredNetwork ¶
func (*Asset) IsConnectedToNetwork ¶
func (*Asset) IsRescanning ¶
func (*Asset) IsSycnRescanning ¶ added in v1.1.2
func (*Asset) IsSyncProgressListenerRegisteredFor ¶
func (*Asset) IsSyncShuttingDown ¶
func (*Asset) IsUnsignedTxExist ¶
func (*Asset) KnownVSPs ¶
KnownVSPs returns a list of known VSPs. This list may be updated by calling ReloadVSPList. This method is safe for concurrent access.
func (*Asset) LastUsedVSP ¶
LastUsedVSP returns the host of the last used VSP, as saved by the SaveLastUsedVSP() method.
func (*Asset) MixedAccountNumber ¶
func (*Asset) NewUnsignedTx ¶
func (asset *Asset) NewUnsignedTx(sourceAccountNumber int32, utxos []*sharedW.UnspentOutput) error
func (*Asset) NextAddress ¶
NextAddress returns the address immediately following the last requested payment address. If that address has already been used to receive funds, the next chained address is returned.
func (*Asset) NextTicketPriceRemaining ¶
NextTicketPriceRemaining returns the remaning time in seconds of a ticket for the next block, if secs equal 0 is imminent
func (*Asset) PublishLastSyncProgress ¶
func (*Asset) PublishUnminedTransactions ¶
func (*Asset) PurchaseTickets ¶
func (asset *Asset) PurchaseTickets(account, numTickets int32, vspHost, passphrase string, vspPubKey []byte) ([]*chainhash.Hash, error)
PurchaseTickets purchases tickets from the asset. Returns a slice of hashes for tickets purchased.
func (*Asset) ReloadVSPList ¶
ReloadVSPList reloads the list of known VSPs. This method makes multiple network calls; should be called in a goroutine to prevent blocking the UI thread.
func (*Asset) RemoveAccountMixerNotificationListener ¶
func (*Asset) RemoveChangeDestination ¶
func (asset *Asset) RemoveChangeDestination()
func (*Asset) RemovePeers ¶
func (asset *Asset) RemovePeers()
func (*Asset) RemoveSendDestination ¶
func (*Asset) RemoveSyncProgressListener ¶
func (*Asset) RemoveTxAndBlockNotificationListener ¶
func (*Asset) RenameAccount ¶
func (*Asset) RescanBlocks ¶
func (*Asset) RescanBlocksFromHeight ¶
func (*Asset) RestartSpvSync ¶
func (*Asset) SafelyCancelSync ¶
func (asset *Asset) SafelyCancelSync()
SafelyCancelSync is used to controllably disable network activity.
func (*Asset) SaveLastUsedVSP ¶
SaveLastUsedVSP saves the host of the last used VSP.
func (*Asset) SaveVSP ¶
SaveVSP marks a VSP as known and will be susbequently included as part of known VSPs.
func (*Asset) SendDestination ¶
func (asset *Asset) SendDestination(id int) *sharedW.TransactionDestination
func (*Asset) SetAccountMixerConfig ¶
func (asset *Asset) SetAccountMixerConfig(mixedAccount, unmixedAccount int32, privPass string) error
SetAccountMixerConfig sets the config for mixed and unmixed account. Private passphrase is verifed for security even if not used. This function should be used with manual cspp mixer setup.
func (*Asset) SetAutoTicketsBuyerConfig ¶
func (asset *Asset) SetAutoTicketsBuyerConfig(vspHost string, purchaseAccount int32, amountToMaintain int64)
SetAutoTicketsBuyerConfig sets ticket buyer config for the asset.
func (*Asset) SetBlocksRescanProgressListener ¶
func (asset *Asset) SetBlocksRescanProgressListener(blocksRescanProgressListener *sharedW.BlocksRescanProgressListener)
func (*Asset) SetChangeDestination ¶
func (*Asset) SetSpecificPeer ¶
func (*Asset) SetTreasuryPolicy ¶
func (asset *Asset) SetTreasuryPolicy(PiKey, newVotingPolicy, tixHash string, passphrase string) error
SetTreasuryPolicy saves the voting policy for treasury spends by a particular PI key. If a ticket hash is provided, the voting policy is also updated with the VSP controlling the ticket. If a ticket hash isn't provided, the vote choice is saved to the local wallet database and the VSPs controlling all unspent, unexpired tickets are updated to use the specified vote policy.
func (*Asset) SetVoteChoice ¶
SetVoteChoice sets a voting choice for the specified agenda. If a ticket hash is provided, the voting choice is also updated with the VSP controlling the ticket. If a ticket hash isn't provided, the vote choice is saved to the local wallet database and the VSPs controlling all unspent, unexpired tickets are updated to use the specified vote choice.
func (*Asset) SignMessage ¶
func (*Asset) SpendableForAccount ¶
func (*Asset) StakingOverview ¶
func (asset *Asset) StakingOverview() (stOverview *StakingOverview, err error)
func (*Asset) StartAccountMixer ¶
StartAccountMixer starts the automatic account mixer
func (*Asset) StartTicketBuyer ¶
StartTicketBuyer starts the automatic ticket buyer. The wallet should already be configured with the required parameters using asset.SetAutoTicketsBuyerConfig().
func (*Asset) StopAccountMixer ¶
StopAccountMixer stops the active account mixer
func (*Asset) StopAutoTicketsPurchase ¶
StopAutoTicketsPurchase stops the automatic ticket buyer.
func (*Asset) SyncInactiveForPeriod ¶
func (*Asset) TicketBuyerConfigIsSet ¶
TicketBuyerConfigIsSet checks if ticket buyer config is set for the asset.
func (*Asset) TicketExpiry ¶
func (*Asset) TicketHasVotedOrRevoked ¶
func (*Asset) TicketMaturity ¶
func (*Asset) TicketPrice ¶
func (asset *Asset) TicketPrice() (*TicketPriceResponse, error)
TicketPrice returns the price of a ticket for the next block, also known as the stake difficulty. May be incorrect if blockchain sync is ongoing or if blockchain is not up-to-date.
func (*Asset) TicketSpender ¶
func (asset *Asset) TicketSpender(ticketHash string) (*sharedW.Transaction, error)
func (*Asset) ToAmount ¶
func (asset *Asset) ToAmount(v int64) sharedW.AssetAmount
Returns a DCR amount that implements the asset amount interface.
func (*Asset) TotalSendAmount ¶
func (*Asset) TotalStakingRewards ¶
func (*Asset) TransactionOverview ¶
func (asset *Asset) TransactionOverview() (txOverview *sharedW.TransactionOverview, err error)
func (*Asset) TreasuryPolicies ¶
func (asset *Asset) TreasuryPolicies(PiKey, tixHash string) ([]*TreasuryKeyPolicy, error)
TreasuryPolicies returns saved voting policies for treasury spends per pi key. If a pi key is specified, the policy for that pi key is returned; otherwise the policies for all pi keys are returned. If a ticket hash is provided, the policy(ies) for that ticket is/are returned.
func (*Asset) TxMatchesFilter ¶
func (asset *Asset) TxMatchesFilter(tx *sharedW.Transaction, txFilter int32) bool
func (*Asset) TxMatchesFilter2 ¶
func (*Asset) UnmixedAccountNumber ¶
func (*Asset) UnspentOutputs ¶
func (asset *Asset) UnspentOutputs(account int32) ([]*sharedW.UnspentOutput, error)
UnspentOutputs returns unspent outputs that can be used for transactions. Unspent outputs that are locked by the wallet are not returned as valid unspent utxos.
func (*Asset) UnspentUnexpiredTickets ¶
func (asset *Asset) UnspentUnexpiredTickets() ([]*sharedW.Transaction, error)
UnspentUnexpiredTickets returns all Unmined, Immature and Live tickets.
func (*Asset) UpdateSendDestination ¶
func (*Asset) VSPTicketInfo ¶
func (asset *Asset) VSPTicketInfo(hash string) (*VSPTicketInfo, error)
VSPTicketInfo returns vsp-related info for a given ticket. Returns an error if the ticket is not yet assigned to a VSP.
type CSPPConfig ¶
type DEXWallet ¶ added in v1.1.0
type DEXWallet struct {
// contains filtered or unexported fields
}
DEXWallet wraps *Asset and implements dexdcr.Wallet.
func NewDEXWallet ¶ added in v1.1.0
func NewDEXWallet(w *dcrwallet.Wallet, helper WalletHelper, tradingAccountNumber int32, syncData *SyncData) *DEXWallet
NewDEXWallet returns a new *DEXWallet.
func (*DEXWallet) AccountBalance ¶ added in v1.1.0
func (dw *DEXWallet) AccountBalance(ctx context.Context, confirms int32, accountName string) (*walletjson.GetAccountBalanceResult, error)
AccountBalance returns the balance breakdown for the specified account. Part of the Wallet interface.
func (*DEXWallet) AccountOwnsAddress ¶ added in v1.1.0
func (dw *DEXWallet) AccountOwnsAddress(ctx context.Context, addr stdaddr.Address, acctName string) (bool, error)
AccountOwnsAddress checks if the provided address belongs to the specified account. Part of the Wallet interface.
func (*DEXWallet) AccountUnlocked ¶ added in v1.1.0
AccountUnlocked returns true if the account is unlocked. Part of the Wallet interface.
func (*DEXWallet) Accounts ¶ added in v1.1.0
func (dw *DEXWallet) Accounts() dexdcr.XCWalletAccounts
Accounts returns the names of the accounts for use by the exchange wallet.
func (*DEXWallet) AddressInfo ¶ added in v1.1.0
AddressInfo returns information for the provided address. It is an error if the address is not owned by the wallet. Part of the Wallet interface.
func (*DEXWallet) AddressPrivKey ¶ added in v1.1.0
func (dw *DEXWallet) AddressPrivKey(ctx context.Context, addr stdaddr.Address) (*secp256k1.PrivateKey, error)
AddressPrivKey fetches the privkey for the specified address. Part of the Wallet interface.
func (*DEXWallet) Connect ¶ added in v1.1.0
Connect establishes a connection to the wallet. Part of the Wallet interface.
func (*DEXWallet) Disconnect ¶ added in v1.1.0
func (dw *DEXWallet) Disconnect()
Disconnect shuts down access to the wallet. Part of the Wallet interface.
func (*DEXWallet) ExternalAddress ¶ added in v1.1.0
func (dw *DEXWallet) ExternalAddress(ctx context.Context, accountName string) (stdaddr.Address, error)
ExternalAddress returns an external address using GapPolicyIgnore. Part of the Wallet interface. Using GapPolicyWrap here, introducing a relatively small risk of address reuse, but improving wallet recoverability.
func (*DEXWallet) GetBestBlock ¶ added in v1.1.0
GetBestBlock returns the hash and height of the wallet's best block. Part of the Wallet interface.
func (*DEXWallet) GetBlock ¶ added in v1.1.0
func (dw *DEXWallet) GetBlock(ctx context.Context, blockHash *chainhash.Hash) (*wire.MsgBlock, error)
GetBlock returns the *wire.MsgBlock. Part of the Wallet interface.
func (*DEXWallet) GetBlockHash ¶ added in v1.1.0
GetBlockHash returns the hash of the mainchain block at the specified height. Part of the Wallet interface.
func (*DEXWallet) GetBlockHeader ¶ added in v1.1.0
func (dw *DEXWallet) GetBlockHeader(ctx context.Context, blockHash *chainhash.Hash) (*dexdcr.BlockHeader, error)
GetBlockHeader generates a *BlockHeader for the specified block hash. The returned block header is a wire.BlockHeader with the addition of the block's median time. Part of the Wallet interface.
func (*DEXWallet) GetRawTransaction ¶ added in v1.1.0
func (dw *DEXWallet) GetRawTransaction(ctx context.Context, txHash *chainhash.Hash) (*wire.MsgTx, error)
GetRawTransaction returns details of the tx with the provided hash. Returns dw.wallet. CoinNotFoundError if the tx is not found. Part of the Wallet interface.
func (*DEXWallet) GetTransaction ¶ added in v1.1.0
func (dw *DEXWallet) GetTransaction(ctx context.Context, txHash *chainhash.Hash) (*dexdcr.WalletTransaction, error)
GetTransaction returns the details of a wallet tx, if the wallet contains a tx with the provided hash. Returns dw.wallet. CoinNotFoundError if the tx is not found in the wallet.
func (*DEXWallet) InternalAddress ¶ added in v1.1.0
func (dw *DEXWallet) InternalAddress(ctx context.Context, accountName string) (stdaddr.Address, error)
InternalAddress returns an internal address using GapPolicyIgnore. Part of the Wallet interface.
func (*DEXWallet) ListSinceBlock ¶ added in v1.1.2
func (dw *DEXWallet) ListSinceBlock(ctx context.Context, start, end, syncHeight int32) ([]walletjson.ListTransactionsResult, error)
func (*DEXWallet) LockAccount ¶ added in v1.1.0
LockAccount locks the specified account. Part of the Wallet interface.
func (*DEXWallet) LockUnspent ¶ added in v1.1.0
LockUnspent locks or unlocks the specified outpoint. Part of the Wallet interface.
func (*DEXWallet) LockedOutputs ¶ added in v1.1.0
func (dw *DEXWallet) LockedOutputs(ctx context.Context, accountName string) ([]chainjson.TransactionInput, error)
LockedOutputs fetches locked outputs for the Wallet. Part of the Wallet interface.
func (*DEXWallet) MatchAnyScript ¶ added in v1.1.0
func (dw *DEXWallet) MatchAnyScript(ctx context.Context, blockHash *chainhash.Hash, scripts [][]byte) (bool, error)
MatchAnyScript looks for any of the provided scripts in the block specified. Part of the Wallet interface.
func (*DEXWallet) NotifyOnTipChange ¶ added in v1.1.0
NotifyOnTipChange is not used, in favor of the tipNotifier pattern. See: https://github.com/decred/dcrdex/blob/master/client/asset/dcr/spv.go#513. Part of the Wallet interface.
func (*DEXWallet) PeerCount ¶ added in v1.1.0
PeerCount returns the number of network peers to which the wallet or its backing node are connected. Part of the Wallet interface.
func (*DEXWallet) PurchaseTickets ¶ added in v1.1.0
func (dw *DEXWallet) PurchaseTickets(_ context.Context, _ int, _, _ string) ([]*dexasset.Ticket, error)
PurchaseTickets purchases n tickets. vspHost and vspPubKey only needed for internal wallets.
func (*DEXWallet) Reconfigure ¶ added in v1.1.0
func (dw *DEXWallet) Reconfigure(_ context.Context, _ *dexasset.WalletConfig, _ dex.Network, _ string) (restart bool, err error)
Part of the Wallet interface.
func (*DEXWallet) SendRawTransaction ¶ added in v1.1.0
func (dw *DEXWallet) SendRawTransaction(ctx context.Context, tx *wire.MsgTx, _ bool) (*chainhash.Hash, error)
SendRawTransaction broadcasts the provided transaction to the Decred network. Part of the Wallet interface.
func (*DEXWallet) SetVotingPreferences ¶ added in v1.1.0
SetVotingPreferences sets preferences used when a ticket is chosen to be voted on.
func (*DEXWallet) SignRawTransaction ¶ added in v1.1.0
func (dw *DEXWallet) SignRawTransaction(ctx context.Context, baseTx *wire.MsgTx) (*wire.MsgTx, error)
SignRawTransaction signs the provided transaction. SignRawTransaction is not used for redemptions, so previous outpoints and scripts should be known by the wallet. SignRawTransaction should not mutate the input transaction. Part of the Wallet interface.
func (*DEXWallet) SpvMode ¶ added in v1.1.0
SpvMode returns true if the wallet is connected to the Decred network via SPV peers. Part of the Wallet interface.
func (*DEXWallet) SyncStatus ¶ added in v1.1.0
SyncStatus returns the wallet's sync status. Part of the Wallet interface.
func (*DEXWallet) Tickets ¶ added in v1.1.0
Tickets returns current active ticket hashes up until they are voted or revoked. Includes unconfirmed tickets.
func (*DEXWallet) UnlockAccount ¶ added in v1.1.0
UnlockAccount unlocks the specified account or the wallet if account is not encrypted. Part of the Wallet interface.
func (*DEXWallet) UnspentOutput ¶ added in v1.1.0
func (dw *DEXWallet) UnspentOutput(ctx context.Context, txHash *chainhash.Hash, index uint32, _ int8) (*dexdcr.TxOutput, error)
UnspentOutput returns information about an unspent tx output, if found and unspent. Use wire.TxTreeUnknown if the output tree is unknown, the correct tree will be returned if the unspent output is found. This method is only guaranteed to return results for outputs that pay to the wallet, although wallets connected to a full node may return results for non-wallet outputs. Returns dw.wallet.CoinNotFoundError if the unspent output cannot be located. Part of the Wallet interface.
func (*DEXWallet) Unspents ¶ added in v1.1.0
func (dw *DEXWallet) Unspents(ctx context.Context, accountName string) ([]*walletjson.ListUnspentResult, error)
Unspents fetches unspent outputs for the Wallet. Part of the Wallet interface.
func (*DEXWallet) VotingPreferences ¶ added in v1.1.0
func (dw *DEXWallet) VotingPreferences(_ context.Context) ([]*walletjson.VoteChoice, []*dexasset.TBTreasurySpend, []*walletjson.TreasuryPolicyResult, error)
VotingPreferences returns current voting preferences.
type DcrdataAgenda ¶
type DcrdataAgenda struct { Name string `json:"name"` Description string `json:"-"` Status string `json:"status"` VotingStarted int64 `json:"-"` VotingDone int64 `json:"-"` Activated int64 `json:"-"` HardForked int64 `json:"-"` StartTime string `json:"-"` ExpireTime string `json:"-"` VoteVersion uint32 `json:"-"` Mask uint16 `json:"-"` }
DcrdataAgenda models agenda information for the active network from the dcrdata api https://dcrdata.decred.org/api/agendas for mainnet or https://testnet.decred.org/api/agendas for testnet.
type StakingOverview ¶
type SyncData ¶
type SyncData struct {
// contains filtered or unexported fields
}
reading/writing of properties of this struct are protected by mutex.x
type TicketBuyerConfig ¶
type TicketBuyerConfig struct { VspHost string PurchaseAccount int32 BalanceToMaintain int64 VspClient *vsp.Client }
TicketBuyerConfig defines configuration parameters for running an automated ticket buyer.
type TicketPriceResponse ¶
type TreasuryKeyPolicy ¶
type TreasuryKeyPolicy struct { PiKey string `json:"pi_key"` TicketHash string `json:"ticket_hash"` // nil unless for per-ticket VSP policies Policy string `json:"policy"` }
TreasuryKeyPolicy records the voting policy for treasury spend transactions by a particular key, and possibly for a particular ticket being voted on by a VSP.
type VSP ¶
type VSP struct { Host string *VspInfoResponse }
type VSPFeeStatus ¶
type VSPFeeStatus uint8
VSPFeeStatus represents the current fee status of a ticket.
const ( // VSPFeeProcessStarted represents the state which process has being // called but fee still not paid. VSPFeeProcessStarted VSPFeeStatus = iota // VSPFeeProcessPaid represents the state where the process has being // paid, but not published. VSPFeeProcessPaid VSPFeeProcessErrored // VSPFeeProcessConfirmed represents the state where the fee has been // confirmed by the VSP. VSPFeeProcessConfirmed )
func (VSPFeeStatus) String ¶
func (status VSPFeeStatus) String() string
String returns a human-readable interpretation of the vsp fee status.
type VSPTicketInfo ¶
type VSPTicketInfo struct { VSP string FeeTxHash string FeeTxStatus VSPFeeStatus // Client defines the vsp client needed to process more tickets requests. Client *vsp.Client // ConfirmedByVSP is nil if the ticket status could not be obtained // from the VSP, false if the VSP hasn't confirmed the fee and true // if the VSP has fully registered the ticket. ConfirmedByVSP bool // VoteChoices is only set if the ticket status was obtained from the // VSP. VoteChoices map[string]string }
VSPTicketInfo is information about a ticket that is assigned to a VSP.
type VspInfoResponse ¶
type VspInfoResponse struct { APIVersions []int64 `json:"apiversions"` Timestamp int64 `json:"timestamp"` PubKey []byte `json:"pubkey"` FeePercentage float64 `json:"feepercentage"` VspClosed bool `json:"vspclosed"` Network string `json:"network"` VspdVersion string `json:"vspdversion"` Voting int64 `json:"voting"` Voted int64 `json:"voted"` Revoked int64 `json:"revoked"` }
* begin vspd-related types
type WalletHelper ¶ added in v1.1.2
type WalletsIterator ¶
func (*WalletsIterator) Next ¶
func (walletsIterator *WalletsIterator) Next() *Asset
func (*WalletsIterator) Reset ¶
func (walletsIterator *WalletsIterator) Reset()