bitshares

package module
v0.0.0-...-7e56884 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 6 Imported by: 0

README

asuleymanov/bitshares-go

GoDoc Go Report Card

Golang RPC client library for Bitshares.

Usage

import "github.com/asuleymanov/bitshares-go"

Example

This is just a code snippet. Please check the examples directory for more complete and ready to use examples.

package main

import (
	"fmt"

	"github.com/asuleymanov/bitshares-go"
)

func main() {
	cls, _ := golos.NewClient("wss://golos.lexa.host/ws")
	defer cls.Close()

  fmt.Println("Config --> ")
  fmt.Printf("%#v \n",cls.Config)
}

Package Organisation

You need to create a Client object to be able to do anything. Then you just need to call NewClient().

License

MIT, see the LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitializeTransport = errors.New("Failed to initialize transport.")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	API *api.API

	Config api.Config

	ChainID string
	// contains filtered or unexported fields
}

Client can be used to access GOLOS remote APIs. There is a function for every available GOLOS API, for example, Client.API.GetDatabaseInfo() corresponds to database_api -> get_database_info.

func NewClient

func NewClient(apiURL string) (*Client, error)

NewClient creates a new RPC client that use the given CallCloser internally. Initialize only server present API. Absent API initialized as nil value.

func (*Client) Close

func (client *Client) Close() error

Close should be used to close the client when no longer needed. It simply calls Close() on the underlying CallCloser.

Directories

Path Synopsis
encoding
wif
rfc6979
Package rfc6979 is an implementation of RFC 6979's deterministic DSA.
Package rfc6979 is an implementation of RFC 6979's deterministic DSA.

Jump to

Keyboard shortcuts

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