auth

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 10 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

Types

type QueryTxParseMsg added in v0.0.6

type QueryTxParseMsg struct {
	TmEvents []string
	TxType   string
}

func MakeQueryTxMsg

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

(Query) make msg - transaction

type QueryTxsByEventParseMsg added in v0.0.6

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