chain

package
v0.5.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIEndpoint

type APIEndpoint string
const (
	// List of known origin api endpoints.
	SonrLocalRpcOrigin  APIEndpoint = "localhost:9090"
	SonrPublicRpcOrigin APIEndpoint = "142.93.116.204:9090"
)

func (APIEndpoint) TcpAddress added in v0.5.0

func (e APIEndpoint) TcpAddress() string

type SonrQueryClient

type SonrQueryClient struct {
	APIEndpoint string
}

func NewClient

func NewClient(apiEndpoint APIEndpoint) *SonrQueryClient

NewClient creates a new client for the sonr chain

func (*SonrQueryClient) BroadcastTx added in v0.5.0

func (c *SonrQueryClient) BroadcastTx(ctx context.Context, tx []byte) (*ctypes.ResultBroadcastTx, error)

BroadcastTx broadcasts a transaction to the sonr chain

func (*SonrQueryClient) GetAllDIDs

func (c *SonrQueryClient) GetAllDIDs(ctx context.Context) ([]*identitytypes.DidDocument, error)

GetAllDIDs returns all DID documents

func (*SonrQueryClient) GetAllServices

func (c *SonrQueryClient) GetAllServices(ctx context.Context) ([]*identitytypes.Service, error)

GetAllServices returns all services

func (*SonrQueryClient) GetDID

GetDID returns the DID document with the given id

func (*SonrQueryClient) GetService

func (c *SonrQueryClient) GetService(ctx context.Context, origin string) (*identitytypes.Service, error)

GetService returns the service with the given id

Jump to

Keyboard shortcuts

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