types

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 41 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeTimeout      = "timeout"
	EventTypePacket       = "non_fungible_token_packet"
	EventTypeTransfer     = "ibc_nft_transfer"
	EventTypeChannelClose = "channel_closed"
	EventTypeClassTrace   = "class_trace"

	AttributeKeySender     = "sender"
	AttributeKeyReceiver   = "receiver"
	AttributeKeyClassID    = "classID"
	AttributeKeyTokenIDs   = "tokenIDs"
	AttributeKeyAckSuccess = "success"
	AttributeKeyAckError   = "error"
	AttributeKeyTraceHash  = "trace_hash"
)

IBC transfer events

View Source
const (
	// ModuleName defines the IBC nft-transfer name
	ModuleName = "nonfungibletokentransfer"

	// Version defines the current version the IBC nft-transfer
	// module supports
	Version = "ics721-1"

	// PortID is the default port id that nft-transfer module binds to
	PortID = "nft-transfer"

	// StoreKey is the store key string for IBC nft-transfer
	StoreKey = ModuleName

	// RouterKey is the message route for IBC nft-transfer
	RouterKey = ModuleName

	// QuerierRoute is the querier route for IBC nft-transfer
	QuerierRoute = ModuleName

	// ClassPrefix is the prefix used for internal SDK non-fungible token representation.
	ClassPrefix = "ibc"
)
View Source
const (
	// DefaultSendEnabled enabled
	DefaultSendEnabled = true
	// DefaultReceiveEnabled enabled
	DefaultReceiveEnabled = true
)
View Source
const (
	TypeMsgTransfer = "nft-transfer"
)

msg types

Variables

View Source
var (

	// ModuleCdc references the global nft-transfer module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding.
	//
	// The actual codec used for serialization should be provided to nft-transfer and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

	// AminoCdc is a amino codec created to support amino json compatible msgs.
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	ErrInvalidPacketTimeout = sdkerrors.Register(ModuleName, 2, "invalid packet timeout")
	ErrInvalidVersion       = sdkerrors.Register(ModuleName, 3, "invalid ICS721 version")
	ErrMaxTransferChannels  = sdkerrors.Register(ModuleName, 4, "max nft-transfer channels")
	ErrInvalidClassID       = sdkerrors.Register(ModuleName, 5, "invalid class id")
	ErrInvalidTokenID       = sdkerrors.Register(ModuleName, 6, "invalid token id")
	ErrInvalidPacket        = sdkerrors.Register(ModuleName, 7, "invalid non-fungible token packet")
	ErrTraceNotFound        = sdkerrors.Register(ModuleName, 8, "classTrace trace not found")
	ErrMarshal              = sdkerrors.Register(ModuleName, 9, "failed to marshal token data")
	ErrSendDisabled         = sdkerrors.Register(ModuleName, 10, "non-fungible token transfers from this chain are disabled")
	ErrReceiveDisabled      = sdkerrors.Register(ModuleName, 11, "non-fungible token transfers to this chain are disabled")
)

IBC transfer sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// PortKey defines the key to store the port ID in store
	PortKey = []byte{0x01}

	// ClassTraceKey defines the key to store the class trace info in store
	ClassTraceKey = []byte{0x02}
)
View Source
var (
	// DefaultRelativePacketTimeoutHeight is the default packet timeout height (in blocks) relative
	// to the current block height of the counterparty chain provided by the client state. The
	// timeout is disabled when set to 0.
	DefaultRelativePacketTimeoutHeight = "0-0"

	// DefaultRelativePacketTimeoutTimestamp is the default packet timeout timestamp (in nanoseconds)
	// relative to the current block timestamp of the counterparty chain provided by the client
	// state. The timeout is disabled when set to 0. The default is currently set to a 10 minute
	// timeout.
	DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds())
)
View Source
var (
	ErrInvalidLengthPacket        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPacket          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// KeySendEnabled is store's key for SendEnabled Params
	KeySendEnabled = []byte("SendEnabled")
	// KeyReceiveEnabled is store's key for ReceiveEnabled Params
	KeyReceiveEnabled = []byte("ReceiveEnabled")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTransfer        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTransfer          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTransfer = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetClassPrefix

func GetClassPrefix(portID, channelID string) string

GetClassPrefix returns the receiving class prefix

func GetEscrowAddress

func GetEscrowAddress(portID, channelID string) sdk.AccAddress

GetEscrowAddress returns the escrow address for the specified channel. The escrow address follows the format as outlined in ADR 028: https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md

func GetIfExist

func GetIfExist(i int, data []string) string

func IsAwayFromOrigin

func IsAwayFromOrigin(sourcePort, sourceChannel, fullClassPath string) bool

IsAwayFromOrigin determine if non-fungible token is moving away from the origin chain (the chain issued by the native nft). Note that fullClassPath refers to the full path of the unencoded classID. The longer the fullClassPath, the farther it is from the origin chain

func MustProtoMarshalJSON

func MustProtoMarshalJSON(msg proto.Message) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable type declaration for parameters

func ParseHexHash

func ParseHexHash(hexHash string) (tmbytes.HexBytes, error)

ParseHexHash parses a hex hash in string format to bytes and validates its correctness.

func ProtoMarshalJSON

func ProtoMarshalJSON(msg proto.Message, resolver jsonpb.AnyResolver) ([]byte, error)

ProtoMarshalJSON provides an auxiliary function to return Proto3 JSON encoded bytes of a message.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the ibc nft-transfer module interfaces to protobuf Any.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary nft-transfer interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func RemoveClassPrefix

func RemoveClassPrefix(portID, channelID, classID string) (string, error)

RemoveClassPrefix returns the unprefixed classID. After the receiving chain receives the packet,if isAwayFromOrigin=false, it means that nft is moving in the direction of the original chain, and the portID/channelID prefix of the sending chain in trace.path needs to be removed

Types

type AccountKeeper

type AccountKeeper interface {
	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
	// Set an account in the store.
	SetAccount(sdk.Context, types.AccountI)
	HasAccount(ctx sdk.Context, addr sdk.AccAddress) bool
	GetModuleAddress(name string) sdk.AccAddress
}

AccountKeeper defines the contract required for account APIs.

type ChannelKeeper

type ChannelKeeper interface {
	GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool)
	GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
}

ChannelKeeper defines the expected IBC channel keeper

type Class

type Class interface {
	GetID() string
	GetURI() string
	GetData() string
}

Class defines the interface specifications of collection that can be transferred across chains

type ClassTrace

type ClassTrace struct {
	// path defines the chain of port/channel identifiers used for tracing the
	// source of the non-fungible token.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// base classID of the relayed non-fungible token.
	BaseClassId string `protobuf:"bytes,2,opt,name=base_class_id,json=baseClassId,proto3" json:"base_class_id,omitempty"`
}

ClassTrace contains the base classID for ICS721 non-fungible tokens and the source tracing information path.

func ParseClassTrace

func ParseClassTrace(rawClassID string) ClassTrace

ParseClassTrace parses a string with the ibc prefix (class trace) and the base classID into a ClassTrace type.

Examples:

  • "port-1/channel-1/class-1" => ClassTrace{Path: "port-1/channel-1", BaseClassId: "class-1"}
  • "class-1" => ClassTrace{Path: "", BaseClassId: "class-1"}

func (*ClassTrace) Descriptor

func (*ClassTrace) Descriptor() ([]byte, []int)

func (*ClassTrace) GetBaseClassId

func (m *ClassTrace) GetBaseClassId() string

func (ClassTrace) GetFullClassPath

func (ct ClassTrace) GetFullClassPath() string

GetFullClassPath returns the full classId according to the ICS721 specification: tracePath + "/" + BaseClassId If there exists no trace then the base BaseClassId is returned.

func (*ClassTrace) GetPath

func (m *ClassTrace) GetPath() string

func (ClassTrace) GetPrefix

func (ct ClassTrace) GetPrefix() string

GetPrefix returns the receiving classId prefix composed by the trace info and a separator.

func (ClassTrace) Hash

func (ct ClassTrace) Hash() tmbytes.HexBytes

Hash returns the hex bytes of the SHA256 hash of the ClassTrace fields using the following formula:

hash = sha256(tracePath + "/" + baseClassId)

func (ClassTrace) IBCClassID

func (ct ClassTrace) IBCClassID() string

IBCClassID a classID for an ICS721 non-fungible token in the format 'ibc/{hash(tracePath + BaseClassId)}'. If the trace is empty, it will return the base classID.

func (*ClassTrace) Marshal

func (m *ClassTrace) Marshal() (dAtA []byte, err error)

func (*ClassTrace) MarshalTo

func (m *ClassTrace) MarshalTo(dAtA []byte) (int, error)

func (*ClassTrace) MarshalToSizedBuffer

func (m *ClassTrace) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClassTrace) ProtoMessage

func (*ClassTrace) ProtoMessage()

func (*ClassTrace) Reset

func (m *ClassTrace) Reset()

func (*ClassTrace) Size

func (m *ClassTrace) Size() (n int)

func (*ClassTrace) String

func (m *ClassTrace) String() string

func (*ClassTrace) Unmarshal

func (m *ClassTrace) Unmarshal(dAtA []byte) error

func (ClassTrace) Validate

func (ct ClassTrace) Validate() error

Validate performs a basic validation of the ClassTrace fields.

func (*ClassTrace) XXX_DiscardUnknown

func (m *ClassTrace) XXX_DiscardUnknown()

func (*ClassTrace) XXX_Marshal

func (m *ClassTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClassTrace) XXX_Merge

func (m *ClassTrace) XXX_Merge(src proto.Message)

func (*ClassTrace) XXX_Size

func (m *ClassTrace) XXX_Size() int

func (*ClassTrace) XXX_Unmarshal

func (m *ClassTrace) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
	Traces Traces `protobuf:"bytes,2,rep,name=traces,proto3,castrepeated=Traces" json:"traces"`
	Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params"`
}

GenesisState defines the ibc-nft-transfer genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a GenesisState with "nft-transfer" as the default PortID.

func NewGenesisState

func NewGenesisState(portID string, traces Traces, params Params) *GenesisState

NewGenesisState creates a new ibc nft-transfer GenesisState instance.

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPortId

func (m *GenesisState) GetPortId() string

func (*GenesisState) GetTraces

func (m *GenesisState) GetTraces() Traces

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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 (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 ICS4Wrapper

type ICS4Wrapper interface {
	SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error
}

ICS4Wrapper defines the expected ICS4Wrapper for middleware

type MsgClient

type MsgClient interface {
	// Transfer defines a rpc handler method for MsgTransfer.
	Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, 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 MsgServer

type MsgServer interface {
	// Transfer defines a rpc handler method for MsgTransfer.
	Transfer(context.Context, *MsgTransfer) (*MsgTransferResponse, error)
}

MsgServer is the server API for Msg service.

type MsgTransfer

type MsgTransfer struct {
	// the port on which the packet will be sent
	SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"`
	// the channel by which the packet will be sent
	SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"`
	// the class_id of tokens to be transferred
	ClassId string `protobuf:"bytes,3,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	// the non fungible tokens to be transferred
	TokenIds []string `protobuf:"bytes,4,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"`
	// the sender address
	Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"`
	// the recipient address on the destination chain
	Receiver string `protobuf:"bytes,6,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Timeout height relative to the current block height.
	// The timeout is disabled when set to 0.
	TimeoutHeight types.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height"`
	// Timeout timestamp in absolute nanoseconds since unix epoch.
	// The timeout is disabled when set to 0.
	TimeoutTimestamp uint64 `protobuf:"varint,8,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"`
	// optional memo
	Memo string `protobuf:"bytes,9,opt,name=memo,proto3" json:"memo,omitempty"`
}

MsgTransfer defines a msg to transfer non fungible tokens between ICS721 enabled chains. See ICS Spec here: https://github.com/cosmos/ibc/tree/master/spec/app/ics-721-nft-transfer#data-structures

func NewMsgTransfer

func NewMsgTransfer(
	sourcePort, sourceChannel string,
	classID string, tokenIds []string, sender, receiver string,
	timeoutHeight clienttypes.Height, timeoutTimestamp uint64, memo string,
) *MsgTransfer

NewMsgTransfer creates a new MsgTransfer instance

func (*MsgTransfer) Descriptor

func (*MsgTransfer) Descriptor() ([]byte, []int)

func (MsgTransfer) GetSignBytes

func (msg MsgTransfer) GetSignBytes() []byte

GetSignBytes implements sdk.Msg.

func (MsgTransfer) GetSigners

func (msg MsgTransfer) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgTransfer) Marshal

func (m *MsgTransfer) Marshal() (dAtA []byte, err error)

func (*MsgTransfer) MarshalTo

func (m *MsgTransfer) MarshalTo(dAtA []byte) (int, error)

func (*MsgTransfer) MarshalToSizedBuffer

func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgTransfer) ProtoMessage

func (*MsgTransfer) ProtoMessage()

func (*MsgTransfer) Reset

func (m *MsgTransfer) Reset()

func (MsgTransfer) Route

func (MsgTransfer) Route() string

Route implements sdk.Msg

func (*MsgTransfer) Size

func (m *MsgTransfer) Size() (n int)

func (*MsgTransfer) String

func (m *MsgTransfer) String() string

func (MsgTransfer) Type

func (MsgTransfer) Type() string

Type implements sdk.Msg

func (*MsgTransfer) Unmarshal

func (m *MsgTransfer) Unmarshal(dAtA []byte) error

func (MsgTransfer) ValidateBasic

func (msg MsgTransfer) ValidateBasic() error

ValidateBasic performs a basic check of the MsgTransfer fields. NOTE: timeout height or timestamp values can be 0 to disable the timeout. NOTE: The recipient addresses format is not validated as the format defined by the chain is not known to IBC.

func (*MsgTransfer) XXX_DiscardUnknown

func (m *MsgTransfer) XXX_DiscardUnknown()

func (*MsgTransfer) XXX_Marshal

func (m *MsgTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgTransfer) XXX_Merge

func (m *MsgTransfer) XXX_Merge(src proto.Message)

func (*MsgTransfer) XXX_Size

func (m *MsgTransfer) XXX_Size() int

func (*MsgTransfer) XXX_Unmarshal

func (m *MsgTransfer) XXX_Unmarshal(b []byte) error

type MsgTransferResponse

type MsgTransferResponse struct {
	// sequence number of the transfer packet sent
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
}

MsgTransferResponse defines the Msg/Transfer response type.

func (*MsgTransferResponse) Descriptor

func (*MsgTransferResponse) Descriptor() ([]byte, []int)

func (*MsgTransferResponse) GetSequence

func (m *MsgTransferResponse) GetSequence() uint64

func (*MsgTransferResponse) Marshal

func (m *MsgTransferResponse) Marshal() (dAtA []byte, err error)

func (*MsgTransferResponse) MarshalTo

func (m *MsgTransferResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgTransferResponse) MarshalToSizedBuffer

func (m *MsgTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgTransferResponse) ProtoMessage

func (*MsgTransferResponse) ProtoMessage()

func (*MsgTransferResponse) Reset

func (m *MsgTransferResponse) Reset()

func (*MsgTransferResponse) Size

func (m *MsgTransferResponse) Size() (n int)

func (*MsgTransferResponse) String

func (m *MsgTransferResponse) String() string

func (*MsgTransferResponse) Unmarshal

func (m *MsgTransferResponse) Unmarshal(dAtA []byte) error

func (*MsgTransferResponse) XXX_DiscardUnknown

func (m *MsgTransferResponse) XXX_DiscardUnknown()

func (*MsgTransferResponse) XXX_Marshal

func (m *MsgTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgTransferResponse) XXX_Merge

func (m *MsgTransferResponse) XXX_Merge(src proto.Message)

func (*MsgTransferResponse) XXX_Size

func (m *MsgTransferResponse) XXX_Size() int

func (*MsgTransferResponse) XXX_Unmarshal

func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error

type NFT

type NFT interface {
	GetClassID() string
	GetID() string
	GetURI() string
	GetData() string
}

NFT defines the interface specification of nft that can be transferred across chains

type NFTKeeper

type NFTKeeper interface {
	CreateOrUpdateClass(ctx sdk.Context, classID, classURI string, classData string) error
	Mint(ctx sdk.Context, classID, tokenID, tokenURI string, tokenData string, receiver sdk.AccAddress) error
	Transfer(ctx sdk.Context, classID string, tokenID string, tokenData string, receiver sdk.AccAddress) error
	Burn(ctx sdk.Context, classID string, tokenID string) error

	GetOwner(ctx sdk.Context, classID string, tokenID string) sdk.AccAddress
	HasClass(ctx sdk.Context, classID string) bool
	GetClass(ctx sdk.Context, classID string) (Class, bool)
	GetNFT(ctx sdk.Context, classID, tokenID string) (NFT, bool)
}

NFTKeeper defines the expected nft keeper

type NonFungibleTokenPacketData

type NonFungibleTokenPacketData struct {
	// the class_id of class to be transferred
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	// the class_uri of class to be transferred
	ClassUri string `protobuf:"bytes,2,opt,name=class_uri,json=classUri,proto3" json:"class_uri,omitempty"`
	// the class_data of class to be transferred
	ClassData string `protobuf:"bytes,3,opt,name=class_data,json=classData,proto3" json:"class_data,omitempty"`
	// the non fungible tokens to be transferred
	TokenIds []string `protobuf:"bytes,4,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"`
	// the non fungible tokens's uri to be transferred
	TokenUris []string `protobuf:"bytes,5,rep,name=token_uris,json=tokenUris,proto3" json:"token_uris,omitempty"`
	// the non fungible tokens's data to be transferred
	TokenData []string `protobuf:"bytes,6,rep,name=token_data,json=tokenData,proto3" json:"token_data,omitempty"`
	// the sender address
	Sender string `protobuf:"bytes,7,opt,name=sender,proto3" json:"sender,omitempty"`
	// the recipient address on the destination chain
	Receiver string `protobuf:"bytes,8,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// optional memo
	Memo string `protobuf:"bytes,9,opt,name=memo,proto3" json:"memo,omitempty"`
}

NonFungibleTokenPacketData defines a struct for the packet payload See NonFungibleTokenPacketData spec: https://github.com/cosmos/ibc/tree/master/spec/app/ics-721-nft-transfer#data-structures

func NewNonFungibleTokenPacketData

func NewNonFungibleTokenPacketData(
	classID, classURI, classData string,
	tokenIDs, tokenURI []string,
	sender, receiver string,
	tokenData []string,
	memo string,
) NonFungibleTokenPacketData

NewNonFungibleTokenPacketData constructs a new NonFungibleTokenPacketData instance

func (*NonFungibleTokenPacketData) Descriptor

func (*NonFungibleTokenPacketData) Descriptor() ([]byte, []int)

func (NonFungibleTokenPacketData) GetBytes

func (nftpd NonFungibleTokenPacketData) GetBytes() []byte

GetBytes is a helper for serializing

func (*NonFungibleTokenPacketData) GetClassData

func (m *NonFungibleTokenPacketData) GetClassData() string

func (*NonFungibleTokenPacketData) GetClassId

func (m *NonFungibleTokenPacketData) GetClassId() string

func (*NonFungibleTokenPacketData) GetClassUri

func (m *NonFungibleTokenPacketData) GetClassUri() string

func (*NonFungibleTokenPacketData) GetMemo

func (m *NonFungibleTokenPacketData) GetMemo() string

func (*NonFungibleTokenPacketData) GetReceiver

func (m *NonFungibleTokenPacketData) GetReceiver() string

func (*NonFungibleTokenPacketData) GetSender

func (m *NonFungibleTokenPacketData) GetSender() string

func (*NonFungibleTokenPacketData) GetTokenData

func (m *NonFungibleTokenPacketData) GetTokenData() []string

func (*NonFungibleTokenPacketData) GetTokenIds

func (m *NonFungibleTokenPacketData) GetTokenIds() []string

func (*NonFungibleTokenPacketData) GetTokenUris

func (m *NonFungibleTokenPacketData) GetTokenUris() []string

func (*NonFungibleTokenPacketData) Marshal

func (m *NonFungibleTokenPacketData) Marshal() (dAtA []byte, err error)

func (*NonFungibleTokenPacketData) MarshalTo

func (m *NonFungibleTokenPacketData) MarshalTo(dAtA []byte) (int, error)

func (*NonFungibleTokenPacketData) MarshalToSizedBuffer

func (m *NonFungibleTokenPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NonFungibleTokenPacketData) ProtoMessage

func (*NonFungibleTokenPacketData) ProtoMessage()

func (*NonFungibleTokenPacketData) Reset

func (m *NonFungibleTokenPacketData) Reset()

func (*NonFungibleTokenPacketData) Size

func (m *NonFungibleTokenPacketData) Size() (n int)

func (*NonFungibleTokenPacketData) String

func (m *NonFungibleTokenPacketData) String() string

func (*NonFungibleTokenPacketData) Unmarshal

func (m *NonFungibleTokenPacketData) Unmarshal(dAtA []byte) error

func (NonFungibleTokenPacketData) ValidateBasic

func (nftpd NonFungibleTokenPacketData) ValidateBasic() error

ValidateBasic is used for validating the nft transfer. NOTE: The addresses formats are not validated as the sender and recipient can have different formats defined by their corresponding chains that are not known to IBC.

func (*NonFungibleTokenPacketData) XXX_DiscardUnknown

func (m *NonFungibleTokenPacketData) XXX_DiscardUnknown()

func (*NonFungibleTokenPacketData) XXX_Marshal

func (m *NonFungibleTokenPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NonFungibleTokenPacketData) XXX_Merge

func (m *NonFungibleTokenPacketData) XXX_Merge(src proto.Message)

func (*NonFungibleTokenPacketData) XXX_Size

func (m *NonFungibleTokenPacketData) XXX_Size() int

func (*NonFungibleTokenPacketData) XXX_Unmarshal

func (m *NonFungibleTokenPacketData) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	// send_enabled enables or disables all cross-chain nft transfers from this
	// chain.
	SendEnabled bool `protobuf:"varint,1,opt,name=send_enabled,json=sendEnabled,proto3" json:"send_enabled,omitempty"`
	// receive_enabled enables or disables all cross-chain nft transfers to this
	// chain.
	ReceiveEnabled bool `protobuf:"varint,2,opt,name=receive_enabled,json=receiveEnabled,proto3" json:"receive_enabled,omitempty"`
}

Params defines the set of IBC nft-transfer parameters. NOTE: To prevent a nft from being transferred, set the TransfersEnabled parameter to false.

func DefaultParams

func DefaultParams() Params

DefaultParams is the default parameter configuration for the ibc-transfer module

func NewParams

func NewParams(enableSend, enableReceive bool) Params

NewParams creates a new parameter configuration for the ibc transfer module

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetReceiveEnabled

func (m *Params) GetReceiveEnabled() bool

func (*Params) GetSendEnabled

func (m *Params) GetSendEnabled() bool

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate all ibc-transfer module parameters

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type PortKeeper

type PortKeeper interface {
	BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}

PortKeeper defines the expected IBC port keeper

type QueryClassHashRequest

type QueryClassHashRequest struct {
	// The class trace ([port_id]/[channel_id])+/[denom]
	Trace string `protobuf:"bytes,1,opt,name=trace,proto3" json:"trace,omitempty"`
}

QueryClassHashRequest is the request type for the Query/ClassHash RPC method

func (*QueryClassHashRequest) Descriptor

func (*QueryClassHashRequest) Descriptor() ([]byte, []int)

func (*QueryClassHashRequest) GetTrace

func (m *QueryClassHashRequest) GetTrace() string

func (*QueryClassHashRequest) Marshal

func (m *QueryClassHashRequest) Marshal() (dAtA []byte, err error)

func (*QueryClassHashRequest) MarshalTo

func (m *QueryClassHashRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassHashRequest) MarshalToSizedBuffer

func (m *QueryClassHashRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassHashRequest) ProtoMessage

func (*QueryClassHashRequest) ProtoMessage()

func (*QueryClassHashRequest) Reset

func (m *QueryClassHashRequest) Reset()

func (*QueryClassHashRequest) Size

func (m *QueryClassHashRequest) Size() (n int)

func (*QueryClassHashRequest) String

func (m *QueryClassHashRequest) String() string

func (*QueryClassHashRequest) Unmarshal

func (m *QueryClassHashRequest) Unmarshal(dAtA []byte) error

func (*QueryClassHashRequest) XXX_DiscardUnknown

func (m *QueryClassHashRequest) XXX_DiscardUnknown()

func (*QueryClassHashRequest) XXX_Marshal

func (m *QueryClassHashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassHashRequest) XXX_Merge

func (m *QueryClassHashRequest) XXX_Merge(src proto.Message)

func (*QueryClassHashRequest) XXX_Size

func (m *QueryClassHashRequest) XXX_Size() int

func (*QueryClassHashRequest) XXX_Unmarshal

func (m *QueryClassHashRequest) XXX_Unmarshal(b []byte) error

type QueryClassHashResponse

type QueryClassHashResponse struct {
	// hash (in hex format) of the denomination trace information.
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
}

QueryClassHashResponse is the response type for the Query/ClassHash RPC method.

func (*QueryClassHashResponse) Descriptor

func (*QueryClassHashResponse) Descriptor() ([]byte, []int)

func (*QueryClassHashResponse) GetHash

func (m *QueryClassHashResponse) GetHash() string

func (*QueryClassHashResponse) Marshal

func (m *QueryClassHashResponse) Marshal() (dAtA []byte, err error)

func (*QueryClassHashResponse) MarshalTo

func (m *QueryClassHashResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassHashResponse) MarshalToSizedBuffer

func (m *QueryClassHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassHashResponse) ProtoMessage

func (*QueryClassHashResponse) ProtoMessage()

func (*QueryClassHashResponse) Reset

func (m *QueryClassHashResponse) Reset()

func (*QueryClassHashResponse) Size

func (m *QueryClassHashResponse) Size() (n int)

func (*QueryClassHashResponse) String

func (m *QueryClassHashResponse) String() string

func (*QueryClassHashResponse) Unmarshal

func (m *QueryClassHashResponse) Unmarshal(dAtA []byte) error

func (*QueryClassHashResponse) XXX_DiscardUnknown

func (m *QueryClassHashResponse) XXX_DiscardUnknown()

func (*QueryClassHashResponse) XXX_Marshal

func (m *QueryClassHashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassHashResponse) XXX_Merge

func (m *QueryClassHashResponse) XXX_Merge(src proto.Message)

func (*QueryClassHashResponse) XXX_Size

func (m *QueryClassHashResponse) XXX_Size() int

func (*QueryClassHashResponse) XXX_Unmarshal

func (m *QueryClassHashResponse) XXX_Unmarshal(b []byte) error

type QueryClassTraceRequest

type QueryClassTraceRequest struct {
	// hash (in hex format) or classID (full classID with ibc prefix) of the
	// denomination trace information.
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
}

QueryClassTraceRequest is the request type for the Query/ClassDenom RPC method

func (*QueryClassTraceRequest) Descriptor

func (*QueryClassTraceRequest) Descriptor() ([]byte, []int)

func (*QueryClassTraceRequest) GetHash

func (m *QueryClassTraceRequest) GetHash() string

func (*QueryClassTraceRequest) Marshal

func (m *QueryClassTraceRequest) Marshal() (dAtA []byte, err error)

func (*QueryClassTraceRequest) MarshalTo

func (m *QueryClassTraceRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassTraceRequest) MarshalToSizedBuffer

func (m *QueryClassTraceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassTraceRequest) ProtoMessage

func (*QueryClassTraceRequest) ProtoMessage()

func (*QueryClassTraceRequest) Reset

func (m *QueryClassTraceRequest) Reset()

func (*QueryClassTraceRequest) Size

func (m *QueryClassTraceRequest) Size() (n int)

func (*QueryClassTraceRequest) String

func (m *QueryClassTraceRequest) String() string

func (*QueryClassTraceRequest) Unmarshal

func (m *QueryClassTraceRequest) Unmarshal(dAtA []byte) error

func (*QueryClassTraceRequest) XXX_DiscardUnknown

func (m *QueryClassTraceRequest) XXX_DiscardUnknown()

func (*QueryClassTraceRequest) XXX_Marshal

func (m *QueryClassTraceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassTraceRequest) XXX_Merge

func (m *QueryClassTraceRequest) XXX_Merge(src proto.Message)

func (*QueryClassTraceRequest) XXX_Size

func (m *QueryClassTraceRequest) XXX_Size() int

func (*QueryClassTraceRequest) XXX_Unmarshal

func (m *QueryClassTraceRequest) XXX_Unmarshal(b []byte) error

type QueryClassTraceResponse

type QueryClassTraceResponse struct {
	// class_trace returns the requested class trace information.
	ClassTrace *ClassTrace `protobuf:"bytes,1,opt,name=class_trace,json=classTrace,proto3" json:"class_trace,omitempty"`
}

QueryClassTraceResponse is the response type for the Query/ClassDenom RPC method.

func (*QueryClassTraceResponse) Descriptor

func (*QueryClassTraceResponse) Descriptor() ([]byte, []int)

func (*QueryClassTraceResponse) GetClassTrace

func (m *QueryClassTraceResponse) GetClassTrace() *ClassTrace

func (*QueryClassTraceResponse) Marshal

func (m *QueryClassTraceResponse) Marshal() (dAtA []byte, err error)

func (*QueryClassTraceResponse) MarshalTo

func (m *QueryClassTraceResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassTraceResponse) MarshalToSizedBuffer

func (m *QueryClassTraceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassTraceResponse) ProtoMessage

func (*QueryClassTraceResponse) ProtoMessage()

func (*QueryClassTraceResponse) Reset

func (m *QueryClassTraceResponse) Reset()

func (*QueryClassTraceResponse) Size

func (m *QueryClassTraceResponse) Size() (n int)

func (*QueryClassTraceResponse) String

func (m *QueryClassTraceResponse) String() string

func (*QueryClassTraceResponse) Unmarshal

func (m *QueryClassTraceResponse) Unmarshal(dAtA []byte) error

func (*QueryClassTraceResponse) XXX_DiscardUnknown

func (m *QueryClassTraceResponse) XXX_DiscardUnknown()

func (*QueryClassTraceResponse) XXX_Marshal

func (m *QueryClassTraceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassTraceResponse) XXX_Merge

func (m *QueryClassTraceResponse) XXX_Merge(src proto.Message)

func (*QueryClassTraceResponse) XXX_Size

func (m *QueryClassTraceResponse) XXX_Size() int

func (*QueryClassTraceResponse) XXX_Unmarshal

func (m *QueryClassTraceResponse) XXX_Unmarshal(b []byte) error

type QueryClassTracesRequest

type QueryClassTracesRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryConnectionsRequest is the request type for the Query/ClassTraces RPC method

func (*QueryClassTracesRequest) Descriptor

func (*QueryClassTracesRequest) Descriptor() ([]byte, []int)

func (*QueryClassTracesRequest) GetPagination

func (m *QueryClassTracesRequest) GetPagination() *query.PageRequest

func (*QueryClassTracesRequest) Marshal

func (m *QueryClassTracesRequest) Marshal() (dAtA []byte, err error)

func (*QueryClassTracesRequest) MarshalTo

func (m *QueryClassTracesRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassTracesRequest) MarshalToSizedBuffer

func (m *QueryClassTracesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassTracesRequest) ProtoMessage

func (*QueryClassTracesRequest) ProtoMessage()

func (*QueryClassTracesRequest) Reset

func (m *QueryClassTracesRequest) Reset()

func (*QueryClassTracesRequest) Size

func (m *QueryClassTracesRequest) Size() (n int)

func (*QueryClassTracesRequest) String

func (m *QueryClassTracesRequest) String() string

func (*QueryClassTracesRequest) Unmarshal

func (m *QueryClassTracesRequest) Unmarshal(dAtA []byte) error

func (*QueryClassTracesRequest) XXX_DiscardUnknown

func (m *QueryClassTracesRequest) XXX_DiscardUnknown()

func (*QueryClassTracesRequest) XXX_Marshal

func (m *QueryClassTracesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassTracesRequest) XXX_Merge

func (m *QueryClassTracesRequest) XXX_Merge(src proto.Message)

func (*QueryClassTracesRequest) XXX_Size

func (m *QueryClassTracesRequest) XXX_Size() int

func (*QueryClassTracesRequest) XXX_Unmarshal

func (m *QueryClassTracesRequest) XXX_Unmarshal(b []byte) error

type QueryClassTracesResponse

type QueryClassTracesResponse struct {
	// class_traces returns all class trace information.
	ClassTraces Traces `protobuf:"bytes,1,rep,name=class_traces,json=classTraces,proto3,castrepeated=Traces" json:"class_traces"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryClassTracesResponse is the response type for the Query/ClassTraces RPC method.

func (*QueryClassTracesResponse) Descriptor

func (*QueryClassTracesResponse) Descriptor() ([]byte, []int)

func (*QueryClassTracesResponse) GetClassTraces

func (m *QueryClassTracesResponse) GetClassTraces() Traces

func (*QueryClassTracesResponse) GetPagination

func (m *QueryClassTracesResponse) GetPagination() *query.PageResponse

func (*QueryClassTracesResponse) Marshal

func (m *QueryClassTracesResponse) Marshal() (dAtA []byte, err error)

func (*QueryClassTracesResponse) MarshalTo

func (m *QueryClassTracesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassTracesResponse) MarshalToSizedBuffer

func (m *QueryClassTracesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassTracesResponse) ProtoMessage

func (*QueryClassTracesResponse) ProtoMessage()

func (*QueryClassTracesResponse) Reset

func (m *QueryClassTracesResponse) Reset()

func (*QueryClassTracesResponse) Size

func (m *QueryClassTracesResponse) Size() (n int)

func (*QueryClassTracesResponse) String

func (m *QueryClassTracesResponse) String() string

func (*QueryClassTracesResponse) Unmarshal

func (m *QueryClassTracesResponse) Unmarshal(dAtA []byte) error

func (*QueryClassTracesResponse) XXX_DiscardUnknown

func (m *QueryClassTracesResponse) XXX_DiscardUnknown()

func (*QueryClassTracesResponse) XXX_Marshal

func (m *QueryClassTracesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassTracesResponse) XXX_Merge

func (m *QueryClassTracesResponse) XXX_Merge(src proto.Message)

func (*QueryClassTracesResponse) XXX_Size

func (m *QueryClassTracesResponse) XXX_Size() int

func (*QueryClassTracesResponse) XXX_Unmarshal

func (m *QueryClassTracesResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// ClassTrace queries a class trace information.
	ClassTrace(ctx context.Context, in *QueryClassTraceRequest, opts ...grpc.CallOption) (*QueryClassTraceResponse, error)
	// ClassTraces queries all class traces.
	ClassTraces(ctx context.Context, in *QueryClassTracesRequest, opts ...grpc.CallOption) (*QueryClassTracesResponse, error)
	// ClassHash queries a class hash information.
	ClassHash(ctx context.Context, in *QueryClassHashRequest, opts ...grpc.CallOption) (*QueryClassHashResponse, error)
	// EscrowAddress returns the escrow address for a particular port and channel
	// id.
	EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error)
	// Params queries all parameters of the nft-transfer module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryEscrowAddressRequest

type QueryEscrowAddressRequest struct {
	// unique port identifier
	PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
	// unique channel identifier
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
}

QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method.

func (*QueryEscrowAddressRequest) Descriptor

func (*QueryEscrowAddressRequest) Descriptor() ([]byte, []int)

func (*QueryEscrowAddressRequest) GetChannelId

func (m *QueryEscrowAddressRequest) GetChannelId() string

func (*QueryEscrowAddressRequest) GetPortId

func (m *QueryEscrowAddressRequest) GetPortId() string

func (*QueryEscrowAddressRequest) Marshal

func (m *QueryEscrowAddressRequest) Marshal() (dAtA []byte, err error)

func (*QueryEscrowAddressRequest) MarshalTo

func (m *QueryEscrowAddressRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryEscrowAddressRequest) MarshalToSizedBuffer

func (m *QueryEscrowAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEscrowAddressRequest) ProtoMessage

func (*QueryEscrowAddressRequest) ProtoMessage()

func (*QueryEscrowAddressRequest) Reset

func (m *QueryEscrowAddressRequest) Reset()

func (*QueryEscrowAddressRequest) Size

func (m *QueryEscrowAddressRequest) Size() (n int)

func (*QueryEscrowAddressRequest) String

func (m *QueryEscrowAddressRequest) String() string

func (*QueryEscrowAddressRequest) Unmarshal

func (m *QueryEscrowAddressRequest) Unmarshal(dAtA []byte) error

func (*QueryEscrowAddressRequest) XXX_DiscardUnknown

func (m *QueryEscrowAddressRequest) XXX_DiscardUnknown()

func (*QueryEscrowAddressRequest) XXX_Marshal

func (m *QueryEscrowAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEscrowAddressRequest) XXX_Merge

func (m *QueryEscrowAddressRequest) XXX_Merge(src proto.Message)

func (*QueryEscrowAddressRequest) XXX_Size

func (m *QueryEscrowAddressRequest) XXX_Size() int

func (*QueryEscrowAddressRequest) XXX_Unmarshal

func (m *QueryEscrowAddressRequest) XXX_Unmarshal(b []byte) error

type QueryEscrowAddressResponse

type QueryEscrowAddressResponse struct {
	// the escrow account address
	EscrowAddress string `protobuf:"bytes,1,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"`
}

QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.

func (*QueryEscrowAddressResponse) Descriptor

func (*QueryEscrowAddressResponse) Descriptor() ([]byte, []int)

func (*QueryEscrowAddressResponse) GetEscrowAddress

func (m *QueryEscrowAddressResponse) GetEscrowAddress() string

func (*QueryEscrowAddressResponse) Marshal

func (m *QueryEscrowAddressResponse) Marshal() (dAtA []byte, err error)

func (*QueryEscrowAddressResponse) MarshalTo

func (m *QueryEscrowAddressResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryEscrowAddressResponse) MarshalToSizedBuffer

func (m *QueryEscrowAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEscrowAddressResponse) ProtoMessage

func (*QueryEscrowAddressResponse) ProtoMessage()

func (*QueryEscrowAddressResponse) Reset

func (m *QueryEscrowAddressResponse) Reset()

func (*QueryEscrowAddressResponse) Size

func (m *QueryEscrowAddressResponse) Size() (n int)

func (*QueryEscrowAddressResponse) String

func (m *QueryEscrowAddressResponse) String() string

func (*QueryEscrowAddressResponse) Unmarshal

func (m *QueryEscrowAddressResponse) Unmarshal(dAtA []byte) error

func (*QueryEscrowAddressResponse) XXX_DiscardUnknown

func (m *QueryEscrowAddressResponse) XXX_DiscardUnknown()

func (*QueryEscrowAddressResponse) XXX_Marshal

func (m *QueryEscrowAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEscrowAddressResponse) XXX_Merge

func (m *QueryEscrowAddressResponse) XXX_Merge(src proto.Message)

func (*QueryEscrowAddressResponse) XXX_Size

func (m *QueryEscrowAddressResponse) XXX_Size() int

func (*QueryEscrowAddressResponse) XXX_Unmarshal

func (m *QueryEscrowAddressResponse) XXX_Unmarshal(b []byte) error

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is 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 holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is 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 QueryServer

type QueryServer interface {
	// ClassTrace queries a class trace information.
	ClassTrace(context.Context, *QueryClassTraceRequest) (*QueryClassTraceResponse, error)
	// ClassTraces queries all class traces.
	ClassTraces(context.Context, *QueryClassTracesRequest) (*QueryClassTracesResponse, error)
	// ClassHash queries a class hash information.
	ClassHash(context.Context, *QueryClassHashRequest) (*QueryClassHashResponse, error)
	// EscrowAddress returns the escrow address for a particular port and channel
	// id.
	EscrowAddress(context.Context, *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error)
	// Params queries all parameters of the nft-transfer module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type Traces

type Traces []ClassTrace

Traces defines a wrapper type for a slice of DenomTrace.

func (Traces) Len

func (t Traces) Len() int

Len implements sort.Interface for Traces

func (Traces) Less

func (t Traces) Less(i, j int) bool

Less implements sort.Interface for Traces

func (Traces) Sort

func (t Traces) Sort() Traces

Sort is a helper function to sort the set of denomination traces in-place

func (Traces) Swap

func (t Traces) Swap(i, j int)

Swap implements sort.Interface for Traces

func (Traces) Validate

func (t Traces) Validate() error

Validate performs a basic validation of each denomination trace info.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Transfer

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ClassHash

func (*UnimplementedQueryServer) ClassTrace

func (*UnimplementedQueryServer) ClassTraces

func (*UnimplementedQueryServer) EscrowAddress

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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