Documentation ¶
Index ¶
- Constants
- Variables
- func GetHTLCExpiredQueueKey(expirationHeight uint64, hashLock []byte) []byte
- func GetHTLCExpiredQueueSubspace(expirationHeight uint64) []byte
- func GetHTLCKey(hashLock []byte) []byte
- func Migrate(ctx sdk.Context, cdc codec.Codec, k htlckeeper.Keeper, bk bankkeeper.Keeper, ...) error
- func PresetHTLTParams() htlctypes.Params
- type HTLCStatus
- type OldHTLC
- func (this *OldHTLC) Equal(that interface{}) bool
- func (m *OldHTLC) Marshal() (dAtA []byte, err error)
- func (m *OldHTLC) MarshalTo(dAtA []byte) (int, error)
- func (m *OldHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OldHTLC) ProtoMessage()
- func (m *OldHTLC) Reset()
- func (m *OldHTLC) Size() (n int)
- func (m *OldHTLC) String() string
- func (m *OldHTLC) Unmarshal(dAtA []byte) error
- func (m *OldHTLC) XXX_DiscardUnknown()
- func (m *OldHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OldHTLC) XXX_Merge(src proto.Message)
- func (m *OldHTLC) XXX_Size() int
- func (m *OldHTLC) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( // ModuleName is the name of the HTLC module ModuleName = "htlc" // StoreKey is the string store representation StoreKey string = ModuleName // QuerierRoute is the querier route for the HTLC module QuerierRoute string = ModuleName // RouterKey is the msg router key for the HTLC module RouterKey string = ModuleName )
Variables ¶
View Source
var ( ErrInvalidLengthHtlc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHtlc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupHtlc = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( // Keys for store prefixes HTLCKey = []byte{0x01} // prefix for HTLC HTLCExpiredQueueKey = []byte{0x02} // prefix for the HTLC expiration queue )
View Source
var HTLCStatus_name = map[int32]string{
0: "HTLC_STATE_OPEN",
1: "HTLC_STATE_COMPLETED",
2: "HTLC_STATE_EXPIRED",
3: "HTLC_STATE_REFUNDED",
}
View Source
var HTLCStatus_value = map[string]int32{
"HTLC_STATE_OPEN": 0,
"HTLC_STATE_COMPLETED": 1,
"HTLC_STATE_EXPIRED": 2,
"HTLC_STATE_REFUNDED": 3,
}
Functions ¶
func GetHTLCExpiredQueueKey ¶
GetHTLCExpiredQueueKey returns the key for the HTLC expiration queue by the specified height and hash lock VALUE: []byte{}
func GetHTLCExpiredQueueSubspace ¶
GetHTLCExpiredQueueSubspace returns the key prefix for the HTLC expiration queue by the given height
func GetHTLCKey ¶
GetHTLCKey returns the key for the HTLC with the specified hash lock VALUE: htlc/HTLC
func Migrate ¶
func Migrate(ctx sdk.Context, cdc codec.Codec, k htlckeeper.Keeper, bk bankkeeper.Keeper, key *storetypes.KVStoreKey) error
func PresetHTLTParams ¶
Types ¶
type HTLCStatus ¶
type HTLCStatus int32
HTLCStatus defines the state of an OldHTLC
const ( // HTLC_STATE_OPEN defines an open state. Open HTLCStatus = 0 // HTLC_STATE_COMPLETED defines a completed state. Completed HTLCStatus = 1 // HTLC_STATE_EXPIRED defines an expired state. Expired HTLCStatus = 2 // HTLC_STATE_REFUNDED defines a refunded state. Refunded HTLCStatus = 3 )
func (HTLCStatus) String ¶
func (x HTLCStatus) String() string
type OldHTLC ¶
type OldHTLC struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` ReceiverOnOtherChain string `` /* 156-byte string literal not displayed */ Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` Secret string `protobuf:"bytes,5,opt,name=secret,proto3" json:"secret,omitempty"` Timestamp uint64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` ExpirationHeight uint64 `` /* 135-byte string literal not displayed */ State HTLCStatus `protobuf:"varint,8,opt,name=state,proto3,enum=irismod.htlc.HTLCStatus" json:"state,omitempty"` }
OldHTLC defines the struct of an OldHTLC
func (*OldHTLC) MarshalToSizedBuffer ¶
func (*OldHTLC) ProtoMessage ¶
func (*OldHTLC) ProtoMessage()
func (*OldHTLC) XXX_DiscardUnknown ¶
func (m *OldHTLC) XXX_DiscardUnknown()
func (*OldHTLC) XXX_Marshal ¶
func (*OldHTLC) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.