Documentation ¶
Index ¶
- Variables
- func WalletIsLocked(icmd interface{}) (interface{}, error)
- type BlockChain
- type DeserializationError
- type InvalidParameterError
- type Language
- type Modules
- type ParseError
- type RPCInterface
- func (rpc *RPCInterface) GetBestBlock()
- func (rpc *RPCInterface) GetBlockCount()
- func (rpc *RPCInterface) GetInfo()
- func (rpc *RPCInterface) GetNewAddress()
- func (rpc *RPCInterface) SendToAddress(vaddress string, vlabel string, vamount interface{})
- func (rpc *RPCInterface) WalletPassphrase(wpp string, tmo int64)
- type RequestedPayment
- type RequestedPaymentHistory
- type SendToAddress
Constants ¶
This section is empty.
Variables ¶
var RPCHandlers = &rpcHandlers
var WLT *wallet.Wallet
Functions ¶
func WalletIsLocked ¶
func WalletIsLocked(icmd interface{}) (interface{}, error)
walletIsLocked handles the walletislocked extension request by returning the current lock state (false for unlocked, true for locked) of an account.
Types ¶
type BlockChain ¶
type BlockChain struct { GetInfo *json.InfoWalletResult `json:"getinfo"` ListTransactions []json.ListTransactionsResult `json:"listtransactions"` ListAllTransactions []json.ListTransactionsResult `json:"listalltransactions"` ListAllSendTransactions []json.ListTransactionsResult `json:"listallsendtransactions"` Balance float64 `json:"balance"` UnConfirmed float64 `json:"unconfirmed"` }
func (*BlockChain) GetInfoData ¶
func (k *BlockChain) GetInfoData()
type DeserializationError ¶
type DeserializationError struct {
// contains filtered or unexported fields
}
type InvalidParameterError ¶
type InvalidParameterError struct {
// contains filtered or unexported fields
}
type Language ¶
type Language struct { TrueStory string `json:"truestory"` Wallet string `json:"wallet"` Interface string `json:"interface"` Network string `json:"network"` Security string `json:"security"` Mining string `json:"mining"` Overview string `json:"overview"` Send string `json:"send"` Receive string `json:"receive"` AddressBook string `json:"addressbook"` History string `json:"history"` Balances string `json:"balances"` CurrentBalance string `json:"currentbalance"` Total string `json:"total"` Unconfirmed string `json:"unconfirmed"` Available string `json:"available"` LatestTransactions string `json:"latesttransactions"` Type string `json:"type"` Address string `json:"address"` Date string `json:"date"` Amount string `json:"amount"` PayTo string `json:"payto"` Label string `json:"label"` PerPage string `json:"perpage"` Paginated string `json:"paginated"` SentTransactionsHistory string `json:"senttransactionshistory"` RequestPaymentsHistory string `json:"requestpaymentshistory"` Message string `json:"message"` }
func (*Language) LanguageData ¶
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
type RPCInterface ¶
type RPCInterface struct { MSG interface{} `json="msg"` ERR interface{} `json="err"` BlockCount int32 `json="blockcount"` Address string `json="address"` Getaddednodeinfo *[]json.GetAddedNodeInfoResult Getbestblock *json.GetBestBlockResult Getbestblockhash *string Getblock *json.GetBlockVerboseResult // Getblockcount int32 Getblockhash *string Getblockheader *json.GetBlockHeaderVerboseResult Getblocktemplate *json.GetBlockTemplateResult Getblockchaininfo *json.GetBlockChainInfoResult Getcfilter *string Getcfilterheader *string Getconnectioncount *int32 Getcurrentnet *uint32 Getdifficulty *float64 Getgenerate *bool Gethashespersec *float64 Getheaders *[]string Getinfo *json.InfoWalletResult Getmempoolinfo *json.GetMempoolInfoResult Getmininginfo *json.GetMiningInfoResult Getnettotals *json.GetNetTotalsResult Getnetworkhashps *int64 Getpeerinfo *[]json.GetPeerInfoResult Getrawmempool *json.GetRawMempoolVerboseResult Getrawtransaction *json.TxRawResult Gettxout *json.GetTxOutResult Searchrawtransactions *[]json.SearchRawTransactionsResult Sendrawtransaction *string Stop *string Submitblock *string Uptime *int64 Validateaddress *json.ValidateAddressChainResult Verifychain *bool Verifymessage *bool Version *map[string]json.VersionResult // Websocket commands. Session *json.SessionResult Rescanblocks *[]json.RescannedBlock // contains filtered or unexported fields }
func (*RPCInterface) GetBestBlock ¶
func (rpc *RPCInterface) GetBestBlock()
getBestBlock handles a getbestblock request by returning a JSON object with the height and hash of the most recently processed block.
func (*RPCInterface) GetBlockCount ¶
func (rpc *RPCInterface) GetBlockCount()
func (rpc *RPCInterface) GetBlockCount() {
func (*RPCInterface) GetInfo ¶
func (rpc *RPCInterface) GetInfo()
getInfo handles a getinfo request by returning the a structure containing information about the current state of btcwallet. exist.
func (*RPCInterface) GetNewAddress ¶
func (rpc *RPCInterface) GetNewAddress()
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 (*RPCInterface) SendToAddress ¶
func (rpc *RPCInterface) SendToAddress(vaddress string, vlabel string, vamount interface{})
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 (*RPCInterface) WalletPassphrase ¶
func (rpc *RPCInterface) WalletPassphrase(wpp string, tmo int64)
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.
type RequestedPayment ¶
type RequestedPayment struct { Time string `json:"time"` Label string `json:"label"` Address string `json:"address"` Amount string `json:"amount"` Desc string `json:"desc"` }
func (*RequestedPayment) RequestedPaymentWrite ¶
func (ab *RequestedPayment) RequestedPaymentWrite(time, label, address, amount, desc string)
type RequestedPaymentHistory ¶
type RequestedPaymentHistory struct {
RequestedPayment []RequestedPayment `json:"label"`
}
func (*RequestedPaymentHistory) RequestedPaymentHistory ¶
func (ab *RequestedPaymentHistory) RequestedPaymentHistory()