rpc

package
v0.0.0-...-d2fdb59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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 DialHTTP

func DialHTTP(url string) *BitcoinRPC

DialHTTP is a wrapper of rpc.DialHTTP.

func New

func New(rpcClient *rpc.Client) *BitcoinRPC

New returns bitcoin rpc client.

func (*BitcoinRPC) Close

func (rpc *BitcoinRPC) Close()

Close closes rpc connection.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL