jsonrpc

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

View Source
const ErrCodeProtocol = -33000

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(services ...Service) (http.Handler, error)

Types

type Client

type Client struct {
	Client http.Client
	Server string
}

func NewClient

func NewClient(server string) *Client

NewClient creates new API client with default config

func (*Client) ConsensusStatus

func (c *Client) ConsensusStatus(ctx context.Context, opts api.ConsensusStatusOptions) (*api.ConsensusStatus, error)

func (*Client) Faucet

func (c *Client) Faucet(ctx context.Context, account *url.URL, opts api.FaucetOptions) (*api.Submission, error)

func (*Client) FindService added in v1.2.0

func (c *Client) FindService(ctx context.Context, opts api.FindServiceOptions) ([]*api.FindServiceResult, error)

func (*Client) Metrics

func (c *Client) Metrics(ctx context.Context, opts api.MetricsOptions) (*api.Metrics, error)

func (*Client) NetworkStatus

func (c *Client) NetworkStatus(ctx context.Context, opts api.NetworkStatusOptions) (*api.NetworkStatus, error)

func (*Client) NodeInfo added in v1.2.0

func (c *Client) NodeInfo(ctx context.Context, opts api.NodeInfoOptions) (*api.NodeInfo, error)

func (*Client) Private added in v1.2.10

func (c *Client) Private() *PrivateClient

func (*Client) Query

func (c *Client) Query(ctx context.Context, scope *url.URL, query api.Query) (api.Record, error)

func (*Client) Submit

func (c *Client) Submit(ctx context.Context, envelope *messaging.Envelope, opts api.SubmitOptions) ([]*api.Submission, error)

func (*Client) Validate

func (c *Client) Validate(ctx context.Context, envelope *messaging.Envelope, opts api.ValidateOptions) ([]*api.Submission, error)

type ConsensusService

type ConsensusService struct{ api.ConsensusService }

type Faucet

type Faucet struct{ api.Faucet }

type MetricsService

type MetricsService struct{ api.MetricsService }

type NetworkService

type NetworkService struct{ api.NetworkService }

type NodeService

type NodeService struct {
	api.NodeService
}

type PrivateClient added in v1.2.10

type PrivateClient Client

func (*PrivateClient) Sequence added in v1.2.10

func (c *PrivateClient) Sequence(ctx context.Context, src, dst *url.URL, num uint64, opts private.SequenceOptions) (*api.MessageRecord[messaging.Message], error)

type Querier

type Querier struct{ api.Querier }

type Sequencer added in v1.2.10

type Sequencer struct{ private.Sequencer }

type Service

type Service interface {
	// contains filtered or unexported methods
}

type Submitter

type Submitter struct{ api.Submitter }

type Validator

type Validator struct{ api.Validator }

Jump to

Keyboard shortcuts

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