o3

package
v0.0.0-...-cbe201a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NEOMainNet = "main"
View Source
var NEOTestNet = "test"

Functions

This section is empty.

Types

type ClaimableGASResponse

type ClaimableGASResponse struct {
	Response
	*ErrorResponse
	Result struct {
		Data struct {
			Gas    string `json:"gas"`
			Claims []struct {
				Asset          string `json:"asset"`
				Index          int    `json:"index"`
				Txid           string `json:"txid"`
				Value          string `json:"value"`
				CreatedAtBlock int    `json:"createdAtBlock"`
			} `json:"claims"`
		} `json:"data"`
	} `json:"result"`
}

type ErrorResponse

type ErrorResponse struct {
	Error struct {
		Message string `json:"message"`
		Type    string `json:"type"`
	} `json:"error"`
}

type NEONetWork

type NEONetWork string

type O3APIInterface

type O3APIInterface interface {
	GetNEOUTXO(address string) UTXOResponse
	GetNEOClimableGAS(address string) ClaimableGASResponse
}

type O3Client

type O3Client struct {
	APIBaseEndpoint url.URL
	// contains filtered or unexported fields
}

func APIClientWithNEOPrivateNet

func APIClientWithNEOPrivateNet() *O3Client

func APIClientWithNEOTestnet

func APIClientWithNEOTestnet() *O3Client

func DefaultO3APIClient

func DefaultO3APIClient() *O3Client

func (*O3Client) GetNEOClimableGAS

func (o *O3Client) GetNEOClimableGAS(address string) ClaimableGASResponse

func (*O3Client) GetNEOUTXO

func (o *O3Client) GetNEOUTXO(address string) UTXOResponse

type Response

type Response struct {
	Code int `json:"code"`
}

type UTXOResponse

type UTXOResponse struct {
	Response
	*ErrorResponse
	Result struct {
		Data []UTXOResultData `json:"data"`
	} `json:"result"`
}

type UTXOResultData

type UTXOResultData struct {
	Asset          string `json:"asset"`
	Index          int    `json:"index"`
	Txid           string `json:"txid"`
	Value          string `json:"value"`
	CreatedAtBlock int    `json:"createdAtBlock"`
}

Jump to

Keyboard shortcuts

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