Documentation ¶
Index ¶
- Constants
- Variables
- func AddMultiSigAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func Confirms(txHeight, curHeight int32) int32
- func CreateMultiSig(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func CreateNewAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func DecodeAddress(s string, params *netparams.Params) (util.Address, error)
- func DecodeHexStr(hexStr string) ([]byte, error)
- func DropWalletHistory(w *wallet.Wallet, cfg *pod.Config) func(c *cli.Context) (e error)
- func DumpPrivKey(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetAccountAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetAddressesByAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetBalance(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetBestBlock(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetBestBlockHash(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetBlockCount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetInfo(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetNewAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetRawChangeAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetReceivedByAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (ii interface{}, e error)
- func GetReceivedByAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetTransaction(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func GetUnconfirmedBalance(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func HTTPBasicAuth(username, password string) []byte
- func HandleDropWalletHistory(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (out interface{}, e error)
- func Help(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error)
- func HelpDescsEnUS() map[string]string
- func HelpNoChainRPC(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func HelpWithChainRPC(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func IDPointer(id interface{}) (p *interface{})
- func ImportPrivKey(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func IsNilOrEmpty(s *string) bool
- func JSONAuthFail(w http.ResponseWriter)
- func JSONError(e error) *btcjson.RPCError
- func KeypoolRefill(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListAccounts(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListAddressTransactions(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListAllTransactions(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListLockUnspent(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListReceivedByAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListReceivedByAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func ListSinceBlock(icmd interface{}, w *wallet.Wallet, cc ...*chain.RPCClient) (interface{}, error)
- func ListTransactions(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (txs interface{}, e error)
- func ListUnspent(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func LockUnspent(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func MakeMultiSigScript(w *wallet.Wallet, keys []string, nRequired int) ([]byte, error)
- func MakeOutputs(pairs map[string]util.Amount, chainParams *netparams.Params) ([]*wire.TxOut, error)
- func MakeResponse(id, result interface{}, e error) btcjson.Response
- func RenameAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func RunAPI(chainRPC *chain.RPCClient, wallet *wallet.Wallet, quit qu.C)
- func SendFrom(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error)
- func SendMany(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func SendPairs(w *wallet.Wallet, amounts map[string]util.Amount, account uint32, ...) (string, error)
- func SendToAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func SetTxFee(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func SignMessage(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func SignRawTransaction(icmd interface{}, w *wallet.Wallet, cc ...*chain.RPCClient) (interface{}, error)
- func Throttled(threshold int64, h http.Handler) http.Handler
- func ThrottledFn(threshold int64, f http.HandlerFunc) http.Handler
- func Unimplemented(interface{}, *wallet.Wallet) (interface{}, error)
- func Unsupported(interface{}, *wallet.Wallet) (interface{}, error)
- func ValidateAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func VerifyMessage(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func WalletIsLocked(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func WalletLock(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func WalletPassphrase(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- func WalletPassphraseChange(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
- type API
- func (a API) AddMultiSigAddress(cmd *btcjson.AddMultisigAddressCmd) (e error)
- func (a API) AddMultiSigAddressCheck() (isNew bool)
- func (a API) AddMultiSigAddressGetRes() (out *string, e error)
- func (a API) AddMultiSigAddressWait(cmd *btcjson.AddMultisigAddressCmd) (out *string, e error)
- func (a API) CreateMultiSig(cmd *btcjson.CreateMultisigCmd) (e error)
- func (a API) CreateMultiSigCheck() (isNew bool)
- func (a API) CreateMultiSigGetRes() (out *btcjson.CreateMultiSigResult, e error)
- func (a API) CreateMultiSigWait(cmd *btcjson.CreateMultisigCmd) (out *btcjson.CreateMultiSigResult, e error)
- func (a API) CreateNewAccount(cmd *btcjson.CreateNewAccountCmd) (e error)
- func (a API) CreateNewAccountCheck() (isNew bool)
- func (a API) CreateNewAccountGetRes() (out *None, e error)
- func (a API) CreateNewAccountWait(cmd *btcjson.CreateNewAccountCmd) (out *None, e error)
- func (a API) DumpPrivKey(cmd *btcjson.DumpPrivKeyCmd) (e error)
- func (a API) DumpPrivKeyCheck() (isNew bool)
- func (a API) DumpPrivKeyGetRes() (out *string, e error)
- func (a API) DumpPrivKeyWait(cmd *btcjson.DumpPrivKeyCmd) (out *string, e error)
- func (a API) GetAccount(cmd *btcjson.GetAccountCmd) (e error)
- func (a API) GetAccountAddress(cmd *btcjson.GetAccountAddressCmd) (e error)
- func (a API) GetAccountAddressCheck() (isNew bool)
- func (a API) GetAccountAddressGetRes() (out *string, e error)
- func (a API) GetAccountAddressWait(cmd *btcjson.GetAccountAddressCmd) (out *string, e error)
- func (a API) GetAccountCheck() (isNew bool)
- func (a API) GetAccountGetRes() (out *string, e error)
- func (a API) GetAccountWait(cmd *btcjson.GetAccountCmd) (out *string, e error)
- func (a API) GetAddressesByAccount(cmd *btcjson.GetAddressesByAccountCmd) (e error)
- func (a API) GetAddressesByAccountCheck() (isNew bool)
- func (a API) GetAddressesByAccountGetRes() (out *[]string, e error)
- func (a API) GetAddressesByAccountWait(cmd *btcjson.GetAddressesByAccountCmd) (out *[]string, e error)
- func (a API) GetBalance(cmd *btcjson.GetBalanceCmd) (e error)
- func (a API) GetBalanceCheck() (isNew bool)
- func (a API) GetBalanceGetRes() (out *float64, e error)
- func (a API) GetBalanceWait(cmd *btcjson.GetBalanceCmd) (out *float64, e error)
- func (a API) GetBestBlock(cmd *None) (e error)
- func (a API) GetBestBlockCheck() (isNew bool)
- func (a API) GetBestBlockGetRes() (out *btcjson.GetBestBlockResult, e error)
- func (a API) GetBestBlockHash(cmd *None) (e error)
- func (a API) GetBestBlockHashCheck() (isNew bool)
- func (a API) GetBestBlockHashGetRes() (out *string, e error)
- func (a API) GetBestBlockHashWait(cmd *None) (out *string, e error)
- func (a API) GetBestBlockWait(cmd *None) (out *btcjson.GetBestBlockResult, e error)
- func (a API) GetBlockCount(cmd *None) (e error)
- func (a API) GetBlockCountCheck() (isNew bool)
- func (a API) GetBlockCountGetRes() (out *int32, e error)
- func (a API) GetBlockCountWait(cmd *None) (out *int32, e error)
- func (a API) GetInfo(cmd *None) (e error)
- func (a API) GetInfoCheck() (isNew bool)
- func (a API) GetInfoGetRes() (out *btcjson.InfoWalletResult, e error)
- func (a API) GetInfoWait(cmd *None) (out *btcjson.InfoWalletResult, e error)
- func (a API) GetNewAddress(cmd *btcjson.GetNewAddressCmd) (e error)
- func (a API) GetNewAddressCheck() (isNew bool)
- func (a API) GetNewAddressGetRes() (out *string, e error)
- func (a API) GetNewAddressWait(cmd *btcjson.GetNewAddressCmd) (out *string, e error)
- func (a API) GetRawChangeAddress(cmd *btcjson.GetRawChangeAddressCmd) (e error)
- func (a API) GetRawChangeAddressCheck() (isNew bool)
- func (a API) GetRawChangeAddressGetRes() (out *string, e error)
- func (a API) GetRawChangeAddressWait(cmd *btcjson.GetRawChangeAddressCmd) (out *string, e error)
- func (a API) GetReceivedByAccount(cmd *btcjson.GetReceivedByAccountCmd) (e error)
- func (a API) GetReceivedByAccountCheck() (isNew bool)
- func (a API) GetReceivedByAccountGetRes() (out *float64, e error)
- func (a API) GetReceivedByAccountWait(cmd *btcjson.GetReceivedByAccountCmd) (out *float64, e error)
- func (a API) GetReceivedByAddress(cmd *btcjson.GetReceivedByAddressCmd) (e error)
- func (a API) GetReceivedByAddressCheck() (isNew bool)
- func (a API) GetReceivedByAddressGetRes() (out *float64, e error)
- func (a API) GetReceivedByAddressWait(cmd *btcjson.GetReceivedByAddressCmd) (out *float64, e error)
- func (a API) GetTransaction(cmd *btcjson.GetTransactionCmd) (e error)
- func (a API) GetTransactionCheck() (isNew bool)
- func (a API) GetTransactionGetRes() (out *btcjson.GetTransactionResult, e error)
- func (a API) GetTransactionWait(cmd *btcjson.GetTransactionCmd) (out *btcjson.GetTransactionResult, e error)
- func (a API) GetUnconfirmedBalance(cmd *btcjson.GetUnconfirmedBalanceCmd) (e error)
- func (a API) GetUnconfirmedBalanceCheck() (isNew bool)
- func (a API) GetUnconfirmedBalanceGetRes() (out *float64, e error)
- func (a API) GetUnconfirmedBalanceWait(cmd *btcjson.GetUnconfirmedBalanceCmd) (out *float64, e error)
- func (a API) HandleDropWalletHistory(cmd *None) (e error)
- func (a API) HandleDropWalletHistoryCheck() (isNew bool)
- func (a API) HandleDropWalletHistoryGetRes() (out *string, e error)
- func (a API) HandleDropWalletHistoryWait(cmd *None) (out *string, e error)
- func (a API) HelpNoChainRPC(cmd btcjson.HelpCmd) (e error)
- func (a API) HelpNoChainRPCCheck() (isNew bool)
- func (a API) HelpNoChainRPCGetRes() (out *string, e error)
- func (a API) HelpNoChainRPCWait(cmd btcjson.HelpCmd) (out *string, e error)
- func (a API) ImportPrivKey(cmd *btcjson.ImportPrivKeyCmd) (e error)
- func (a API) ImportPrivKeyCheck() (isNew bool)
- func (a API) ImportPrivKeyGetRes() (out *None, e error)
- func (a API) ImportPrivKeyWait(cmd *btcjson.ImportPrivKeyCmd) (out *None, e error)
- func (a API) KeypoolRefill(cmd *None) (e error)
- func (a API) KeypoolRefillCheck() (isNew bool)
- func (a API) KeypoolRefillGetRes() (out *None, e error)
- func (a API) KeypoolRefillWait(cmd *None) (out *None, e error)
- func (a API) ListAccounts(cmd *btcjson.ListAccountsCmd) (e error)
- func (a API) ListAccountsCheck() (isNew bool)
- func (a API) ListAccountsGetRes() (out *map[string]float64, e error)
- func (a API) ListAccountsWait(cmd *btcjson.ListAccountsCmd) (out *map[string]float64, e error)
- func (a API) ListAddressTransactions(cmd *btcjson.ListAddressTransactionsCmd) (e error)
- func (a API) ListAddressTransactionsCheck() (isNew bool)
- func (a API) ListAddressTransactionsGetRes() (out *[]btcjson.ListTransactionsResult, e error)
- func (a API) ListAddressTransactionsWait(cmd *btcjson.ListAddressTransactionsCmd) (out *[]btcjson.ListTransactionsResult, e error)
- func (a API) ListAllTransactions(cmd *btcjson.ListAllTransactionsCmd) (e error)
- func (a API) ListAllTransactionsCheck() (isNew bool)
- func (a API) ListAllTransactionsGetRes() (out *[]btcjson.ListTransactionsResult, e error)
- func (a API) ListAllTransactionsWait(cmd *btcjson.ListAllTransactionsCmd) (out *[]btcjson.ListTransactionsResult, e error)
- func (a API) ListLockUnspent(cmd *None) (e error)
- func (a API) ListLockUnspentCheck() (isNew bool)
- func (a API) ListLockUnspentGetRes() (out *[]btcjson.TransactionInput, e error)
- func (a API) ListLockUnspentWait(cmd *None) (out *[]btcjson.TransactionInput, e error)
- func (a API) ListReceivedByAccount(cmd *btcjson.ListReceivedByAccountCmd) (e error)
- func (a API) ListReceivedByAccountCheck() (isNew bool)
- func (a API) ListReceivedByAccountGetRes() (out *[]btcjson.ListReceivedByAccountResult, e error)
- func (a API) ListReceivedByAccountWait(cmd *btcjson.ListReceivedByAccountCmd) (out *[]btcjson.ListReceivedByAccountResult, e error)
- func (a API) ListReceivedByAddress(cmd *btcjson.ListReceivedByAddressCmd) (e error)
- func (a API) ListReceivedByAddressCheck() (isNew bool)
- func (a API) ListReceivedByAddressGetRes() (out *btcjson.ListReceivedByAddressResult, e error)
- func (a API) ListReceivedByAddressWait(cmd *btcjson.ListReceivedByAddressCmd) (out *btcjson.ListReceivedByAddressResult, e error)
- func (a API) ListSinceBlock(cmd btcjson.ListSinceBlockCmd) (e error)
- func (a API) ListSinceBlockCheck() (isNew bool)
- func (a API) ListSinceBlockGetRes() (out *btcjson.ListSinceBlockResult, e error)
- func (a API) ListSinceBlockWait(cmd btcjson.ListSinceBlockCmd) (out *btcjson.ListSinceBlockResult, e error)
- func (a API) ListTransactions(cmd *btcjson.ListTransactionsCmd) (e error)
- func (a API) ListTransactionsCheck() (isNew bool)
- func (a API) ListTransactionsGetRes() (out *[]btcjson.ListTransactionsResult, e error)
- func (a API) ListTransactionsWait(cmd *btcjson.ListTransactionsCmd) (out *[]btcjson.ListTransactionsResult, e error)
- func (a API) ListUnspent(cmd *btcjson.ListUnspentCmd) (e error)
- func (a API) ListUnspentCheck() (isNew bool)
- func (a API) ListUnspentGetRes() (out *[]btcjson.ListUnspentResult, e error)
- func (a API) ListUnspentWait(cmd *btcjson.ListUnspentCmd) (out *[]btcjson.ListUnspentResult, e error)
- func (a API) LockUnspent(cmd btcjson.LockUnspentCmd) (e error)
- func (a API) LockUnspentCheck() (isNew bool)
- func (a API) LockUnspentGetRes() (out *bool, e error)
- func (a API) LockUnspentWait(cmd btcjson.LockUnspentCmd) (out *bool, e error)
- func (a API) RenameAccount(cmd *btcjson.RenameAccountCmd) (e error)
- func (a API) RenameAccountCheck() (isNew bool)
- func (a API) RenameAccountGetRes() (out *None, e error)
- func (a API) RenameAccountWait(cmd *btcjson.RenameAccountCmd) (out *None, e error)
- func (a API) SendMany(cmd *btcjson.SendManyCmd) (e error)
- func (a API) SendManyCheck() (isNew bool)
- func (a API) SendManyGetRes() (out *string, e error)
- func (a API) SendManyWait(cmd *btcjson.SendManyCmd) (out *string, e error)
- func (a API) SendToAddress(cmd *btcjson.SendToAddressCmd) (e error)
- func (a API) SendToAddressCheck() (isNew bool)
- func (a API) SendToAddressGetRes() (out *string, e error)
- func (a API) SendToAddressWait(cmd *btcjson.SendToAddressCmd) (out *string, e error)
- func (a API) SetTxFee(cmd *btcjson.SetTxFeeCmd) (e error)
- func (a API) SetTxFeeCheck() (isNew bool)
- func (a API) SetTxFeeGetRes() (out *bool, e error)
- func (a API) SetTxFeeWait(cmd *btcjson.SetTxFeeCmd) (out *bool, e error)
- func (a API) SignMessage(cmd *btcjson.SignMessageCmd) (e error)
- func (a API) SignMessageCheck() (isNew bool)
- func (a API) SignMessageGetRes() (out *string, e error)
- func (a API) SignMessageWait(cmd *btcjson.SignMessageCmd) (out *string, e error)
- func (a API) SignRawTransaction(cmd btcjson.SignRawTransactionCmd) (e error)
- func (a API) SignRawTransactionCheck() (isNew bool)
- func (a API) SignRawTransactionGetRes() (out *btcjson.SignRawTransactionResult, e error)
- func (a API) SignRawTransactionWait(cmd btcjson.SignRawTransactionCmd) (out *btcjson.SignRawTransactionResult, e error)
- func (a API) ValidateAddress(cmd *btcjson.ValidateAddressCmd) (e error)
- func (a API) ValidateAddressCheck() (isNew bool)
- func (a API) ValidateAddressGetRes() (out *btcjson.ValidateAddressWalletResult, e error)
- func (a API) ValidateAddressWait(cmd *btcjson.ValidateAddressCmd) (out *btcjson.ValidateAddressWalletResult, e error)
- func (a API) VerifyMessage(cmd *btcjson.VerifyMessageCmd) (e error)
- func (a API) VerifyMessageCheck() (isNew bool)
- func (a API) VerifyMessageGetRes() (out *bool, e error)
- func (a API) VerifyMessageWait(cmd *btcjson.VerifyMessageCmd) (out *bool, e error)
- func (a API) WalletIsLocked(cmd *None) (e error)
- func (a API) WalletIsLockedCheck() (isNew bool)
- func (a API) WalletIsLockedGetRes() (out *bool, e error)
- func (a API) WalletIsLockedWait(cmd *None) (out *bool, e error)
- func (a API) WalletLock(cmd *None) (e error)
- func (a API) WalletLockCheck() (isNew bool)
- func (a API) WalletLockGetRes() (out *None, e error)
- func (a API) WalletLockWait(cmd *None) (out *None, e error)
- func (a API) WalletPassphrase(cmd *btcjson.WalletPassphraseCmd) (e error)
- func (a API) WalletPassphraseChange(cmd *btcjson.WalletPassphraseChangeCmd) (e error)
- func (a API) WalletPassphraseChangeCheck() (isNew bool)
- func (a API) WalletPassphraseChangeGetRes() (out *None, e error)
- func (a API) WalletPassphraseChangeWait(cmd *btcjson.WalletPassphraseChangeCmd) (out *None, e error)
- func (a API) WalletPassphraseCheck() (isNew bool)
- func (a API) WalletPassphraseGetRes() (out *None, e error)
- func (a API) WalletPassphraseWait(cmd *btcjson.WalletPassphraseCmd) (out *None, e error)
- type AddMultiSigAddressRes
- type CAPI
- func (c *CAPI) AddMultiSigAddress(req *btcjson.AddMultisigAddressCmd, resp string) (e error)
- func (c *CAPI) CreateMultiSig(req *btcjson.CreateMultisigCmd, resp btcjson.CreateMultiSigResult) (e error)
- func (c *CAPI) CreateNewAccount(req *btcjson.CreateNewAccountCmd, resp None) (e error)
- func (c *CAPI) DumpPrivKey(req *btcjson.DumpPrivKeyCmd, resp string) (e error)
- func (c *CAPI) GetAccount(req *btcjson.GetAccountCmd, resp string) (e error)
- func (c *CAPI) GetAccountAddress(req *btcjson.GetAccountAddressCmd, resp string) (e error)
- func (c *CAPI) GetAddressesByAccount(req *btcjson.GetAddressesByAccountCmd, resp []string) (e error)
- func (c *CAPI) GetBalance(req *btcjson.GetBalanceCmd, resp float64) (e error)
- func (c *CAPI) GetBestBlock(req *None, resp btcjson.GetBestBlockResult) (e error)
- func (c *CAPI) GetBestBlockHash(req *None, resp string) (e error)
- func (c *CAPI) GetBlockCount(req *None, resp int32) (e error)
- func (c *CAPI) GetInfo(req *None, resp btcjson.InfoWalletResult) (e error)
- func (c *CAPI) GetNewAddress(req *btcjson.GetNewAddressCmd, resp string) (e error)
- func (c *CAPI) GetRawChangeAddress(req *btcjson.GetRawChangeAddressCmd, resp string) (e error)
- func (c *CAPI) GetReceivedByAccount(req *btcjson.GetReceivedByAccountCmd, resp float64) (e error)
- func (c *CAPI) GetReceivedByAddress(req *btcjson.GetReceivedByAddressCmd, resp float64) (e error)
- func (c *CAPI) GetTransaction(req *btcjson.GetTransactionCmd, resp btcjson.GetTransactionResult) (e error)
- func (c *CAPI) GetUnconfirmedBalance(req *btcjson.GetUnconfirmedBalanceCmd, resp float64) (e error)
- func (c *CAPI) HandleDropWalletHistory(req *None, resp string) (e error)
- func (c *CAPI) HelpNoChainRPC(req btcjson.HelpCmd, resp string) (e error)
- func (c *CAPI) ImportPrivKey(req *btcjson.ImportPrivKeyCmd, resp None) (e error)
- func (c *CAPI) KeypoolRefill(req *None, resp None) (e error)
- func (c *CAPI) ListAccounts(req *btcjson.ListAccountsCmd, resp map[string]float64) (e error)
- func (c *CAPI) ListAddressTransactions(req *btcjson.ListAddressTransactionsCmd, resp []btcjson.ListTransactionsResult) (e error)
- func (c *CAPI) ListAllTransactions(req *btcjson.ListAllTransactionsCmd, resp []btcjson.ListTransactionsResult) (e error)
- func (c *CAPI) ListLockUnspent(req *None, resp []btcjson.TransactionInput) (e error)
- func (c *CAPI) ListReceivedByAccount(req *btcjson.ListReceivedByAccountCmd, ...) (e error)
- func (c *CAPI) ListReceivedByAddress(req *btcjson.ListReceivedByAddressCmd, ...) (e error)
- func (c *CAPI) ListSinceBlock(req btcjson.ListSinceBlockCmd, resp btcjson.ListSinceBlockResult) (e error)
- func (c *CAPI) ListTransactions(req *btcjson.ListTransactionsCmd, resp []btcjson.ListTransactionsResult) (e error)
- func (c *CAPI) ListUnspent(req *btcjson.ListUnspentCmd, resp []btcjson.ListUnspentResult) (e error)
- func (c *CAPI) LockUnspent(req btcjson.LockUnspentCmd, resp bool) (e error)
- func (c *CAPI) RenameAccount(req *btcjson.RenameAccountCmd, resp None) (e error)
- func (c *CAPI) SendMany(req *btcjson.SendManyCmd, resp string) (e error)
- func (c *CAPI) SendToAddress(req *btcjson.SendToAddressCmd, resp string) (e error)
- func (c *CAPI) SetTxFee(req *btcjson.SetTxFeeCmd, resp bool) (e error)
- func (c *CAPI) SignMessage(req *btcjson.SignMessageCmd, resp string) (e error)
- func (c *CAPI) SignRawTransaction(req btcjson.SignRawTransactionCmd, resp btcjson.SignRawTransactionResult) (e error)
- func (c *CAPI) ValidateAddress(req *btcjson.ValidateAddressCmd, resp btcjson.ValidateAddressWalletResult) (e error)
- func (c *CAPI) VerifyMessage(req *btcjson.VerifyMessageCmd, resp bool) (e error)
- func (c *CAPI) WalletIsLocked(req *None, resp bool) (e error)
- func (c *CAPI) WalletLock(req *None, resp None) (e error)
- func (c *CAPI) WalletPassphrase(req *btcjson.WalletPassphraseCmd, resp None) (e error)
- func (c *CAPI) WalletPassphraseChange(req *btcjson.WalletPassphraseChangeCmd, resp None) (e error)
- type CAPIClient
- func (r *CAPIClient) AddMultiSigAddress(cmd ...*btcjson.AddMultisigAddressCmd) (res string, e error)
- func (r *CAPIClient) CreateMultiSig(cmd ...*btcjson.CreateMultisigCmd) (res btcjson.CreateMultiSigResult, e error)
- func (r *CAPIClient) CreateNewAccount(cmd ...*btcjson.CreateNewAccountCmd) (res None, e error)
- func (r *CAPIClient) DumpPrivKey(cmd ...*btcjson.DumpPrivKeyCmd) (res string, e error)
- func (r *CAPIClient) GetAccount(cmd ...*btcjson.GetAccountCmd) (res string, e error)
- func (r *CAPIClient) GetAccountAddress(cmd ...*btcjson.GetAccountAddressCmd) (res string, e error)
- func (r *CAPIClient) GetAddressesByAccount(cmd ...*btcjson.GetAddressesByAccountCmd) (res []string, e error)
- func (r *CAPIClient) GetBalance(cmd ...*btcjson.GetBalanceCmd) (res float64, e error)
- func (r *CAPIClient) GetBestBlock(cmd ...*None) (res btcjson.GetBestBlockResult, e error)
- func (r *CAPIClient) GetBestBlockHash(cmd ...*None) (res string, e error)
- func (r *CAPIClient) GetBlockCount(cmd ...*None) (res int32, e error)
- func (r *CAPIClient) GetInfo(cmd ...*None) (res btcjson.InfoWalletResult, e error)
- func (r *CAPIClient) GetNewAddress(cmd ...*btcjson.GetNewAddressCmd) (res string, e error)
- func (r *CAPIClient) GetRawChangeAddress(cmd ...*btcjson.GetRawChangeAddressCmd) (res string, e error)
- func (r *CAPIClient) GetReceivedByAccount(cmd ...*btcjson.GetReceivedByAccountCmd) (res float64, e error)
- func (r *CAPIClient) GetReceivedByAddress(cmd ...*btcjson.GetReceivedByAddressCmd) (res float64, e error)
- func (r *CAPIClient) GetTransaction(cmd ...*btcjson.GetTransactionCmd) (res btcjson.GetTransactionResult, e error)
- func (r *CAPIClient) GetUnconfirmedBalance(cmd ...*btcjson.GetUnconfirmedBalanceCmd) (res float64, e error)
- func (r *CAPIClient) HandleDropWalletHistory(cmd ...*None) (res string, e error)
- func (r *CAPIClient) HelpNoChainRPC(cmd ...btcjson.HelpCmd) (res string, e error)
- func (r *CAPIClient) ImportPrivKey(cmd ...*btcjson.ImportPrivKeyCmd) (res None, e error)
- func (r *CAPIClient) KeypoolRefill(cmd ...*None) (res None, e error)
- func (r *CAPIClient) ListAccounts(cmd ...*btcjson.ListAccountsCmd) (res map[string]float64, e error)
- func (r *CAPIClient) ListAddressTransactions(cmd ...*btcjson.ListAddressTransactionsCmd) (res []btcjson.ListTransactionsResult, e error)
- func (r *CAPIClient) ListAllTransactions(cmd ...*btcjson.ListAllTransactionsCmd) (res []btcjson.ListTransactionsResult, e error)
- func (r *CAPIClient) ListLockUnspent(cmd ...*None) (res []btcjson.TransactionInput, e error)
- func (r *CAPIClient) ListReceivedByAccount(cmd ...*btcjson.ListReceivedByAccountCmd) (res []btcjson.ListReceivedByAccountResult, e error)
- func (r *CAPIClient) ListReceivedByAddress(cmd ...*btcjson.ListReceivedByAddressCmd) (res btcjson.ListReceivedByAddressResult, e error)
- func (r *CAPIClient) ListSinceBlock(cmd ...btcjson.ListSinceBlockCmd) (res btcjson.ListSinceBlockResult, e error)
- func (r *CAPIClient) ListTransactions(cmd ...*btcjson.ListTransactionsCmd) (res []btcjson.ListTransactionsResult, e error)
- func (r *CAPIClient) ListUnspent(cmd ...*btcjson.ListUnspentCmd) (res []btcjson.ListUnspentResult, e error)
- func (r *CAPIClient) LockUnspent(cmd ...btcjson.LockUnspentCmd) (res bool, e error)
- func (r *CAPIClient) RenameAccount(cmd ...*btcjson.RenameAccountCmd) (res None, e error)
- func (r *CAPIClient) SendMany(cmd ...*btcjson.SendManyCmd) (res string, e error)
- func (r *CAPIClient) SendToAddress(cmd ...*btcjson.SendToAddressCmd) (res string, e error)
- func (r *CAPIClient) SetTxFee(cmd ...*btcjson.SetTxFeeCmd) (res bool, e error)
- func (r *CAPIClient) SignMessage(cmd ...*btcjson.SignMessageCmd) (res string, e error)
- func (r *CAPIClient) SignRawTransaction(cmd ...btcjson.SignRawTransactionCmd) (res btcjson.SignRawTransactionResult, e error)
- func (r *CAPIClient) ValidateAddress(cmd ...*btcjson.ValidateAddressCmd) (res btcjson.ValidateAddressWalletResult, e error)
- func (r *CAPIClient) VerifyMessage(cmd ...*btcjson.VerifyMessageCmd) (res bool, e error)
- func (r *CAPIClient) WalletIsLocked(cmd ...*None) (res bool, e error)
- func (r *CAPIClient) WalletLock(cmd ...*None) (res None, e error)
- func (r *CAPIClient) WalletPassphrase(cmd ...*btcjson.WalletPassphraseCmd) (res None, e error)
- func (r *CAPIClient) WalletPassphraseChange(cmd ...*btcjson.WalletPassphraseChangeCmd) (res None, e error)
- type CreateMultiSigRes
- type CreateNewAccountRes
- type DeserializationError
- type DumpPrivKeyRes
- type GetAccountAddressRes
- type GetAccountRes
- type GetAddressesByAccountRes
- type GetBalanceRes
- type GetBestBlockHashRes
- type GetBestBlockRes
- type GetBlockCountRes
- type GetInfoRes
- type GetNewAddressRes
- type GetRawChangeAddressRes
- type GetReceivedByAccountRes
- type GetReceivedByAddressRes
- type GetTransactionRes
- type GetUnconfirmedBalanceRes
- type HandleDropWalletHistoryRes
- type HelpNoChainRPCRes
- type ImportPrivKeyRes
- type InvalidParameterError
- type KeypoolRefillRes
- type LazyHandler
- type ListAccountsRes
- type ListAddressTransactionsRes
- type ListAllTransactionsRes
- type ListLockUnspentRes
- type ListReceivedByAccountRes
- type ListReceivedByAddressRes
- type ListSinceBlockRes
- type ListTransactionsRes
- type ListUnspentRes
- type LockUnspentRes
- type None
- type Options
- type ParseError
- type RenameAccountRes
- type RequestHandler
- type SendManyRes
- type SendToAddressRes
- type Server
- func (s *Server) CheckAuthHeader(r *http.Request) (e error)
- func (s *Server) HandlerClosure(request *btcjson.Request) LazyHandler
- func (s *Server) InvalidAuth(req *btcjson.Request) bool
- func (s *Server) POSTClientRPC(w http.ResponseWriter, r *http.Request)
- func (s *Server) RegisterWallet(w *wallet.Wallet)
- func (s *Server) RequestProcessShutdown()
- func (s *Server) RequestProcessShutdownChan() qu.C
- func (s *Server) Serve(lis net.Listener)
- func (s *Server) SetChainServer(chainClient chain.Interface)
- func (s *Server) Stop()
- func (s *Server) WebsocketClientRPC(wsc *WebsocketClient)
- func (s *Server) WebsocketClientRead(wsc *WebsocketClient)
- func (s *Server) WebsocketClientRespond(wsc *WebsocketClient)
- func (s *Server) WebsocketClientSend(wsc *WebsocketClient)
- type SetTxFeeRes
- type SignMessageRes
- type SignRawTransactionRes
- type ValidateAddressRes
- type VerifyMessageRes
- type WalletIsLockedRes
- type WalletLockRes
- type WalletPassphraseChangeRes
- type WalletPassphraseRes
- type WebsocketClient
Constants ¶
const MaxRequestSize = 1024 * 1024 * 4
MaxRequestSize specifies the maximum number of bytes in the request body that may be read from a client. This is currently limited to 4MB.
Variables ¶
var ( ErrNeedPositiveAmount = InvalidParameterError{ errors.New("amount must be positive"), } ErrNeedPositiveMinconf = InvalidParameterError{ errors.New("minconf must be positive"), } ErrAddressNotInWallet = btcjson.RPCError{ Code: btcjson.ErrRPCWallet, Message: "address not found in wallet", } ErrAccountNameNotFound = btcjson.RPCError{ Code: btcjson.ErrRPCWalletInvalidAccountName, Message: "account name not found", } ErrUnloadedWallet = btcjson.RPCError{ Code: btcjson.ErrRPCWallet, Message: "Request requires a wallet but wallet has not loaded yet", } ErrWalletUnlockNeeded = btcjson.RPCError{ Code: btcjson.ErrRPCWalletUnlockNeeded, Message: "Enter the wallet passphrase with walletpassphrase first", } ErrNotImportedAccount = btcjson.RPCError{ Code: btcjson.ErrRPCWallet, Message: "imported addresses must belong to the imported account", } ErrNoTransactionInfo = btcjson.RPCError{ Code: btcjson.ErrRPCNoTxInfo, Message: "No information for transaction", } ErrReservedAccountName = btcjson.RPCError{ Code: btcjson.ErrRPCInvalidParameter, Message: "Account name is reserved by RPC server", } )
Errors variables that are defined once here to avoid duplication below.
var ErrNoAuth = errors.New("no auth")
ErrNoAuth represents an error where authentication could not succeed due to a missing Authorization HTTP header.
var F, E, W, I, D, T logg.LevelPrinter = logg.GetLogPrinterSet(subsystem)
var HelpDescs map[string]string
var HelpDescsMutex sync.Mutex // Help may execute concurrently, so synchronize access.
var LocaleHelpDescs = map[string]func() map[string]string{ "en_US": HelpDescsEnUS, }
var RPCHandlers = map[string]struct { Handler RequestHandler // Function variables cannot be compared against anything but nil, so use a boolean to record whether help // generation is necessary. This is used by the tests to ensure that help can be generated for every implemented // method. // // A single map and this bool is here is used rather than several maps for the unimplemented handlers so every // method has exactly one handler function. // // The Return field returns a new channel of the type returned by this function. This makes it possible to use this // for callers to receive a response in the cpc library which implements the functions as channel pipes NoHelp bool Call chan API Params interface{} Result func() API }{ "addmultisigaddress": { Handler: AddMultiSigAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan AddMultiSigAddressRes)} }}, "createmultisig": { Handler: CreateMultiSig, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan CreateMultiSigRes)} }}, "createnewaccount": { Handler: CreateNewAccount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan CreateNewAccountRes)} }}, "dropwallethistory": { Handler: HandleDropWalletHistory, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan HandleDropWalletHistoryRes)} }}, "dumpprivkey": { Handler: DumpPrivKey, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan DumpPrivKeyRes)} }}, "getaccount": { Handler: GetAccount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetAccountRes)} }}, "getaccountaddress": { Handler: GetAccountAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetAccountAddressRes)} }}, "getaddressesbyaccount": { Handler: GetAddressesByAccount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetAddressesByAccountRes)} }}, "getbalance": { Handler: GetBalance, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetBalanceRes)} }}, "getbestblock": { Handler: GetBestBlock, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetBestBlockRes)} }}, "getbestblockhash": { Handler: GetBestBlockHash, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetBestBlockHashRes)} }}, "getblockcount": { Handler: GetBlockCount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetBlockCountRes)} }}, "getinfo": { Handler: GetInfo, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetInfoRes)} }}, "getnewaddress": { Handler: GetNewAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetNewAddressRes)} }}, "getrawchangeaddress": { Handler: GetRawChangeAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetRawChangeAddressRes)} }}, "getreceivedbyaccount": { Handler: GetReceivedByAccount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetReceivedByAccountRes)} }}, "getreceivedbyaddress": { Handler: GetReceivedByAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetReceivedByAddressRes)} }}, "gettransaction": { Handler: GetTransaction, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetTransactionRes)} }}, "getunconfirmedbalance": { Handler: GetUnconfirmedBalance, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan GetUnconfirmedBalanceRes)} }}, "help": { Handler: HelpNoChainRPC, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan HelpNoChainRPCRes)} }}, "importprivkey": { Handler: ImportPrivKey, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ImportPrivKeyRes)} }}, "keypoolrefill": { Handler: KeypoolRefill, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan KeypoolRefillRes)} }}, "listaccounts": { Handler: ListAccounts, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListAccountsRes)} }}, "listaddresstransactions": { Handler: ListAddressTransactions, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListAddressTransactionsRes)} }}, "listalltransactions": { Handler: ListAllTransactions, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListAllTransactionsRes)} }}, "listlockunspent": { Handler: ListLockUnspent, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListLockUnspentRes)} }}, "listreceivedbyaccount": { Handler: ListReceivedByAccount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListReceivedByAccountRes)} }}, "listreceivedbyaddress": { Handler: ListReceivedByAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListReceivedByAddressRes)} }}, "listsinceblock": { Handler: ListSinceBlock, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListSinceBlockRes)} }}, "listtransactions": { Handler: ListTransactions, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListTransactionsRes)} }}, "listunspent": { Handler: ListUnspent, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ListUnspentRes)} }}, "renameaccount": { Handler: RenameAccount, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan RenameAccountRes)} }}, "sendfrom": { Handler: LockUnspent, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan LockUnspentRes)} }}, "sendmany": { Handler: SendMany, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan SendManyRes)} }}, "sendtoaddress": { Handler: SendToAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan SendToAddressRes)} }}, "settxfee": { Handler: SetTxFee, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan SetTxFeeRes)} }}, "signmessage": { Handler: SignMessage, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan SignMessageRes)} }}, "signrawtransaction": { Handler: SignRawTransaction, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan SignRawTransactionRes)} }}, "validateaddress": { Handler: ValidateAddress, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan ValidateAddressRes)} }}, "verifymessage": { Handler: VerifyMessage, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan VerifyMessageRes)} }}, "walletislocked": { Handler: WalletIsLocked, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan WalletIsLockedRes)} }}, "walletlock": { Handler: WalletLock, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan WalletLockRes)} }}, "walletpassphrase": { Handler: WalletPassphrase, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan WalletPassphraseRes)} }}, "walletpassphrasechange": { Handler: WalletPassphraseChange, Call: make(chan API, 32), Result: func() API { return API{Ch: make(chan WalletPassphraseChangeRes)} }}, }
RPCHandlers is all of the RPC calls available
- Handler is the handler function
- Call is a channel carrying a struct containing parameters and error that is listened to in RunAPI to dispatch the calls
- Result is a bundle of command parameters and a channel that the result will be sent back on
Get and save the Result function's return, and you can then call the call functions check, result and wait functions for asynchronous and synchronous calls to RPC functions
var RequestUsages = "" /* 1969-byte string literal not displayed */
Functions ¶
func AddMultiSigAddress ¶
func AddMultiSigAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
AddMultiSigAddress handles an addmultisigaddress request by adding a multisig address to the given wallet.
func Confirms ¶
Confirms returns the number of confirmations for a transaction in a block at height txHeight (or -1 for an unconfirmed tx) given the chain height curHeight.
func CreateMultiSig ¶
func CreateMultiSig(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
CreateMultiSig handles an createmultisig request by returning a multisig address for the given inputs.
func CreateNewAccount ¶
func CreateNewAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
CreateNewAccount handles a createnewaccount request by creating and returning a new account. If the last account has no transaction history as per BIP 0044 a new account cannot be created so an error will be returned.
func DecodeHexStr ¶
DecodeHexStr decodes the hex encoding of a string, possibly prepending a leading '0' character if there is an odd number of bytes in the hex string. This is to prevent an error for an invalid hex string when using an odd number of bytes when calling hex.Decode.
func DropWalletHistory ¶ added in v0.4.14
func DumpPrivKey ¶
func DumpPrivKey(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
DumpPrivKey handles a dumpprivkey request with the private key for a single address, or an appropriate error if the wallet is locked.
func GetAccount ¶
func GetAccount( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
GetAccount handles a getaccount request by returning the account name associated with a single address.
func GetAccountAddress ¶
func GetAccountAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetAccountAddress handles a getaccountaddress by returning the most recently-created chained address that has not yet been used (does not yet appear in the blockchain, or any tx that has arrived in the pod mempool).
If the most recently-requested address has been used, a new address (the next chained address in the keypool) is used. This can fail if the keypool runs out (and will return json.ErrRPCWalletKeypoolRanOut if that happens).
func GetAddressesByAccount ¶
func GetAddressesByAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetAddressesByAccount handles a getaddressesbyaccount request by returning all addresses for an account, or an error if the requested account does not exist.
func GetBalance ¶
func GetBalance(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetBalance handles a getbalance request by returning the balance for an account (wallet), or an error if the requested account does not exist.
func GetBestBlock ¶
func GetBestBlock(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetBestBlock handles a getbestblock request by returning a JSON object with the height and hash of the most recently processed block.
func GetBestBlockHash ¶
func GetBestBlockHash(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetBestBlockHash handles a getbestblockhash request by returning the hash of the most recently processed block.
func GetBlockCount ¶
func GetBlockCount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetBlockCount handles a getblockcount request by returning the chain height of the most recently processed block.
func GetInfo ¶
func GetInfo(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetInfo handles a getinfo request by returning the a structure containing information about the current state of btcwallet. exist.
func GetNewAddress ¶
func GetNewAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetNewAddress handles a getnewaddress request by returning a new address for an account. If the account does not exist an appropiate error is returned.
TODO: Follow BIP 0044 and warn if number of unused addresses exceeds the gap limit.
func GetRawChangeAddress ¶
func GetRawChangeAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetRawChangeAddress handles a getrawchangeaddress request by creating and returning a new change address for an account.
Note: bitcoind allows specifying the account as an optional parameter, but ignores the parameter.
func GetReceivedByAccount ¶
func GetReceivedByAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (ii interface{}, e error)
GetReceivedByAccount handles a getreceivedbyaccount request by returning the total amount received by addresses of an account.
func GetReceivedByAddress ¶
func GetReceivedByAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetReceivedByAddress handles a getreceivedbyaddress request by returning the total amount received by a single address.
func GetTransaction ¶
func GetTransaction(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetTransaction handles a gettransaction request by returning details about a single transaction saved by wallet.
func GetUnconfirmedBalance ¶
func GetUnconfirmedBalance(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
GetUnconfirmedBalance handles a getunconfirmedbalance extension request by returning the current unconfirmed balance of an account.
func HTTPBasicAuth ¶
HTTPBasicAuth returns the UTF-8 bytes of the HTTP Basic authentication string:
"Basic " + base64(username + ":" + password)
func HandleDropWalletHistory ¶ added in v0.4.14
func Help ¶
Help handles the Help request by returning one line usage of all available methods, or full Help for a specific method. The chainClient is optional, and this is simply a helper function for the HelpNoChainRPC and HelpWithChainRPC handlers.
func HelpDescsEnUS ¶
func HelpNoChainRPC ¶
func HelpNoChainRPC( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
HelpNoChainRPC handles the help request when the RPC server has not been associated with a consensus RPC client. No help messages are included for passthrough requests.
func HelpWithChainRPC ¶
func HelpWithChainRPC( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
HelpWithChainRPC handles the help request when the RPC server has been associated with a consensus RPC client. The additional RPC client is used to include help messages for methods implemented by the consensus server via RPC passthrough.
func IDPointer ¶
func IDPointer(id interface{}) (p *interface{})
IDPointer returns a pointer to the passed ID, or nil if the interface is nil. Interface pointers are usually a red flag of doing something incorrectly, but this is only implemented here to work around an oddity with json, which uses empty interface pointers for response IDs.
func ImportPrivKey ¶
func ImportPrivKey(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
ImportPrivKey handles an importprivkey request by parsing a WIF-encoded private key and adding it to an account.
func IsNilOrEmpty ¶
func JSONAuthFail ¶
func JSONAuthFail(w http.ResponseWriter)
JSONAuthFail sends a message back to the client if the http auth is rejected.
func KeypoolRefill ¶
func KeypoolRefill( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
KeypoolRefill handles the keypoolrefill command. Since we handle the keypool automatically this does nothing since refilling is never manually required.
func ListAccounts ¶
func ListAccounts( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListAccounts handles a listaccounts request by returning a map of account names to their balances.
func ListAddressTransactions ¶
func ListAddressTransactions( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListAddressTransactions handles a listaddresstransactions request by returning an array of maps with details of spent and received wallet transactions.
The form of the reply is identical to listtransactions, but the array elements are limited to transaction details which are about the addresess included in the request.
func ListAllTransactions ¶
func ListAllTransactions( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListAllTransactions handles a listalltransactions request by returning a map with details of sent and received wallet transactions. This is similar to ListTransactions, except it takes only a single optional argument for the account name and replies with all transactions.
func ListLockUnspent ¶
func ListLockUnspent( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListLockUnspent handles a listlockunspent request by returning an slice of all locked outpoints.
func ListReceivedByAccount ¶
func ListReceivedByAccount( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListReceivedByAccount handles a listreceivedbyaccount request by returning a slice of objects, each one containing:
"account": the receiving account; "amount": total amount received by the account; "confirmations": number of confirmations of the most recent transaction.
It takes two parameters:
"minconf": minimum number of confirmations to consider a transaction - default: one; "includeempty": whether or not to include addresses that have no transactions - default: false.
func ListReceivedByAddress ¶
func ListReceivedByAddress( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListReceivedByAddress handles a listreceivedbyaddress request by returning a slice of objects, each one containing:
"account": the account of the receiving address; "address": the receiving address; "amount": total amount received by the address; "confirmations": number of confirmations of the most recent transaction.
It takes two parameters:
"minconf": minimum number of confirmations to consider a transaction - default: one; "includeempty": whether or not to include addresses that have no transactions - default: false.
func ListSinceBlock ¶
func ListSinceBlock( icmd interface{}, w *wallet.Wallet, cc ...*chain.RPCClient, ) (interface{}, error)
ListSinceBlock handles a listsinceblock request by returning an array of maps with details of sent and received wallet transactions since the given block.
func ListTransactions ¶
func ListTransactions(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) ( txs interface{}, e error, )
ListTransactions handles a listtransactions request by returning an array of maps with details of sent and recevied wallet transactions.
func ListUnspent ¶
func ListUnspent( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
ListUnspent handles the listunspent command.
func LockUnspent ¶
func LockUnspent( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
LockUnspent handles the lockunspent command.
func MakeMultiSigScript ¶
MakeMultiSigScript is a helper function to combine common logic for AddMultiSig and CreateMultiSig.
func MakeOutputs ¶
func MakeOutputs(pairs map[string]util.Amount, chainParams *netparams.Params) ([]*wire.TxOut, error)
MakeOutputs creates a slice of transaction outputs from a pair of address strings to amounts. This is used to create the outputs to include in newly created transactions from a JSON object describing the output destinations and amounts.
func MakeResponse ¶
MakeResponse makes the JSON-RPC response struct for the result and error returned by a requestHandler. The returned response is not ready for marshaling and sending off to a client, but must be
func RenameAccount ¶
func RenameAccount(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
RenameAccount handles a renameaccount request by renaming an account. If the account does not exist an appropiate error will be returned.
func RunAPI ¶ added in v0.4.14
RunAPI starts up the api handler server that receives rpc.API messages and runs the handler and returns the result Note that the parameters are type asserted to prevent the consumer of the API from sending wrong message types not because it's necessary since they are interfaces end to end
func SendFrom ¶
func SendFrom(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error)
SendFrom handles a sendfrom RPC request by creating a new transaction spending unspent transaction outputs for a wallet to another payment address. Leftover inputs not sent to the payment address or a fee for the miner are sent back to a new address in the wallet. Upon success, the TxID for the created transaction is returned.
func SendMany ¶
func SendMany( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
SendMany handles a sendmany RPC request by creating a new transaction spending unspent transaction outputs for a wallet to any number of payment addresses.
Leftover inputs not sent to the payment address or a fee for the miner are sent back to a new address in the wallet. Upon success, the TxID for the created transaction is returned.
func SendPairs ¶
func SendPairs( w *wallet.Wallet, amounts map[string]util.Amount, account uint32, minconf int32, feeSatPerKb util.Amount, ) (string, error)
SendPairs creates and sends payment transactions. It returns the transaction hash in string format upon success All errors are returned in json.RPCError format
func SendToAddress ¶
func SendToAddress( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
SendToAddress handles a sendtoaddress RPC request by creating a new transaction spending unspent transaction outputs for a wallet to another payment address.
Leftover inputs not sent to the payment address or a fee for the miner are sent back to a new address in the wallet. Upon success, the TxID for the created transaction is returned.
func SetTxFee ¶
func SetTxFee( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
SetTxFee sets the transaction fee per kilobyte added to transactions.
func SignMessage ¶
func SignMessage( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
SignMessage signs the given message with the private key for the given address
func SignRawTransaction ¶
func SignRawTransaction( icmd interface{}, w *wallet.Wallet, cc ...*chain.RPCClient, ) (interface{}, error)
SignRawTransaction handles the signrawtransaction command.
func Throttled ¶
Throttled wraps an http.Handler with throttling of concurrent active clients by responding with an HTTP 429 when the threshold is crossed.
func ThrottledFn ¶
func ThrottledFn(threshold int64, f http.HandlerFunc) http.Handler
ThrottledFn wraps an http.HandlerFunc with throttling of concurrent active clients by responding with an HTTP 429 when the threshold is crossed.
func Unimplemented ¶
Unimplemented handles an Unimplemented RPC request with the appropiate error.
func Unsupported ¶
Unsupported handles a standard bitcoind RPC request which is Unsupported by btcwallet due to design differences.
func ValidateAddress ¶
func ValidateAddress(icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient) (interface{}, error)
ValidateAddress handles the validateaddress command.
func VerifyMessage ¶
func VerifyMessage( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
VerifyMessage handles the verifymessage command by verifying the provided compact signature for the given address and message.
func WalletIsLocked ¶
func WalletIsLocked( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
WalletIsLocked handles the walletislocked extension request by returning the current lock state (false for unlocked, true for locked) of an account.
func WalletLock ¶
func WalletLock( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
WalletLock handles a walletlock request by locking the all account wallets, returning an error if any wallet is not encrypted (for example, a watching-only wallet).
func WalletPassphrase ¶
func WalletPassphrase( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
WalletPassphrase responds to the walletpassphrase request by unlocking the wallet. The decryption key is saved in the wallet until timeout seconds expires, after which the wallet is locked.
func WalletPassphraseChange ¶
func WalletPassphraseChange( icmd interface{}, w *wallet.Wallet, chainClient ...*chain.RPCClient, ) (interface{}, error)
WalletPassphraseChange responds to the walletpassphrasechange request by unlocking all accounts with the provided old passphrase, and re-encrypting each private key with an AES key derived from the new passphrase.
If the old passphrase is correct and the passphrase is changed, all wallets will be immediately locked.
Types ¶
type API ¶ added in v0.4.14
type API struct { Ch interface{} Params interface{} Result interface{} }
API stores the channel, parameters and result values from calls via the channel
func (API) AddMultiSigAddress ¶ added in v0.4.14
func (a API) AddMultiSigAddress(cmd *btcjson.AddMultisigAddressCmd) (e error)
AddMultiSigAddress calls the method with the given parameters
func (API) AddMultiSigAddressCheck ¶ added in v0.4.14
AddMultiSigAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) AddMultiSigAddressGetRes ¶ added in v0.4.14
AddMultiSigAddressGetRes returns a pointer to the value in the Result field
func (API) AddMultiSigAddressWait ¶ added in v0.4.14
func (a API) AddMultiSigAddressWait(cmd *btcjson.AddMultisigAddressCmd) (out *string, e error)
AddMultiSigAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) CreateMultiSig ¶ added in v0.4.14
func (a API) CreateMultiSig(cmd *btcjson.CreateMultisigCmd) (e error)
CreateMultiSig calls the method with the given parameters
func (API) CreateMultiSigCheck ¶ added in v0.4.14
CreateMultiSigCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) CreateMultiSigGetRes ¶ added in v0.4.14
func (a API) CreateMultiSigGetRes() (out *btcjson.CreateMultiSigResult, e error)
CreateMultiSigGetRes returns a pointer to the value in the Result field
func (API) CreateMultiSigWait ¶ added in v0.4.14
func (a API) CreateMultiSigWait(cmd *btcjson.CreateMultisigCmd) (out *btcjson.CreateMultiSigResult, e error)
CreateMultiSigWait calls the method and blocks until it returns or 5 seconds passes
func (API) CreateNewAccount ¶ added in v0.4.14
func (a API) CreateNewAccount(cmd *btcjson.CreateNewAccountCmd) (e error)
CreateNewAccount calls the method with the given parameters
func (API) CreateNewAccountCheck ¶ added in v0.4.14
CreateNewAccountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) CreateNewAccountGetRes ¶ added in v0.4.14
CreateNewAccountGetRes returns a pointer to the value in the Result field
func (API) CreateNewAccountWait ¶ added in v0.4.14
func (a API) CreateNewAccountWait(cmd *btcjson.CreateNewAccountCmd) (out *None, e error)
CreateNewAccountWait calls the method and blocks until it returns or 5 seconds passes
func (API) DumpPrivKey ¶ added in v0.4.14
func (a API) DumpPrivKey(cmd *btcjson.DumpPrivKeyCmd) (e error)
DumpPrivKey calls the method with the given parameters
func (API) DumpPrivKeyCheck ¶ added in v0.4.14
DumpPrivKeyCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) DumpPrivKeyGetRes ¶ added in v0.4.14
DumpPrivKeyGetRes returns a pointer to the value in the Result field
func (API) DumpPrivKeyWait ¶ added in v0.4.14
func (a API) DumpPrivKeyWait(cmd *btcjson.DumpPrivKeyCmd) (out *string, e error)
DumpPrivKeyWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetAccount ¶ added in v0.4.14
func (a API) GetAccount(cmd *btcjson.GetAccountCmd) (e error)
GetAccount calls the method with the given parameters
func (API) GetAccountAddress ¶ added in v0.4.14
func (a API) GetAccountAddress(cmd *btcjson.GetAccountAddressCmd) (e error)
GetAccountAddress calls the method with the given parameters
func (API) GetAccountAddressCheck ¶ added in v0.4.14
GetAccountAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetAccountAddressGetRes ¶ added in v0.4.14
GetAccountAddressGetRes returns a pointer to the value in the Result field
func (API) GetAccountAddressWait ¶ added in v0.4.14
func (a API) GetAccountAddressWait(cmd *btcjson.GetAccountAddressCmd) (out *string, e error)
GetAccountAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetAccountCheck ¶ added in v0.4.14
GetAccountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetAccountGetRes ¶ added in v0.4.14
GetAccountGetRes returns a pointer to the value in the Result field
func (API) GetAccountWait ¶ added in v0.4.14
func (a API) GetAccountWait(cmd *btcjson.GetAccountCmd) (out *string, e error)
GetAccountWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetAddressesByAccount ¶ added in v0.4.14
func (a API) GetAddressesByAccount(cmd *btcjson.GetAddressesByAccountCmd) (e error)
GetAddressesByAccount calls the method with the given parameters
func (API) GetAddressesByAccountCheck ¶ added in v0.4.14
GetAddressesByAccountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetAddressesByAccountGetRes ¶ added in v0.4.14
GetAddressesByAccountGetRes returns a pointer to the value in the Result field
func (API) GetAddressesByAccountWait ¶ added in v0.4.14
func (a API) GetAddressesByAccountWait(cmd *btcjson.GetAddressesByAccountCmd) (out *[]string, e error)
GetAddressesByAccountWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetBalance ¶ added in v0.4.14
func (a API) GetBalance(cmd *btcjson.GetBalanceCmd) (e error)
GetBalance calls the method with the given parameters
func (API) GetBalanceCheck ¶ added in v0.4.14
GetBalanceCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetBalanceGetRes ¶ added in v0.4.14
GetBalanceGetRes returns a pointer to the value in the Result field
func (API) GetBalanceWait ¶ added in v0.4.14
func (a API) GetBalanceWait(cmd *btcjson.GetBalanceCmd) (out *float64, e error)
GetBalanceWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetBestBlock ¶ added in v0.4.14
GetBestBlock calls the method with the given parameters
func (API) GetBestBlockCheck ¶ added in v0.4.14
GetBestBlockCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetBestBlockGetRes ¶ added in v0.4.14
func (a API) GetBestBlockGetRes() (out *btcjson.GetBestBlockResult, e error)
GetBestBlockGetRes returns a pointer to the value in the Result field
func (API) GetBestBlockHash ¶ added in v0.4.14
GetBestBlockHash calls the method with the given parameters
func (API) GetBestBlockHashCheck ¶ added in v0.4.14
GetBestBlockHashCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetBestBlockHashGetRes ¶ added in v0.4.14
GetBestBlockHashGetRes returns a pointer to the value in the Result field
func (API) GetBestBlockHashWait ¶ added in v0.4.14
GetBestBlockHashWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetBestBlockWait ¶ added in v0.4.14
func (a API) GetBestBlockWait(cmd *None) (out *btcjson.GetBestBlockResult, e error)
GetBestBlockWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetBlockCount ¶ added in v0.4.14
GetBlockCount calls the method with the given parameters
func (API) GetBlockCountCheck ¶ added in v0.4.14
GetBlockCountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetBlockCountGetRes ¶ added in v0.4.14
GetBlockCountGetRes returns a pointer to the value in the Result field
func (API) GetBlockCountWait ¶ added in v0.4.14
GetBlockCountWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetInfoCheck ¶ added in v0.4.14
GetInfoCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetInfoGetRes ¶ added in v0.4.14
func (a API) GetInfoGetRes() (out *btcjson.InfoWalletResult, e error)
GetInfoGetRes returns a pointer to the value in the Result field
func (API) GetInfoWait ¶ added in v0.4.14
func (a API) GetInfoWait(cmd *None) (out *btcjson.InfoWalletResult, e error)
GetInfoWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetNewAddress ¶ added in v0.4.14
func (a API) GetNewAddress(cmd *btcjson.GetNewAddressCmd) (e error)
GetNewAddress calls the method with the given parameters
func (API) GetNewAddressCheck ¶ added in v0.4.14
GetNewAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetNewAddressGetRes ¶ added in v0.4.14
GetNewAddressGetRes returns a pointer to the value in the Result field
func (API) GetNewAddressWait ¶ added in v0.4.14
func (a API) GetNewAddressWait(cmd *btcjson.GetNewAddressCmd) (out *string, e error)
GetNewAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetRawChangeAddress ¶ added in v0.4.14
func (a API) GetRawChangeAddress(cmd *btcjson.GetRawChangeAddressCmd) (e error)
GetRawChangeAddress calls the method with the given parameters
func (API) GetRawChangeAddressCheck ¶ added in v0.4.14
GetRawChangeAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetRawChangeAddressGetRes ¶ added in v0.4.14
GetRawChangeAddressGetRes returns a pointer to the value in the Result field
func (API) GetRawChangeAddressWait ¶ added in v0.4.14
func (a API) GetRawChangeAddressWait(cmd *btcjson.GetRawChangeAddressCmd) (out *string, e error)
GetRawChangeAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetReceivedByAccount ¶ added in v0.4.14
func (a API) GetReceivedByAccount(cmd *btcjson.GetReceivedByAccountCmd) (e error)
GetReceivedByAccount calls the method with the given parameters
func (API) GetReceivedByAccountCheck ¶ added in v0.4.14
GetReceivedByAccountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetReceivedByAccountGetRes ¶ added in v0.4.14
GetReceivedByAccountGetRes returns a pointer to the value in the Result field
func (API) GetReceivedByAccountWait ¶ added in v0.4.14
func (a API) GetReceivedByAccountWait(cmd *btcjson.GetReceivedByAccountCmd) (out *float64, e error)
GetReceivedByAccountWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetReceivedByAddress ¶ added in v0.4.14
func (a API) GetReceivedByAddress(cmd *btcjson.GetReceivedByAddressCmd) (e error)
GetReceivedByAddress calls the method with the given parameters
func (API) GetReceivedByAddressCheck ¶ added in v0.4.14
GetReceivedByAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetReceivedByAddressGetRes ¶ added in v0.4.14
GetReceivedByAddressGetRes returns a pointer to the value in the Result field
func (API) GetReceivedByAddressWait ¶ added in v0.4.14
func (a API) GetReceivedByAddressWait(cmd *btcjson.GetReceivedByAddressCmd) (out *float64, e error)
GetReceivedByAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetTransaction ¶ added in v0.4.14
func (a API) GetTransaction(cmd *btcjson.GetTransactionCmd) (e error)
GetTransaction calls the method with the given parameters
func (API) GetTransactionCheck ¶ added in v0.4.14
GetTransactionCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetTransactionGetRes ¶ added in v0.4.14
func (a API) GetTransactionGetRes() (out *btcjson.GetTransactionResult, e error)
GetTransactionGetRes returns a pointer to the value in the Result field
func (API) GetTransactionWait ¶ added in v0.4.14
func (a API) GetTransactionWait(cmd *btcjson.GetTransactionCmd) (out *btcjson.GetTransactionResult, e error)
GetTransactionWait calls the method and blocks until it returns or 5 seconds passes
func (API) GetUnconfirmedBalance ¶ added in v0.4.14
func (a API) GetUnconfirmedBalance(cmd *btcjson.GetUnconfirmedBalanceCmd) (e error)
GetUnconfirmedBalance calls the method with the given parameters
func (API) GetUnconfirmedBalanceCheck ¶ added in v0.4.14
GetUnconfirmedBalanceCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) GetUnconfirmedBalanceGetRes ¶ added in v0.4.14
GetUnconfirmedBalanceGetRes returns a pointer to the value in the Result field
func (API) GetUnconfirmedBalanceWait ¶ added in v0.4.14
func (a API) GetUnconfirmedBalanceWait(cmd *btcjson.GetUnconfirmedBalanceCmd) (out *float64, e error)
GetUnconfirmedBalanceWait calls the method and blocks until it returns or 5 seconds passes
func (API) HandleDropWalletHistory ¶ added in v0.4.14
HandleDropWalletHistory calls the method with the given parameters
func (API) HandleDropWalletHistoryCheck ¶ added in v0.4.14
HandleDropWalletHistoryCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) HandleDropWalletHistoryGetRes ¶ added in v0.4.14
HandleDropWalletHistoryGetRes returns a pointer to the value in the Result field
func (API) HandleDropWalletHistoryWait ¶ added in v0.4.14
HandleDropWalletHistoryWait calls the method and blocks until it returns or 5 seconds passes
func (API) HelpNoChainRPC ¶ added in v0.4.14
HelpNoChainRPC calls the method with the given parameters
func (API) HelpNoChainRPCCheck ¶ added in v0.4.14
HelpNoChainRPCCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) HelpNoChainRPCGetRes ¶ added in v0.4.14
HelpNoChainRPCGetRes returns a pointer to the value in the Result field
func (API) HelpNoChainRPCWait ¶ added in v0.4.14
HelpNoChainRPCWait calls the method and blocks until it returns or 5 seconds passes
func (API) ImportPrivKey ¶ added in v0.4.14
func (a API) ImportPrivKey(cmd *btcjson.ImportPrivKeyCmd) (e error)
ImportPrivKey calls the method with the given parameters
func (API) ImportPrivKeyCheck ¶ added in v0.4.14
ImportPrivKeyCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ImportPrivKeyGetRes ¶ added in v0.4.14
ImportPrivKeyGetRes returns a pointer to the value in the Result field
func (API) ImportPrivKeyWait ¶ added in v0.4.14
func (a API) ImportPrivKeyWait(cmd *btcjson.ImportPrivKeyCmd) (out *None, e error)
ImportPrivKeyWait calls the method and blocks until it returns or 5 seconds passes
func (API) KeypoolRefill ¶ added in v0.4.14
KeypoolRefill calls the method with the given parameters
func (API) KeypoolRefillCheck ¶ added in v0.4.14
KeypoolRefillCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) KeypoolRefillGetRes ¶ added in v0.4.14
KeypoolRefillGetRes returns a pointer to the value in the Result field
func (API) KeypoolRefillWait ¶ added in v0.4.14
KeypoolRefillWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListAccounts ¶ added in v0.4.14
func (a API) ListAccounts(cmd *btcjson.ListAccountsCmd) (e error)
ListAccounts calls the method with the given parameters
func (API) ListAccountsCheck ¶ added in v0.4.14
ListAccountsCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListAccountsGetRes ¶ added in v0.4.14
ListAccountsGetRes returns a pointer to the value in the Result field
func (API) ListAccountsWait ¶ added in v0.4.14
ListAccountsWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListAddressTransactions ¶ added in v0.4.14
func (a API) ListAddressTransactions(cmd *btcjson.ListAddressTransactionsCmd) (e error)
ListAddressTransactions calls the method with the given parameters
func (API) ListAddressTransactionsCheck ¶ added in v0.4.14
ListAddressTransactionsCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListAddressTransactionsGetRes ¶ added in v0.4.14
func (a API) ListAddressTransactionsGetRes() (out *[]btcjson.ListTransactionsResult, e error)
ListAddressTransactionsGetRes returns a pointer to the value in the Result field
func (API) ListAddressTransactionsWait ¶ added in v0.4.14
func (a API) ListAddressTransactionsWait(cmd *btcjson.ListAddressTransactionsCmd) (out *[]btcjson.ListTransactionsResult, e error)
ListAddressTransactionsWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListAllTransactions ¶ added in v0.4.14
func (a API) ListAllTransactions(cmd *btcjson.ListAllTransactionsCmd) (e error)
ListAllTransactions calls the method with the given parameters
func (API) ListAllTransactionsCheck ¶ added in v0.4.14
ListAllTransactionsCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListAllTransactionsGetRes ¶ added in v0.4.14
func (a API) ListAllTransactionsGetRes() (out *[]btcjson.ListTransactionsResult, e error)
ListAllTransactionsGetRes returns a pointer to the value in the Result field
func (API) ListAllTransactionsWait ¶ added in v0.4.14
func (a API) ListAllTransactionsWait(cmd *btcjson.ListAllTransactionsCmd) (out *[]btcjson.ListTransactionsResult, e error)
ListAllTransactionsWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListLockUnspent ¶ added in v0.4.14
ListLockUnspent calls the method with the given parameters
func (API) ListLockUnspentCheck ¶ added in v0.4.14
ListLockUnspentCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListLockUnspentGetRes ¶ added in v0.4.14
func (a API) ListLockUnspentGetRes() (out *[]btcjson.TransactionInput, e error)
ListLockUnspentGetRes returns a pointer to the value in the Result field
func (API) ListLockUnspentWait ¶ added in v0.4.14
func (a API) ListLockUnspentWait(cmd *None) (out *[]btcjson.TransactionInput, e error)
ListLockUnspentWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListReceivedByAccount ¶ added in v0.4.14
func (a API) ListReceivedByAccount(cmd *btcjson.ListReceivedByAccountCmd) (e error)
ListReceivedByAccount calls the method with the given parameters
func (API) ListReceivedByAccountCheck ¶ added in v0.4.14
ListReceivedByAccountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListReceivedByAccountGetRes ¶ added in v0.4.14
func (a API) ListReceivedByAccountGetRes() (out *[]btcjson.ListReceivedByAccountResult, e error)
ListReceivedByAccountGetRes returns a pointer to the value in the Result field
func (API) ListReceivedByAccountWait ¶ added in v0.4.14
func (a API) ListReceivedByAccountWait(cmd *btcjson.ListReceivedByAccountCmd) (out *[]btcjson.ListReceivedByAccountResult, e error)
ListReceivedByAccountWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListReceivedByAddress ¶ added in v0.4.14
func (a API) ListReceivedByAddress(cmd *btcjson.ListReceivedByAddressCmd) (e error)
ListReceivedByAddress calls the method with the given parameters
func (API) ListReceivedByAddressCheck ¶ added in v0.4.14
ListReceivedByAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListReceivedByAddressGetRes ¶ added in v0.4.14
func (a API) ListReceivedByAddressGetRes() (out *btcjson.ListReceivedByAddressResult, e error)
ListReceivedByAddressGetRes returns a pointer to the value in the Result field
func (API) ListReceivedByAddressWait ¶ added in v0.4.14
func (a API) ListReceivedByAddressWait(cmd *btcjson.ListReceivedByAddressCmd) (out *btcjson.ListReceivedByAddressResult, e error)
ListReceivedByAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListSinceBlock ¶ added in v0.4.14
func (a API) ListSinceBlock(cmd btcjson.ListSinceBlockCmd) (e error)
ListSinceBlock calls the method with the given parameters
func (API) ListSinceBlockCheck ¶ added in v0.4.14
ListSinceBlockCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListSinceBlockGetRes ¶ added in v0.4.14
func (a API) ListSinceBlockGetRes() (out *btcjson.ListSinceBlockResult, e error)
ListSinceBlockGetRes returns a pointer to the value in the Result field
func (API) ListSinceBlockWait ¶ added in v0.4.14
func (a API) ListSinceBlockWait(cmd btcjson.ListSinceBlockCmd) (out *btcjson.ListSinceBlockResult, e error)
ListSinceBlockWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListTransactions ¶ added in v0.4.14
func (a API) ListTransactions(cmd *btcjson.ListTransactionsCmd) (e error)
ListTransactions calls the method with the given parameters
func (API) ListTransactionsCheck ¶ added in v0.4.14
ListTransactionsCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListTransactionsGetRes ¶ added in v0.4.14
func (a API) ListTransactionsGetRes() (out *[]btcjson.ListTransactionsResult, e error)
ListTransactionsGetRes returns a pointer to the value in the Result field
func (API) ListTransactionsWait ¶ added in v0.4.14
func (a API) ListTransactionsWait(cmd *btcjson.ListTransactionsCmd) (out *[]btcjson.ListTransactionsResult, e error)
ListTransactionsWait calls the method and blocks until it returns or 5 seconds passes
func (API) ListUnspent ¶ added in v0.4.14
func (a API) ListUnspent(cmd *btcjson.ListUnspentCmd) (e error)
ListUnspent calls the method with the given parameters
func (API) ListUnspentCheck ¶ added in v0.4.14
ListUnspentCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ListUnspentGetRes ¶ added in v0.4.14
func (a API) ListUnspentGetRes() (out *[]btcjson.ListUnspentResult, e error)
ListUnspentGetRes returns a pointer to the value in the Result field
func (API) ListUnspentWait ¶ added in v0.4.14
func (a API) ListUnspentWait(cmd *btcjson.ListUnspentCmd) (out *[]btcjson.ListUnspentResult, e error)
ListUnspentWait calls the method and blocks until it returns or 5 seconds passes
func (API) LockUnspent ¶ added in v0.4.14
func (a API) LockUnspent(cmd btcjson.LockUnspentCmd) (e error)
LockUnspent calls the method with the given parameters
func (API) LockUnspentCheck ¶ added in v0.4.14
LockUnspentCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) LockUnspentGetRes ¶ added in v0.4.14
LockUnspentGetRes returns a pointer to the value in the Result field
func (API) LockUnspentWait ¶ added in v0.4.14
func (a API) LockUnspentWait(cmd btcjson.LockUnspentCmd) (out *bool, e error)
LockUnspentWait calls the method and blocks until it returns or 5 seconds passes
func (API) RenameAccount ¶ added in v0.4.14
func (a API) RenameAccount(cmd *btcjson.RenameAccountCmd) (e error)
RenameAccount calls the method with the given parameters
func (API) RenameAccountCheck ¶ added in v0.4.14
RenameAccountCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) RenameAccountGetRes ¶ added in v0.4.14
RenameAccountGetRes returns a pointer to the value in the Result field
func (API) RenameAccountWait ¶ added in v0.4.14
func (a API) RenameAccountWait(cmd *btcjson.RenameAccountCmd) (out *None, e error)
RenameAccountWait calls the method and blocks until it returns or 5 seconds passes
func (API) SendMany ¶ added in v0.4.14
func (a API) SendMany(cmd *btcjson.SendManyCmd) (e error)
SendMany calls the method with the given parameters
func (API) SendManyCheck ¶ added in v0.4.14
SendManyCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) SendManyGetRes ¶ added in v0.4.14
SendManyGetRes returns a pointer to the value in the Result field
func (API) SendManyWait ¶ added in v0.4.14
func (a API) SendManyWait(cmd *btcjson.SendManyCmd) (out *string, e error)
SendManyWait calls the method and blocks until it returns or 5 seconds passes
func (API) SendToAddress ¶ added in v0.4.14
func (a API) SendToAddress(cmd *btcjson.SendToAddressCmd) (e error)
SendToAddress calls the method with the given parameters
func (API) SendToAddressCheck ¶ added in v0.4.14
SendToAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) SendToAddressGetRes ¶ added in v0.4.14
SendToAddressGetRes returns a pointer to the value in the Result field
func (API) SendToAddressWait ¶ added in v0.4.14
func (a API) SendToAddressWait(cmd *btcjson.SendToAddressCmd) (out *string, e error)
SendToAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) SetTxFee ¶ added in v0.4.14
func (a API) SetTxFee(cmd *btcjson.SetTxFeeCmd) (e error)
SetTxFee calls the method with the given parameters
func (API) SetTxFeeCheck ¶ added in v0.4.14
SetTxFeeCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) SetTxFeeGetRes ¶ added in v0.4.14
SetTxFeeGetRes returns a pointer to the value in the Result field
func (API) SetTxFeeWait ¶ added in v0.4.14
func (a API) SetTxFeeWait(cmd *btcjson.SetTxFeeCmd) (out *bool, e error)
SetTxFeeWait calls the method and blocks until it returns or 5 seconds passes
func (API) SignMessage ¶ added in v0.4.14
func (a API) SignMessage(cmd *btcjson.SignMessageCmd) (e error)
SignMessage calls the method with the given parameters
func (API) SignMessageCheck ¶ added in v0.4.14
SignMessageCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) SignMessageGetRes ¶ added in v0.4.14
SignMessageGetRes returns a pointer to the value in the Result field
func (API) SignMessageWait ¶ added in v0.4.14
func (a API) SignMessageWait(cmd *btcjson.SignMessageCmd) (out *string, e error)
SignMessageWait calls the method and blocks until it returns or 5 seconds passes
func (API) SignRawTransaction ¶ added in v0.4.14
func (a API) SignRawTransaction(cmd btcjson.SignRawTransactionCmd) (e error)
SignRawTransaction calls the method with the given parameters
func (API) SignRawTransactionCheck ¶ added in v0.4.14
SignRawTransactionCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) SignRawTransactionGetRes ¶ added in v0.4.14
func (a API) SignRawTransactionGetRes() (out *btcjson.SignRawTransactionResult, e error)
SignRawTransactionGetRes returns a pointer to the value in the Result field
func (API) SignRawTransactionWait ¶ added in v0.4.14
func (a API) SignRawTransactionWait(cmd btcjson.SignRawTransactionCmd) (out *btcjson.SignRawTransactionResult, e error)
SignRawTransactionWait calls the method and blocks until it returns or 5 seconds passes
func (API) ValidateAddress ¶ added in v0.4.14
func (a API) ValidateAddress(cmd *btcjson.ValidateAddressCmd) (e error)
ValidateAddress calls the method with the given parameters
func (API) ValidateAddressCheck ¶ added in v0.4.14
ValidateAddressCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) ValidateAddressGetRes ¶ added in v0.4.14
func (a API) ValidateAddressGetRes() (out *btcjson.ValidateAddressWalletResult, e error)
ValidateAddressGetRes returns a pointer to the value in the Result field
func (API) ValidateAddressWait ¶ added in v0.4.14
func (a API) ValidateAddressWait(cmd *btcjson.ValidateAddressCmd) (out *btcjson.ValidateAddressWalletResult, e error)
ValidateAddressWait calls the method and blocks until it returns or 5 seconds passes
func (API) VerifyMessage ¶ added in v0.4.14
func (a API) VerifyMessage(cmd *btcjson.VerifyMessageCmd) (e error)
VerifyMessage calls the method with the given parameters
func (API) VerifyMessageCheck ¶ added in v0.4.14
VerifyMessageCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) VerifyMessageGetRes ¶ added in v0.4.14
VerifyMessageGetRes returns a pointer to the value in the Result field
func (API) VerifyMessageWait ¶ added in v0.4.14
func (a API) VerifyMessageWait(cmd *btcjson.VerifyMessageCmd) (out *bool, e error)
VerifyMessageWait calls the method and blocks until it returns or 5 seconds passes
func (API) WalletIsLocked ¶ added in v0.4.14
WalletIsLocked calls the method with the given parameters
func (API) WalletIsLockedCheck ¶ added in v0.4.14
WalletIsLockedCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) WalletIsLockedGetRes ¶ added in v0.4.14
WalletIsLockedGetRes returns a pointer to the value in the Result field
func (API) WalletIsLockedWait ¶ added in v0.4.14
WalletIsLockedWait calls the method and blocks until it returns or 5 seconds passes
func (API) WalletLock ¶ added in v0.4.14
WalletLock calls the method with the given parameters
func (API) WalletLockCheck ¶ added in v0.4.14
WalletLockCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) WalletLockGetRes ¶ added in v0.4.14
WalletLockGetRes returns a pointer to the value in the Result field
func (API) WalletLockWait ¶ added in v0.4.14
WalletLockWait calls the method and blocks until it returns or 5 seconds passes
func (API) WalletPassphrase ¶ added in v0.4.14
func (a API) WalletPassphrase(cmd *btcjson.WalletPassphraseCmd) (e error)
WalletPassphrase calls the method with the given parameters
func (API) WalletPassphraseChange ¶ added in v0.4.14
func (a API) WalletPassphraseChange(cmd *btcjson.WalletPassphraseChangeCmd) (e error)
WalletPassphraseChange calls the method with the given parameters
func (API) WalletPassphraseChangeCheck ¶ added in v0.4.14
WalletPassphraseChangeCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) WalletPassphraseChangeGetRes ¶ added in v0.4.14
WalletPassphraseChangeGetRes returns a pointer to the value in the Result field
func (API) WalletPassphraseChangeWait ¶ added in v0.4.14
func (a API) WalletPassphraseChangeWait(cmd *btcjson.WalletPassphraseChangeCmd) (out *None, e error)
WalletPassphraseChangeWait calls the method and blocks until it returns or 5 seconds passes
func (API) WalletPassphraseCheck ¶ added in v0.4.14
WalletPassphraseCheck checks if a new message arrived on the result channel and returns true if it does, as well as storing the value in the Result field
func (API) WalletPassphraseGetRes ¶ added in v0.4.14
WalletPassphraseGetRes returns a pointer to the value in the Result field
func (API) WalletPassphraseWait ¶ added in v0.4.14
func (a API) WalletPassphraseWait(cmd *btcjson.WalletPassphraseCmd) (out *None, e error)
WalletPassphraseWait calls the method and blocks until it returns or 5 seconds passes
type AddMultiSigAddressRes ¶ added in v0.4.14
type AddMultiSigAddressRes struct { Res *string // contains filtered or unexported fields }
AddMultiSigAddressRes is the result from a call to AddMultiSigAddress
type CAPI ¶ added in v0.4.14
CAPI is the central structure for configuration and access to a net/rpc API access endpoint for this RPC API
func (*CAPI) AddMultiSigAddress ¶ added in v0.4.14
func (c *CAPI) AddMultiSigAddress(req *btcjson.AddMultisigAddressCmd, resp string) (e error)
func (*CAPI) CreateMultiSig ¶ added in v0.4.14
func (c *CAPI) CreateMultiSig(req *btcjson.CreateMultisigCmd, resp btcjson.CreateMultiSigResult) (e error)
func (*CAPI) CreateNewAccount ¶ added in v0.4.14
func (c *CAPI) CreateNewAccount(req *btcjson.CreateNewAccountCmd, resp None) (e error)
func (*CAPI) DumpPrivKey ¶ added in v0.4.14
func (c *CAPI) DumpPrivKey(req *btcjson.DumpPrivKeyCmd, resp string) (e error)
func (*CAPI) GetAccount ¶ added in v0.4.14
func (c *CAPI) GetAccount(req *btcjson.GetAccountCmd, resp string) (e error)
func (*CAPI) GetAccountAddress ¶ added in v0.4.14
func (c *CAPI) GetAccountAddress(req *btcjson.GetAccountAddressCmd, resp string) (e error)
func (*CAPI) GetAddressesByAccount ¶ added in v0.4.14
func (c *CAPI) GetAddressesByAccount(req *btcjson.GetAddressesByAccountCmd, resp []string) (e error)
func (*CAPI) GetBalance ¶ added in v0.4.14
func (c *CAPI) GetBalance(req *btcjson.GetBalanceCmd, resp float64) (e error)
func (*CAPI) GetBestBlock ¶ added in v0.4.14
func (c *CAPI) GetBestBlock(req *None, resp btcjson.GetBestBlockResult) (e error)
func (*CAPI) GetBestBlockHash ¶ added in v0.4.14
func (*CAPI) GetBlockCount ¶ added in v0.4.14
func (*CAPI) GetInfo ¶ added in v0.4.14
func (c *CAPI) GetInfo(req *None, resp btcjson.InfoWalletResult) (e error)
func (*CAPI) GetNewAddress ¶ added in v0.4.14
func (c *CAPI) GetNewAddress(req *btcjson.GetNewAddressCmd, resp string) (e error)
func (*CAPI) GetRawChangeAddress ¶ added in v0.4.14
func (c *CAPI) GetRawChangeAddress(req *btcjson.GetRawChangeAddressCmd, resp string) (e error)
func (*CAPI) GetReceivedByAccount ¶ added in v0.4.14
func (c *CAPI) GetReceivedByAccount(req *btcjson.GetReceivedByAccountCmd, resp float64) (e error)
func (*CAPI) GetReceivedByAddress ¶ added in v0.4.14
func (c *CAPI) GetReceivedByAddress(req *btcjson.GetReceivedByAddressCmd, resp float64) (e error)
func (*CAPI) GetTransaction ¶ added in v0.4.14
func (c *CAPI) GetTransaction(req *btcjson.GetTransactionCmd, resp btcjson.GetTransactionResult) (e error)
func (*CAPI) GetUnconfirmedBalance ¶ added in v0.4.14
func (c *CAPI) GetUnconfirmedBalance(req *btcjson.GetUnconfirmedBalanceCmd, resp float64) (e error)
func (*CAPI) HandleDropWalletHistory ¶ added in v0.4.14
func (*CAPI) HelpNoChainRPC ¶ added in v0.4.14
func (*CAPI) ImportPrivKey ¶ added in v0.4.14
func (c *CAPI) ImportPrivKey(req *btcjson.ImportPrivKeyCmd, resp None) (e error)
func (*CAPI) KeypoolRefill ¶ added in v0.4.14
func (*CAPI) ListAccounts ¶ added in v0.4.14
func (*CAPI) ListAddressTransactions ¶ added in v0.4.14
func (c *CAPI) ListAddressTransactions(req *btcjson.ListAddressTransactionsCmd, resp []btcjson.ListTransactionsResult) (e error)
func (*CAPI) ListAllTransactions ¶ added in v0.4.14
func (c *CAPI) ListAllTransactions(req *btcjson.ListAllTransactionsCmd, resp []btcjson.ListTransactionsResult) (e error)
func (*CAPI) ListLockUnspent ¶ added in v0.4.14
func (c *CAPI) ListLockUnspent(req *None, resp []btcjson.TransactionInput) (e error)
func (*CAPI) ListReceivedByAccount ¶ added in v0.4.14
func (c *CAPI) ListReceivedByAccount(req *btcjson.ListReceivedByAccountCmd, resp []btcjson.ListReceivedByAccountResult) (e error)
func (*CAPI) ListReceivedByAddress ¶ added in v0.4.14
func (c *CAPI) ListReceivedByAddress(req *btcjson.ListReceivedByAddressCmd, resp btcjson.ListReceivedByAddressResult) (e error)
func (*CAPI) ListSinceBlock ¶ added in v0.4.14
func (c *CAPI) ListSinceBlock(req btcjson.ListSinceBlockCmd, resp btcjson.ListSinceBlockResult) (e error)
func (*CAPI) ListTransactions ¶ added in v0.4.14
func (c *CAPI) ListTransactions(req *btcjson.ListTransactionsCmd, resp []btcjson.ListTransactionsResult) (e error)
func (*CAPI) ListUnspent ¶ added in v0.4.14
func (c *CAPI) ListUnspent(req *btcjson.ListUnspentCmd, resp []btcjson.ListUnspentResult) (e error)
func (*CAPI) LockUnspent ¶ added in v0.4.14
func (c *CAPI) LockUnspent(req btcjson.LockUnspentCmd, resp bool) (e error)
func (*CAPI) RenameAccount ¶ added in v0.4.14
func (c *CAPI) RenameAccount(req *btcjson.RenameAccountCmd, resp None) (e error)
func (*CAPI) SendMany ¶ added in v0.4.14
func (c *CAPI) SendMany(req *btcjson.SendManyCmd, resp string) (e error)
func (*CAPI) SendToAddress ¶ added in v0.4.14
func (c *CAPI) SendToAddress(req *btcjson.SendToAddressCmd, resp string) (e error)
func (*CAPI) SetTxFee ¶ added in v0.4.14
func (c *CAPI) SetTxFee(req *btcjson.SetTxFeeCmd, resp bool) (e error)
func (*CAPI) SignMessage ¶ added in v0.4.14
func (c *CAPI) SignMessage(req *btcjson.SignMessageCmd, resp string) (e error)
func (*CAPI) SignRawTransaction ¶ added in v0.4.14
func (c *CAPI) SignRawTransaction(req btcjson.SignRawTransactionCmd, resp btcjson.SignRawTransactionResult) (e error)
func (*CAPI) ValidateAddress ¶ added in v0.4.14
func (c *CAPI) ValidateAddress(req *btcjson.ValidateAddressCmd, resp btcjson.ValidateAddressWalletResult) (e error)
func (*CAPI) VerifyMessage ¶ added in v0.4.14
func (c *CAPI) VerifyMessage(req *btcjson.VerifyMessageCmd, resp bool) (e error)
func (*CAPI) WalletIsLocked ¶ added in v0.4.14
func (*CAPI) WalletLock ¶ added in v0.4.14
func (*CAPI) WalletPassphrase ¶ added in v0.4.14
func (c *CAPI) WalletPassphrase(req *btcjson.WalletPassphraseCmd, resp None) (e error)
func (*CAPI) WalletPassphraseChange ¶ added in v0.4.14
func (c *CAPI) WalletPassphraseChange(req *btcjson.WalletPassphraseChangeCmd, resp None) (e error)
type CAPIClient ¶ added in v0.4.14
CAPIClient is a wrapper around RPC calls
func NewCAPIClient ¶ added in v0.4.14
func NewCAPIClient(conn io.ReadWriteCloser) *CAPIClient
NewCAPIClient creates a new client for a kopach_worker. Note that any kind of connection can be used here, other than the StdConn
func (*CAPIClient) AddMultiSigAddress ¶ added in v0.4.14
func (r *CAPIClient) AddMultiSigAddress(cmd ...*btcjson.AddMultisigAddressCmd) (res string, e error)
func (*CAPIClient) CreateMultiSig ¶ added in v0.4.14
func (r *CAPIClient) CreateMultiSig(cmd ...*btcjson.CreateMultisigCmd) (res btcjson.CreateMultiSigResult, e error)
func (*CAPIClient) CreateNewAccount ¶ added in v0.4.14
func (r *CAPIClient) CreateNewAccount(cmd ...*btcjson.CreateNewAccountCmd) (res None, e error)
func (*CAPIClient) DumpPrivKey ¶ added in v0.4.14
func (r *CAPIClient) DumpPrivKey(cmd ...*btcjson.DumpPrivKeyCmd) (res string, e error)
func (*CAPIClient) GetAccount ¶ added in v0.4.14
func (r *CAPIClient) GetAccount(cmd ...*btcjson.GetAccountCmd) (res string, e error)
func (*CAPIClient) GetAccountAddress ¶ added in v0.4.14
func (r *CAPIClient) GetAccountAddress(cmd ...*btcjson.GetAccountAddressCmd) (res string, e error)
func (*CAPIClient) GetAddressesByAccount ¶ added in v0.4.14
func (r *CAPIClient) GetAddressesByAccount(cmd ...*btcjson.GetAddressesByAccountCmd) (res []string, e error)
func (*CAPIClient) GetBalance ¶ added in v0.4.14
func (r *CAPIClient) GetBalance(cmd ...*btcjson.GetBalanceCmd) (res float64, e error)
func (*CAPIClient) GetBestBlock ¶ added in v0.4.14
func (r *CAPIClient) GetBestBlock(cmd ...*None) (res btcjson.GetBestBlockResult, e error)
func (*CAPIClient) GetBestBlockHash ¶ added in v0.4.14
func (r *CAPIClient) GetBestBlockHash(cmd ...*None) (res string, e error)
func (*CAPIClient) GetBlockCount ¶ added in v0.4.14
func (r *CAPIClient) GetBlockCount(cmd ...*None) (res int32, e error)
func (*CAPIClient) GetInfo ¶ added in v0.4.14
func (r *CAPIClient) GetInfo(cmd ...*None) (res btcjson.InfoWalletResult, e error)
func (*CAPIClient) GetNewAddress ¶ added in v0.4.14
func (r *CAPIClient) GetNewAddress(cmd ...*btcjson.GetNewAddressCmd) (res string, e error)
func (*CAPIClient) GetRawChangeAddress ¶ added in v0.4.14
func (r *CAPIClient) GetRawChangeAddress(cmd ...*btcjson.GetRawChangeAddressCmd) (res string, e error)
func (*CAPIClient) GetReceivedByAccount ¶ added in v0.4.14
func (r *CAPIClient) GetReceivedByAccount(cmd ...*btcjson.GetReceivedByAccountCmd) (res float64, e error)
func (*CAPIClient) GetReceivedByAddress ¶ added in v0.4.14
func (r *CAPIClient) GetReceivedByAddress(cmd ...*btcjson.GetReceivedByAddressCmd) (res float64, e error)
func (*CAPIClient) GetTransaction ¶ added in v0.4.14
func (r *CAPIClient) GetTransaction(cmd ...*btcjson.GetTransactionCmd) (res btcjson.GetTransactionResult, e error)
func (*CAPIClient) GetUnconfirmedBalance ¶ added in v0.4.14
func (r *CAPIClient) GetUnconfirmedBalance(cmd ...*btcjson.GetUnconfirmedBalanceCmd) (res float64, e error)
func (*CAPIClient) HandleDropWalletHistory ¶ added in v0.4.14
func (r *CAPIClient) HandleDropWalletHistory(cmd ...*None) (res string, e error)
func (*CAPIClient) HelpNoChainRPC ¶ added in v0.4.14
func (r *CAPIClient) HelpNoChainRPC(cmd ...btcjson.HelpCmd) (res string, e error)
func (*CAPIClient) ImportPrivKey ¶ added in v0.4.14
func (r *CAPIClient) ImportPrivKey(cmd ...*btcjson.ImportPrivKeyCmd) (res None, e error)
func (*CAPIClient) KeypoolRefill ¶ added in v0.4.14
func (r *CAPIClient) KeypoolRefill(cmd ...*None) (res None, e error)
func (*CAPIClient) ListAccounts ¶ added in v0.4.14
func (r *CAPIClient) ListAccounts(cmd ...*btcjson.ListAccountsCmd) (res map[string]float64, e error)
func (*CAPIClient) ListAddressTransactions ¶ added in v0.4.14
func (r *CAPIClient) ListAddressTransactions(cmd ...*btcjson.ListAddressTransactionsCmd) (res []btcjson.ListTransactionsResult, e error)
func (*CAPIClient) ListAllTransactions ¶ added in v0.4.14
func (r *CAPIClient) ListAllTransactions(cmd ...*btcjson.ListAllTransactionsCmd) (res []btcjson.ListTransactionsResult, e error)
func (*CAPIClient) ListLockUnspent ¶ added in v0.4.14
func (r *CAPIClient) ListLockUnspent(cmd ...*None) (res []btcjson.TransactionInput, e error)
func (*CAPIClient) ListReceivedByAccount ¶ added in v0.4.14
func (r *CAPIClient) ListReceivedByAccount(cmd ...*btcjson.ListReceivedByAccountCmd) (res []btcjson.ListReceivedByAccountResult, e error)
func (*CAPIClient) ListReceivedByAddress ¶ added in v0.4.14
func (r *CAPIClient) ListReceivedByAddress(cmd ...*btcjson.ListReceivedByAddressCmd) (res btcjson.ListReceivedByAddressResult, e error)
func (*CAPIClient) ListSinceBlock ¶ added in v0.4.14
func (r *CAPIClient) ListSinceBlock(cmd ...btcjson.ListSinceBlockCmd) (res btcjson.ListSinceBlockResult, e error)
func (*CAPIClient) ListTransactions ¶ added in v0.4.14
func (r *CAPIClient) ListTransactions(cmd ...*btcjson.ListTransactionsCmd) (res []btcjson.ListTransactionsResult, e error)
func (*CAPIClient) ListUnspent ¶ added in v0.4.14
func (r *CAPIClient) ListUnspent(cmd ...*btcjson.ListUnspentCmd) (res []btcjson.ListUnspentResult, e error)
func (*CAPIClient) LockUnspent ¶ added in v0.4.14
func (r *CAPIClient) LockUnspent(cmd ...btcjson.LockUnspentCmd) (res bool, e error)
func (*CAPIClient) RenameAccount ¶ added in v0.4.14
func (r *CAPIClient) RenameAccount(cmd ...*btcjson.RenameAccountCmd) (res None, e error)
func (*CAPIClient) SendMany ¶ added in v0.4.14
func (r *CAPIClient) SendMany(cmd ...*btcjson.SendManyCmd) (res string, e error)
func (*CAPIClient) SendToAddress ¶ added in v0.4.14
func (r *CAPIClient) SendToAddress(cmd ...*btcjson.SendToAddressCmd) (res string, e error)
func (*CAPIClient) SetTxFee ¶ added in v0.4.14
func (r *CAPIClient) SetTxFee(cmd ...*btcjson.SetTxFeeCmd) (res bool, e error)
func (*CAPIClient) SignMessage ¶ added in v0.4.14
func (r *CAPIClient) SignMessage(cmd ...*btcjson.SignMessageCmd) (res string, e error)
func (*CAPIClient) SignRawTransaction ¶ added in v0.4.14
func (r *CAPIClient) SignRawTransaction(cmd ...btcjson.SignRawTransactionCmd) (res btcjson.SignRawTransactionResult, e error)
func (*CAPIClient) ValidateAddress ¶ added in v0.4.14
func (r *CAPIClient) ValidateAddress(cmd ...*btcjson.ValidateAddressCmd) (res btcjson.ValidateAddressWalletResult, e error)
func (*CAPIClient) VerifyMessage ¶ added in v0.4.14
func (r *CAPIClient) VerifyMessage(cmd ...*btcjson.VerifyMessageCmd) (res bool, e error)
func (*CAPIClient) WalletIsLocked ¶ added in v0.4.14
func (r *CAPIClient) WalletIsLocked(cmd ...*None) (res bool, e error)
func (*CAPIClient) WalletLock ¶ added in v0.4.14
func (r *CAPIClient) WalletLock(cmd ...*None) (res None, e error)
func (*CAPIClient) WalletPassphrase ¶ added in v0.4.14
func (r *CAPIClient) WalletPassphrase(cmd ...*btcjson.WalletPassphraseCmd) (res None, e error)
func (*CAPIClient) WalletPassphraseChange ¶ added in v0.4.14
func (r *CAPIClient) WalletPassphraseChange(cmd ...*btcjson.WalletPassphraseChangeCmd) (res None, e error)
type CreateMultiSigRes ¶ added in v0.4.14
type CreateMultiSigRes struct { Res *btcjson.CreateMultiSigResult // contains filtered or unexported fields }
CreateMultiSigRes is the result from a call to CreateMultiSig
type CreateNewAccountRes ¶ added in v0.4.14
type CreateNewAccountRes struct { Res *None // contains filtered or unexported fields }
CreateNewAccountRes is the result from a call to CreateNewAccount
type DeserializationError ¶
type DeserializationError struct {
// contains filtered or unexported fields
}
DeserializationError describes a failed deserializaion due to bad user input. It corresponds to json.ErrRPCDeserialization.
type DumpPrivKeyRes ¶ added in v0.4.14
type DumpPrivKeyRes struct { Res *string // contains filtered or unexported fields }
DumpPrivKeyRes is the result from a call to DumpPrivKey
type GetAccountAddressRes ¶ added in v0.4.14
type GetAccountAddressRes struct { Res *string // contains filtered or unexported fields }
GetAccountAddressRes is the result from a call to GetAccountAddress
type GetAccountRes ¶ added in v0.4.14
type GetAccountRes struct { Res *string // contains filtered or unexported fields }
GetAccountRes is the result from a call to GetAccount
type GetAddressesByAccountRes ¶ added in v0.4.14
type GetAddressesByAccountRes struct { Res *[]string // contains filtered or unexported fields }
GetAddressesByAccountRes is the result from a call to GetAddressesByAccount
type GetBalanceRes ¶ added in v0.4.14
type GetBalanceRes struct { Res *float64 // contains filtered or unexported fields }
GetBalanceRes is the result from a call to GetBalance
type GetBestBlockHashRes ¶ added in v0.4.14
type GetBestBlockHashRes struct { Res *string // contains filtered or unexported fields }
GetBestBlockHashRes is the result from a call to GetBestBlockHash
type GetBestBlockRes ¶ added in v0.4.14
type GetBestBlockRes struct { Res *btcjson.GetBestBlockResult // contains filtered or unexported fields }
GetBestBlockRes is the result from a call to GetBestBlock
type GetBlockCountRes ¶ added in v0.4.14
type GetBlockCountRes struct { Res *int32 // contains filtered or unexported fields }
GetBlockCountRes is the result from a call to GetBlockCount
type GetInfoRes ¶ added in v0.4.14
type GetInfoRes struct { Res *btcjson.InfoWalletResult // contains filtered or unexported fields }
GetInfoRes is the result from a call to GetInfo
type GetNewAddressRes ¶ added in v0.4.14
type GetNewAddressRes struct { Res *string // contains filtered or unexported fields }
GetNewAddressRes is the result from a call to GetNewAddress
type GetRawChangeAddressRes ¶ added in v0.4.14
type GetRawChangeAddressRes struct { Res *string // contains filtered or unexported fields }
GetRawChangeAddressRes is the result from a call to GetRawChangeAddress
type GetReceivedByAccountRes ¶ added in v0.4.14
type GetReceivedByAccountRes struct { Res *float64 // contains filtered or unexported fields }
GetReceivedByAccountRes is the result from a call to GetReceivedByAccount
type GetReceivedByAddressRes ¶ added in v0.4.14
type GetReceivedByAddressRes struct { Res *float64 // contains filtered or unexported fields }
GetReceivedByAddressRes is the result from a call to GetReceivedByAddress
type GetTransactionRes ¶ added in v0.4.14
type GetTransactionRes struct { Res *btcjson.GetTransactionResult // contains filtered or unexported fields }
GetTransactionRes is the result from a call to GetTransaction
type GetUnconfirmedBalanceRes ¶ added in v0.4.14
type GetUnconfirmedBalanceRes struct { Res *float64 // contains filtered or unexported fields }
GetUnconfirmedBalanceRes is the result from a call to GetUnconfirmedBalance
type HandleDropWalletHistoryRes ¶ added in v0.4.14
type HandleDropWalletHistoryRes struct { Res *string // contains filtered or unexported fields }
HandleDropWalletHistoryRes is the result from a call to HandleDropWalletHistory
type HelpNoChainRPCRes ¶ added in v0.4.14
type HelpNoChainRPCRes struct { Res *string // contains filtered or unexported fields }
HelpNoChainRPCRes is the result from a call to HelpNoChainRPC
type ImportPrivKeyRes ¶ added in v0.4.14
type ImportPrivKeyRes struct { Res *None // contains filtered or unexported fields }
ImportPrivKeyRes is the result from a call to ImportPrivKey
type InvalidParameterError ¶
type InvalidParameterError struct {
// contains filtered or unexported fields
}
InvalidParameterError describes an invalid parameter passed by the user. It corresponds to json.ErrRPCInvalidParameter.
type KeypoolRefillRes ¶ added in v0.4.14
type KeypoolRefillRes struct { Res *None // contains filtered or unexported fields }
KeypoolRefillRes is the result from a call to KeypoolRefill
type LazyHandler ¶
LazyHandler is a closure over a requestHandler or passthrough request with the RPC server's wallet and chain server variables as part of the closure context.
func LazyApplyHandler ¶
func LazyApplyHandler(request *btcjson.Request, w *wallet.Wallet, chainClient chain.Interface) LazyHandler
LazyApplyHandler looks up the best request handler func for the method, returning a closure that will execute it with the (required) wallet and (optional) consensus RPC server. If no handlers are found and the chainClient is not nil, the returned handler performs RPC passthrough.
type ListAccountsRes ¶ added in v0.4.14
ListAccountsRes is the result from a call to ListAccounts
type ListAddressTransactionsRes ¶ added in v0.4.14
type ListAddressTransactionsRes struct { Res *[]btcjson.ListTransactionsResult // contains filtered or unexported fields }
ListAddressTransactionsRes is the result from a call to ListAddressTransactions
type ListAllTransactionsRes ¶ added in v0.4.14
type ListAllTransactionsRes struct { Res *[]btcjson.ListTransactionsResult // contains filtered or unexported fields }
ListAllTransactionsRes is the result from a call to ListAllTransactions
type ListLockUnspentRes ¶ added in v0.4.14
type ListLockUnspentRes struct { Res *[]btcjson.TransactionInput // contains filtered or unexported fields }
ListLockUnspentRes is the result from a call to ListLockUnspent
type ListReceivedByAccountRes ¶ added in v0.4.14
type ListReceivedByAccountRes struct { Res *[]btcjson.ListReceivedByAccountResult // contains filtered or unexported fields }
ListReceivedByAccountRes is the result from a call to ListReceivedByAccount
type ListReceivedByAddressRes ¶ added in v0.4.14
type ListReceivedByAddressRes struct { Res *btcjson.ListReceivedByAddressResult // contains filtered or unexported fields }
ListReceivedByAddressRes is the result from a call to ListReceivedByAddress
type ListSinceBlockRes ¶ added in v0.4.14
type ListSinceBlockRes struct { Res *btcjson.ListSinceBlockResult // contains filtered or unexported fields }
ListSinceBlockRes is the result from a call to ListSinceBlock
type ListTransactionsRes ¶ added in v0.4.14
type ListTransactionsRes struct { Res *[]btcjson.ListTransactionsResult // contains filtered or unexported fields }
ListTransactionsRes is the result from a call to ListTransactions
type ListUnspentRes ¶ added in v0.4.14
type ListUnspentRes struct { Res *[]btcjson.ListUnspentResult // contains filtered or unexported fields }
ListUnspentRes is the result from a call to ListUnspent
type LockUnspentRes ¶ added in v0.4.14
type LockUnspentRes struct { Res *bool // contains filtered or unexported fields }
LockUnspentRes is the result from a call to LockUnspent
type None ¶ added in v0.4.14
type None struct{}
None means no parameters it is not checked so it can be nil
type Options ¶
type Options struct { Username string Password string MaxPOSTClients int64 MaxWebsocketClients int64 }
Options contains the required options for running the legacy RPC server.
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
ParseError describes a failed parse due to bad user input. It corresponds to json.ErrRPCParse.
type RenameAccountRes ¶ added in v0.4.14
type RenameAccountRes struct { Res *None // contains filtered or unexported fields }
RenameAccountRes is the result from a call to RenameAccount
type RequestHandler ¶
RequestHandler is a handler function to handle an unmarshaled and parsed request into a marshalable response. If the error is a *json.RPCError or any of the above special error classes, the server will respond with the JSON-RPC appropriate error code. All other errors use the wallet catch-all error code, json.ErrRPCWallet.
type SendManyRes ¶ added in v0.4.14
type SendManyRes struct { Res *string // contains filtered or unexported fields }
SendManyRes is the result from a call to SendMany
type SendToAddressRes ¶ added in v0.4.14
type SendToAddressRes struct { Res *string // contains filtered or unexported fields }
SendToAddressRes is the result from a call to SendToAddress
type Server ¶
type Server struct { HTTPServer http.Server Wallet *wallet.Wallet WalletLoader *wallet.Loader ChainClient chain.Interface // handlerLookup func(string) (requestHandler, bool) HandlerMutex sync.Mutex Listeners []net.Listener AuthSHA [sha256.Size]byte Upgrader websocket.Upgrader MaxPostClients int64 // Max concurrent HTTP POST clients. MaxWebsocketClients int64 // Max concurrent websocket clients. WG sync.WaitGroup Quit qu.C QuitMutex sync.Mutex RequestShutdownChan qu.C }
Server holds the items the RPC server may need to access (auth, config, shutdown, etc.)
func NewServer ¶
func NewServer(opts *Options, walletLoader *wallet.Loader, listeners []net.Listener, quit qu.C) *Server
NewServer creates a new server for serving legacy RPC client connections, both HTTP POST and websocket.
func (*Server) CheckAuthHeader ¶
CheckAuthHeader checks the HTTP Basic authentication supplied by a client in the HTTP request r. It errors with ErrNoAuth if the request does not contain the Authorization header, or another non-nil error if the authentication was provided but incorrect.
This check is time-constant.
func (*Server) HandlerClosure ¶
func (s *Server) HandlerClosure(request *btcjson.Request) LazyHandler
HandlerClosure creates a closure function for handling requests of the given method. This may be a request that is handled directly by btcwallet, or a chain server request that is handled by passing the request down to pod.
NOTE: These handlers do not handle special cases, such as the authenticate method. Each of these must be checked beforehand (the method is already known) and handled accordingly.
func (*Server) InvalidAuth ¶
InvalidAuth checks whether a websocket request is a valid (parsable) authenticate request and checks the supplied username and passphrase against the server auth.
func (*Server) POSTClientRPC ¶
func (s *Server) POSTClientRPC(w http.ResponseWriter, r *http.Request)
POSTClientRPC processes and replies to a JSON-RPC client request.
func (*Server) RegisterWallet ¶
RegisterWallet associates the legacy RPC server with the wallet. This function must be called before any wallet RPCs can be called by clients.
func (*Server) RequestProcessShutdown ¶
func (s *Server) RequestProcessShutdown()
func (*Server) RequestProcessShutdownChan ¶
RequestProcessShutdownChan returns a channel that is sent to when an authorized client requests remote shutdown.
func (*Server) Serve ¶
Serve serves HTTP POST and websocket RPC for the legacy JSON-RPC RPC server. This function does not block on lis.Accept.
func (*Server) SetChainServer ¶
SetChainServer sets the chain server client component needed to run a fully functional bitcoin wallet RPC server. This can be called to enable RPC passthrough even before a loaded wallet is set, but the wallet's RPC client is preferred.
func (*Server) Stop ¶
func (s *Server) Stop()
Stop gracefully shuts down the rpc server by stopping and disconnecting all clients, disconnecting the chain server connection, and closing the wallet's account files. This blocks until shutdown completes.
func (*Server) WebsocketClientRPC ¶
func (s *Server) WebsocketClientRPC(wsc *WebsocketClient)
WebsocketClientRPC starts the goroutines to serve JSON-RPC requests over a websocket connection for a single client.
func (*Server) WebsocketClientRead ¶
func (s *Server) WebsocketClientRead(wsc *WebsocketClient)
func (*Server) WebsocketClientRespond ¶
func (s *Server) WebsocketClientRespond(wsc *WebsocketClient)
func (*Server) WebsocketClientSend ¶
func (s *Server) WebsocketClientSend(wsc *WebsocketClient)
type SetTxFeeRes ¶ added in v0.4.14
type SetTxFeeRes struct { Res *bool // contains filtered or unexported fields }
SetTxFeeRes is the result from a call to SetTxFee
type SignMessageRes ¶ added in v0.4.14
type SignMessageRes struct { Res *string // contains filtered or unexported fields }
SignMessageRes is the result from a call to SignMessage
type SignRawTransactionRes ¶ added in v0.4.14
type SignRawTransactionRes struct { Res *btcjson.SignRawTransactionResult // contains filtered or unexported fields }
SignRawTransactionRes is the result from a call to SignRawTransaction
type ValidateAddressRes ¶ added in v0.4.14
type ValidateAddressRes struct { Res *btcjson.ValidateAddressWalletResult // contains filtered or unexported fields }
ValidateAddressRes is the result from a call to ValidateAddress
type VerifyMessageRes ¶ added in v0.4.14
type VerifyMessageRes struct { Res *bool // contains filtered or unexported fields }
VerifyMessageRes is the result from a call to VerifyMessage
type WalletIsLockedRes ¶ added in v0.4.14
type WalletIsLockedRes struct { Res *bool // contains filtered or unexported fields }
WalletIsLockedRes is the result from a call to WalletIsLocked
type WalletLockRes ¶ added in v0.4.14
type WalletLockRes struct { Res *None // contains filtered or unexported fields }
WalletLockRes is the result from a call to WalletLock
type WalletPassphraseChangeRes ¶ added in v0.4.14
type WalletPassphraseChangeRes struct { Res *None // contains filtered or unexported fields }
WalletPassphraseChangeRes is the result from a call to WalletPassphraseChange
type WalletPassphraseRes ¶ added in v0.4.14
type WalletPassphraseRes struct { Res *None // contains filtered or unexported fields }
WalletPassphraseRes is the result from a call to WalletPassphrase
type WebsocketClient ¶
type WebsocketClient struct {
// contains filtered or unexported fields
}
func NewWebsocketClient ¶
func NewWebsocketClient(c *websocket.Conn, authenticated bool, remoteAddr string) *WebsocketClient
func (*WebsocketClient) Send ¶
func (c *WebsocketClient) Send(b []byte) (e error)