Versions in this module Expand all Collapse all v0 v0.2.17 Dec 28, 2019 v0.2.15 Dec 28, 2019 Changes in this version + const MaxRequestSize + var ErrAccountNameNotFound = btcjson.RPCError + var ErrAddressNotInWallet = btcjson.RPCError + var ErrNeedPositiveAmount = InvalidParameterError + var ErrNeedPositiveMinconf = InvalidParameterError + var ErrNoAuth = errors.New("no auth") + var ErrNoTransactionInfo = btcjson.RPCError + var ErrNotImportedAccount = btcjson.RPCError + var ErrReservedAccountName = btcjson.RPCError + var ErrUnloadedWallet = btcjson.RPCError + var ErrWalletUnlockNeeded = btcjson.RPCError + var HelpDescs map[string]string + var HelpDescsMutex sync.Mutex + var LocaleHelpDescs = map[string]func() map[string]string + var RPCHandlers = map[string]struct{ ... } + var RequestUsages = "addmultisigaddress nrequired [\"key\",...] (\"account\")\ncreatemultisig nrequired [\"key\",...]\ndumpprivkey \"address\"\ngetaccount \"address\"\ngetaccountaddress \"account\"\ngetaddressesbyaccount \"account\"\ngetbalance (\"account\" minconf=1)\ngetbestblockhash\ngetblockcount\ngetinfo\ngetnewaddress (\"account\")\ngetrawchangeaddress (\"account\")\ngetreceivedbyaccount \"account\" (minconf=1)\ngetreceivedbyaddress \"address\" (minconf=1)\ngettransaction \"txid\" (includewatchonly=false)\nhelp (\"command\")\nimportprivkey \"privkey\" (\"label\" rescan=true)\nkeypoolrefill (newsize=100)\nlistaccounts (minconf=1)\nlistlockunspent\nlistreceivedbyaccount (minconf=1 includeempty=false includewatchonly=false)\nlistreceivedbyaddress (minconf=1 includeempty=false includewatchonly=false)\nlistsinceblock (\"blockhash\" targetconfirmations=1 includewatchonly=false)\nlisttransactions (\"account\" count=10 from=0 includewatchonly=false)\nlistunspent (minconf=1 maxconf=9999999 [\"address\",...])\nlockunspent unlock [{\"txid\":\"value\",\"vout\":n},...]\nsendfrom \"fromaccount\" \"toaddress\" amount (minconf=1 \"comment\" \"commentto\")\nsendmany \"fromaccount\" {\"address\":amount,...} (minconf=1 \"comment\")\nsendtoaddress \"address\" amount (\"comment\" \"commentto\")\nsettxfee amount\nsignmessage \"address\" \"message\"\nsignrawtransaction \"rawtx\" ([{\"txid\":\"value\",\"vout\":n,\"scriptpubkey\":\"value\",\"redeemscript\":\"value\"},...] [\"privkey\",...] flags=\"ALL\")\nvalidateaddress \"address\"\nverifymessage \"address\" \"signature\" \"message\"\nwalletlock\nwalletpassphrase \"passphrase\" timeout\nwalletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\ncreatenewaccount \"account\"\nexportwatchingwallet (\"account\" download=false)\ngetbestblock\ngetunconfirmedbalance (\"account\")\nlistaddresstransactions [\"address\",...] (\"account\")\nlistalltransactions (\"account\")\nrenameaccount \"oldaccount\" \"newaccount\"\nwalletislocked" + func AddMultiSigAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func Confirms(txHeight, curHeight int32) int32 + func CreateMultiSig(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func CreateNewAccount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func DecodeAddress(s string, params *netparams.Params) (util.Address, error) + func DecodeHexStr(hexStr string) ([]byte, error) + func DumpPrivKey(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetAccount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetAccountAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetAddressesByAccount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetBalance(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetBestBlock(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetBestBlockHash(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetBlockCount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetInfo(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error) + func GetNewAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetRawChangeAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetReceivedByAccount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetReceivedByAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetTransaction(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func GetUnconfirmedBalance(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func HTTPBasicAuth(username, password string) []byte + func Help(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error) + func HelpDescsEnUS() map[string]string + func HelpNoChainRPC(icmd interface{}, w *wallet.Wallet) (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) (interface{}, error) + func IsNilOrEmpty(s *string) bool + func JSONAuthFail(w http.ResponseWriter) + func JSONError(err error) *btcjson.RPCError + func KeypoolRefill(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListAccounts(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListAddressTransactions(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListAllTransactions(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListLockUnspent(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListReceivedByAccount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListReceivedByAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListSinceBlock(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error) + func ListTransactions(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func ListUnspent(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func LockUnspent(icmd interface{}, w *wallet.Wallet) (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{}, err error) btcjson.Response + func RenameAccount(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func SendFrom(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (interface{}, error) + func SendMany(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func SendPairs(w *wallet.Wallet, amounts map[string]util.Amount, account uint32, ...) (string, error) + func SendToAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func SetTxFee(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func SignMessage(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func SignRawTransaction(icmd interface{}, w *wallet.Wallet, chainClient *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) (interface{}, error) + func VerifyMessage(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func WalletIsLocked(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func WalletLock(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func WalletPassphrase(icmd interface{}, w *wallet.Wallet) (interface{}, error) + func WalletPassphraseChange(icmd interface{}, w *wallet.Wallet) (interface{}, error) + type DeserializationError struct + type InvalidParameterError struct + type LazyHandler func() (interface{}, *btcjson.RPCError) + func LazyApplyHandler(request *btcjson.Request, w *wallet.Wallet, chainClient chain.Interface) LazyHandler + type Options struct + MaxPOSTClients int64 + MaxWebsocketClients int64 + Password string + Username string + type ParseError struct + type RequestHandler func(interface{}, *wallet.Wallet) (interface{}, error) + type RequestHandlerChainRequired func(interface{}, *wallet.Wallet, *chain.RPCClient) (interface{}, error) + type Server struct + AuthSHA [sha256.Size]byte + ChainClient chain.Interface + HTTPServer http.Server + HandlerMutex sync.Mutex + Listeners []net.Listener + MaxPostClients int64 + MaxWebsocketClients int64 + Quit chan struct{} + QuitMutex sync.Mutex + RequestShutdownChan chan struct{} + Upgrader websocket.Upgrader + WG sync.WaitGroup + Wallet *wallet.Wallet + WalletLoader *wallet.Loader + func NewServer(opts *Options, walletLoader *wallet.Loader, listeners []net.Listener) *Server + func (s *Server) CheckAuthHeader(r *http.Request) 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() <-chan struct{} + 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 WebsocketClient struct + func NewWebsocketClient(c *websocket.Conn, authenticated bool, remoteAddr string) *WebsocketClient + func (c *WebsocketClient) Send(b []byte) error