rest

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rest ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainRESTClient

type BlockchainRESTClient struct {
	// contains filtered or unexported fields
}

BlockchainRESTClient is a client to the blockchain REST interface.

func NewBlockchainRESTClient

func NewBlockchainRESTClient(baseURL string) *BlockchainRESTClient

NewBlockchainRESTClient ...

func (*BlockchainRESTClient) GetTokenBalance

func (b *BlockchainRESTClient) GetTokenBalance(ctx context.Context, address string) (*TokenResponse, error)

GetTokenBalance returns token balance (PDV) of the given address.

type TokenResponse

type TokenResponse struct {
	Height string `json:"height"`
	Result struct {
		Balance      sdk.Dec `json:"balance"`
		BalanceDelta sdk.Dec `json:"balanceDelta"`
	} `json:"result"`
}

TokenResponse ...

Jump to

Keyboard shortcuts

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