rpc

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET = "GET"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) GetLatestHeight

func (c *Client) GetLatestHeight(ctx context.Context) (int64, error)

func (*Client) GetMappingValue

func (c *Client) GetMappingValue(ctx context.Context, programId, mappingName, mappingKey string) (map[string]string, error)

returns the value in a key-value mapping corresponding to the supplied mappingKey

type Execution

type Execution struct {
	Transitions     []Transitions `json:"transitions"`
	GlobalStateRoot string        `json:"global_state_root"`
	Proof           string        `json:"proof"`
}

type FeeTransition

type FeeTransition struct {
	Transtion       Transitions `json:"transition"`
	GlobalStateRoot string      `json:"global_state_root"`
	Proof           string      `json:"proof"`
}

type IAleoRPC

type IAleoRPC interface {
	GetMappingValue(ctx context.Context, programId, mappingName, mappingKey string) (map[string]string, error)
	GetLatestHeight(ctx context.Context) (int64, error)
}

func NewRPC

func NewRPC(RpcEndPoint, Network string) (IAleoRPC, error)

type Inputs

type Inputs struct {
	Type  string `json:"type"`
	Id    string `json:"id"`
	Value string `json:"value"`
}

type Outputs

type Outputs struct {
	Type  string `json:"type"`
	Id    string `json:"id"`
	Value string `json:"value"`
}

type Transaction

type Transaction struct {
	Type       string        `json:"type"`
	Id         string        `json:"id"`
	Execution_ Execution     `json:"execution"`
	Fee        FeeTransition `json:"fee"`
}

type Transitions

type Transitions struct {
	Id       string    `json:"id"`
	Program  string    `json:"program"`
	Function string    `json:"function"`
	Inputs   []Inputs  `json:"inputs"`
	Outputs  []Outputs `json:"outputs"`
	Tpk      string    `json:"tpk"`
	Tcm      string    `json:"tcm"`
}

Jump to

Keyboard shortcuts

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