Documentation
¶
Index ¶
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) AddHTLCToExpiredQueue(ctx sdk.Context, expirationHeight uint64, hashLock tmbytes.HexBytes)
- func (k Keeper) ClaimHTLC(ctx sdk.Context, hashLock tmbytes.HexBytes, secret tmbytes.HexBytes) error
- func (k Keeper) CreateHTLC(ctx sdk.Context, sender, to sdk.AccAddress, receiverOnOtherChain string, ...) error
- func (k Keeper) DeleteHTLCFromExpiredQueue(ctx sdk.Context, expirationHeight uint64, hashLock tmbytes.HexBytes)
- func (k Keeper) GetHTLC(ctx sdk.Context, hashLock tmbytes.HexBytes) (htlc types.HTLC, found bool)
- func (k Keeper) GetHTLCAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) HTLC(c context.Context, request *types.QueryHTLCRequest) (*types.QueryHTLCResponse, error)
- func (k Keeper) HasHTLC(ctx sdk.Context, hashLock tmbytes.HexBytes) bool
- func (k Keeper) IterateHTLCExpiredQueueByHeight(ctx sdk.Context, height uint64, ...)
- func (k Keeper) IterateHTLCs(ctx sdk.Context, op func(hlock tmbytes.HexBytes, h types.HTLC) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RefundHTLC(ctx sdk.Context, hashLock tmbytes.HexBytes) error
- func (k Keeper) SetHTLC(ctx sdk.Context, htlc types.HTLC, hashLock tmbytes.HexBytes)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier creates a new HTLC Querier instance
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the HTLC keeper
func NewKeeper ¶
func NewKeeper( cdc codec.Marshaler, key sdk.StoreKey, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) Keeper
NewKeeper creates a new HTLC Keeper instance
func (Keeper) AddHTLCToExpiredQueue ¶
func (k Keeper) AddHTLCToExpiredQueue(ctx sdk.Context, expirationHeight uint64, hashLock tmbytes.HexBytes)
AddHTLCToExpiredQueue adds the specified HTLC to the expiration queue
func (Keeper) ClaimHTLC ¶
func (k Keeper) ClaimHTLC(ctx sdk.Context, hashLock tmbytes.HexBytes, secret tmbytes.HexBytes) error
ClaimHTLC claims the specified HTLC with the given secret
func (Keeper) CreateHTLC ¶
func (k Keeper) CreateHTLC( ctx sdk.Context, sender, to sdk.AccAddress, receiverOnOtherChain string, amount sdk.Coins, hashLock tmbytes.HexBytes, timestamp, timeLock uint64, ) error
CreateHTLC creates an HTLC
func (Keeper) DeleteHTLCFromExpiredQueue ¶
func (k Keeper) DeleteHTLCFromExpiredQueue(ctx sdk.Context, expirationHeight uint64, hashLock tmbytes.HexBytes)
DeleteHTLCFromExpiredQueue removes the specified HTLC from the expiration queue
func (Keeper) GetHTLCAccount ¶
func (k Keeper) GetHTLCAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetHTLCAccount returns the HTLC module account
func (Keeper) HTLC ¶
func (k Keeper) HTLC(c context.Context, request *types.QueryHTLCRequest) (*types.QueryHTLCResponse, error)
func (Keeper) IterateHTLCExpiredQueueByHeight ¶
func (k Keeper) IterateHTLCExpiredQueueByHeight( ctx sdk.Context, height uint64, op func(hlock tmbytes.HexBytes, h types.HTLC) (stop bool), )
IterateHTLCExpiredQueueByHeight iterates through the HTLC expiration queue by the specified height
func (Keeper) IterateHTLCs ¶
func (k Keeper) IterateHTLCs( ctx sdk.Context, op func(hlock tmbytes.HexBytes, h types.HTLC) (stop bool), )
IterateHTLCs iterates through the HTLCs
func (Keeper) RefundHTLC ¶
RefundHTLC refunds the specified HTLC
Click to show internal directories.
Click to hide internal directories.