rpc

package module
v0.0.0-...-9cc8e37 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 11 Imported by: 4

README

RPC

This module is for invoking APIs specified in the Nano RPC Protocol

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccountNotFound = errors.New("Account not found")

Functions

This section is empty.

Types

type RPCClient

type RPCClient struct {
	Url string
	// contains filtered or unexported fields
}

func NewRPCClient

func NewRPCClient(url string) *RPCClient

func (*RPCClient) MakeAccountBalanceRequest

func (client *RPCClient) MakeAccountBalanceRequest(account string) (*responses.AccountBalanceItem, error)

func (*RPCClient) MakeAccountInfoRequest

func (client *RPCClient) MakeAccountInfoRequest(account string) (*responses.AccountInfoResponse, error)

{"error":"Account not found"}

func (*RPCClient) MakeAccountsBalancesRequest

func (client *RPCClient) MakeAccountsBalancesRequest(accounts []string) (*responses.AccountsBalancesResponse, error)

func (*RPCClient) MakeAccountsFrontiersRequest

func (client *RPCClient) MakeAccountsFrontiersRequest(accounts []string) (*responses.AccountsFrontiersResponse, error)

func (*RPCClient) MakeAccountsPendingRequest

func (client *RPCClient) MakeAccountsPendingRequest(accounts []string) (*responses.AccountsPendingResponse, error)

func (*RPCClient) MakeBlockInfoRequest

func (client *RPCClient) MakeBlockInfoRequest(hash string) (*responses.BlockInfoResponse, error)

func (*RPCClient) MakeProcessRequest

func (client *RPCClient) MakeProcessRequest(request requests.ProcessRequest) (*responses.ProcessResponse, error)

func (*RPCClient) MakeReceivableRequest

func (client *RPCClient) MakeReceivableRequest(account string, threshold string) (*responses.ReceivableResponse, error)

func (*RPCClient) MakeRequest

func (client *RPCClient) MakeRequest(request interface{}) ([]byte, error)

Base request

Directories

Path Synopsis
models

Jump to

Keyboard shortcuts

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