Documentation ¶
Index ¶
- Constants
- type Keeper
- func (k Keeper) ClassPathFromHash(ctx sdk.Context, class string) (string, error)
- func (q Keeper) ClassTrace(c context.Context, req *types.QueryClassTraceRequest) (*types.QueryClassTraceResponse, error)
- func (q Keeper) ClassTraces(c context.Context, req *types.QueryClassTracesRequest) (*types.QueryClassTracesResponse, error)
- func (k Keeper) GetClassTrace(ctx sdk.Context, classTraceHash tmbytes.HexBytes) (types.ClassTrace, bool)
- func (k Keeper) GetNftTransferModuleAddr(name string) sdk.AccAddress
- func (k Keeper) HasClassTrace(ctx sdk.Context, classTraceHash tmbytes.HexBytes) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MustMarshalClassTrace(classTrace types.ClassTrace) []byte
- func (k Keeper) NftTransfer(goCtx context.Context, msg *types.MsgNftTransfer) (*types.MsgNftTransferResponse, error)
- func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, data types.NonFungibleTokenPacketData, ...) error
- func (k Keeper) OnRecvPacket(ctx sdk.Context, packet packetType.Packet, ...) error
- func (k Keeper) SendNftTransfer(ctx sdk.Context, class, id string, sender sdk.AccAddress, receiver string, ...) error
- func (k Keeper) SetClassTrace(ctx sdk.Context, classTrace types.ClassTrace)
- func (k Keeper) UnmarshalClassTrace(bz []byte) (types.ClassTrace, error)
Constants ¶
const ( CLASSPREFIX = "tibc-" CLASSPATHPREFIX = "nft" DELIMITER = "/" // DoNotModify used to indicate that some field should not be updated DoNotModify = "[do-not-modify]" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, nk types.NftKeeper, pk types.PacketKeeper, ck types.ClientKeeper, ) Keeper
NewKeeper creates a new TIBC transfer Keeper instance
func (Keeper) ClassPathFromHash ¶ added in v0.2.0
ClassPathFromHash returns the full class path prefix from an ibc class with a hash component.
func (Keeper) ClassTrace ¶ added in v0.2.0
func (q Keeper) ClassTrace(c context.Context, req *types.QueryClassTraceRequest) (*types.QueryClassTraceResponse, error)
ClassTrace implements the Query/ClassTrace gRPC method
func (Keeper) ClassTraces ¶ added in v0.2.0
func (q Keeper) ClassTraces(c context.Context, req *types.QueryClassTracesRequest) (*types.QueryClassTracesResponse, error)
ClassTraces implements the Query/ClassTraces gRPC method
func (Keeper) GetClassTrace ¶ added in v0.2.0
func (k Keeper) GetClassTrace(ctx sdk.Context, classTraceHash tmbytes.HexBytes) (types.ClassTrace, bool)
GetClassTrace retreives the full identifiers trace and base class from the store.
func (Keeper) GetNftTransferModuleAddr ¶
func (k Keeper) GetNftTransferModuleAddr(name string) sdk.AccAddress
GetNftTransferModuleAddr returns the nft transfer module addr
func (Keeper) HasClassTrace ¶ added in v0.2.0
HasClassTrace checks if a the key with the given class trace hash exists on the store.
func (Keeper) MustMarshalClassTrace ¶ added in v0.2.0
func (k Keeper) MustMarshalClassTrace(classTrace types.ClassTrace) []byte
MustMarshalClassTrace attempts to encode an ClassTrace object and returns the raw encoded bytes. It panics on error.
func (Keeper) NftTransfer ¶
func (k Keeper) NftTransfer(goCtx context.Context, msg *types.MsgNftTransfer) (*types.MsgNftTransferResponse, error)
func (Keeper) OnAcknowledgementPacket ¶
func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, data types.NonFungibleTokenPacketData, ack packetType.Acknowledgement) error
func (Keeper) OnRecvPacket ¶
func (k Keeper) OnRecvPacket(ctx sdk.Context, packet packetType.Packet, data types.NonFungibleTokenPacketData) error
OnRecvPacket A->B->C away_from_source == true
B receive packet from A : class -> nft/A/B/class c receive packet from B : nft/A/B/class -> nft/A/B/C/class
C->B->A away_from_source == flase
B receive packet from C : nft/A/B/C/class -> nft/A/B/class A receive packet from B : nft/A/B/class -> class
func (Keeper) SendNftTransfer ¶
func (Keeper) SetClassTrace ¶ added in v0.2.0
func (k Keeper) SetClassTrace(ctx sdk.Context, classTrace types.ClassTrace)
SetClassTrace sets a new {trace hash -> class trace} pair to the store.
func (Keeper) UnmarshalClassTrace ¶ added in v0.2.0
func (k Keeper) UnmarshalClassTrace(bz []byte) (types.ClassTrace, error)
UnmarshalClassTrace attempts to decode and return an ClassTrace object from raw encoded bytes.