auth

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: 15 Imported by: 0

README

Auth module

Usage

(Query) auth params
response, err := xplac.AuthParams().Query()
(Query) account address
queryAccAddressMsg := types.QueryAccAddressMsg{
    Address: "xpla19w2r47nczglwlpfynqe5769cwkwq5fvmzu5pu7",
}
response, err := xplac.AccAddress(queryAccAddressMsg).Query()
(Query) accounts
response, err := xplac.Accounts().Query()
(Query) Txs by events
queryTxsByEventsMsg := types.QueryTxsByEventsMsg{
    Events: "transfer.recipient=xpla19w2r47nczglwlpfynqe5769cwkwq5fvmzu5pu7",
}
response, err := xplac.TxsByEvents(queryTxsByEventsMsg).Query()
(Query) tx
// Retrieve by using hash
queryTxMsg := types.QueryTxMsg{
    // Default type is "hash" including empty type.
    Value: "B6BBBB649F19E8970EF274C0083FE945FD38AD8C524D68BB3FE3A20D72DF03C4",
}
response, err := xplac.Tx(queryTxMsg).Query()

// Retrieve by using signature
queryTxMsg := types.QueryTxMsg{
    Type:  "signature",
    Value: "4fmwN0Qp084qpfNpm1XV22YOwnjrGYWIuyRgGgj7f3Mv2ECsQ0ZY/9MqOaZ9TGB3slQQQNNiiBf9eR2ACad/pgE=",
}

// Retrieve by using account sequence
queryTxMsg := types.QueryTxMsg{
		Type:  "acc_seq",
		Value: "xpla19w2r47nczglwlpfynqe5769cwkwq5fvmzu5pu7/5", //<addr>/<sequence>
	}
response, err := xplac.Tx(queryTxMsg).Query()

Documentation

Index

Constants

View Source
const (
	AuthModule                  = "auth"
	AuthQueryParamsMsgType      = "query-auth-params"
	AuthQueryAccAddressMsgType  = "query-account"
	AuthQueryAccountsMsgType    = "query-accounts"
	AuthQueryTxsByEventsMsgType = "query-txs-by-events"
	AuthQueryTxMsgType          = "query-tx"
)

Variables

This section is empty.

Functions

func MakeAuthParamMsg

func MakeAuthParamMsg() (authtypes.QueryParamsRequest, error)

(Query) make msg - auth param

func MakeQueryAccAddressMsg

func MakeQueryAccAddressMsg(queryAccAddressMsg types.QueryAccAddressMsg) (authtypes.QueryAccountRequest, error)

(Query) make msg - auth account

func MakeQueryAccountsMsg

func MakeQueryAccountsMsg() (authtypes.QueryAccountsRequest, error)

(Query) make msg - auth accounts

func NewCoreModule added in v0.1.2

func NewCoreModule() core.CoreModule

func QueryAuth

func QueryAuth(i core.QueryClient) (string, error)

Query client for auth module.

Types

type AuthExternal added in v0.1.2

type AuthExternal struct {
	Xplac provider.XplaClient
}

func NewAuthExternal added in v0.1.2

func NewAuthExternal(xplac provider.XplaClient) (e AuthExternal)

func (AuthExternal) AccAddress added in v0.1.2

func (e AuthExternal) AccAddress(queryAccAddresMsg types.QueryAccAddressMsg) provider.XplaClient

Query for account by address.

func (AuthExternal) Accounts added in v0.1.2

func (e AuthExternal) Accounts() provider.XplaClient

Query all accounts.

func (AuthExternal) AuthParams added in v0.1.2

func (e AuthExternal) AuthParams() provider.XplaClient

Query the current auth parameters.

func (AuthExternal) Tx added in v0.1.2

func (e AuthExternal) Tx(queryTxMsg types.QueryTxMsg) provider.XplaClient

Query for a transaction by hash <addr>/<seq> combination or comma-separated signatures in a committed block.

func (AuthExternal) TxsByEvents added in v0.1.2

func (e AuthExternal) TxsByEvents(txsByEventsMsg types.QueryTxsByEventsMsg) provider.XplaClient

Query for paginated transactions that match a set of events.

type QueryTxParseMsg

type QueryTxParseMsg struct {
	TmEvents []string
	TxType   string
}

func MakeQueryTxMsg

func MakeQueryTxMsg(queryTxMsg types.QueryTxMsg) (QueryTxParseMsg, error)

(Query) make msg - transaction

type QueryTxsByEventParseMsg

type QueryTxsByEventParseMsg struct {
	TmEvents []string
	Page     int
	Limit    int
}

func MakeTxsByEventsMsg

func MakeTxsByEventsMsg(txsByEventsMsg types.QueryTxsByEventsMsg) (QueryTxsByEventParseMsg, error)

(Query) make msg - transactions by events

Jump to

Keyboard shortcuts

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