Documentation
¶
Index ¶
- type BitcoinRPC
- func (rpc *BitcoinRPC) Close()
- func (rpc *BitcoinRPC) GetAccountAddress(name string) (interface{}, error)
- func (rpc *BitcoinRPC) GetAddressesByAccount(name string) (interface{}, error)
- func (rpc *BitcoinRPC) GetBestBlockHash() (string, error)
- func (rpc *BitcoinRPC) GetBlockByHash(h string) ([]byte, error)
- func (rpc *BitcoinRPC) GetBlockByHeight(h uint64) ([]byte, error)
- func (rpc *BitcoinRPC) GetBlockHash(height uint64) (string, error)
- func (rpc *BitcoinRPC) GetFullBlockByHash(h string) ([]byte, error)
- func (rpc *BitcoinRPC) GetFullBlockByHeight(h uint64) ([]byte, error)
- func (rpc *BitcoinRPC) GetRawTransaction(h string) ([]byte, error)
- func (rpc *BitcoinRPC) ListAccounts() (interface{}, error)
- func (rpc *BitcoinRPC) OmniGetTransaction(h string) ([]byte, error)
- func (rpc *BitcoinRPC) OmniListBlockTransactions(height int64) ([]byte, error)
- func (rpc *BitcoinRPC) SendToAddress(addr, amount string) (interface{}, error)
- func (rpc *BitcoinRPC) WalletPassphrase(password, timeout string) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitcoinRPC ¶
type BitcoinRPC struct {
// contains filtered or unexported fields
}
BitcoinRPC is a warpper of btc/ltc/bcc/usdt.. rpc client.
func (*BitcoinRPC) GetAccountAddress ¶
func (rpc *BitcoinRPC) GetAccountAddress(name string) (interface{}, error)
GetAccountAddress returns the address.
func (*BitcoinRPC) GetAddressesByAccount ¶
func (rpc *BitcoinRPC) GetAddressesByAccount(name string) (interface{}, error)
getaddressesbyaccount returns the addresses.
func (*BitcoinRPC) GetBestBlockHash ¶
func (rpc *BitcoinRPC) GetBestBlockHash() (string, error)
GetBestBlockHash returns the bestblockhash.
func (*BitcoinRPC) GetBlockByHash ¶
func (rpc *BitcoinRPC) GetBlockByHash(h string) ([]byte, error)
GetBlockByHash returns block infomations by hash.
func (*BitcoinRPC) GetBlockByHeight ¶
func (rpc *BitcoinRPC) GetBlockByHeight(h uint64) ([]byte, error)
GetBlockByHeight returns block infomations by height.
func (*BitcoinRPC) GetBlockHash ¶
func (rpc *BitcoinRPC) GetBlockHash(height uint64) (string, error)
GetBlockHash returns block hash with block height.
func (*BitcoinRPC) GetFullBlockByHash ¶
func (rpc *BitcoinRPC) GetFullBlockByHash(h string) ([]byte, error)
GetFullBlockByHash returns block full infomations by hash.
func (*BitcoinRPC) GetFullBlockByHeight ¶
func (rpc *BitcoinRPC) GetFullBlockByHeight(h uint64) ([]byte, error)
GetFullBlockByHeight returns block full infomations by height.
func (*BitcoinRPC) GetRawTransaction ¶
func (rpc *BitcoinRPC) GetRawTransaction(h string) ([]byte, error)
GetRawTransaction returns raw transaction by transaction hash.
func (*BitcoinRPC) ListAccounts ¶
func (rpc *BitcoinRPC) ListAccounts() (interface{}, error)
listaccounts returns the accoutns.
func (*BitcoinRPC) OmniGetTransaction ¶
func (rpc *BitcoinRPC) OmniGetTransaction(h string) ([]byte, error)
OmniGetTransaction returns omnilayer raw transaction.
func (*BitcoinRPC) OmniListBlockTransactions ¶
func (rpc *BitcoinRPC) OmniListBlockTransactions(height int64) ([]byte, error)
OmniListBlockTransactions returns the omnilayer transactions in block.
func (*BitcoinRPC) SendToAddress ¶
func (rpc *BitcoinRPC) SendToAddress(addr, amount string) (interface{}, error)
SendToAddress sends coin to dest address.
func (*BitcoinRPC) WalletPassphrase ¶
func (rpc *BitcoinRPC) WalletPassphrase(password, timeout string) (interface{}, error)
unlockwallet return nil.