Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetAddressKeyPrefix(addr sdk.AccAddress) (key []byte, err error)
- func GetNameKeyPrefix(name string) (key []byte, err error)
- func GetNameKeyPrefixLegacyAmino(name string) (key []byte, err error)
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateAddress(address sdk.AccAddress) error
- type CreateRootNameProposal
- func (*CreateRootNameProposal) Descriptor() ([]byte, []int)
- func (crnp CreateRootNameProposal) GetDescription() string
- func (crnp CreateRootNameProposal) GetTitle() string
- func (m *CreateRootNameProposal) Marshal() (dAtA []byte, err error)
- func (m *CreateRootNameProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateRootNameProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (crnp CreateRootNameProposal) ProposalRoute() string
- func (crnp CreateRootNameProposal) ProposalType() string
- func (*CreateRootNameProposal) ProtoMessage()
- func (m *CreateRootNameProposal) Reset()
- func (m *CreateRootNameProposal) Size() (n int)
- func (crnp CreateRootNameProposal) String() string
- func (m *CreateRootNameProposal) Unmarshal(dAtA []byte) error
- func (crnp CreateRootNameProposal) ValidateBasic() error
- func (m *CreateRootNameProposal) XXX_DiscardUnknown()
- func (m *CreateRootNameProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateRootNameProposal) XXX_Merge(src proto.Message)
- func (m *CreateRootNameProposal) XXX_Size() int
- func (m *CreateRootNameProposal) XXX_Unmarshal(b []byte) error
- type EventNameBound
- func (*EventNameBound) Descriptor() ([]byte, []int)
- func (m *EventNameBound) GetAddress() string
- func (m *EventNameBound) GetName() string
- func (m *EventNameBound) Marshal() (dAtA []byte, err error)
- func (m *EventNameBound) MarshalTo(dAtA []byte) (int, error)
- func (m *EventNameBound) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventNameBound) ProtoMessage()
- func (m *EventNameBound) Reset()
- func (m *EventNameBound) Size() (n int)
- func (m *EventNameBound) String() string
- func (m *EventNameBound) Unmarshal(dAtA []byte) error
- func (m *EventNameBound) XXX_DiscardUnknown()
- func (m *EventNameBound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventNameBound) XXX_Merge(src proto.Message)
- func (m *EventNameBound) XXX_Size() int
- func (m *EventNameBound) XXX_Unmarshal(b []byte) error
- type EventNameUnbound
- func (*EventNameUnbound) Descriptor() ([]byte, []int)
- func (m *EventNameUnbound) GetAddress() string
- func (m *EventNameUnbound) GetName() string
- func (m *EventNameUnbound) Marshal() (dAtA []byte, err error)
- func (m *EventNameUnbound) MarshalTo(dAtA []byte) (int, error)
- func (m *EventNameUnbound) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventNameUnbound) ProtoMessage()
- func (m *EventNameUnbound) Reset()
- func (m *EventNameUnbound) Size() (n int)
- func (m *EventNameUnbound) String() string
- func (m *EventNameUnbound) Unmarshal(dAtA []byte) error
- func (m *EventNameUnbound) XXX_DiscardUnknown()
- func (m *EventNameUnbound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventNameUnbound) XXX_Merge(src proto.Message)
- func (m *EventNameUnbound) XXX_Size() int
- func (m *EventNameUnbound) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (state GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgBindNameRequest
- func (*MsgBindNameRequest) Descriptor() ([]byte, []int)
- func (msg MsgBindNameRequest) GetSignBytes() []byte
- func (msg MsgBindNameRequest) GetSigners() []sdk.AccAddress
- func (m *MsgBindNameRequest) Marshal() (dAtA []byte, err error)
- func (m *MsgBindNameRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBindNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBindNameRequest) ProtoMessage()
- func (m *MsgBindNameRequest) Reset()
- func (msg MsgBindNameRequest) Route() string
- func (m *MsgBindNameRequest) Size() (n int)
- func (m *MsgBindNameRequest) String() string
- func (msg MsgBindNameRequest) Type() string
- func (m *MsgBindNameRequest) Unmarshal(dAtA []byte) error
- func (msg MsgBindNameRequest) ValidateBasic() error
- func (m *MsgBindNameRequest) XXX_DiscardUnknown()
- func (m *MsgBindNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBindNameRequest) XXX_Merge(src proto.Message)
- func (m *MsgBindNameRequest) XXX_Size() int
- func (m *MsgBindNameRequest) XXX_Unmarshal(b []byte) error
- type MsgBindNameResponse
- func (*MsgBindNameResponse) Descriptor() ([]byte, []int)
- func (m *MsgBindNameResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgBindNameResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBindNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBindNameResponse) ProtoMessage()
- func (m *MsgBindNameResponse) Reset()
- func (m *MsgBindNameResponse) Size() (n int)
- func (m *MsgBindNameResponse) String() string
- func (m *MsgBindNameResponse) Unmarshal(dAtA []byte) error
- func (m *MsgBindNameResponse) XXX_DiscardUnknown()
- func (m *MsgBindNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBindNameResponse) XXX_Merge(src proto.Message)
- func (m *MsgBindNameResponse) XXX_Size() int
- func (m *MsgBindNameResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgDeleteNameRequest
- func (*MsgDeleteNameRequest) Descriptor() ([]byte, []int)
- func (msg MsgDeleteNameRequest) GetSignBytes() []byte
- func (msg MsgDeleteNameRequest) GetSigners() []sdk.AccAddress
- func (m *MsgDeleteNameRequest) Marshal() (dAtA []byte, err error)
- func (m *MsgDeleteNameRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDeleteNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDeleteNameRequest) ProtoMessage()
- func (m *MsgDeleteNameRequest) Reset()
- func (msg MsgDeleteNameRequest) Route() string
- func (m *MsgDeleteNameRequest) Size() (n int)
- func (m *MsgDeleteNameRequest) String() string
- func (msg MsgDeleteNameRequest) Type() string
- func (m *MsgDeleteNameRequest) Unmarshal(dAtA []byte) error
- func (msg MsgDeleteNameRequest) ValidateBasic() error
- func (m *MsgDeleteNameRequest) XXX_DiscardUnknown()
- func (m *MsgDeleteNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDeleteNameRequest) XXX_Merge(src proto.Message)
- func (m *MsgDeleteNameRequest) XXX_Size() int
- func (m *MsgDeleteNameRequest) XXX_Unmarshal(b []byte) error
- type MsgDeleteNameResponse
- func (*MsgDeleteNameResponse) Descriptor() ([]byte, []int)
- func (m *MsgDeleteNameResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDeleteNameResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDeleteNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDeleteNameResponse) ProtoMessage()
- func (m *MsgDeleteNameResponse) Reset()
- func (m *MsgDeleteNameResponse) Size() (n int)
- func (m *MsgDeleteNameResponse) String() string
- func (m *MsgDeleteNameResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDeleteNameResponse) XXX_DiscardUnknown()
- func (m *MsgDeleteNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDeleteNameResponse) XXX_Merge(src proto.Message)
- func (m *MsgDeleteNameResponse) XXX_Size() int
- func (m *MsgDeleteNameResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type NameRecord
- func (*NameRecord) Descriptor() ([]byte, []int)
- func (m *NameRecord) GetAddress() string
- func (m *NameRecord) GetName() string
- func (m *NameRecord) GetRestricted() bool
- func (m *NameRecord) Marshal() (dAtA []byte, err error)
- func (m *NameRecord) MarshalTo(dAtA []byte) (int, error)
- func (m *NameRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NameRecord) ProtoMessage()
- func (m *NameRecord) Reset()
- func (m *NameRecord) Size() (n int)
- func (nr NameRecord) String() string
- func (m *NameRecord) Unmarshal(dAtA []byte) error
- func (nr NameRecord) ValidateBasic() error
- func (m *NameRecord) XXX_DiscardUnknown()
- func (m *NameRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NameRecord) XXX_Merge(src proto.Message)
- func (m *NameRecord) XXX_Size() int
- func (m *NameRecord) XXX_Unmarshal(b []byte) error
- type NameRecords
- type ParamSubspace
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (p *Params) Equal(that interface{}) bool
- func (m *Params) GetAllowUnrestrictedNames() bool
- func (m *Params) GetMaxNameLevels() uint32
- func (m *Params) GetMaxSegmentLength() uint32
- func (m *Params) GetMinSegmentLength() uint32
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryNameResult
- type QueryNameResults
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryResolveRequest
- func (*QueryResolveRequest) Descriptor() ([]byte, []int)
- func (m *QueryResolveRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryResolveRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryResolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryResolveRequest) ProtoMessage()
- func (m *QueryResolveRequest) Reset()
- func (m *QueryResolveRequest) Size() (n int)
- func (m *QueryResolveRequest) String() string
- func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error
- func (m *QueryResolveRequest) XXX_DiscardUnknown()
- func (m *QueryResolveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryResolveRequest) XXX_Merge(src proto.Message)
- func (m *QueryResolveRequest) XXX_Size() int
- func (m *QueryResolveRequest) XXX_Unmarshal(b []byte) error
- type QueryResolveResponse
- func (*QueryResolveResponse) Descriptor() ([]byte, []int)
- func (m *QueryResolveResponse) GetAddress() string
- func (m *QueryResolveResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryResolveResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryResolveResponse) ProtoMessage()
- func (m *QueryResolveResponse) Reset()
- func (m *QueryResolveResponse) Size() (n int)
- func (m *QueryResolveResponse) String() string
- func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error
- func (m *QueryResolveResponse) XXX_DiscardUnknown()
- func (m *QueryResolveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryResolveResponse) XXX_Merge(src proto.Message)
- func (m *QueryResolveResponse) XXX_Size() int
- func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error
- type QueryReverseLookupRequest
- func (*QueryReverseLookupRequest) Descriptor() ([]byte, []int)
- func (m *QueryReverseLookupRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryReverseLookupRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryReverseLookupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryReverseLookupRequest) ProtoMessage()
- func (m *QueryReverseLookupRequest) Reset()
- func (m *QueryReverseLookupRequest) Size() (n int)
- func (m *QueryReverseLookupRequest) String() string
- func (m *QueryReverseLookupRequest) Unmarshal(dAtA []byte) error
- func (m *QueryReverseLookupRequest) XXX_DiscardUnknown()
- func (m *QueryReverseLookupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryReverseLookupRequest) XXX_Merge(src proto.Message)
- func (m *QueryReverseLookupRequest) XXX_Size() int
- func (m *QueryReverseLookupRequest) XXX_Unmarshal(b []byte) error
- type QueryReverseLookupResponse
- func (*QueryReverseLookupResponse) Descriptor() ([]byte, []int)
- func (m *QueryReverseLookupResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryReverseLookupResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryReverseLookupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryReverseLookupResponse) ProtoMessage()
- func (m *QueryReverseLookupResponse) Reset()
- func (m *QueryReverseLookupResponse) Size() (n int)
- func (m *QueryReverseLookupResponse) String() string
- func (m *QueryReverseLookupResponse) Unmarshal(dAtA []byte) error
- func (m *QueryReverseLookupResponse) XXX_DiscardUnknown()
- func (m *QueryReverseLookupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryReverseLookupResponse) XXX_Merge(src proto.Message)
- func (m *QueryReverseLookupResponse) XXX_Size() int
- func (m *QueryReverseLookupResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error)
- func (*UnimplementedQueryServer) ReverseLookup(ctx context.Context, req *QueryReverseLookupRequest) (*QueryReverseLookupResponse, error)
Constants ¶
const ( // EventTypeNameBound is the type of event generated when a name is bound to an address. EventTypeNameBound string = "name_bound" // EventTypeNameUnbound is the type of event generated when a name is unbound from an address (deleted). EventTypeNameUnbound string = "name_unbound" // KeyAttributeName is the key for a name. KeyAttributeName string = "name" // KeyAttributeAddress is the key for an address. KeyAttributeAddress string = "address" )
const ( // ModuleName is the name of the module ModuleName = "name" // StoreKey is the store key string for distribution StoreKey = ModuleName // RouterKey is the message route for distribution RouterKey = ModuleName // QuerierRoute is the querier route for distribution QuerierRoute = ModuleName )
const ( TypeMsgBindNameRequest = "bind_name" TypeMsgDeleteNameRequest = "delete_name" )
name message types
const ( DefaultMinSegmentLength = uint32(2) DefaultMaxSegmentLength = uint32(32) DefaultMaxSegments = uint32(16) DefaultAllowUnrestrictedNames = true )
Default parameter namespace
const ( // The query base for getting the module params QueryParams = "params" // The query base for resolving names. QueryResolve = "resolve" // The query base for reverse lookup. QueryLookup = "lookup" )
querier keys
const (
// ProposalTypeCreateRootName defines the type for a CreateRootNameProposal
ProposalTypeCreateRootName = "CreateRootName"
)
Variables ¶
var ( // ErrNameNotBound is a sentinel error returned when a name is not bound to an address. ErrNameNotBound = sdkerrors.Register(ModuleName, 2, "no address bound to name") // ErrNameAlreadyBound occurs when a bind request is made against an existing name ErrNameAlreadyBound = sdkerrors.Register(ModuleName, 3, "name is already bound to an address") // ErrNameInvalid occurs when a name is invalid ErrNameInvalid = sdkerrors.Register(ModuleName, 4, "value provided for name is invalid") // ErrNameSegmentTooShort occurs when a segment of a name is shorter than the minimum length ErrNameSegmentTooShort = sdkerrors.Register(ModuleName, 5, "segment of name is too short") // ErrNameSegmentTooLong occurs when a segment of a name is longer than the maximum length ErrNameSegmentTooLong = sdkerrors.Register(ModuleName, 6, "segment of name is too long") // ErrNameHasTooManySegments occurs when a name has too many segments (names separated by a period) ErrNameHasTooManySegments = sdkerrors.Register(ModuleName, 7, "name has too many segments") // ErrInvalidAddress indicates the address given does not match an existing account. ErrInvalidAddress = sdkerrors.Register(ModuleName, 8, "invalid account address") // ErrNameContainsSegments indicates a multi-segment name in a single segment context. ErrNameContainsSegments = sdkerrors.Register(ModuleName, 9, "invalid name: \".\" is reserved") )
x/name module errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // NameKeyPrefixAmino is a prefix added to keys for adding/querying names. // This exists because we persisted some records with the legacy amino codec. NameKeyPrefixAmino = []byte{0x01} // AddressKeyPrefixAmino is a prefix added to keys for indexing name records by address. // This exists because we persisted some records with the legacy amino codec. AddressKeyPrefixAmino = []byte{0x02} // NameKeyPrefix is a prefix added to keys for adding/querying names. NameKeyPrefix = []byte{0x03} // AddressKeyPrefix is a prefix added to keys for indexing name records by address. AddressKeyPrefix = []byte{0x05} )
var ( ErrInvalidLengthName = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowName = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupName = fmt.Errorf("proto: unexpected end of group") )
var ( // maximum length of name segment to allow ParamStoreKeyMaxSegmentLength = []byte("MaxSegmentLength") // minimum length of name segment to allow ParamStoreKeyMinSegmentLength = []byte("MinSegmentLength") // maximum number of name segments to allow. Example: `foo.bar.baz` would be 3 ParamStoreKeyMaxNameLevels = []byte("MaxNameLevels") // determines if unrestricted name keys are allowed or not ParamStoreKeyAllowUnrestrictedNames = []byte("AllowUnrestrictedNames") )
Parameter store keys
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleCdc references the global x/account module codec. Note, the codec should // ONLY be used in certain instances of tests and for JSON encoding as Amino is // still used for that purpose. // // The actual codec used for serialization should be provided to x/account and // defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
Functions ¶
func GetAddressKeyPrefix ¶
func GetAddressKeyPrefix(addr sdk.AccAddress) (key []byte, err error)
GetAddressKeyPrefix returns a store key for a name record address
func GetNameKeyPrefix ¶
GetNameKeyPrefix converts a name into key format.
func GetNameKeyPrefixLegacyAmino ¶ added in v1.0.0
GetNameKeyPrefixLegacyAmino converts a name into key format, using the NameKeyPrefixAmino key prefix.
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers concrete implentations for the given type names
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers all the necessary types and interfaces for the name module.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateAddress ¶ added in v1.7.0
func ValidateAddress(address sdk.AccAddress) error
Types ¶
type CreateRootNameProposal ¶
type CreateRootNameProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` Restricted bool `protobuf:"varint,5,opt,name=restricted,proto3" json:"restricted,omitempty"` }
CreateRootNameProposal details a proposal to create a new root name that is controlled by a given owner and optionally restricted to the owner for the sole creation of sub names.
func NewCreateRootNameProposal ¶
func NewCreateRootNameProposal(title, description, name string, owner sdk.AccAddress, restricted bool) *CreateRootNameProposal
NewCreateRootNameProposal create a new governance proposal request to create a root name
func (*CreateRootNameProposal) Descriptor ¶
func (*CreateRootNameProposal) Descriptor() ([]byte, []int)
func (CreateRootNameProposal) GetDescription ¶
func (crnp CreateRootNameProposal) GetDescription() string
GetDescription returns the description of a community pool spend proposal.
func (CreateRootNameProposal) GetTitle ¶
func (crnp CreateRootNameProposal) GetTitle() string
GetTitle returns the title of a community pool spend proposal.
func (*CreateRootNameProposal) Marshal ¶
func (m *CreateRootNameProposal) Marshal() (dAtA []byte, err error)
func (*CreateRootNameProposal) MarshalTo ¶
func (m *CreateRootNameProposal) MarshalTo(dAtA []byte) (int, error)
func (*CreateRootNameProposal) MarshalToSizedBuffer ¶
func (m *CreateRootNameProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (CreateRootNameProposal) ProposalRoute ¶
func (crnp CreateRootNameProposal) ProposalRoute() string
ProposalRoute returns the routing key of a community pool spend proposal.
func (CreateRootNameProposal) ProposalType ¶
func (crnp CreateRootNameProposal) ProposalType() string
ProposalType returns the type of a community pool spend proposal.
func (*CreateRootNameProposal) ProtoMessage ¶
func (*CreateRootNameProposal) ProtoMessage()
func (*CreateRootNameProposal) Reset ¶
func (m *CreateRootNameProposal) Reset()
func (*CreateRootNameProposal) Size ¶
func (m *CreateRootNameProposal) Size() (n int)
func (CreateRootNameProposal) String ¶
func (crnp CreateRootNameProposal) String() string
String implements the Stringer interface.
func (*CreateRootNameProposal) Unmarshal ¶
func (m *CreateRootNameProposal) Unmarshal(dAtA []byte) error
func (CreateRootNameProposal) ValidateBasic ¶
func (crnp CreateRootNameProposal) ValidateBasic() error
ValidateBasic runs basic stateless validity checks
func (*CreateRootNameProposal) XXX_DiscardUnknown ¶
func (m *CreateRootNameProposal) XXX_DiscardUnknown()
func (*CreateRootNameProposal) XXX_Marshal ¶
func (m *CreateRootNameProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateRootNameProposal) XXX_Merge ¶
func (m *CreateRootNameProposal) XXX_Merge(src proto.Message)
func (*CreateRootNameProposal) XXX_Size ¶
func (m *CreateRootNameProposal) XXX_Size() int
func (*CreateRootNameProposal) XXX_Unmarshal ¶
func (m *CreateRootNameProposal) XXX_Unmarshal(b []byte) error
type EventNameBound ¶ added in v1.1.0
type EventNameBound struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` }
Event emitted when name is bound.
func NewEventNameBound ¶ added in v1.5.0
func NewEventNameBound(address string, name string) *EventNameBound
func (*EventNameBound) Descriptor ¶ added in v1.1.0
func (*EventNameBound) Descriptor() ([]byte, []int)
func (*EventNameBound) GetAddress ¶ added in v1.1.0
func (m *EventNameBound) GetAddress() string
func (*EventNameBound) GetName ¶ added in v1.1.0
func (m *EventNameBound) GetName() string
func (*EventNameBound) Marshal ¶ added in v1.1.0
func (m *EventNameBound) Marshal() (dAtA []byte, err error)
func (*EventNameBound) MarshalTo ¶ added in v1.1.0
func (m *EventNameBound) MarshalTo(dAtA []byte) (int, error)
func (*EventNameBound) MarshalToSizedBuffer ¶ added in v1.1.0
func (m *EventNameBound) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventNameBound) ProtoMessage ¶ added in v1.1.0
func (*EventNameBound) ProtoMessage()
func (*EventNameBound) Reset ¶ added in v1.1.0
func (m *EventNameBound) Reset()
func (*EventNameBound) Size ¶ added in v1.1.0
func (m *EventNameBound) Size() (n int)
func (*EventNameBound) String ¶ added in v1.1.0
func (m *EventNameBound) String() string
func (*EventNameBound) Unmarshal ¶ added in v1.1.0
func (m *EventNameBound) Unmarshal(dAtA []byte) error
func (*EventNameBound) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *EventNameBound) XXX_DiscardUnknown()
func (*EventNameBound) XXX_Marshal ¶ added in v1.1.0
func (m *EventNameBound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventNameBound) XXX_Merge ¶ added in v1.1.0
func (m *EventNameBound) XXX_Merge(src proto.Message)
func (*EventNameBound) XXX_Size ¶ added in v1.1.0
func (m *EventNameBound) XXX_Size() int
func (*EventNameBound) XXX_Unmarshal ¶ added in v1.1.0
func (m *EventNameBound) XXX_Unmarshal(b []byte) error
type EventNameUnbound ¶ added in v1.1.0
type EventNameUnbound struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` }
Event emitted when name is unbound.
func NewEventNameUnbound ¶ added in v1.5.0
func NewEventNameUnbound(address string, name string) *EventNameUnbound
func (*EventNameUnbound) Descriptor ¶ added in v1.1.0
func (*EventNameUnbound) Descriptor() ([]byte, []int)
func (*EventNameUnbound) GetAddress ¶ added in v1.1.0
func (m *EventNameUnbound) GetAddress() string
func (*EventNameUnbound) GetName ¶ added in v1.1.0
func (m *EventNameUnbound) GetName() string
func (*EventNameUnbound) Marshal ¶ added in v1.1.0
func (m *EventNameUnbound) Marshal() (dAtA []byte, err error)
func (*EventNameUnbound) MarshalTo ¶ added in v1.1.0
func (m *EventNameUnbound) MarshalTo(dAtA []byte) (int, error)
func (*EventNameUnbound) MarshalToSizedBuffer ¶ added in v1.1.0
func (m *EventNameUnbound) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventNameUnbound) ProtoMessage ¶ added in v1.1.0
func (*EventNameUnbound) ProtoMessage()
func (*EventNameUnbound) Reset ¶ added in v1.1.0
func (m *EventNameUnbound) Reset()
func (*EventNameUnbound) Size ¶ added in v1.1.0
func (m *EventNameUnbound) Size() (n int)
func (*EventNameUnbound) String ¶ added in v1.1.0
func (m *EventNameUnbound) String() string
func (*EventNameUnbound) Unmarshal ¶ added in v1.1.0
func (m *EventNameUnbound) Unmarshal(dAtA []byte) error
func (*EventNameUnbound) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *EventNameUnbound) XXX_DiscardUnknown()
func (*EventNameUnbound) XXX_Marshal ¶ added in v1.1.0
func (m *EventNameUnbound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventNameUnbound) XXX_Merge ¶ added in v1.1.0
func (m *EventNameUnbound) XXX_Merge(src proto.Message)
func (*EventNameUnbound) XXX_Size ¶ added in v1.1.0
func (m *EventNameUnbound) XXX_Size() int
func (*EventNameUnbound) XXX_Unmarshal ¶ added in v1.1.0
func (m *EventNameUnbound) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { // params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // bindings defines all the name records present at genesis Bindings []NameRecord `protobuf:"bytes,2,rep,name=bindings,proto3" json:"bindings"` }
GenesisState defines the name module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns the initial set of name -> address bindings.
func GetGenesisStateFromAppState ¶
func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) *GenesisState
GetGenesisStateFromAppState returns x/name GenesisState given raw application genesis state.
func NewGenesisState ¶
func NewGenesisState(params Params, nameRecords NameRecords) *GenesisState
NewGenesisState creates a new GenesisState object
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (state GenesisState) Validate() error
Validate ensures a genesis state is valid.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgBindNameRequest ¶
type MsgBindNameRequest struct { // The parent record to bind this name under. Parent NameRecord `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent"` // The name record to bind under the parent Record NameRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record"` }
MsgBindNameRequest defines an sdk.Msg type that is used to add an address/name binding under an optional parent name. The record may optionally be restricted to prevent additional names from being added under this one without the owner signing the request.
func NewMsgBindNameRequest ¶
func NewMsgBindNameRequest(record, parent NameRecord) *MsgBindNameRequest
NewMsgBindNameRequest creates a new bind name request
func (*MsgBindNameRequest) Descriptor ¶
func (*MsgBindNameRequest) Descriptor() ([]byte, []int)
func (MsgBindNameRequest) GetSignBytes ¶
func (msg MsgBindNameRequest) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgBindNameRequest) GetSigners ¶
func (msg MsgBindNameRequest) GetSigners() []sdk.AccAddress
GetSigners indicates that the message must have been signed by the parent.
func (*MsgBindNameRequest) Marshal ¶
func (m *MsgBindNameRequest) Marshal() (dAtA []byte, err error)
func (*MsgBindNameRequest) MarshalTo ¶
func (m *MsgBindNameRequest) MarshalTo(dAtA []byte) (int, error)
func (*MsgBindNameRequest) MarshalToSizedBuffer ¶
func (m *MsgBindNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBindNameRequest) ProtoMessage ¶
func (*MsgBindNameRequest) ProtoMessage()
func (*MsgBindNameRequest) Reset ¶
func (m *MsgBindNameRequest) Reset()
func (*MsgBindNameRequest) Size ¶
func (m *MsgBindNameRequest) Size() (n int)
func (*MsgBindNameRequest) String ¶
func (m *MsgBindNameRequest) String() string
func (*MsgBindNameRequest) Unmarshal ¶
func (m *MsgBindNameRequest) Unmarshal(dAtA []byte) error
func (MsgBindNameRequest) ValidateBasic ¶
func (msg MsgBindNameRequest) ValidateBasic() error
ValidateBasic runs stateless validation checks on the message.
func (*MsgBindNameRequest) XXX_DiscardUnknown ¶
func (m *MsgBindNameRequest) XXX_DiscardUnknown()
func (*MsgBindNameRequest) XXX_Marshal ¶
func (m *MsgBindNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBindNameRequest) XXX_Merge ¶
func (m *MsgBindNameRequest) XXX_Merge(src proto.Message)
func (*MsgBindNameRequest) XXX_Size ¶
func (m *MsgBindNameRequest) XXX_Size() int
func (*MsgBindNameRequest) XXX_Unmarshal ¶
func (m *MsgBindNameRequest) XXX_Unmarshal(b []byte) error
type MsgBindNameResponse ¶
type MsgBindNameResponse struct { }
MsgBindNameResponse defines the Msg/BindName response type.
func (*MsgBindNameResponse) Descriptor ¶
func (*MsgBindNameResponse) Descriptor() ([]byte, []int)
func (*MsgBindNameResponse) Marshal ¶
func (m *MsgBindNameResponse) Marshal() (dAtA []byte, err error)
func (*MsgBindNameResponse) MarshalTo ¶
func (m *MsgBindNameResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgBindNameResponse) MarshalToSizedBuffer ¶
func (m *MsgBindNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBindNameResponse) ProtoMessage ¶
func (*MsgBindNameResponse) ProtoMessage()
func (*MsgBindNameResponse) Reset ¶
func (m *MsgBindNameResponse) Reset()
func (*MsgBindNameResponse) Size ¶
func (m *MsgBindNameResponse) Size() (n int)
func (*MsgBindNameResponse) String ¶
func (m *MsgBindNameResponse) String() string
func (*MsgBindNameResponse) Unmarshal ¶
func (m *MsgBindNameResponse) Unmarshal(dAtA []byte) error
func (*MsgBindNameResponse) XXX_DiscardUnknown ¶
func (m *MsgBindNameResponse) XXX_DiscardUnknown()
func (*MsgBindNameResponse) XXX_Marshal ¶
func (m *MsgBindNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBindNameResponse) XXX_Merge ¶
func (m *MsgBindNameResponse) XXX_Merge(src proto.Message)
func (*MsgBindNameResponse) XXX_Size ¶
func (m *MsgBindNameResponse) XXX_Size() int
func (*MsgBindNameResponse) XXX_Unmarshal ¶
func (m *MsgBindNameResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // BindName binds a name to an address under a root name. BindName(ctx context.Context, in *MsgBindNameRequest, opts ...grpc.CallOption) (*MsgBindNameResponse, error) // DeleteName defines a method to verify a particular invariance. DeleteName(ctx context.Context, in *MsgDeleteNameRequest, opts ...grpc.CallOption) (*MsgDeleteNameResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgDeleteNameRequest ¶
type MsgDeleteNameRequest struct { // The record being removed Record NameRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record"` }
MsgDeleteNameRequest defines an sdk.Msg type that is used to remove an existing address/name binding. The binding may not have any child names currently bound for this request to be successful.
func NewMsgDeleteNameRequest ¶
func NewMsgDeleteNameRequest(record NameRecord) *MsgDeleteNameRequest
NewMsgDeleteNameRequest creates a new Delete Name Request
func (*MsgDeleteNameRequest) Descriptor ¶
func (*MsgDeleteNameRequest) Descriptor() ([]byte, []int)
func (MsgDeleteNameRequest) GetSignBytes ¶
func (msg MsgDeleteNameRequest) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgDeleteNameRequest) GetSigners ¶
func (msg MsgDeleteNameRequest) GetSigners() []sdk.AccAddress
GetSigners indicates that the message must have been signed by the record owner.
func (*MsgDeleteNameRequest) Marshal ¶
func (m *MsgDeleteNameRequest) Marshal() (dAtA []byte, err error)
func (*MsgDeleteNameRequest) MarshalTo ¶
func (m *MsgDeleteNameRequest) MarshalTo(dAtA []byte) (int, error)
func (*MsgDeleteNameRequest) MarshalToSizedBuffer ¶
func (m *MsgDeleteNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDeleteNameRequest) ProtoMessage ¶
func (*MsgDeleteNameRequest) ProtoMessage()
func (*MsgDeleteNameRequest) Reset ¶
func (m *MsgDeleteNameRequest) Reset()
func (MsgDeleteNameRequest) Route ¶
func (msg MsgDeleteNameRequest) Route() string
Route implements Msg
func (*MsgDeleteNameRequest) Size ¶
func (m *MsgDeleteNameRequest) Size() (n int)
func (*MsgDeleteNameRequest) String ¶
func (m *MsgDeleteNameRequest) String() string
func (MsgDeleteNameRequest) Type ¶
func (msg MsgDeleteNameRequest) Type() string
Type implements Msg
func (*MsgDeleteNameRequest) Unmarshal ¶
func (m *MsgDeleteNameRequest) Unmarshal(dAtA []byte) error
func (MsgDeleteNameRequest) ValidateBasic ¶
func (msg MsgDeleteNameRequest) ValidateBasic() error
ValidateBasic runs stateless validation checks on the message.
func (*MsgDeleteNameRequest) XXX_DiscardUnknown ¶
func (m *MsgDeleteNameRequest) XXX_DiscardUnknown()
func (*MsgDeleteNameRequest) XXX_Marshal ¶
func (m *MsgDeleteNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDeleteNameRequest) XXX_Merge ¶
func (m *MsgDeleteNameRequest) XXX_Merge(src proto.Message)
func (*MsgDeleteNameRequest) XXX_Size ¶
func (m *MsgDeleteNameRequest) XXX_Size() int
func (*MsgDeleteNameRequest) XXX_Unmarshal ¶
func (m *MsgDeleteNameRequest) XXX_Unmarshal(b []byte) error
type MsgDeleteNameResponse ¶
type MsgDeleteNameResponse struct { }
MsgDeleteNameResponse defines the Msg/DeleteName response type.
func (*MsgDeleteNameResponse) Descriptor ¶
func (*MsgDeleteNameResponse) Descriptor() ([]byte, []int)
func (*MsgDeleteNameResponse) Marshal ¶
func (m *MsgDeleteNameResponse) Marshal() (dAtA []byte, err error)
func (*MsgDeleteNameResponse) MarshalTo ¶
func (m *MsgDeleteNameResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDeleteNameResponse) MarshalToSizedBuffer ¶
func (m *MsgDeleteNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDeleteNameResponse) ProtoMessage ¶
func (*MsgDeleteNameResponse) ProtoMessage()
func (*MsgDeleteNameResponse) Reset ¶
func (m *MsgDeleteNameResponse) Reset()
func (*MsgDeleteNameResponse) Size ¶
func (m *MsgDeleteNameResponse) Size() (n int)
func (*MsgDeleteNameResponse) String ¶
func (m *MsgDeleteNameResponse) String() string
func (*MsgDeleteNameResponse) Unmarshal ¶
func (m *MsgDeleteNameResponse) Unmarshal(dAtA []byte) error
func (*MsgDeleteNameResponse) XXX_DiscardUnknown ¶
func (m *MsgDeleteNameResponse) XXX_DiscardUnknown()
func (*MsgDeleteNameResponse) XXX_Marshal ¶
func (m *MsgDeleteNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDeleteNameResponse) XXX_Merge ¶
func (m *MsgDeleteNameResponse) XXX_Merge(src proto.Message)
func (*MsgDeleteNameResponse) XXX_Size ¶
func (m *MsgDeleteNameResponse) XXX_Size() int
func (*MsgDeleteNameResponse) XXX_Unmarshal ¶
func (m *MsgDeleteNameResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // BindName binds a name to an address under a root name. BindName(context.Context, *MsgBindNameRequest) (*MsgBindNameResponse, error) // DeleteName defines a method to verify a particular invariance. DeleteName(context.Context, *MsgDeleteNameRequest) (*MsgDeleteNameResponse, error) }
MsgServer is the server API for Msg service.
type NameRecord ¶
type NameRecord struct { // The bound name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The address the name resolved to. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Whether owner signature is required to add sub-names. Restricted bool `protobuf:"varint,3,opt,name=restricted,proto3" json:"restricted,omitempty"` }
NameRecord is a structure used to bind ownership of a name hierarchy to a collection of addresses
func NewNameRecord ¶
func NewNameRecord(name string, address sdk.AccAddress, restricted bool) NameRecord
NewNameRecord creates a name record binding that is restricted for child updates to the owner.
func (*NameRecord) Descriptor ¶
func (*NameRecord) Descriptor() ([]byte, []int)
func (*NameRecord) GetAddress ¶
func (m *NameRecord) GetAddress() string
func (*NameRecord) GetName ¶
func (m *NameRecord) GetName() string
func (*NameRecord) GetRestricted ¶
func (m *NameRecord) GetRestricted() bool
func (*NameRecord) Marshal ¶
func (m *NameRecord) Marshal() (dAtA []byte, err error)
func (*NameRecord) MarshalToSizedBuffer ¶
func (m *NameRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*NameRecord) ProtoMessage ¶
func (*NameRecord) ProtoMessage()
func (*NameRecord) Reset ¶
func (m *NameRecord) Reset()
func (*NameRecord) Size ¶
func (m *NameRecord) Size() (n int)
func (*NameRecord) Unmarshal ¶
func (m *NameRecord) Unmarshal(dAtA []byte) error
func (NameRecord) ValidateBasic ¶
func (nr NameRecord) ValidateBasic() error
ValidateBasic performs basic stateless validity checks.
func (*NameRecord) XXX_DiscardUnknown ¶
func (m *NameRecord) XXX_DiscardUnknown()
func (*NameRecord) XXX_Marshal ¶
func (m *NameRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NameRecord) XXX_Merge ¶
func (m *NameRecord) XXX_Merge(src proto.Message)
func (*NameRecord) XXX_Size ¶
func (m *NameRecord) XXX_Size() int
func (*NameRecord) XXX_Unmarshal ¶
func (m *NameRecord) XXX_Unmarshal(b []byte) error
type NameRecords ¶
type NameRecords []NameRecord
NameRecords within the GenesisState
func (NameRecords) Contains ¶
func (nrs NameRecords) Contains(name string) bool
Contains returns true if the given name exists in a slice of NameRecord genesis objects.
type ParamSubspace ¶
type ParamSubspace interface { Get(ctx sdk.Context, key []byte, ptr interface{}) Set(ctx sdk.Context, key []byte, param interface{}) }
ParamSubspace defines the expected Subspace interface for parameters (noalias)
type Params ¶
type Params struct { // maximum length of name segment to allow MaxSegmentLength uint32 `protobuf:"varint,1,opt,name=max_segment_length,json=maxSegmentLength,proto3" json:"max_segment_length,omitempty"` // minimum length of name segment to allow MinSegmentLength uint32 `protobuf:"varint,2,opt,name=min_segment_length,json=minSegmentLength,proto3" json:"min_segment_length,omitempty"` // maximum number of name segments to allow. Example: `foo.bar.baz` would be 3 MaxNameLevels uint32 `protobuf:"varint,3,opt,name=max_name_levels,json=maxNameLevels,proto3" json:"max_name_levels,omitempty"` // determines if unrestricted name keys are allowed or not AllowUnrestrictedNames bool `` /* 130-byte string literal not displayed */ }
Params defines the set of params for the name module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func NewParams ¶
func NewParams( maxSegmentLength uint32, minSegmentLength uint32, maxNameLevels uint32, allowUnrestrictedNames bool, ) Params
NewParams creates a new parameter object
func (*Params) Descriptor ¶
func (*Params) Equal ¶ added in v1.0.0
Equal returns true if the given value is equivalent to the current instance of params
func (*Params) GetAllowUnrestrictedNames ¶
func (*Params) GetMaxNameLevels ¶
func (*Params) GetMaxSegmentLength ¶
func (*Params) GetMinSegmentLength ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs - Implements params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // Params queries params of the name module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Resolve queries for the address associated with a given name Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) // ReverseLookup queries for all names bound against a given address ReverseLookup(ctx context.Context, in *QueryReverseLookupRequest, opts ...grpc.CallOption) (*QueryReverseLookupResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryNameResult ¶
type QueryNameResult struct { Name string `json:"name"` Address string `json:"address"` Restricted bool `json:"restricted"` }
QueryNameResult contains the address from a name query.
func (QueryNameResult) String ¶
func (r QueryNameResult) String() string
String implements fmt.Stringer
type QueryNameResults ¶
type QueryNameResults struct {
Records []QueryNameResult `json:"records"`
}
QueryNameResults contains a sequence of name records.
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is the request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct { // params defines the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is the response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryResolveRequest ¶
type QueryResolveRequest struct { // name to resolve the address for Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` }
QueryResolveRequest is the request type for the Query/Resolve method.
func (*QueryResolveRequest) Descriptor ¶
func (*QueryResolveRequest) Descriptor() ([]byte, []int)
func (*QueryResolveRequest) Marshal ¶
func (m *QueryResolveRequest) Marshal() (dAtA []byte, err error)
func (*QueryResolveRequest) MarshalTo ¶
func (m *QueryResolveRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryResolveRequest) MarshalToSizedBuffer ¶
func (m *QueryResolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryResolveRequest) ProtoMessage ¶
func (*QueryResolveRequest) ProtoMessage()
func (*QueryResolveRequest) Reset ¶
func (m *QueryResolveRequest) Reset()
func (*QueryResolveRequest) Size ¶
func (m *QueryResolveRequest) Size() (n int)
func (*QueryResolveRequest) String ¶
func (m *QueryResolveRequest) String() string
func (*QueryResolveRequest) Unmarshal ¶
func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error
func (*QueryResolveRequest) XXX_DiscardUnknown ¶
func (m *QueryResolveRequest) XXX_DiscardUnknown()
func (*QueryResolveRequest) XXX_Marshal ¶
func (m *QueryResolveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryResolveRequest) XXX_Merge ¶
func (m *QueryResolveRequest) XXX_Merge(src proto.Message)
func (*QueryResolveRequest) XXX_Size ¶
func (m *QueryResolveRequest) XXX_Size() int
func (*QueryResolveRequest) XXX_Unmarshal ¶
func (m *QueryResolveRequest) XXX_Unmarshal(b []byte) error
type QueryResolveResponse ¶
type QueryResolveResponse struct { // a string containing the address the name resolves to Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` }
QueryResolveResponse is the response type for the Query/Resolve method.
func (*QueryResolveResponse) Descriptor ¶
func (*QueryResolveResponse) Descriptor() ([]byte, []int)
func (*QueryResolveResponse) GetAddress ¶
func (m *QueryResolveResponse) GetAddress() string
func (*QueryResolveResponse) Marshal ¶
func (m *QueryResolveResponse) Marshal() (dAtA []byte, err error)
func (*QueryResolveResponse) MarshalTo ¶
func (m *QueryResolveResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryResolveResponse) MarshalToSizedBuffer ¶
func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryResolveResponse) ProtoMessage ¶
func (*QueryResolveResponse) ProtoMessage()
func (*QueryResolveResponse) Reset ¶
func (m *QueryResolveResponse) Reset()
func (*QueryResolveResponse) Size ¶
func (m *QueryResolveResponse) Size() (n int)
func (*QueryResolveResponse) String ¶
func (m *QueryResolveResponse) String() string
func (*QueryResolveResponse) Unmarshal ¶
func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error
func (*QueryResolveResponse) XXX_DiscardUnknown ¶
func (m *QueryResolveResponse) XXX_DiscardUnknown()
func (*QueryResolveResponse) XXX_Marshal ¶
func (m *QueryResolveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryResolveResponse) XXX_Merge ¶
func (m *QueryResolveResponse) XXX_Merge(src proto.Message)
func (*QueryResolveResponse) XXX_Size ¶
func (m *QueryResolveResponse) XXX_Size() int
func (*QueryResolveResponse) XXX_Unmarshal ¶
func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error
type QueryReverseLookupRequest ¶
type QueryReverseLookupRequest struct { // address to find name records for Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryReverseLookupRequest is the request type for the Query/ReverseLookup method.
func (*QueryReverseLookupRequest) Descriptor ¶
func (*QueryReverseLookupRequest) Descriptor() ([]byte, []int)
func (*QueryReverseLookupRequest) Marshal ¶
func (m *QueryReverseLookupRequest) Marshal() (dAtA []byte, err error)
func (*QueryReverseLookupRequest) MarshalTo ¶
func (m *QueryReverseLookupRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryReverseLookupRequest) MarshalToSizedBuffer ¶
func (m *QueryReverseLookupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryReverseLookupRequest) ProtoMessage ¶
func (*QueryReverseLookupRequest) ProtoMessage()
func (*QueryReverseLookupRequest) Reset ¶
func (m *QueryReverseLookupRequest) Reset()
func (*QueryReverseLookupRequest) Size ¶
func (m *QueryReverseLookupRequest) Size() (n int)
func (*QueryReverseLookupRequest) String ¶
func (m *QueryReverseLookupRequest) String() string
func (*QueryReverseLookupRequest) Unmarshal ¶
func (m *QueryReverseLookupRequest) Unmarshal(dAtA []byte) error
func (*QueryReverseLookupRequest) XXX_DiscardUnknown ¶
func (m *QueryReverseLookupRequest) XXX_DiscardUnknown()
func (*QueryReverseLookupRequest) XXX_Marshal ¶
func (m *QueryReverseLookupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryReverseLookupRequest) XXX_Merge ¶
func (m *QueryReverseLookupRequest) XXX_Merge(src proto.Message)
func (*QueryReverseLookupRequest) XXX_Size ¶
func (m *QueryReverseLookupRequest) XXX_Size() int
func (*QueryReverseLookupRequest) XXX_Unmarshal ¶
func (m *QueryReverseLookupRequest) XXX_Unmarshal(b []byte) error
type QueryReverseLookupResponse ¶
type QueryReverseLookupResponse struct { // an array of names bound against a given address Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryReverseLookupResponse is the response type for the Query/Resolve method.
func (*QueryReverseLookupResponse) Descriptor ¶
func (*QueryReverseLookupResponse) Descriptor() ([]byte, []int)
func (*QueryReverseLookupResponse) Marshal ¶
func (m *QueryReverseLookupResponse) Marshal() (dAtA []byte, err error)
func (*QueryReverseLookupResponse) MarshalTo ¶
func (m *QueryReverseLookupResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryReverseLookupResponse) MarshalToSizedBuffer ¶
func (m *QueryReverseLookupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryReverseLookupResponse) ProtoMessage ¶
func (*QueryReverseLookupResponse) ProtoMessage()
func (*QueryReverseLookupResponse) Reset ¶
func (m *QueryReverseLookupResponse) Reset()
func (*QueryReverseLookupResponse) Size ¶
func (m *QueryReverseLookupResponse) Size() (n int)
func (*QueryReverseLookupResponse) String ¶
func (m *QueryReverseLookupResponse) String() string
func (*QueryReverseLookupResponse) Unmarshal ¶
func (m *QueryReverseLookupResponse) Unmarshal(dAtA []byte) error
func (*QueryReverseLookupResponse) XXX_DiscardUnknown ¶
func (m *QueryReverseLookupResponse) XXX_DiscardUnknown()
func (*QueryReverseLookupResponse) XXX_Marshal ¶
func (m *QueryReverseLookupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryReverseLookupResponse) XXX_Merge ¶
func (m *QueryReverseLookupResponse) XXX_Merge(src proto.Message)
func (*QueryReverseLookupResponse) XXX_Size ¶
func (m *QueryReverseLookupResponse) XXX_Size() int
func (*QueryReverseLookupResponse) XXX_Unmarshal ¶
func (m *QueryReverseLookupResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries params of the name module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Resolve queries for the address associated with a given name Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) // ReverseLookup queries for all names bound against a given address ReverseLookup(context.Context, *QueryReverseLookupRequest) (*QueryReverseLookupResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) BindName ¶
func (*UnimplementedMsgServer) BindName(ctx context.Context, req *MsgBindNameRequest) (*MsgBindNameResponse, error)
func (*UnimplementedMsgServer) DeleteName ¶
func (*UnimplementedMsgServer) DeleteName(ctx context.Context, req *MsgDeleteNameRequest) (*MsgDeleteNameResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Resolve ¶
func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error)
func (*UnimplementedQueryServer) ReverseLookup ¶
func (*UnimplementedQueryServer) ReverseLookup(ctx context.Context, req *QueryReverseLookupRequest) (*QueryReverseLookupResponse, error)