Documentation ¶
Overview ¶
Package wasm supports smart contract integration with the provenance name module.
Package wasm supports smart contract integration with the name module.
Package wasm supports smart contract integration with the provenance name module.
Index ¶
- func Encoder(contract sdk.AccAddress, msg json.RawMessage, version string) ([]sdk.Msg, error)
- func Querier(keeper keeper.Keeper) provwasm.Querier
- type BindNameParams
- type DeleteNameParams
- type LookupQueryParams
- type NameMsgParams
- type NameQueryParams
- type QueryResName
- type QueryResNames
- type ResolveQueryParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encoder ¶
func Encoder(contract sdk.AccAddress, msg json.RawMessage, version string) ([]sdk.Msg, error)
Encoder returns a smart contract message encoder for the name module.
Types ¶
type BindNameParams ¶
type BindNameParams struct { // The combined name and root name (eg in x.y.z : name = x, root_name = y.z) Name string `json:"name"` // The address to bind Address string `json:"address"` // Whether to restrict binding child names to the owner Restrict bool `json:"restrict"` }
BindNameParams are params for encoding a MsgBindName.
func (*BindNameParams) Encode ¶
func (params *BindNameParams) Encode(contract sdk.AccAddress) ([]sdk.Msg, error)
Encode creates a MsgBindNameRequest. The parent address is required to be the signer. But, in x/wasm the contract address must be the signer. This means that contract instances should have a parent name they own, or the parent name must be unrestricted.
type DeleteNameParams ¶
type DeleteNameParams struct { // The name to unbind from the contract address. Name string `json:"name"` }
DeleteNameParams are params for encoding a MsgDeleteNameRequest.
func (*DeleteNameParams) Encode ¶
func (params *DeleteNameParams) Encode(contract sdk.AccAddress) ([]sdk.Msg, error)
Encode creates a MsgDeleteNameRequest.
type LookupQueryParams ¶
type LookupQueryParams struct { // Find all names bound to this address. Address string `json:"address"` }
LookupQueryParams are the inpust for a lookup query.
type NameMsgParams ¶
type NameMsgParams struct { // Encode a MsgBindName Bind *BindNameParams `json:"bind_name,omitempty"` // Encode a MsgUnBindName Delete *DeleteNameParams `json:"delete_name,omitempty"` }
NameMsgParams are params for encoding []sdk.Msg types from the name module. Only one field should be set.
type NameQueryParams ¶
type NameQueryParams struct { // Resolve the address bound to the given name. Resolve *ResolveQueryParams `json:"resolve,omitempty"` // Lookup all names an address is bound to. Lookup *LookupQueryParams `json:"lookup,omitempty"` }
NameQueryParams represents the request type for the name module sent by a smart contracts. Only one query field should be set.
type QueryResName ¶
type QueryResName struct { Name string `json:"name"` Address string `json:"address"` Restricted bool `json:"restricted"` }
QueryResName contains the address from a name query.
type QueryResNames ¶
type QueryResNames struct {
Records []QueryResName `json:"records,omitempty"`
}
QueryResNames contains a sequence of name records.
type ResolveQueryParams ¶
type ResolveQueryParams struct { // The name we want to resolve the address for. Name string `json:"name"` }
ResolveQueryParams are the inputs for a resolve name query.