mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-27 23:41:35 +00:00
parent
00dbc71bb8
commit
8be51e37cf
1 changed files with 51 additions and 1 deletions
52
cmdmgr.go
52
cmdmgr.go
|
@ -41,7 +41,7 @@ var (
|
||||||
type cmdHandler func(chan []byte, btcjson.Cmd)
|
type cmdHandler func(chan []byte, btcjson.Cmd)
|
||||||
|
|
||||||
var rpcHandlers = map[string]cmdHandler{
|
var rpcHandlers = map[string]cmdHandler{
|
||||||
// Standard bitcoind methods
|
// Standard bitcoind methods (implemented)
|
||||||
"dumpprivkey": DumpPrivKey,
|
"dumpprivkey": DumpPrivKey,
|
||||||
"getaddressesbyaccount": GetAddressesByAccount,
|
"getaddressesbyaccount": GetAddressesByAccount,
|
||||||
"getbalance": GetBalance,
|
"getbalance": GetBalance,
|
||||||
|
@ -55,6 +55,40 @@ var rpcHandlers = map[string]cmdHandler{
|
||||||
"walletlock": WalletLock,
|
"walletlock": WalletLock,
|
||||||
"walletpassphrase": WalletPassphrase,
|
"walletpassphrase": WalletPassphrase,
|
||||||
|
|
||||||
|
// Standard bitcoind methods (currently unimplemented)
|
||||||
|
"addmultisigaddress": Unimplemented,
|
||||||
|
"backupwallet": Unimplemented,
|
||||||
|
"createmultisig": Unimplemented,
|
||||||
|
"dumpwallet": Unimplemented,
|
||||||
|
"getaccount": Unimplemented,
|
||||||
|
"getaccountaddress": Unimplemented,
|
||||||
|
"getrawchangeaddress": Unimplemented,
|
||||||
|
"getreceivedbyaccount": Unimplemented,
|
||||||
|
"getreceivedbyaddress": Unimplemented,
|
||||||
|
"gettransaction": Unimplemented,
|
||||||
|
"gettxout": Unimplemented,
|
||||||
|
"gettxoutsetinfo": Unimplemented,
|
||||||
|
"importwallet": Unimplemented,
|
||||||
|
"keypoolrefill": Unimplemented,
|
||||||
|
"listaddressgroupings": Unimplemented,
|
||||||
|
"listlockunspent": Unimplemented,
|
||||||
|
"listreceivedbyaccount": Unimplemented,
|
||||||
|
"listreceivedbyaddress": Unimplemented,
|
||||||
|
"listsinceblock": Unimplemented,
|
||||||
|
"listunspent": Unimplemented,
|
||||||
|
"lockunspent": Unimplemented,
|
||||||
|
"move": Unimplemented,
|
||||||
|
"sendtoaddress": Unimplemented,
|
||||||
|
"setaccount": Unimplemented,
|
||||||
|
"signmessage": Unimplemented,
|
||||||
|
"signrawtransaction": Unimplemented,
|
||||||
|
"validateaddress": Unimplemented,
|
||||||
|
"verifymessage": Unimplemented,
|
||||||
|
"walletpassphrasechange": Unimplemented,
|
||||||
|
|
||||||
|
// Standard bitcoind methods which won't be implemented by btcwallet.
|
||||||
|
"encryptwallet": Unsupported,
|
||||||
|
|
||||||
// Extensions not exclusive to websocket connections.
|
// Extensions not exclusive to websocket connections.
|
||||||
"createencryptedwallet": CreateEncryptedWallet,
|
"createencryptedwallet": CreateEncryptedWallet,
|
||||||
}
|
}
|
||||||
|
@ -171,6 +205,22 @@ func ReplySuccess(frontend chan []byte, id interface{}, result interface{}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unimplemented responds to an unimplemented RPC request with the
|
||||||
|
// appropiate error.
|
||||||
|
func Unimplemented(frontend chan []byte, icmd btcjson.Cmd) {
|
||||||
|
ReplyError(frontend, icmd.Id(), &btcjson.ErrUnimplemented)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unsupported responds to an standard bitcoind RPC request which is
|
||||||
|
// unsupported by btcwallet due to design differences.
|
||||||
|
func Unsupported(frontend chan []byte, icmd btcjson.Cmd) {
|
||||||
|
e := &btcjson.Error{
|
||||||
|
Code: -1,
|
||||||
|
Message: "Command unsupported by btcwallet",
|
||||||
|
}
|
||||||
|
ReplyError(frontend, icmd.Id(), e)
|
||||||
|
}
|
||||||
|
|
||||||
// DumpPrivKey replies to a dumpprivkey request with the private
|
// DumpPrivKey replies to a dumpprivkey request with the private
|
||||||
// key for a single address, or an appropiate error if the wallet
|
// key for a single address, or an appropiate error if the wallet
|
||||||
// is locked.
|
// is locked.
|
||||||
|
|
Loading…
Add table
Reference in a new issue