client

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClientShutdown is an error to describe the condition where the
	// client is either already shutdown, or in the process of shutting
	// down.  Any outstanding futures when a client shutdown occurs will
	// return this error as will any new requests.
	ErrClientShutdown = errors.New("the client has been shutdown")
)

Functions

func MarshalCmdToJRPC

func MarshalCmdToJRPC(id uint64, cmd *Command) ([]byte, error)

Description: MarshalCmdToJRPC marshals the passed command to a JSON-RPC request byte slice that is suitable for transmission to an RPC server. The provided command type must be a registered type. All commands provided by this package are registered by default.

  • Author: architect.bian
  • Date: 2018/08/26 19:14

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Description: Client represents a Bitcoin RPC client which allows easy access to the various RPC methods available on a Bitcoin RPC server. Each of the wrapper functions handle the details of converting the passed and return types th and from the underlying JSON types which are required for the JSON-RPC invocations.

The client provides each RPC in both synchronous (blocking) and asynchronous (non-blocking) forms. The asynchronous forms are based on the concept of futures where they return an instance of a type that promises to deliver the result of the invocation at some future time. Invoking the Receive method on the returned future will block util the result is available if it's not already.

  • Author: architect.bian
  • Date: 2018/08/26 14:03

func NewClient

func NewClient(config *Config) *Client

Description: New creates a new RPC client based on the provided connection configuration details.

  • Author: architect.bian
  • Date: 2018/08/23 14:53

func (*Client) AbandonTransaction added in v0.4.0

func (c *Client) AbandonTransaction(txid string) error

Description: Mark in-wallet transaction <txid> as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace "stuck" or evicted transactions. It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already abandoned.

  • Author: architect.bian
  • Date: 2018/10/15 13:29

func (*Client) AbandonTransactionAsync added in v0.4.0

func (c *Client) AbandonTransactionAsync(txid string) futures.FutureResult

Description: AbandonTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See AbandonTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) AbortRescan added in v0.4.0

func (c *Client) AbortRescan() error

Description: Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.

  • Author: architect.bian
  • Date: 2018/10/15 13:34

func (*Client) AbortRescanAsync added in v0.4.0

func (c *Client) AbortRescanAsync() futures.FutureResult

Description: AbortRescanAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See AbortRescan for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) AddMultiSigAddress added in v0.4.0

func (c *Client) AddMultiSigAddress(nrequired int32, keys []string) (*interface{}, error)

Description: Add a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup. Each key is a Bitcoin address or hex-encoded public key. This functionality is only intended for use with non-watchonly addresses. See `importaddress` for watchonly p2sh address support.

  • Author: architect.bian
  • Date: 2018/10/15 13:38

func (*Client) AddMultiSigAddressAsync added in v0.4.0

func (c *Client) AddMultiSigAddressAsync(nrequired int32, keys []string, label *string, addressType *string) futures.FutureResult

Description: AddMultiSigAddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See AddMultiSigAddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) AddMultiSigAddressEntire added in v0.4.0

func (c *Client) AddMultiSigAddressEntire(nrequired int32, keys []string, label string, addressType string) (*interface{}, error)

Description: AddMultiSigAddressEntire Add a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup. Each key is a Bitcoin address or hex-encoded public key. This functionality is only intended for use with non-watchonly addresses. See `importaddress` for watchonly p2sh address support. 'label' is specified, assign address to that label.

  • Author: architect.bian
  • Date: 2018/10/15 13:38

func (*Client) BackupWallet added in v0.4.0

func (c *Client) BackupWallet(destination string) error

Description: Safely copies current wallet file to destination, which can be a directory or a path with filename.

  • Author: architect.bian
  • Date: 2018/10/15 14:31

func (*Client) BackupWalletAsync added in v0.4.0

func (c *Client) BackupWalletAsync(destination string) futures.FutureResult

Description: BackupWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See BackupWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) BumpFee added in v0.4.0

func (c *Client) BumpFee(txid string, options map[string]interface{}) (*interface{}, error)

Description:

  • Author: architect.bian
  • Date: 2018/10/15 14:33

func (*Client) BumpFeeAsync added in v0.4.0

func (c *Client) BumpFeeAsync(txid string, options map[string]interface{}) futures.FutureResult

Description: BumpFeeAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See BumpFee for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) CombinePSBT added in v0.4.0

func (c *Client) CombinePSBT(txHexs []string) (*interface{}, error)

Description: Combine multiple partially signed Bitcoin transactions into one transaction. Implements the Combiner role.

  • Author: architect.bian
  • Date: 2018/10/15 20:18

func (*Client) CombinePSBTAsync added in v0.4.0

func (c *Client) CombinePSBTAsync(txHexs []string) futures.FutureResult

Description: CombinePSBT returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See CombinePSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) CombineRawTransaction added in v0.4.0

func (c *Client) CombineRawTransaction(txs []string) (*interface{}, error)

Description: Combine multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.

  • Author: architect.bian
  • Date: 2018/10/15 20:18

func (*Client) CombineRawTransactionAsync added in v0.4.0

func (c *Client) CombineRawTransactionAsync(txs []string) futures.FutureResult

Description: CombineRawTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See CombineRawTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) ConvertToPSBT added in v0.6.0

func (c *Client) ConvertToPSBT(txHex string) (*string, error)

Description: Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction createpsbt and walletcreatefundedpsbt should be used for new applications.

  • Author: architect.bian
  • Date: 2018/10/15 20:22

func (*Client) ConvertToPSBTAsync added in v0.6.0

func (c *Client) ConvertToPSBTAsync(txHex string, permitsigdata bool, iswitness bool) futures.FutureString

Description: ConvertToPSBTAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ConvertToPSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) ConvertToPSBTEntire added in v0.6.0

func (c *Client) ConvertToPSBTEntire(txHex string, permitsigdata bool, iswitness bool) (*string, error)

Description: Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction createpsbt and walletcreatefundedpsbt should be used for new applications.

  • Author: architect.bian
  • Date: 2018/10/15 20:23

func (*Client) CreateRawTransaction added in v0.4.0

func (c *Client) CreateRawTransaction(inputs []map[string]interface{}, outputs []map[string]interface{},
	locktime int32, replaceable bool) (*string, error)

Description: Create a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.

  • Author: architect.bian
  • Date: 2018/10/15 20:31

func (*Client) CreateRawTransactionAsync added in v0.4.0

func (c *Client) CreateRawTransactionAsync(inputs []map[string]interface{}, outputs []map[string]interface{}, locktime int32, replaceable bool) futures.FutureString

Description: CreateRawTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See CreateRawTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) CreateWallet added in v0.4.0

func (c *Client) CreateWallet(walletName string, disablePrivateKeys bool) (*interface{}, error)

Description: Creates and loads a new wallet.

  • Author: architect.bian
  • Date: 2018/10/15 14:38

func (*Client) CreateWalletAsync added in v0.4.0

func (c *Client) CreateWalletAsync(walletName string, disablePrivateKeys bool) futures.FutureResult

Description: CreateWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See CreateWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) CreatepSBT added in v0.4.0

func (c *Client) CreatepSBT(inputs []map[string]interface{}, outputs []map[string]interface{}, locktime int32, replaceable bool) (*string, error)

Description: Creates a transaction in the Partially Signed Transaction format. Implements the Creator role.

  • Author: architect.bian
  • Date: 2018/10/15 20:27

func (*Client) CreatepSBTAsync added in v0.4.0

func (c *Client) CreatepSBTAsync(inputs []map[string]interface{}, outputs []map[string]interface{}, locktime int32, replaceable bool) futures.FutureString

Description: CreatepSBTAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See CreatepSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) DecodePSBT added in v0.6.0

func (c *Client) DecodePSBT(psbtBase64 string) (*interface{}, error)

Description: Return a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.

  • Author: architect.bian
  • Date: 2018/10/15 20:32

func (*Client) DecodePSBTAsync added in v0.6.0

func (c *Client) DecodePSBTAsync(psbtBase64 string) futures.FutureResult

Description: DecodePSBTAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See DecodePSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) DecodeRawTransaction added in v0.4.0

func (c *Client) DecodeRawTransaction(txHex string, isWitness bool) (*interface{}, error)

Description: Return a JSON object representing the serialized, hex-encoded transaction.

  • Author: architect.bian
  • Date: 2018/10/15 20:34

func (*Client) DecodeRawTransactionAsync added in v0.4.0

func (c *Client) DecodeRawTransactionAsync(txHex string, isWitness bool) futures.FutureResult

Description: DecodeRawTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See DecodeRawTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) DecodeScript added in v0.4.0

func (c *Client) DecodeScript(scriptHex string) (*interface{}, error)

Description: Decode a hex-encoded script.

  • Author: architect.bian
  • Date: 2018/10/15 20:36

func (*Client) DecodeScriptAsync added in v0.4.0

func (c *Client) DecodeScriptAsync(scriptHex string) futures.FutureResult

Description: DecodeScriptAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See DecodeScript for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) DumpPrivkey added in v0.4.0

func (c *Client) DumpPrivkey(address string) (*string, error)

Description: Reveals the private key corresponding to 'address'. Then the importprivkey can be used with this output

  • Author: architect.bian
  • Date: 2018/10/15 14:41

func (*Client) DumpPrivkeyAsync added in v0.4.0

func (c *Client) DumpPrivkeyAsync(address string) futures.FutureString

Description: DumpPrivkeyAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See DumpPrivkey for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) DumpWallet added in v0.4.0

func (c *Client) DumpWallet(filename string) (*interface{}, error)

Description: Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files. Imported scripts are included in the dumpfile, but corresponding BIP173 addresses, etc. may not be added automatically by importwallet. Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).

  • Author: architect.bian
  • Date: 2018/10/15 14:44

func (*Client) DumpWalletAsync added in v0.4.0

func (c *Client) DumpWalletAsync(filename string) futures.FutureResult

Description: DumpWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See DumpWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) EncryptWallet added in v0.4.0

func (c *Client) EncryptWallet(passphrase string) error

Description: Encrypts the wallet with 'passphrase'. This is for first time encryption. After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior the making these calls. Use the walletpassphrase call for this, and then walletlock call. If the wallet is already encrypted, use the walletpassphrasechange call. Note that this will shutdown the server.

  • Author: architect.bian
  • Date: 2018/10/15 14:46

func (*Client) EncryptWalletAsync added in v0.4.0

func (c *Client) EncryptWalletAsync(passphrase string) futures.FutureResult

Description: EncryptWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See EncryptWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) FinalizePSBT added in v0.6.0

func (c *Client) FinalizePSBT(psbt string, extract bool) (*interface{}, error)

Description: Finalize the inputs of a PSBT. If the transaction is fully signed, it will produce a network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete. Implements the Finalizer and Extractor roles.

  • Author: architect.bian
  • Date: 2018/10/15 20:38

func (*Client) FinalizePSBTAsync added in v0.6.0

func (c *Client) FinalizePSBTAsync(psbt string, extract bool) futures.FutureResult

Description: FinalizePSBTAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See FinalizePSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) FundRawTransaction added in v0.4.0

func (c *Client) FundRawTransaction(txHex string, options map[string]interface{}, iswitness bool) (*interface{}, error)

Description: Add inputs to a transaction until it has enough in value to meet its out value. This will not modify existing inputs, and will add at most one change output to the outputs. No existing outputs will be modified unless "subtractFeeFromOutputs" is specified. Note that inputs which were signed may need to be resigned after completion since in/outputs have been added. The inputs added will not be signed, use signrawtransaction for that. Note that all existing inputs must have their previous output transaction be in the wallet. Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees). You can see whether this is the case by checking the "solvable" field in the listunspent output. Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only

  • Author: architect.bian
  • Date: 2018/10/15 20:36

func (*Client) FundRawTransactionAsync added in v0.4.0

func (c *Client) FundRawTransactionAsync(txHex string, options map[string]interface{}, iswitness bool) futures.FutureResult

Description: FundRawTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See FundRawTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) GetAddressInfo added in v0.4.0

func (c *Client) GetAddressInfo(address string) (*interface{}, error)

Description: Return information about the given bitcoin address. Some information requires the address to be in the wallet.

  • Author: architect.bian
  • Date: 2018/10/15 14:55

func (*Client) GetAddressInfoAsync added in v0.4.0

func (c *Client) GetAddressInfoAsync(address string) futures.FutureResult

Description: GetAddressInfoAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetAddressInfo for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetAddressesByLabel added in v0.4.0

func (c *Client) GetAddressesByLabel(label string) (*interface{}, error)

Description: Returns the list of addresses assigned the specified label.

  • Author: architect.bian
  • Date: 2018/10/15 14:53

func (*Client) GetAddressesByLabelAsync added in v0.4.0

func (c *Client) GetAddressesByLabelAsync(label string) futures.FutureResult

Description: GetAddressesByLabelAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetAddressesByLabel for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetBalance added in v0.4.0

func (c *Client) GetBalance() (float64, error)

Description: Returns the total available balance.

  • Author: architect.bian
  • Date: 2018/10/15 15:03

func (*Client) GetBalanceAsync added in v0.4.0

func (c *Client) GetBalanceAsync(dummy string, minConfirm int32, includeWatchonly bool) futures.FutureFloat64

Description: GetBalanceAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBalance for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetBalanceEntire added in v0.4.0

func (c *Client) GetBalanceEntire(dummy string, minConfirm int32, includeWatchonly bool) (float64, error)

Description: Returns the total available balance. The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.

  • Author: architect.bian
  • Date: 2018/10/16 16:03

func (*Client) GetBestBlockHash

func (c *Client) GetBestBlockHash() (*results.Hash, error)

Description: GetBestBlockHash returns the hash of the best block in the longest block chain.

  • Author: architect.bian
  • Date: 2018/09/14 13:15

func (*Client) GetBestBlockHashAsync

func (c *Client) GetBestBlockHashAsync() futures.FutureGetBestBlockHashResult

Description: GetBestBlockHashAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBestBlockHash for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/14 13:18

func (*Client) GetBlock

func (c *Client) GetBlock(blockHash *results.Hash) (*results.GetBlockResult, error)

Description: GetBlock returns a raw block from the server given its hash. See GetBlockVerbose to retrieve a data structure with information about the block instead. * Author: architect.bian * Date: 2018/09/17 16:09

func (*Client) GetBlockAsync

func (c *Client) GetBlockAsync(blockHash *results.Hash, verbosity *int) futures.FutureResult

Description: GetBlockAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBlock for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 16:09

func (*Client) GetBlockBytes added in v0.2.0

func (c *Client) GetBlockBytes(blockHash *results.Hash) (*[]byte, error)

Description: GetBlock returns a raw block from the server given its hash.

See GetBlockVerbose to retrieve a data structure with information about the block instead.

  • Author: architect.bian
  • Date: 2018/09/17 16:09

func (*Client) GetBlockChainInfo

func (c *Client) GetBlockChainInfo() (*results.GetBlockChainInfoResult, error)

Description: GetBlockChainInfo returns information related to the processing state of various chain-specific details such as the current difficulty from the tip of the main chain.

  • Author: architect.bian
  • Date: 2018/09/17 14:47

func (*Client) GetBlockChainInfoAsync

func (c *Client) GetBlockChainInfoAsync() futures.FutureGetBlockChainInfoResult

Description: GetBlockChainInfoAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBlockChainInfo for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 14:49

func (*Client) GetBlockCount

func (c *Client) GetBlockCount() (int64, error)

Description: GetBlockCount returns the number of blocks in the longest block chain.

  • Author: architect.bian
  • Date: 2018/09/14 12:46

func (*Client) GetBlockCountAsync

func (c *Client) GetBlockCountAsync() futures.FutureGetBlockCountResult

Description: GetBlockCountAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBlockCount for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/14 12:49

func (*Client) GetBlockHash

func (c *Client) GetBlockHash(blockHeight int64) (*results.Hash, error)

Description: GetBlockHash returns the hash of the block in the best block chain at the given height.

  • Author: architect.bian
  • Date: 2018/09/15 15:34

func (*Client) GetBlockHashAsync

func (c *Client) GetBlockHashAsync(blockHeight int64) futures.FutureGetBlockHashResult

Description: GetBlockHashAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBlockHash for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/15 15:35

func (*Client) GetBlockHeader

func (c *Client) GetBlockHeader(blockHash *results.Hash) (*results.GetBlockHeaderResult, error)

Description: GetBlockHeader returns the blockheader from the server given its hash. See GetBlockHeader to retrieve a data structure with information about the block instead.

  • Author: architect.bian
  • Date: 2018/09/17 15:22

func (*Client) GetBlockHeaderAsync

func (c *Client) GetBlockHeaderAsync(blockHash *results.Hash, verbose *bool) futures.FutureResult

Description: GetBlockHeaderAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBlockHeader for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 15:23

func (*Client) GetBlockHeaderBytes added in v0.2.0

func (c *Client) GetBlockHeaderBytes(blockHash *results.Hash) (*[]byte, error)

Description: GetBlockHeaderBytes returns the bytes of blockheader from the server given its hash. See GetBlockHeader to retrieve a data structure with information about the block instead.

  • Author: architect.bian
  • Date: 2018/09/17 15:22

func (*Client) GetBlockStats added in v0.2.0

func (c *Client) GetBlockStats(heightOrHash interface{}) (*results.GetBlockStatsResult, error)

Description: GetBlockStats Compute per block statistics for a given window. All amounts are in satoshis.

  • Author: architect.bian
  • Date: 2018/10/10 15:17

func (*Client) GetBlockStatsAsync added in v0.2.0

func (c *Client) GetBlockStatsAsync(heightOrHash interface{}, stats *[]string) futures.FutureResult

Description: GetBlockStatsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetBlockStats for more details.

  • Author: architect.bian
  • Date: 2018/09/17 16:09

func (*Client) GetBlockStatsEntire added in v0.2.0

func (c *Client) GetBlockStatsEntire(heightOrHash interface{}, stats *[]string) (*map[interface{}]interface{}, error)

Description: GetBlockStats Compute per block statistics for a given window. All amounts are in satoshis.

  • Author: architect.bian
  • Date: 2018/10/10 15:17

func (*Client) GetBlockVerboseTX added in v0.2.0

func (c *Client) GetBlockVerboseTX(blockHash *results.Hash) (*results.GetBlockVerboseTXResult, error)

Description: GetBlockVerbose returns a data structure from the server with information about a block given its hash.

See GetBlockVerboseTx to retrieve transaction data structures as well. See GetBlock to retrieve a raw block instead.

  • Author: architect.bian
  • Date: 2018/09/17 16:21

func (*Client) GetChainTXStats added in v0.2.0

func (c *Client) GetChainTXStats() (*results.GetChainTXStatsResult, error)

Description: GetChainTXStats Compute statistics about the total number and rate of transactions in the chain.

  • Author: architect.bian
  • Date: 2018/10/11 10:23

func (*Client) GetChainTXStatsAsync added in v0.2.0

func (c *Client) GetChainTXStatsAsync(nblocks int32, blockhash *results.Hash) futures.FutureResult

Description: GetChainTXStatsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetChainTXStats for more details.

  • Author: architect.bian
  • Date: 2018/09/17 16:09

func (*Client) GetChainTXStatsEntire added in v0.2.0

func (c *Client) GetChainTXStatsEntire(nblocks int32, blockhash *results.Hash) (*results.GetChainTXStatsResult, error)

Description: GetChainTXStatsEntire Compute statistics about the total number and rate of transactions in the chain. Can specify nblocks blockhash

  • Author: architect.bian
  • Date: 2018/10/11 10:24

func (*Client) GetChainTips added in v0.2.0

func (c *Client) GetChainTips() (*[]results.GetChainTipsResult, error)

Description: GetChainTips return information about all known tips in the block tree, including the main chain as well as orphaned branches. of the main chain.

  • Author: architect.bian
  • Date: 2018/09/17 14:47

func (*Client) GetChainTipsAsync added in v0.2.0

func (c *Client) GetChainTipsAsync() futures.FutureResult

Description: GetChainTipsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetChainTips for more details.

  • Author: architect.bian
  • Date: 2018/09/17 14:49

func (*Client) GetDifficulty

func (c *Client) GetDifficulty() (float64, error)

Description: GetDifficulty returns the proof-of-work difficulty as a multiple of the minimum difficulty. The result is bits/params.PowLimitBits

  • Author: architect.bian
  • Date: 2018/09/14 17:34

func (*Client) GetDifficultyAsync

func (c *Client) GetDifficultyAsync() futures.FutureGetDifficultyResult

Description: GetDifficultyAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetDifficulty for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/14 17:35

func (*Client) GetMemoryInfo added in v0.3.0

func (c *Client) GetMemoryInfo() (*interface{}, error)

Description: GetMemoryInfo returns general statistics about memory usage in the daemon.

  • Author: architect.bian
  • Date: 2018/09/14 13:15

func (*Client) GetMemoryInfo4MallocInfo added in v0.3.0

func (c *Client) GetMemoryInfo4MallocInfo() (*string, error)

Description: GetMemoryInfo4MallocInfo returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+)

  • Author: architect.bian
  • Date: 2018/09/14 13:15

func (*Client) GetMemoryInfoAsync added in v0.3.0

func (c *Client) GetMemoryInfoAsync(model string) futures.FutureResult

Description: GetMemoryInfoAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetMemoryInfo for more details.

  • Author: architect.bian
  • Date: 2018/09/14 13:18

func (*Client) GetMempoolAncestors added in v0.2.0

func (c *Client) GetMempoolAncestors(txid results.Hash) (*[]string, error)

Description: GetMempoolAncestors If txid is in the mempool, returns all in-mempool ancestors.

  • Author: architect.bian
  • Date: 2018/10/11 11:41

func (*Client) GetMempoolAncestorsAsync added in v0.2.0

func (c *Client) GetMempoolAncestorsAsync(txid results.Hash, verbose bool) futures.FutureResult

Description: GetMempoolAncestorsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetMempoolAncestors for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:19

func (*Client) GetMempoolAncestorsVerbose added in v0.2.0

func (c *Client) GetMempoolAncestorsVerbose(txid results.Hash) (*map[string]interface{}, error)

Description: GetMempoolAncestorsVerbose If txid is in the mempool, returns all in-mempool ancestors. verbose is true for a json object.

  • Author: architect.bian
  • Date: 2018/10/11 11:42

func (*Client) GetMempoolDescendants added in v0.2.0

func (c *Client) GetMempoolDescendants(txid results.Hash) (*[]string, error)

Description: GetMempoolDescendants If txid is in the mempool, returns all in-mempool descendants.

  • Author: architect.bian
  • Date: 2018/10/11 11:49

func (*Client) GetMempoolDescendantsAsync added in v0.2.0

func (c *Client) GetMempoolDescendantsAsync(txid results.Hash, verbose bool) futures.FutureResult

Description: GetMempoolDescendantsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetMempoolDescendants for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:19

func (*Client) GetMempoolDescendantsVerbose added in v0.2.0

func (c *Client) GetMempoolDescendantsVerbose(txid results.Hash) (*map[string]interface{}, error)

Description: GetMempoolDescendantsVerbose If txid is in the mempool, returns all in-mempool descendants.

  • Author: architect.bian
  • Date: 2018/10/11 11:49

func (*Client) GetMempoolEntry

func (c *Client) GetMempoolEntry(txHash string) (*results.GetMempoolEntryResult, error)

Description: GetMempoolEntry returns a data structure with information about the transaction in the memory pool given its hash.

  • Author: architect.bian
  • Date: 2018/09/17 20:23

func (*Client) GetMempoolEntryAsync

func (c *Client) GetMempoolEntryAsync(txHash string) futures.FutureGetMempoolEntryResult

Description: GetMempoolEntryAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetMempoolEntry for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 20:23

func (*Client) GetMempoolInfo added in v0.2.0

func (c *Client) GetMempoolInfo() (*results.GetMempoolInfoResult, error)

Description: GetMempoolInfo Returns details on the active state of the TX memory pool.

  • Author: architect.bian
  • Date: 2018/10/11 11:52

func (*Client) GetMempoolInfoAsync added in v0.2.0

func (c *Client) GetMempoolInfoAsync() futures.FutureResult

Description: GetMempoolInfoAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetMempoolInfo for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:19

func (*Client) GetNewAddress added in v0.4.0

func (c *Client) GetNewAddress() (*string, error)

Description: Returns a new Bitcoin address for receiving payments. If 'label' is specified, it is added to the address book so payments received with the address will be associated with 'label'.

  • Author: architect.bian
  • Date: 2018/10/15 15:06

func (*Client) GetNewAddressAsync added in v0.4.0

func (c *Client) GetNewAddressAsync(label *string, addressType *string) futures.FutureString

Description: GetNewAddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetNewAddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetNewAddressEntire added in v0.4.0

func (c *Client) GetNewAddressEntire(label string, addressType string) (*string, error)

Description: GetNewAddressEntire Returns a new Bitcoin address for receiving payments. If 'label' is specified, it is added to the address book so payments received with the address will be associated with 'label'.

  • Author: architect.bian
  • Date: 2018/10/15 15:06

func (*Client) GetRawChangeAddress added in v0.4.0

func (c *Client) GetRawChangeAddress() (*string, error)

Description: Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.

  • Author: architect.bian
  • Date: 2018/10/15 15:15

func (*Client) GetRawChangeAddressAsync added in v0.4.0

func (c *Client) GetRawChangeAddressAsync(addressType *string) futures.FutureString

Description: GetRawChangeAddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetRawChangeAddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetRawChangeAddressEntire added in v0.4.0

func (c *Client) GetRawChangeAddressEntire(addressType string) (*string, error)

Description: Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.

  • Author: architect.bian
  • Date: 2018/10/15 15:15

func (*Client) GetRawMempool

func (c *Client) GetRawMempool() ([]*results.Hash, error)

Description: GetRawMempool returns the hashes of all transactions in the memory pool.

See GetRawMempoolVerbose to retrieve data structures with information about the transactions instead.

  • Author: architect.bian
  • Date: 2018/09/17 19:50

func (*Client) GetRawMempoolAsync

func (c *Client) GetRawMempoolAsync() futures.FutureGetRawMempoolResult

Description: GetRawMempoolAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetRawMempool for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 19:51

func (*Client) GetRawMempoolVerbose

func (c *Client) GetRawMempoolVerbose() (map[string]results.GetRawMempoolVerboseResult, error)

Description: GetRawMempoolVerbose returns a map of transaction hashes to an associated data structure with information about the transaction for all transactions in the memory pool.

See GetRawMempool to retrieve only the transaction hashes instead.

  • Author: architect.bian
  • Date: 2018/09/17 20:09

func (*Client) GetRawMempoolVerboseAsync

func (c *Client) GetRawMempoolVerboseAsync() futures.FutureGetRawMempoolVerboseResult

Description: GetRawMempoolVerboseAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetRawMempoolVerbose for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 20:10

func (*Client) GetRawTransaction added in v0.4.0

func (c *Client) GetRawTransaction(txid string, blockhash string) (*string, error)

Description: NOTE: By default this function only works for mempool transactions. If the -txindex option is enabled, it also works for blockchain transactions. If the block which contains the transaction is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is provided, only that block will be searched and if the transaction is in the mempool or other blocks, or if this node does not have the given block available, the transaction will not be found. DEPRECATED: for now, it also works for transactions with unspent outputs.

Return the raw transaction data.

  • Author: architect.bian
  • Date: 2018/10/15 20:41

func (*Client) GetRawTransactionAsync added in v0.4.0

func (c *Client) GetRawTransactionAsync(txid string, verbose bool, blockhash string) futures.FutureResult

Description: GetRawTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetRawTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) GetRawTransactionVerbose added in v0.4.0

func (c *Client) GetRawTransactionVerbose(txid string, blockhash string) (*interface{}, error)

Description: Return the verbose raw transaction data.

  • Author: architect.bian
  • Date: 2018/10/15 20:42

func (*Client) GetReceivedByAddress added in v0.4.0

func (c *Client) GetReceivedByAddress(address string, minconfirms int32) (float64, error)

Description: Returns the total amount received by the given address in transactions with at least minconfirms confirmations.

  • Author: architect.bian
  • Date: 2018/10/15 15:20

func (*Client) GetReceivedByAddressAsync added in v0.4.0

func (c *Client) GetReceivedByAddressAsync(address string, minconfirms int32) futures.FutureFloat64

Description: GetReceivedByAddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetReceivedByAddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetTXOutProof added in v0.2.0

func (c *Client) GetTXOutProof(txids ...string) (*[]byte, error)

func (*Client) GetTXOutProofAsync added in v0.2.0

func (c *Client) GetTXOutProofAsync(txids []string, blockhash results.Hash) futures.FutureResult

Description: GetTXOutProofAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetTXOutProof for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:20

func (*Client) GetTXOutProofEntire added in v0.2.0

func (c *Client) GetTXOutProofEntire(txids []string, blockhash results.Hash) (*[]byte, error)

func (*Client) GetTXOutSetInfo added in v0.2.0

func (c *Client) GetTXOutSetInfo() (*results.GetTXOutSetInfoResult, error)

func (*Client) GetTXOutSetInfoAsync added in v0.2.0

func (c *Client) GetTXOutSetInfoAsync() futures.FutureResult

Description: GetTXOutSetInfoAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetTXOutSetInfo for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:20

func (*Client) GetTransaction added in v0.4.0

func (c *Client) GetTransaction(txid string, includeWatchonly bool) (*interface{}, error)

Description: Get detailed information about in-wallet transaction <txid>

  • Author: architect.bian
  • Date: 2018/10/15 15:21

func (*Client) GetTransactionAsync added in v0.4.0

func (c *Client) GetTransactionAsync(txid string, includeWatchonly bool) futures.FutureResult

Description: GetTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetTxOut

func (c *Client) GetTxOut(txHash *results.Hash, index uint32, mempool bool) (*results.GetTxOutResult, error)

Description: GetTxOut returns the transaction output info if it's unspent and nil, otherwise.

  • Author: architect.bian
  • Date: 2018/09/17 21:07

func (*Client) GetTxOutAsync

func (c *Client) GetTxOutAsync(txHash *results.Hash, index uint32, mempool bool) futures.FutureGetTxOutResult

Description: GetTxOutAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetTxOut for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 21:07

func (*Client) GetUnconfirmedBalance added in v0.4.0

func (c *Client) GetUnconfirmedBalance() (float64, error)

Description: Returns the server's total unconfirmed balance

  • Author: architect.bian
  • Date: 2018/10/15 15:40

func (*Client) GetUnconfirmedBalanceAsync added in v0.4.0

func (c *Client) GetUnconfirmedBalanceAsync() futures.FutureFloat64

Description: GetUnconfirmedBalanceAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetUnconfirmedBalance for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) GetWalletInfo added in v0.4.0

func (c *Client) GetWalletInfo() (*interface{}, error)

Description: Returns an object containing various wallet state info.

  • Author: architect.bian
  • Date: 2018/10/15 15:41

func (*Client) GetWalletInfoAsync added in v0.4.0

func (c *Client) GetWalletInfoAsync() futures.FutureResult

Description: GetWalletInfoAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetWalletInfo for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) Help added in v0.3.0

func (c *Client) Help() (*string, error)

Description: Help List all commands, or get help for a specified command.

  • Author: architect.bian
  • Date: 2018/10/15 10:40

func (*Client) HelpAsync added in v0.3.0

func (c *Client) HelpAsync() futures.FutureString

Description: HelpAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See Help for more details.

  • Author: architect.bian
  • Date: 2018/10/15 10:40

func (*Client) ImportMulti added in v0.4.0

func (c *Client) ImportMulti(requests interface{}, option interface{}) (*interface{}, error)

Description: TODO https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importmulti/

  • Author: architect.bian
  • Date: 2018/10/15 15:49

func (*Client) ImportMultiAsync added in v0.4.0

func (c *Client) ImportMultiAsync(requests interface{}, option interface{}) futures.FutureResult

Description: ImportMultiAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ImportMulti for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ImportPrivkey added in v0.4.0

func (c *Client) ImportPrivkey(privkey string) error

Description: Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup. Hint: use importmulti to import more than one private key.

  • Author: architect.bian
  • Date: 2018/10/15 15:54

func (*Client) ImportPrivkeyAsync added in v0.4.0

func (c *Client) ImportPrivkeyAsync(privkey string, label string, rescan bool) futures.FutureResult

Description: ImportPrivkeyAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ImportPrivkey for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ImportPrivkeyEntire added in v0.4.0

func (c *Client) ImportPrivkeyEntire(privkey string, label string, rescan bool) error

Description: Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup. Hint: use importmulti to import more than one private key.

  • Author: architect.bian
  • Date: 2018/10/15 15:54

func (*Client) ImportPrunedFunds added in v0.4.0

func (c *Client) ImportPrunedFunds(rawTransaction []byte, txOutProof []byte) error

Description: Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

  • Author: architect.bian
  • Date: 2018/10/15 15:58

func (*Client) ImportPrunedFundsAsync added in v0.4.0

func (c *Client) ImportPrunedFundsAsync(rawTransaction []byte, txOutProof []byte) futures.FutureResult

Description: ImportPrunedFundsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ImportPrunedFunds for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ImportPubkey added in v0.4.0

func (c *Client) ImportPubkey(pubkey string) error

Description: Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

  • Author: architect.bian
  • Date: 2018/10/15 16:03

func (*Client) ImportPubkeyAsync added in v0.4.0

func (c *Client) ImportPubkeyAsync(pubkey string, label string, rescan bool) futures.FutureResult

Description: ImportPubkeyAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ImportPubkey for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ImportPubkeyEntire added in v0.4.0

func (c *Client) ImportPubkeyEntire(pubkey string, label string, rescan bool) error

Description: Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

  • Author: architect.bian
  • Date: 2018/10/15 16:03

func (*Client) ImportWallet added in v0.4.0

func (c *Client) ImportWallet(filename string) error

Description: Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.

  • Author: architect.bian
  • Date: 2018/10/15 16:07

func (*Client) ImportWalletAsync added in v0.4.0

func (c *Client) ImportWalletAsync(filename string) futures.FutureResult

Description: ImportWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ImportWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) Importaddress added in v0.4.0

func (c *Client) Importaddress(address string) (*string, error)

Description: Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup. Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes. If you have the full public key, you should call importpubkey instead of this.

Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs.

  • Author: architect.bian
  • Date: 2018/10/15 15:42

func (*Client) ImportaddressAsync added in v0.4.0

func (c *Client) ImportaddressAsync(address string, label string, rescan bool, p2sh bool) futures.FutureString

Description: ImportaddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See Importaddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ImportaddressEntire added in v0.4.0

func (c *Client) ImportaddressEntire(address string, label string, rescan bool, p2sh bool) (*string, error)

Description: Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

  • Author: architect.bian
  • Date: 2018/10/15 15:42

func (*Client) KeypoolRefill added in v0.4.0

func (c *Client) KeypoolRefill(newsize int32) error

Description: Fills the keypool. newsize (numeric, optional, default=100) The new keypool size

  • Author: architect.bian
  • Date: 2018/10/15 16:15

func (*Client) KeypoolRefillAsync added in v0.4.0

func (c *Client) KeypoolRefillAsync(newsize int32) futures.FutureResult

Description: KeypoolRefillAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See KeypoolRefill for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListAddressGroupings added in v0.4.0

func (c *Client) ListAddressGroupings() (*interface{}, error)

Description: Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions

  • Author: architect.bian
  • Date: 2018/10/15 16:30

func (*Client) ListAddressGroupingsAsync added in v0.4.0

func (c *Client) ListAddressGroupingsAsync() futures.FutureResult

Description: ListAddressGroupingsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListAddressGroupings for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListLabels added in v0.4.0

func (c *Client) ListLabels(purpose string) (*interface{}, error)

Description: Returns the list of all labels, or labels that are assigned to addresses with a specific purpose. purpose An empty string is the same as not providing this argument.

  • Author: architect.bian
  • Date: 2018/10/15 16:31

func (*Client) ListLabelsAsync added in v0.4.0

func (c *Client) ListLabelsAsync(purpose string) futures.FutureResult

Description: ListLabelsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListLabels for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListLockUnspent added in v0.4.0

func (c *Client) ListLockUnspent() (*interface{}, error)

Description: Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.

  • Author: architect.bian
  • Date: 2018/10/15 16:32

func (*Client) ListLockUnspentAsync added in v0.4.0

func (c *Client) ListLockUnspentAsync() futures.FutureResult

Description: ListLockUnspentAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListLockUnspent for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListReceivedByAddress added in v0.4.0

func (c *Client) ListReceivedByAddress(minconfirms int32, includeEmpty bool, includeWatchonly bool, addressFilter string) (
	*interface{}, error)

Description: List balances by receiving address.

  • Author: architect.bian
  • Date: 2018/10/15 16:40

func (*Client) ListReceivedByAddressAsync added in v0.4.0

func (c *Client) ListReceivedByAddressAsync(minconfirms int32, includeEmpty bool, includeWatchonly bool,
	addressFilter string) futures.FutureResult

Description: ListReceivedByAddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListReceivedByAddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListSinceBlock added in v0.4.0

func (c *Client) ListSinceBlock(blockhash string, targetConfirmations int32, includeWatchonly bool, includeRemoved bool) (
	*interface{}, error)

Description: Get all transactions in blocks since block [blockhash], or all transactions if omitted. If "blockhash" is no longer a part of the main chain, transactions from the fork point onward are included. Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the "removed" array.

  • Author: architect.bian
  • Date: 2018/10/15 16:42

func (*Client) ListSinceBlockAsync added in v0.4.0

func (c *Client) ListSinceBlockAsync(blockhash string, targetConfirmations int32, includeWatchonly bool, includeRemoved bool) futures.FutureResult

Description: ListSinceBlockAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListSinceBlock for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListTransactions added in v0.4.0

func (c *Client) ListTransactions() (*interface{}, error)

Description: Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'. Note that the "account" argument and "otheraccount" return value have been removed in V0.17. To use this RPC with an "account" argument, restart bitcoind with -deprecatedrpc=accounts

  • Author: architect.bian
  • Date: 2018/10/15 16:46

func (*Client) ListTransactionsAsync added in v0.4.0

func (c *Client) ListTransactionsAsync(dummy string, count int32, skip int32, includeWatchonly bool) futures.FutureResult

Description: ListTransactionsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListTransactions for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListTransactionsEntire added in v0.4.0

func (c *Client) ListTransactionsEntire(dummy string, count int32, skip int32, includeWatchonly bool) (*interface{}, error)

Description: Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'. Note that the "account" argument and "otheraccount" return value have been removed in V0.17. To use this RPC with an "account" argument, restart bitcoind with -deprecatedrpc=accounts

  • Author: architect.bian
  • Date: 2018/10/15 16:46

func (*Client) ListUnspent added in v0.4.0

func (c *Client) ListUnspent() (*interface{}, error)

Description: Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.

  • Author: architect.bian
  • Date: 2018/10/15 16:49

func (*Client) ListUnspentAsync added in v0.4.0

func (c *Client) ListUnspentAsync(minconfirm int32, maxconfirm int32, addresses []string, includeUnsafe bool,
	queryOptions map[string]interface{}) futures.FutureResult

Description: ListUnspentAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListUnspent for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) ListUnspentEntire added in v0.4.0

func (c *Client) ListUnspentEntire(minconfirm int32, maxconfirm int32, addresses []string, includeUnsafe bool,
	queryOptions map[string]interface{}) (*interface{}, error)

Description: Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.

  • Author: architect.bian
  • Date: 2018/10/15 16:49

func (*Client) ListWallets added in v0.4.0

func (c *Client) ListWallets() (*[]string, error)

Description: Returns a list of currently loaded wallets. For full information on the wallet, use "getwalletinfo"

  • Author: architect.bian
  • Date: 2018/10/15 16:54

func (*Client) ListWalletsAsync added in v0.4.0

func (c *Client) ListWalletsAsync() futures.FutureStringArray

Description: ListWalletsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See ListWallets for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) LoadWallet added in v0.4.0

func (c *Client) LoadWallet(filename string) (*interface{}, error)

Description: Loads a wallet from a wallet file or directory. Note that all wallet command-line options used when starting bitcoind will be applied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).

  • Author: architect.bian
  • Date: 2018/10/15 17:07

func (*Client) LoadWalletAsync added in v0.4.0

func (c *Client) LoadWalletAsync(filename string) futures.FutureResult

Description: LoadWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See LoadWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) LockUnspent added in v0.4.0

func (c *Client) LockUnspent(unlock bool, transactions []map[string]interface{}) (bool, error)

Description: Updates list of temporarily unspendable outputs. Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs. If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked. A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins. Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails. Also see the listunspent call

  • Author: architect.bian
  • Date: 2018/10/15 17:12

func (*Client) LockUnspentAsync added in v0.4.0

func (c *Client) LockUnspentAsync(unlock bool, transactions []map[string]interface{}) futures.FutureBool

Description: LockUnspentAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See LockUnspent for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) NextID

func (c *Client) NextID() uint64

Description: NextID returns the next id to be used when sending a JSON-RPC message. This ID allows responses to be associated with particular requestsChan per the JSON-RPC specification. Typically the consumer of the client does not need to call this function, however, if a custom request is being created and used this function should be used to ensure the ID is unique amongst all requestsChan being made.

  • Author: architect.bian
  • Date: 2018/08/26 14:30

func (*Client) PreciousBlock added in v0.2.0

func (c *Client) PreciousBlock(blockhash results.Hash) error

Description: PreciousBlock Treats a block as if it were received before others with the same work.

  • Author: architect.bian
  • Date: 2018/10/11 12:33

func (*Client) PreciousBlockAsync added in v0.2.0

func (c *Client) PreciousBlockAsync(blockhash results.Hash) futures.FutureResult

Description: PreciousBlockAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See PreciousBlock for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:20

func (*Client) PruneBlockchain added in v0.2.0

func (c *Client) PruneBlockchain(height int32) (int32, error)

Description: PruneBlockchain prune blocks

  • Author: architect.bian
  • Date: 2018/10/11 12:33

func (*Client) PruneBlockchainAsync added in v0.2.0

func (c *Client) PruneBlockchainAsync(height int32) futures.FutureResult

Description: PruneBlockchainAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See PruneBlockchain for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:20

func (*Client) RemovePrunedFunds added in v0.4.0

func (c *Client) RemovePrunedFunds(txid string) error

Description: Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.

  • Author: architect.bian
  • Date: 2018/10/15 17:22

func (*Client) RemovePrunedFundsAsync added in v0.4.0

func (c *Client) RemovePrunedFundsAsync(txid string) futures.FutureResult

Description: RemovePrunedFundsAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See RemovePrunedFunds for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) RescanBlockChain added in v0.4.0

func (c *Client) RescanBlockChain() (*interface{}, error)

Description: Rescan the local blockchain for wallet related transactions.

  • Author: architect.bian
  • Date: 2018/10/15 17:25

func (*Client) RescanBlockChainAsync added in v0.4.0

func (c *Client) RescanBlockChainAsync(startHeight int32, stopHeight int32) futures.FutureResult

Description: RescanBlockChainAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See RescanBlockChain for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) RescanBlockChainEntire added in v0.4.0

func (c *Client) RescanBlockChainEntire(startHeight int32, stopHeight int32) (*interface{}, error)

Description: Rescan the local blockchain for wallet related transactions.

  • Author: architect.bian
  • Date: 2018/10/15 17:25

func (*Client) SaveMempool added in v0.2.0

func (c *Client) SaveMempool() error

Description: SaveMempool Dumps the mempool to disk. It will fail until the previous dump is fully loaded.

  • Author: architect.bian
  • Date: 2018/10/11 12:32

func (*Client) SaveMempoolAsync added in v0.2.0

func (c *Client) SaveMempoolAsync() futures.FutureResult

Description: SaveMempoolAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SaveMempool for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:20

func (*Client) Send added in v0.6.0

func (c *Client) Send(command string, args ...interface{}) (*interface{}, error)

Description: Send send any command and arguments, then return a result of interface type

  • Author: architect.bian
  • Date: 2018/08/23 16:02

func (*Client) SendAsync added in v0.6.0

func (c *Client) SendAsync(command string, args ...interface{}) futures.FutureResult

Description: SendAsync send command and args, return an instance of a future type

  • Author: architect.bian
  • Date: 2018/08/23 16:02

func (*Client) SendMany added in v0.4.0

func (c *Client) SendMany(amounts map[string]interface{}) (*string, error)

Description: sendmany "" {"address":amount,...} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode")

Send multiple times. Amounts are double-precision floating point numbers. Note that the "fromaccount" argument has been removed in V0.17. To use this RPC with a "fromaccount" argument, restart bitcoind with -deprecatedrpc=accounts

  • Author: architect.bian
  • Date: 2018/10/15 17:53

func (*Client) SendManyAsync added in v0.4.0

func (c *Client) SendManyAsync(dummy string, amounts map[string]interface{}, minConfirm int32, comment string,
	subtractfeefrom []string, replaceable bool, confTarget int32, estimateMode string) futures.FutureString

Description: SendManyAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SendMany for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) SendManyEntire added in v0.4.0

func (c *Client) SendManyEntire(dummy string, amounts map[string]interface{}, minConfirm int32, comment string,
	subtractfeefrom []string, replaceable bool, confTarget int32, estimateMode string) (*string, error)

Description: SendManyEntire Send multiple times. Amounts are double-precision floating point numbers. Note that the "fromaccount" argument has been removed in V0.17.

  • Author: architect.bian
  • Date: 2018/10/15 17:54

func (*Client) SendRawTransaction added in v0.4.0

func (c *Client) SendRawTransaction(txHex string, allowhighfees bool) (*interface{}, error)

Description: Submits raw transaction (serialized, hex-encoded) to local node and network.

Also see createrawtransaction and signrawtransaction calls.

  • Author: architect.bian
  • Date: 2018/10/15 20:54

func (*Client) SendRawTransactionAsync added in v0.4.0

func (c *Client) SendRawTransactionAsync(txHex string, allowhighfees bool) futures.FutureResult

Description: SendRawTransactionAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SendRawTransaction for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) SendToAddress added in v0.4.0

func (c *Client) SendToAddress(address string, amount float64) (*string, error)

Description: sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode")

Send an amount to a given address.

  • Author: architect.bian
  • Date: 2018/10/15 18:07

func (*Client) SendToAddressAsync added in v0.4.0

func (c *Client) SendToAddressAsync(address string, amount float64, comment string, commentTo string,
	subtractfeefromamount bool, replaceable bool, confTarget int32, estimateMode string) futures.FutureString

Description: SendToAddressAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SendToAddress for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) SendToAddressEntire added in v0.4.0

func (c *Client) SendToAddressEntire(address string, amount float64, comment string, commentTo string,
	subtractfeefromamount bool, replaceable bool, confTarget int32, estimateMode string) (*string, error)

Description: Send an amount to a given address.

  • Author: architect.bian
  • Date: 2018/10/15 18:08

func (*Client) SetHDSeed added in v0.4.0

func (c *Client) SetHDSeed() error

Description: Set or generate a new HD wallet seed. Non-HD wallets will not be upgraded to being a HD wallet. Wallets that are already HD will have a new HD seed set so that new keys added to the keypool will be derived from this new seed.

Note that you will need to MAKE A NEW BACKUP of your wallet after setting the HD wallet seed.

  • Author: architect.bian
  • Date: 2018/10/15 18:24

func (*Client) SetHDSeedAsync added in v0.4.0

func (c *Client) SetHDSeedAsync(newkeypool bool, seed string) futures.FutureResult

Description: SetHDSeedAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SetHDSeed for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) SetHDSeedEntire added in v0.4.0

func (c *Client) SetHDSeedEntire(newkeypool bool, seed string) error

Description: Set or generate a new HD wallet seed. Non-HD wallets will not be upgraded to being a HD wallet. Wallets that are already HD will have a new HD seed set so that new keys added to the keypool will be derived from this new seed.

  • Author: architect.bian
  • Date: 2018/10/15 18:28

func (*Client) SetTXFee added in v0.4.0

func (c *Client) SetTXFee(amount float64) (bool, error)

Description: Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.

  • Author: architect.bian
  • Date: 2018/10/15 18:30

func (*Client) SetTXFeeAsync added in v0.4.0

func (c *Client) SetTXFeeAsync(amount float64) futures.FutureBool

Description: SetTXFeeAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SetTXFee for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) Shutdown

func (c *Client) Shutdown()

Description: Shutdown closes the shutdown channel and logs the shutdown unless shutdown is already in progress. It will return false if the shutdown is not needed. This function is safe for concurrent access.

  • Author: architect.bian
  • Date: 2018/08/26 19:38

func (*Client) SignMessage added in v0.4.0

func (c *Client) SignMessage(address string, message string) (*string, error)

Description: Sign a message with the private key of an address

  • Author: architect.bian
  • Date: 2018/10/15 18:31

func (*Client) SignMessageAsync added in v0.4.0

func (c *Client) SignMessageAsync(address string, message string) futures.FutureString

Description: SignMessageAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SignMessage for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) SignRawTransactionWithKey added in v0.4.0

func (c *Client) SignRawTransactionWithKey(txHex string, privkeys []string) (*interface{}, error)

Description: Sign inputs for raw transaction (serialized, hex-encoded). The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction. The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

  • Author: architect.bian
  • Date: 2018/10/15 21:11

func (*Client) SignRawTransactionWithKeyAsync added in v0.4.0

func (c *Client) SignRawTransactionWithKeyAsync(txHex string, privkeys []string, prevtxs interface{}, sighashtype string) futures.FutureResult

Description: SignRawTransactionWithKeyAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SignRawTransactionWithKey for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) SignRawTransactionWithKeyEntire added in v0.5.0

func (c *Client) SignRawTransactionWithKeyEntire(txHex string, privkeys []string, prevtxs interface{}, sighashtype string) (*interface{}, error)

Description: Sign inputs for raw transaction (serialized, hex-encoded). The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction. The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

  • Author: architect.bian
  • Date: 2018/10/15 21:11

func (*Client) SignRawtransactionWithWallet added in v0.4.0

func (c *Client) SignRawtransactionWithWallet(tx []byte) (*interface{}, error)

Description: signrawtransactionwithwallet "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] sighashtype )

Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

  • Author: architect.bian
  • Date: 2018/10/15 18:31

func (*Client) SignRawtransactionWithWalletAsync added in v0.4.0

func (c *Client) SignRawtransactionWithWalletAsync(tx []byte, prevtxs interface{}, sighashtype string) futures.FutureResult

Description: SignRawtransactionWithWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See SignRawtransactionWithWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) SignRawtransactionWithWalletEntire added in v0.4.0

func (c *Client) SignRawtransactionWithWalletEntire(tx []byte, prevtxs interface{}, sighashtype string) (*interface{}, error)

Description: Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

  • Author: architect.bian
  • Date: 2018/10/15 18:37

func (*Client) Startup

func (c *Client) Startup() *Client

Description: start begins processing input and output messages.

  • Author: architect.bian
  • Date: 2018/08/23 16:02

func (*Client) Stop added in v0.3.0

func (c *Client) Stop() error

Description: Stop Bitcoin server.

  • Author: architect.bian
  • Date: 2018/10/15 10:38

func (*Client) StopAsync added in v0.3.0

func (c *Client) StopAsync() futures.FutureResult

Description: StopAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See Stop for more details.

  • Author: architect.bian
  • Date: 2018/10/15 10:38

func (*Client) TestMempoolAccept added in v0.4.0

func (c *Client) TestMempoolAccept(rawTXs []string, allowHighFees bool) (*interface{}, error)

Description: Returns if raw transaction (serialized, hex-encoded) would be accepted by mempool.

  • Author: architect.bian
  • Date: 2018/10/15 23:13

func (*Client) TestMempoolAcceptAsync added in v0.4.0

func (c *Client) TestMempoolAcceptAsync(rawTXs []string, allowHighFees bool) futures.FutureResult

Description: TestMempoolAcceptAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See TestMempoolAccept for more details.

  • Author: architect.bian
  • Date: 2018/10/15 20:09

func (*Client) UnloadWallet added in v0.4.0

func (c *Client) UnloadWallet(walletName string) error

Description: Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument. Specifying the wallet name on a wallet endpoint is invalid.

  • Author: architect.bian
  • Date: 2018/10/15 18:42

func (*Client) UnloadWalletAsync added in v0.4.0

func (c *Client) UnloadWalletAsync(walletName string) futures.FutureResult

Description: UnloadWalletAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See UnloadWallet for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) Uptime added in v0.3.0

func (c *Client) Uptime() (int32, error)

Description: Uptime Returns the total uptime of the server.

  • Author: architect.bian
  • Date: 2018/10/15 10:36

func (*Client) UptimeAsync added in v0.3.0

func (c *Client) UptimeAsync() futures.FutureInt32

Description: GetUptimeAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See GetUptime for more details.

  • Author: architect.bian
  • Date: 2018/10/15 10:36

func (*Client) VerifyChain

func (c *Client) VerifyChain() (bool, error)

Description: VerifyChain requests the server to verify the block chain database using the default check level and number of blocks to verify.

See VerifyChainLevel and VerifyChainBlocks to override the defaults.

  • Author: architect.bian
  • Date: 2018/09/17 20:54

func (*Client) VerifyChainAsync

func (c *Client) VerifyChainAsync() futures.FutureVerifyChainResult

Description: VerifyChainAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See VerifyChain for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 20:54

func (*Client) VerifyChainBlocks

func (c *Client) VerifyChainBlocks(checkLevel, numBlocks int32) (bool, error)

Description: VerifyChainBlocks requests the server to verify the block chain database using the passed check level and number of blocks to verify.

The check level controls how thorough the verification is with higher numbers increasing the amount of checks done as consequently how long the verification takes.

The number of blocks refers to the number of blocks from the end of the current longest chain.

See VerifyChain and VerifyChainLevel to use defaults.

  • Author: architect.bian
  • Date: 2018/09/17 20:59

func (*Client) VerifyChainBlocksAsync

func (c *Client) VerifyChainBlocksAsync(checkLevel, numBlocks int32) futures.FutureVerifyChainResult

Description: VerifyChainBlocksAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See VerifyChainBlocks for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 21:00

func (*Client) VerifyChainLevel

func (c *Client) VerifyChainLevel(checkLevel int32) (bool, error)

Description: VerifyChainLevel requests the server to verify the block chain database using the passed check level and default number of blocks to verify.

The check level controls how thorough the verification is with higher numbers increasing the amount of checks done as consequently how long the verification takes.

See VerifyChain to use the default check level and VerifyChainBlocks to override the number of blocks to verify.

  • Author: architect.bian
  • Date: 2018/09/17 21:00

func (*Client) VerifyChainLevelAsync

func (c *Client) VerifyChainLevelAsync(checkLevel int32) futures.FutureVerifyChainResult

Description: VerifyChainLevelAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See VerifyChainLevel for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/09/17 21:00

func (*Client) VerifyTXOutProof added in v0.2.0

func (c *Client) VerifyTXOutProof(proof []byte) (*[]string, error)

func (*Client) VerifyTXOutProofAsync added in v0.2.0

func (c *Client) VerifyTXOutProofAsync(proof []byte) futures.FutureResult

Description: VerifyTXOutProofAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See VerifyTXOutProof for the blocking version and more details.

  • Author: architect.bian
  • Date: 2018/10/11 10:20

func (*Client) WalletCreateFundedPSBT added in v0.4.0

func (c *Client) WalletCreateFundedPSBT() (*string, error)

func (*Client) WalletCreateFundedPSBTAsync added in v0.4.0

func (c *Client) WalletCreateFundedPSBTAsync() futures.FutureString

Description: WalletCreateFundedPSBTAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See WalletCreateFundedPSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) WalletLock added in v0.4.0

func (c *Client) WalletLock() error

Description: Removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.

  • Author: architect.bian
  • Date: 2018/10/15 18:48

func (*Client) WalletLockAsync added in v0.4.0

func (c *Client) WalletLockAsync() futures.FutureResult

Description: WalletLockAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See WalletLock for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) WalletPassphrase added in v0.4.0

func (c *Client) WalletPassphrase(passphrase string, timeout int32) error

Description: Stores the wallet decryption key in memory for 'timeout' seconds. This is needed prior to performing transactions related to private keys such as sending bitcoins

  • Author: architect.bian
  • Date: 2018/10/15 18:50

func (*Client) WalletPassphraseAsync added in v0.4.0

func (c *Client) WalletPassphraseAsync(passphrase string, timeout int32) futures.FutureResult

Description: WalletPassphraseAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See WalletPassphrase for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) WalletPassphraseChange added in v0.4.0

func (c *Client) WalletPassphraseChange(oldpassphrase string, newpassphrase string) error

Description: Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.

  • Author: architect.bian
  • Date: 2018/10/15 18:51

func (*Client) WalletPassphraseChangeAsync added in v0.4.0

func (c *Client) WalletPassphraseChangeAsync(oldpassphrase string, newpassphrase string) futures.FutureString

Description: WalletPassphraseChangeAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See WalletPassphraseChange for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) WalletProcessPSBT added in v0.4.0

func (c *Client) WalletProcessPSBT(psbt string) (*interface{}, error)

Description: Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

  • Author: architect.bian
  • Date: 2018/10/15 18:53

func (*Client) WalletProcessPSBTAsync added in v0.4.0

func (c *Client) WalletProcessPSBTAsync(psbt string, sign bool, sighashtype string, bip32derivs bool) futures.FutureResult

Description: WalletProcessPSBTAsync returns an instance of a type that can be used to get the result of the RPC at some future time by invoking the Receive function on the returned instance.

See WalletProcessPSBT for more details.

  • Author: architect.bian
  • Date: 2018/10/15 12:46

func (*Client) WalletProcessPSBTEntire added in v0.4.0

func (c *Client) WalletProcessPSBTEntire(psbt string, sign bool, sighashtype string, bip32derivs bool) (*interface{}, error)

Description: Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

  • Author: architect.bian
  • Date: 2018/10/15 18:53

type Command

type Command struct {
	// contains filtered or unexported fields
}

Description: Command represents a rpc command

  • Author: architect.bian
  • Date: 2018/10/06 18:28

func NewCommand

func NewCommand(name string, args ...interface{}) *Command

Description: NewCommand create a new command with cmd and args. arguments: name, the command name. args, the arguments for current command

  • Author: architect.bian
  • Date: 2018/10/06 18:26

func (*Command) AddArgs added in v0.4.0

func (c *Command) AddArgs(args ...interface{})

func (*Command) AddJsonArgs added in v0.4.0

func (c *Command) AddJsonArgs(args ...interface{}) error

type Config

type Config struct {
	// Host is the IP address and port of the RPC server you want to connect to.
	Host string

	// User is the username to use to authenticate to the RPC server.
	User string

	// Pass is the passphrase to use to authenticate to the RPC server.
	Pass string

	// EnableTLS specifies whether transport layer security should be disabled.
	// It is recommended to always use TLS if the RPC server
	// supports it as otherwise your username and password is sent across the wire in cleartext.
	EnableTLS bool

	// Certificates are the bytes for a PEM-encoded certificate chain used
	// for the TLS connection.  It only has effect if the EnableTLS parameter is true.
	Certificates []byte

	// Proxy specifies to connect through a SOCKS 5 proxy server.  It may
	// be an empty string if a proxy is not required.
	Proxy string

	// ProxyUser is an optional username to use for the proxy server if it
	// requires authentication.  It has no effect if the Proxy parameter is not set.
	ProxyUser string

	// ProxyPass is an optional password to use for the proxy server if it
	// requires authentication.  It has no effect if the Proxy parameter is not set.
	ProxyPass string

	// DisableAutoReconnect specifies the client should not automatically
	// try to reconnect to the server when it has been disconnected.
	DisableAutoReconnect bool
}

Description: ConnConfig describes the connection configuration parameters for the client.

  • Author: architect.bian
  • Date: 2018/08/23 15:32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL