Skip to content

shaunmza/golos-go

 
 

Repository files navigation

asuleymanov/golos-go

GoDoc Go Report Card

Golang RPC client library for Golos.

Usage

import "github.com/asuleymanov/golos-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/golos-go"
)

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

  fmt.Println("Config --> ")
  fmt.Printf("%#v \n",cls.Config)
  fmt.Println("")
  fmt.Println("")
  
  fmt.Println("DatabaseInfo --> ")
  ans,err:= cls.API.GetDatabaseInfo()
  fmt.Printf("%#v \n Error : %s\n",ans,err)
  fmt.Println("")
  fmt.Println("")
  
  fmt.Println("ChainProperties --> ")
  ans1,err1:= cls.API.GetChainProperties()
  fmt.Printf("%#v \n Error : %s\n",ans1,err1)
  fmt.Println("")
  fmt.Println("")
}

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. 1EjXRJneMJZHZbnQiF5TUbS98MYjDvTjBj

About

Golang RPC client library for Golos- https://golos.id

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%