Documentation
¶
Index ¶
- type APIEndpoint
- type SonrQueryClient
- func (c *SonrQueryClient) BroadcastTx(ctx context.Context, tx []byte) (*ctypes.ResultBroadcastTx, error)
- func (c *SonrQueryClient) GetAllDIDs(ctx context.Context) ([]*identitytypes.DidDocument, error)
- func (c *SonrQueryClient) GetAllServices(ctx context.Context) ([]*identitytypes.Service, error)
- func (c *SonrQueryClient) GetDID(ctx context.Context, id string) (*identitytypes.ResolvedDidDocument, error)
- func (c *SonrQueryClient) GetService(ctx context.Context, origin string) (*identitytypes.Service, error)
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 ¶
func (c *SonrQueryClient) GetDID(ctx context.Context, id string) (*identitytypes.ResolvedDidDocument, error)
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
Click to show internal directories.
Click to hide internal directories.