rpc4go

package module
v0.0.0-...-ff649a9 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: MIT Imports: 3 Imported by: 1

README

rpc4go

blockchain rpc clients for golang, support btc,eth,ont etc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDriver

func RegisterDriver(name string, driver Driver)

RegisterDriver .

Types

type Client

type Client interface {
	// BlockNumber get best blocknumber
	BlockNumber() (int64, error)
	BlockByNumber(number int64, block interface{}) error
	BalanceOf(address string, asset string) (string, error)
	SendTransaction(data []byte) (string, error)
}

Client .

func New

func New(driverName string, url string) (Client, error)

New create client object with provider driver and url

type Driver

type Driver interface {
	Create(url string) Client
}

Driver .

Directories

Path Synopsis
driver
eth

Jump to

Keyboard shortcuts

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