chain

package
v0.5.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: GPL-3.0 Imports: 4 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"
)

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) GetAllDIDs

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

GetAllDIDs returns all DID documents

func (*SonrQueryClient) GetAllServices

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

GetAllServices returns all services

func (*SonrQueryClient) GetDID

func (c *SonrQueryClient) GetDID(ctx context.Context, id string) (*types.DidDocument, error)

GetDID returns the DID document with the given id

func (*SonrQueryClient) GetService

func (c *SonrQueryClient) GetService(ctx context.Context, origin string) (*types.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