Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.32 KB

README_v1.md

File metadata and controls

63 lines (46 loc) · 1.32 KB

logo

Utopia Ecosystem API wrapper written in Golang

Docs

GoDoc go-report Build Status

Install

go get github.com/Sagleft/utopialib-go

then

import (
	utopiago "github.com/Sagleft/utopialib-go"
)

Usage

client := utopiago.NewClient("C17BF2E95821A6B545DC9A193CBB750B").
	SetProtocol("http").SetPort(22000).SetWsPort(25000)

myContactData, err := client.GetOwnContact()
if err != nil {
	log.Fatalln(err)
}

fmt.Println(myContactData.Pubkey)

or

client := utopiago.UtopiaClient{
	Protocol: "http",
	Token:    "C17BF2E95821A6B545DC9A193CBB750B",
	Host:     "127.0.0.1",
	Port:     22791,
}

fmt.Println(client.CheckClientConnection())

How can this be used?

  • creating a web service that processes client requests;
  • creation of a payment service;
  • development of a bot for the channel;
  • utility for working with uNS;
  • experiments to explore web3.0;