Versions in this module Expand all Collapse all v0 v0.6.2 Dec 19, 2023 Changes in this version type FundRawTransactionOptions + FeeRate *int v0.6.1 Dec 19, 2023 Changes in this version + type FundRawTransactionOptions struct + ConfTarget *int + EstimateMode *string v0.6.0 Dec 18, 2023 v0.5.0 Sep 1, 2021 v0.4.0 May 19, 2020 v0.3.0 Mar 25, 2020 Changes in this version + var ErrClientInInitialDownload = fmt.Errorf("RPC_CLIENT_IN_INITIAL_DOWNLOAD") + var ErrClientInvalidIPOrSubnet = fmt.Errorf("RPC_CLIENT_INVALID_IP_OR_SUBNET") + var ErrClientNodeAlreadyAdded = fmt.Errorf("RPC_CLIENT_NODE_ALREADY_ADDED") + var ErrClientNodeNotAdded = fmt.Errorf("RPC_CLIENT_NODE_NOT_ADDED") + var ErrClientNodeNotConnected = fmt.Errorf("RPC_CLIENT_NODE_NOT_CONNECTED") + var ErrClientNotConnected = fmt.Errorf("RPC_CLIENT_NOT_CONNECTED") + var ErrClientP2PDisabled = fmt.Errorf("RPC_CLIENT_P2P_DISABLED") + var ErrDatabaseError = fmt.Errorf("RPC_DATABASE_ERROR") + var ErrDeserialzationError = fmt.Errorf("RPC_DESERIALIZATION_ERROR") + var ErrInWarmup = fmt.Errorf("RPC_IN_WARMUP") + var ErrInsufficientFunds = fmt.Errorf("RPC_WALLET_INSUFFICIENT_FUNDS") + var ErrInternalError = fmt.Errorf("RPC_INTERNAL_ERROR") + var ErrInvalidAddressOrKey = fmt.Errorf("RPC_INVALID_ADDRESS_OR_KEY") + var ErrInvalidParameter = fmt.Errorf("RPC_INVALID_PARAMETER") + var ErrInvalidParams = fmt.Errorf("RPC_INVALID_PARAMS") + var ErrInvalidRequest = fmt.Errorf("RPC_INVALID_REQUEST") + var ErrMap = map[int16]error + var ErrMethodDepricated = fmt.Errorf("RPC_METHOD_DEPRECATED") + var ErrMethodNotFound = fmt.Errorf("RPC_METHOD_NOT_FOUND") + var ErrMiscError = fmt.Errorf("RPC_MISC_ERROR") + var ErrOutOfMemory = fmt.Errorf("RPC_OUT_OF_MEMORY") + var ErrParseError = fmt.Errorf("RPC_PARSE_ERROR") + var ErrTypeError = fmt.Errorf("RPC_TYPE_ERROR") + var ErrVerifyAlreadyInChain = fmt.Errorf("RPC_VERIFY_ALREADY_IN_CHAIN") + var ErrVerifyError = fmt.Errorf("RPC_VERIFY_ERROR") + var ErrVerifyRejected = fmt.Errorf("RPC_VERIFY_REJECTED") + var ErrWalletAlreadyUnlocked = fmt.Errorf("RPC_WALLET_ALREADY_UNLOCKED") + var ErrWalletEncryptionFailed = fmt.Errorf("RPC_WALLET_ENCRYPTION_FAILED") + var ErrWalletError = fmt.Errorf("RPC_WALLET_ERROR") + var ErrWalletInvalidLabelName = fmt.Errorf("RPC_WALLET_INVALID_LABEL_NAME") + var ErrWalletKeypoolRanOut = fmt.Errorf("RPC_WALLET_KEYPOOL_RAN_OUT") + var ErrWalletNotFound = fmt.Errorf("RPC_WALLET_NOT_FOUND") + var ErrWalletNotSpecified = fmt.Errorf("RPC_WALLET_NOT_SPECIFIED") + var ErrWalletPassphraseIncorrect = fmt.Errorf("RPC_WALLET_PASSPHRASE_INCORRECT") + var ErrWalletUnlockNeeded = fmt.Errorf("RPC_WALLET_UNLOCK_NEEDED") + var ErrWalletWrongEncState = fmt.Errorf("RPC_WALLET_WRONG_ENC_STATE") v0.2.3 Nov 29, 2018 Changes in this version type Bitcoind + func (b *Bitcoind) SignRawTransactionWithWallet(rawtx string) (signedtx string, err error) v0.2.2 Jul 31, 2018 Changes in this version type Bitcoind + func (b *Bitcoind) GetWalletInfo() (i WalletInfo, err error) + type WalletInfo struct + Balance float64 + Errors string + HDMasterKeyID string + ImmatureBalance float64 + KeypoolOldest int64 + KeypoolSize int64 + KeypoolSizeHDInternal int64 + Name string + PayTxFee float64 + TxCount int64 + UnconfirmedBalance float64 + UnlockedUntil int64 + Version int64 v0.2.1 Jul 30, 2018 Changes in this version type Bitcoind + func (b *Bitcoind) GetNewP2SHAddress(account ...string) (addr string, err error) v0.1.0 Apr 4, 2018 Changes in this version + const DefaultRPCClientTimeout + const Version + type Bitcoind struct + func New(host string, port int, user, passwd string, useSSL bool) (*Bitcoind, error) + func (b *Bitcoind) BackupWallet(destination string) error + func (b *Bitcoind) CreateRawTransaction(inputs []*RawTransactionInput, output RawTransactionOutput) (rawtx string, err error) + func (b *Bitcoind) DecodeRawTransaction(rawtx string) (decoded RawTransaction, err error) + func (b *Bitcoind) DumpPrivKey(address string) (privKey string, err error) + func (b *Bitcoind) EncryptWallet(passphrase string) error + func (b *Bitcoind) EstimateFee(blocks int) (fee float64, err error) + func (b *Bitcoind) FundRawTransaction(rawtx string) (*FundRawTransactionResponse, error) + func (b *Bitcoind) GetAccount(address string) (account string, err error) + func (b *Bitcoind) GetAccountAddress(account string) (address string, err error) + func (b *Bitcoind) GetAddressesByAccount(account string) (addresses []string, err error) + func (b *Bitcoind) GetBalance(account string, minconf uint64) (balance float64, err error) + func (b *Bitcoind) GetBestBlockhash() (bestBlockHash string, err error) + func (b *Bitcoind) GetBlock(blockHash string) (block Block, err error) + func (b *Bitcoind) GetBlockCount() (count uint64, err error) + func (b *Bitcoind) GetBlockHash(index uint64) (hash string, err error) + func (b *Bitcoind) GetBlockTemplate(capabilities []string, mode string) (template string, err error) + func (b *Bitcoind) GetConnectionCount() (count uint64, err error) + func (b *Bitcoind) GetDifficulty() (difficulty float64, err error) + func (b *Bitcoind) GetGenerate() (generate bool, err error) + func (b *Bitcoind) GetHashesPerSec() (hashpersec float64, err error) + func (b *Bitcoind) GetInfo() (i Info, err error) + func (b *Bitcoind) GetMiningInfo() (miningInfo MiningInfo, err error) + func (b *Bitcoind) GetNewAddress(account ...string) (addr string, err error) + func (b *Bitcoind) GetNewBech32Address(account ...string) (addr string, err error) + func (b *Bitcoind) GetNewLegacyAddress(account ...string) (addr string, err error) + func (b *Bitcoind) GetPeerInfo() (peerInfo []Peer, err error) + func (b *Bitcoind) GetRawChangeAddress(account ...string) (rawAddress string, err error) + func (b *Bitcoind) GetRawMempool() (txID []string, err error) + func (b *Bitcoind) GetRawTransaction(txID string, verbose bool) (rawTx interface{}, err error) + func (b *Bitcoind) GetReceivedByAccount(account string, minconf uint32) (amount float64, err error) + func (b *Bitcoind) GetReceivedByAddress(address string, minconf uint32) (amount float64, err error) + func (b *Bitcoind) GetTransaction(txid string) (transaction Transaction, err error) + func (b *Bitcoind) GetTxOut(txid string, n uint32, includeMempool bool) (transactionOut UTransactionOut, err error) + func (b *Bitcoind) GetTxOutsetInfo() (txOutSet TransactionOutSet, err error) + func (b *Bitcoind) GetWork(data ...string) (response interface{}, err error) + func (b *Bitcoind) ImportPrivKey(privKey, label string, rescan bool) error + func (b *Bitcoind) KeyPoolRefill() error + func (b *Bitcoind) ListAccounts(minconf int32) (accounts map[string]float64, err error) + func (b *Bitcoind) ListAddressGroupings() (list []ListAddressResult, err error) + func (b *Bitcoind) ListLockUnspent() (unspendableOutputs []UnspendableOutput, err error) + func (b *Bitcoind) ListReceivedByAccount(minConf uint32, includeEmpty bool) (list []ReceivedByAccount, err error) + func (b *Bitcoind) ListReceivedByAddress(minConf uint32, includeEmpty bool) (list []ReceivedByAddress, err error) + func (b *Bitcoind) ListSinceBlock(blockHash string, targetConfirmations uint32) (transaction []Transaction, err error) + func (b *Bitcoind) ListTransactions(account string, count, from uint32) (transaction []Transaction, err error) + func (b *Bitcoind) ListUnspent(minconf, maxconf uint32) (transactions []UnspentOutput, err error) + func (b *Bitcoind) LockUnspent(lock bool, outputs []UnspendableOutput) (success bool, err error) + func (b *Bitcoind) Move(formAccount, toAccount string, amount float64, minconf uint32, comment string) (success bool, err error) + func (b *Bitcoind) SendFrom(fromAccount, toAddress string, amount float64, minconf uint32, ...) (txID string, err error) + func (b *Bitcoind) SendMany(fromAccount string, amounts map[string]float64, minconf uint32, comment string) (txID string, err error) + func (b *Bitcoind) SendRawTransaction(signedtx string) (string, error) + func (b *Bitcoind) SendToAddress(toAddress string, amount float64, comment, commentTo string) (txID string, err error) + func (b *Bitcoind) SetAccount(address, account string) error + func (b *Bitcoind) SetGenerate(generate bool, genProcLimit int32) error + func (b *Bitcoind) SetTxFee(amount float64) error + func (b *Bitcoind) SignMessage(address, message string) (sig string, err error) + func (b *Bitcoind) SignRawTransaction(rawtx string) (signedtx string, err error) + func (b *Bitcoind) Stop() error + func (b *Bitcoind) ValidateAddress(address string) (va ValidateAddressResponse, err error) + func (b *Bitcoind) VerifyMessage(address, sign, message string) (success bool, err error) + func (b *Bitcoind) WalletLock() error + func (b *Bitcoind) WalletPassphrase(passPhrase string, timeout uint64) error + func (b *Bitcoind) WalletPassphraseChange(oldPassphrase, newPassprhase string) error + type Block struct + Bits string + Chainwork string + Confirmations uint64 + Difficulty float64 + Hash string + Height uint64 + Merkleroot string + Nextblockhash string + Nonce uint64 + Previousblockhash string + Size uint64 + Time int64 + Tx []string + Version uint32 + type FundRawTransactionResponse struct + ChangePos int + Fee float64 + Hex string + type Info struct + Balance float64 + Blocks uint32 + Connections uint32 + Difficulty float64 + Errors string + KeypoolSize uint32 + Keypoololdest uint64 + Paytxfee float64 + Protocolversion uint32 + Proxy string + Relayfee float64 + Testnet bool + Timeoffset int32 + UnlockedUntil int64 + Version uint32 + Walletversion uint32 + type ListAddressResult struct + Account string + Address string + Amount float64 + type MiningInfo struct + Blocks uint64 + CurrentBlockTx uint64 + CurrentBlocksize uint64 + Difficulty float64 + Errors string + GenProcLimit int32 + Generate bool + HashesPersec uint64 + NetworkHashps uint64 + PooledtTx uint64 + Testnet bool + type Peer struct + Addr string + Addrlocal string + Banscore int32 + Bytesrecv uint64 + Bytessent uint64 + Conntime uint64 + Inbound bool + Lastrecv uint64 + Lastsend uint64 + Pingtime float64 + Pingwait float64 + Services string + Startingheight int32 + Subver string + Syncnode bool + Version uint32 + type RawTransaction struct + BlockHash string + Blocktime int64 + Confirmations uint64 + Hex string + LockTime uint32 + Time int64 + Txid string + Version uint32 + Vin []Vin + Vout []Vout + type RawTransactionInput struct + TxID string + Vout int + type RawTransactionOutput map[string]float64 + type ReceivedByAccount struct + Account string + Amount float64 + Confirmations uint32 + type ReceivedByAddress struct + Account string + Address string + Amount float64 + Confirmations uint32 + TxIDs []string + type ScriptPubKey struct + Addresses []string + Asm string + Hex string + ReqSigs int + Type string + type ScriptSig struct + Asm string + Hex string + type SignRawTransactionError struct + Message string + ScriptSig string + Sequence int64 + TxID string + Vout int + func (e *SignRawTransactionError) Error() string + type SignRawTransactionResponse struct + Complete bool + Errors []SignRawTransactionError + Hex string + func (r *SignRawTransactionResponse) Error() string + func (r *SignRawTransactionResponse) HasError() bool + type Transaction struct + Account string + Address string + Amount float64 + BlockHash string + BlockIndex int64 + BlockTime int64 + Category TransactionCategory + Confirmations int64 + Details []TransactionDetails + Fee float64 + Hex string + Time int64 + TimeReceived int64 + TxID string + Vout int64 + WalletConflicts []string + type TransactionCategory string + const TX_CATEGORY_RECEIVE + const TX_CATEGORY_SEND + type TransactionDetails struct + Account string + Address string + Amount float64 + Category string + Fee float64 + type TransactionOutSet struct + Bestblock string + BytesSerialized float64 + HashSerialized string + Height uint32 + TotalAmount float64 + Transactions float64 + TxOuts float64 + type UTransactionOut struct + Bestblock string + Coinbase bool + Confirmations uint32 + ScriptPubKey ScriptPubKey + Value float64 + Version uint32 + type UnspendableOutput struct + TxID string + Vout uint64 + type UnspentOutput struct + Account string + Address string + Amount float64 + Confirmations int64 + ScriptPubKey string + Solvable bool + Spendable bool + TxID string + Vout uint32 + type ValidateAddressResponse struct + Account string + Address string + IsCompressed bool + IsMine bool + IsScript bool + IsValid bool + PubKey string + type Vin struct + Coinbase string + ScriptSig ScriptSig + Sequence uint32 + Txid string + Vout int + type Vout struct + N int + ScriptPubKey ScriptPubKey + Value float64 + type Work struct + Data string + Hash1 string + Midstate string + Target string