core

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PageRequest *query.PageRequest

Functions

func ClientForQuery

func ClientForQuery(i QueryClient) (cmclient.Context, error)

For auth module and gov module, make cosmos sdk client for querying.

func DefaultPagination

func DefaultPagination() *query.PageRequest

Set default pagination.

func PrintObjectLegacy

func PrintObjectLegacy(i QueryClient, toPrint interface{}) ([]byte, error)

Print object by using cosmos sdk legacy amino.

func PrintProto

func PrintProto(i QueryClient, toPrint proto.Message) ([]byte, error)

Print protobuf message by using cosmos sdk codec.

func ReadPageRequest

func ReadPageRequest(pagination types.Pagination) (*query.PageRequest, error)

Read pagination in the xpla client option

Types

type CoreModule added in v0.1.2

type CoreModule interface {
	// Name of a core module must not be duplicated previous names.
	Name() string

	// Routed transaction messages are built in the TxBuilder of Cosmos-SDK.
	NewTxRouter(cmclient.TxBuilder, string, interface{}) (cmclient.TxBuilder, error)

	// Route query requests by gRPC or HTTP.
	// Queries are returned with string type regardless of communication protocol.
	NewQueryRouter(QueryClient) (string, error)
}

The standard form for a module in the core package. Every modules are enrolled to the controller by using this interface.

type QueryClient

type QueryClient struct {
	Ixplac    provider.XplaClient
	QueryType uint8
}

Query internal XPLA client

func NewIxplaClient added in v0.1.2

func NewIxplaClient(moduleClient provider.XplaClient, qt uint8) *QueryClient

Jump to

Keyboard shortcuts

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