Documentation ¶
Overview ¶
nolint
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetHTLCExpiredQueueKey(expirationHeight uint64, hashLock []byte) []byte
- func GetHTLCExpiredQueueSubspace(expirationHeight uint64) []byte
- func GetHTLCKey(hashLock []byte) []byte
- func GetHashLock(secret tmbytes.HexBytes, timestamp uint64) []byte
- 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 ValidateAmount(amount sdk.Coins) error
- func ValidateGenesis(data GenesisState) error
- func ValidateHashLock(hashLock string) error
- func ValidateReceiverOnOtherChain(receiverOnOtherChain string) error
- func ValidateSecret(secret string) error
- func ValidateTimeLock(timeLock uint64) error
- type AccountKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetPendingHtlcs() map[string]HTLC
- 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 (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 HTLC
- func (*HTLC) Descriptor() ([]byte, []int)
- func (this *HTLC) Equal(that interface{}) bool
- func (m *HTLC) Marshal() (dAtA []byte, err error)
- func (m *HTLC) MarshalTo(dAtA []byte) (int, error)
- func (m *HTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HTLC) ProtoMessage()
- func (m *HTLC) Reset()
- func (m *HTLC) Size() (n int)
- func (m *HTLC) String() string
- func (m *HTLC) Unmarshal(dAtA []byte) error
- func (h HTLC) Validate() error
- func (m *HTLC) XXX_DiscardUnknown()
- func (m *HTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HTLC) XXX_Merge(src proto.Message)
- func (m *HTLC) XXX_Size() int
- func (m *HTLC) XXX_Unmarshal(b []byte) error
- type HTLCState
- type MsgClaimHTLC
- func (*MsgClaimHTLC) Descriptor() ([]byte, []int)
- func (this *MsgClaimHTLC) Equal(that interface{}) bool
- func (msg MsgClaimHTLC) GetSignBytes() []byte
- func (msg MsgClaimHTLC) GetSigners() []sdk.AccAddress
- func (m *MsgClaimHTLC) Marshal() (dAtA []byte, err error)
- func (m *MsgClaimHTLC) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgClaimHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgClaimHTLC) ProtoMessage()
- func (m *MsgClaimHTLC) Reset()
- func (msg MsgClaimHTLC) Route() string
- func (m *MsgClaimHTLC) Size() (n int)
- func (m *MsgClaimHTLC) String() string
- func (msg MsgClaimHTLC) Type() string
- func (m *MsgClaimHTLC) Unmarshal(dAtA []byte) error
- func (msg MsgClaimHTLC) ValidateBasic() error
- func (m *MsgClaimHTLC) XXX_DiscardUnknown()
- func (m *MsgClaimHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgClaimHTLC) XXX_Merge(src proto.Message)
- func (m *MsgClaimHTLC) XXX_Size() int
- func (m *MsgClaimHTLC) XXX_Unmarshal(b []byte) error
- type MsgClaimHTLCResponse
- func (*MsgClaimHTLCResponse) Descriptor() ([]byte, []int)
- func (m *MsgClaimHTLCResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgClaimHTLCResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgClaimHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgClaimHTLCResponse) ProtoMessage()
- func (m *MsgClaimHTLCResponse) Reset()
- func (m *MsgClaimHTLCResponse) Size() (n int)
- func (m *MsgClaimHTLCResponse) String() string
- func (m *MsgClaimHTLCResponse) Unmarshal(dAtA []byte) error
- func (m *MsgClaimHTLCResponse) XXX_DiscardUnknown()
- func (m *MsgClaimHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgClaimHTLCResponse) XXX_Merge(src proto.Message)
- func (m *MsgClaimHTLCResponse) XXX_Size() int
- func (m *MsgClaimHTLCResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgCreateHTLC
- func (*MsgCreateHTLC) Descriptor() ([]byte, []int)
- func (this *MsgCreateHTLC) Equal(that interface{}) bool
- func (msg MsgCreateHTLC) GetSignBytes() []byte
- func (msg MsgCreateHTLC) GetSigners() []sdk.AccAddress
- func (m *MsgCreateHTLC) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateHTLC) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateHTLC) ProtoMessage()
- func (m *MsgCreateHTLC) Reset()
- func (msg MsgCreateHTLC) Route() string
- func (m *MsgCreateHTLC) Size() (n int)
- func (m *MsgCreateHTLC) String() string
- func (msg MsgCreateHTLC) Type() string
- func (m *MsgCreateHTLC) Unmarshal(dAtA []byte) error
- func (msg MsgCreateHTLC) ValidateBasic() error
- func (m *MsgCreateHTLC) XXX_DiscardUnknown()
- func (m *MsgCreateHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateHTLC) XXX_Merge(src proto.Message)
- func (m *MsgCreateHTLC) XXX_Size() int
- func (m *MsgCreateHTLC) XXX_Unmarshal(b []byte) error
- type MsgCreateHTLCResponse
- func (*MsgCreateHTLCResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateHTLCResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateHTLCResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateHTLCResponse) ProtoMessage()
- func (m *MsgCreateHTLCResponse) Reset()
- func (m *MsgCreateHTLCResponse) Size() (n int)
- func (m *MsgCreateHTLCResponse) String() string
- func (m *MsgCreateHTLCResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateHTLCResponse) XXX_DiscardUnknown()
- func (m *MsgCreateHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateHTLCResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateHTLCResponse) XXX_Size() int
- func (m *MsgCreateHTLCResponse) XXX_Unmarshal(b []byte) error
- type MsgRefundHTLC
- func (*MsgRefundHTLC) Descriptor() ([]byte, []int)
- func (this *MsgRefundHTLC) Equal(that interface{}) bool
- func (msg MsgRefundHTLC) GetSignBytes() []byte
- func (msg MsgRefundHTLC) GetSigners() []sdk.AccAddress
- func (m *MsgRefundHTLC) Marshal() (dAtA []byte, err error)
- func (m *MsgRefundHTLC) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRefundHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRefundHTLC) ProtoMessage()
- func (m *MsgRefundHTLC) Reset()
- func (msg MsgRefundHTLC) Route() string
- func (m *MsgRefundHTLC) Size() (n int)
- func (m *MsgRefundHTLC) String() string
- func (msg MsgRefundHTLC) Type() string
- func (m *MsgRefundHTLC) Unmarshal(dAtA []byte) error
- func (msg MsgRefundHTLC) ValidateBasic() error
- func (m *MsgRefundHTLC) XXX_DiscardUnknown()
- func (m *MsgRefundHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRefundHTLC) XXX_Merge(src proto.Message)
- func (m *MsgRefundHTLC) XXX_Size() int
- func (m *MsgRefundHTLC) XXX_Unmarshal(b []byte) error
- type MsgRefundHTLCResponse
- func (*MsgRefundHTLCResponse) Descriptor() ([]byte, []int)
- func (m *MsgRefundHTLCResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRefundHTLCResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRefundHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRefundHTLCResponse) ProtoMessage()
- func (m *MsgRefundHTLCResponse) Reset()
- func (m *MsgRefundHTLCResponse) Size() (n int)
- func (m *MsgRefundHTLCResponse) String() string
- func (m *MsgRefundHTLCResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRefundHTLCResponse) XXX_DiscardUnknown()
- func (m *MsgRefundHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRefundHTLCResponse) XXX_Merge(src proto.Message)
- func (m *MsgRefundHTLCResponse) XXX_Size() int
- func (m *MsgRefundHTLCResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type QueryClient
- type QueryHTLCParams
- type QueryHTLCRequest
- func (*QueryHTLCRequest) Descriptor() ([]byte, []int)
- func (m *QueryHTLCRequest) GetHashLock() string
- func (m *QueryHTLCRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryHTLCRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryHTLCRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryHTLCRequest) ProtoMessage()
- func (m *QueryHTLCRequest) Reset()
- func (m *QueryHTLCRequest) Size() (n int)
- func (m *QueryHTLCRequest) String() string
- func (m *QueryHTLCRequest) Unmarshal(dAtA []byte) error
- func (m *QueryHTLCRequest) XXX_DiscardUnknown()
- func (m *QueryHTLCRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryHTLCRequest) XXX_Merge(src proto.Message)
- func (m *QueryHTLCRequest) XXX_Size() int
- func (m *QueryHTLCRequest) XXX_Unmarshal(b []byte) error
- type QueryHTLCResponse
- func (*QueryHTLCResponse) Descriptor() ([]byte, []int)
- func (m *QueryHTLCResponse) GetHtlc() *HTLC
- func (m *QueryHTLCResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryHTLCResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryHTLCResponse) ProtoMessage()
- func (m *QueryHTLCResponse) Reset()
- func (m *QueryHTLCResponse) Size() (n int)
- func (m *QueryHTLCResponse) String() string
- func (m *QueryHTLCResponse) Unmarshal(dAtA []byte) error
- func (m *QueryHTLCResponse) XXX_DiscardUnknown()
- func (m *QueryHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryHTLCResponse) XXX_Merge(src proto.Message)
- func (m *QueryHTLCResponse) XXX_Size() int
- func (m *QueryHTLCResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) ClaimHTLC(ctx context.Context, req *MsgClaimHTLC) (*MsgClaimHTLCResponse, error)
- func (*UnimplementedMsgServer) CreateHTLC(ctx context.Context, req *MsgCreateHTLC) (*MsgCreateHTLCResponse, error)
- func (*UnimplementedMsgServer) RefundHTLC(ctx context.Context, req *MsgRefundHTLC) (*MsgRefundHTLCResponse, error)
- type UnimplementedQueryServer
Constants ¶
const ( EventTypeCreateHTLC = "create_htlc" EventTypeClaimHTLC = "claim_htlc" EventTypeRefundHTLC = "refund_htlc" EventTypeHTLCExpired = "htlc_expired" AttributeValueCategory = ModuleName AttributeKeySender = "sender" AttributeKeyReceiver = "receiver" AttributeKeyReceiverOnOtherChain = "receiver_on_other_chain" AttributeKeyAmount = "amount" AttributeKeyHashLock = "hash_lock" AttributeKeyTimeLock = "time_lock" AttributeKeySecret = "secret" )
HTLC module event types and attributes
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 )
const ( // TypeMsgCreateHTLC is the type for MsgCreateHTLC TypeMsgCreateHTLC = "create_htlc" // TypeMsgClaimHTLC is the type for MsgClaimHTLC TypeMsgClaimHTLC = "claim_htlc" // TypeMsgRefundHTLC is the type for MsgRefundHTLC TypeMsgRefundHTLC = "refund_htlc" )
const ( // SecretLength is the length for the secret in hex string SecretLength = 64 // HashLockLength is the length for the hash lock in hex string HashLockLength = 64 // MaxLengthForAddressOnOtherChain is the maximum length for the address on other chains MaxLengthForAddressOnOtherChain = 128 // MinTimeLock is the minimum time span for HTLC in blocks MinTimeLock = 50 // MaxTimeLock is the maximum time span for HTLC in blocks MaxTimeLock = 25480 )
const (
QueryHTLC = "htlc" // query an HTLC
)
Variables ¶
var ( ErrInvalidHashLock = sdkerrors.Register(ModuleName, 2, "invalid hash lock") ErrInvalidTimeLock = sdkerrors.Register(ModuleName, 3, "invalid time lock") ErrInvalidSecret = sdkerrors.Register(ModuleName, 4, "invalid secret") ErrHTLCExists = sdkerrors.Register(ModuleName, 5, "htlc already exists") ErrUnknownHTLC = sdkerrors.Register(ModuleName, 6, "unknown htlc") ErrHTLCNotOpen = sdkerrors.Register(ModuleName, 7, "htlc not open") ErrHTLCNotExpired = sdkerrors.Register(ModuleName, 8, "htlc not expired") )
HTLC module sentinel 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 ( ErrInvalidLengthHtlc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHtlc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupHtlc = fmt.Errorf("proto: unexpected end of group") )
var ( // Keys for store prefixes HTLCKey = []byte{0x01} // prefix for HTLC HTLCExpiredQueueKey = []byte{0x02} // prefix for the HTLC expiration queue )
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 HTLCState_name = map[int32]string{
0: "HTLC_STATE_OPEN",
1: "HTLC_STATE_COMPLETED",
2: "HTLC_STATE_EXPIRED",
3: "HTLC_STATE_REFUNDED",
}
var HTLCState_value = map[string]int32{
"HTLC_STATE_OPEN": 0,
"HTLC_STATE_COMPLETED": 1,
"HTLC_STATE_EXPIRED": 2,
"HTLC_STATE_REFUNDED": 3,
}
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
ModuleCdc defines the module codec
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 GetHashLock ¶
GetHashLock calculates the hash lock from the given secret and timestamp
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func RegisterMsgServer ¶ added in v1.2.0
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 ValidateAmount ¶ added in v1.2.1
ValidateAmount verifies whether the given amount is legal
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the provided HTLC genesis state to ensure the expected invariants holds.
func ValidateHashLock ¶ added in v1.2.1
ValidateHashLock verifies whether the given hash lock is legal
func ValidateReceiverOnOtherChain ¶ added in v1.2.1
ValidateReceiverOnOtherChain verifies if the receiver on the other chain is legal
func ValidateSecret ¶ added in v1.2.1
ValidateSecret verifies whether the given secret is legal
func ValidateTimeLock ¶ added in v1.2.1
ValidateTimeLock verifies whether the given time lock is legal
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI }
AccountKeeper defines the expected account keeper (noalias)
type BankKeeper ¶
type BankKeeper interface { MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error GetSupply(ctx sdk.Context) (supply bank.SupplyI) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins }
BankKeeper defines the expected bank keeper (noalias)
type GenesisState ¶
type GenesisState struct {
PendingHtlcs map[string]HTLC `` /* 175-byte string literal not displayed */
}
GenesisState defines the HTLC module's genesis state
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState gets the raw genesis message for testing
func NewGenesisState ¶
func NewGenesisState(pendingHtlcs map[string]HTLC) GenesisState
NewGenesisState constructs a new GenesisState instance
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetPendingHtlcs ¶
func (m *GenesisState) GetPendingHtlcs() map[string]HTLC
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) 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 HTLC ¶
type HTLC 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 HTLCState `protobuf:"varint,8,opt,name=state,proto3,enum=irismod.htlc.HTLCState" json:"state,omitempty"` }
HTLC defines the struct of an HTLC
func NewHTLC ¶
func NewHTLC( sender sdk.AccAddress, to sdk.AccAddress, receiverOnOtherChain string, amount sdk.Coins, secret tmbytes.HexBytes, timestamp uint64, expirationHeight uint64, state HTLCState, ) HTLC
NewHTLC constructs a new HTLC instance
func (*HTLC) Descriptor ¶
func (*HTLC) ProtoMessage ¶
func (*HTLC) ProtoMessage()
func (*HTLC) XXX_DiscardUnknown ¶
func (m *HTLC) XXX_DiscardUnknown()
func (*HTLC) XXX_Unmarshal ¶
type HTLCState ¶
type HTLCState int32
HTLCState defines the state of an HTLC
func (HTLCState) EnumDescriptor ¶
type MsgClaimHTLC ¶
type MsgClaimHTLC struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` HashLock string `protobuf:"bytes,2,opt,name=hash_lock,json=hashLock,proto3" json:"hash_lock,omitempty" yaml:"hash_lock"` Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` }
MsgClaimHTLC defines a message to claim an HTLC
func NewMsgClaimHTLC ¶
func NewMsgClaimHTLC( sender string, hashLock string, secret string, ) MsgClaimHTLC
NewMsgClaimHTLC constructs a new MsgClaimHTLC instance
func (*MsgClaimHTLC) Descriptor ¶
func (*MsgClaimHTLC) Descriptor() ([]byte, []int)
func (*MsgClaimHTLC) Equal ¶
func (this *MsgClaimHTLC) Equal(that interface{}) bool
func (MsgClaimHTLC) GetSignBytes ¶
func (msg MsgClaimHTLC) GetSignBytes() []byte
GetSignBytes implements Msg
func (MsgClaimHTLC) GetSigners ¶
func (msg MsgClaimHTLC) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgClaimHTLC) Marshal ¶
func (m *MsgClaimHTLC) Marshal() (dAtA []byte, err error)
func (*MsgClaimHTLC) MarshalToSizedBuffer ¶
func (m *MsgClaimHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgClaimHTLC) ProtoMessage ¶
func (*MsgClaimHTLC) ProtoMessage()
func (*MsgClaimHTLC) Reset ¶
func (m *MsgClaimHTLC) Reset()
func (*MsgClaimHTLC) Size ¶
func (m *MsgClaimHTLC) Size() (n int)
func (*MsgClaimHTLC) String ¶
func (m *MsgClaimHTLC) String() string
func (*MsgClaimHTLC) Unmarshal ¶
func (m *MsgClaimHTLC) Unmarshal(dAtA []byte) error
func (MsgClaimHTLC) ValidateBasic ¶
func (msg MsgClaimHTLC) ValidateBasic() error
ValidateBasic implements Msg.
func (*MsgClaimHTLC) XXX_DiscardUnknown ¶
func (m *MsgClaimHTLC) XXX_DiscardUnknown()
func (*MsgClaimHTLC) XXX_Marshal ¶
func (m *MsgClaimHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgClaimHTLC) XXX_Merge ¶
func (m *MsgClaimHTLC) XXX_Merge(src proto.Message)
func (*MsgClaimHTLC) XXX_Size ¶
func (m *MsgClaimHTLC) XXX_Size() int
func (*MsgClaimHTLC) XXX_Unmarshal ¶
func (m *MsgClaimHTLC) XXX_Unmarshal(b []byte) error
type MsgClaimHTLCResponse ¶ added in v1.2.0
type MsgClaimHTLCResponse struct { }
MsgClaimHTLCResponse defines the Msg/ClaimHTLC response type
func (*MsgClaimHTLCResponse) Descriptor ¶ added in v1.2.0
func (*MsgClaimHTLCResponse) Descriptor() ([]byte, []int)
func (*MsgClaimHTLCResponse) Marshal ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) Marshal() (dAtA []byte, err error)
func (*MsgClaimHTLCResponse) MarshalTo ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgClaimHTLCResponse) MarshalToSizedBuffer ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgClaimHTLCResponse) ProtoMessage ¶ added in v1.2.0
func (*MsgClaimHTLCResponse) ProtoMessage()
func (*MsgClaimHTLCResponse) Reset ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) Reset()
func (*MsgClaimHTLCResponse) Size ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) Size() (n int)
func (*MsgClaimHTLCResponse) String ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) String() string
func (*MsgClaimHTLCResponse) Unmarshal ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) Unmarshal(dAtA []byte) error
func (*MsgClaimHTLCResponse) XXX_DiscardUnknown ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) XXX_DiscardUnknown()
func (*MsgClaimHTLCResponse) XXX_Marshal ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgClaimHTLCResponse) XXX_Merge ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) XXX_Merge(src proto.Message)
func (*MsgClaimHTLCResponse) XXX_Size ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) XXX_Size() int
func (*MsgClaimHTLCResponse) XXX_Unmarshal ¶ added in v1.2.0
func (m *MsgClaimHTLCResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶ added in v1.2.0
type MsgClient interface { // CreateHTLC defines a method for creating a HTLC. CreateHTLC(ctx context.Context, in *MsgCreateHTLC, opts ...grpc.CallOption) (*MsgCreateHTLCResponse, error) // ClaimHTLC defines a method for claiming a HTLC ClaimHTLC(ctx context.Context, in *MsgClaimHTLC, opts ...grpc.CallOption) (*MsgClaimHTLCResponse, error) // RefundHTLC defines a method for refunding a HTLC. RefundHTLC(ctx context.Context, in *MsgRefundHTLC, opts ...grpc.CallOption) (*MsgRefundHTLCResponse, 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 ¶ added in v1.2.0
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgCreateHTLC ¶
type MsgCreateHTLC 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"` HashLock string `protobuf:"bytes,5,opt,name=hash_lock,json=hashLock,proto3" json:"hash_lock,omitempty" yaml:"hash_lock"` Timestamp uint64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` TimeLock uint64 `protobuf:"varint,7,opt,name=time_lock,json=timeLock,proto3" json:"time_lock,omitempty" yaml:"time_lock"` }
MsgCreateHTLC defines a message to create an HTLC
func NewMsgCreateHTLC ¶
func NewMsgCreateHTLC( sender string, to string, receiverOnOtherChain string, amount sdk.Coins, hashLock string, timestamp uint64, timeLock uint64, ) MsgCreateHTLC
NewMsgCreateHTLC creates a new MsgCreateHTLC instance
func (*MsgCreateHTLC) Descriptor ¶
func (*MsgCreateHTLC) Descriptor() ([]byte, []int)
func (*MsgCreateHTLC) Equal ¶
func (this *MsgCreateHTLC) Equal(that interface{}) bool
func (MsgCreateHTLC) GetSignBytes ¶
func (msg MsgCreateHTLC) GetSignBytes() []byte
GetSignBytes implements Msg
func (MsgCreateHTLC) GetSigners ¶
func (msg MsgCreateHTLC) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgCreateHTLC) Marshal ¶
func (m *MsgCreateHTLC) Marshal() (dAtA []byte, err error)
func (*MsgCreateHTLC) MarshalToSizedBuffer ¶
func (m *MsgCreateHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateHTLC) ProtoMessage ¶
func (*MsgCreateHTLC) ProtoMessage()
func (*MsgCreateHTLC) Reset ¶
func (m *MsgCreateHTLC) Reset()
func (*MsgCreateHTLC) Size ¶
func (m *MsgCreateHTLC) Size() (n int)
func (*MsgCreateHTLC) String ¶
func (m *MsgCreateHTLC) String() string
func (*MsgCreateHTLC) Unmarshal ¶
func (m *MsgCreateHTLC) Unmarshal(dAtA []byte) error
func (MsgCreateHTLC) ValidateBasic ¶
func (msg MsgCreateHTLC) ValidateBasic() error
ValidateBasic implements Msg
func (*MsgCreateHTLC) XXX_DiscardUnknown ¶
func (m *MsgCreateHTLC) XXX_DiscardUnknown()
func (*MsgCreateHTLC) XXX_Marshal ¶
func (m *MsgCreateHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateHTLC) XXX_Merge ¶
func (m *MsgCreateHTLC) XXX_Merge(src proto.Message)
func (*MsgCreateHTLC) XXX_Size ¶
func (m *MsgCreateHTLC) XXX_Size() int
func (*MsgCreateHTLC) XXX_Unmarshal ¶
func (m *MsgCreateHTLC) XXX_Unmarshal(b []byte) error
type MsgCreateHTLCResponse ¶ added in v1.2.0
type MsgCreateHTLCResponse struct { }
MsgCreateHTLCResponse defines the Msg/CreateHTLC response type
func (*MsgCreateHTLCResponse) Descriptor ¶ added in v1.2.0
func (*MsgCreateHTLCResponse) Descriptor() ([]byte, []int)
func (*MsgCreateHTLCResponse) Marshal ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateHTLCResponse) MarshalTo ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateHTLCResponse) MarshalToSizedBuffer ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateHTLCResponse) ProtoMessage ¶ added in v1.2.0
func (*MsgCreateHTLCResponse) ProtoMessage()
func (*MsgCreateHTLCResponse) Reset ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) Reset()
func (*MsgCreateHTLCResponse) Size ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) Size() (n int)
func (*MsgCreateHTLCResponse) String ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) String() string
func (*MsgCreateHTLCResponse) Unmarshal ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateHTLCResponse) XXX_DiscardUnknown ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) XXX_DiscardUnknown()
func (*MsgCreateHTLCResponse) XXX_Marshal ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateHTLCResponse) XXX_Merge ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) XXX_Merge(src proto.Message)
func (*MsgCreateHTLCResponse) XXX_Size ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) XXX_Size() int
func (*MsgCreateHTLCResponse) XXX_Unmarshal ¶ added in v1.2.0
func (m *MsgCreateHTLCResponse) XXX_Unmarshal(b []byte) error
type MsgRefundHTLC ¶
type MsgRefundHTLC struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` HashLock string `protobuf:"bytes,2,opt,name=hash_lock,json=hashLock,proto3" json:"hash_lock,omitempty" yaml:"hash_lock"` }
MsgRefundHTLC defines a message to refund an HTLC
func NewMsgRefundHTLC ¶
func NewMsgRefundHTLC( sender string, hashLock string, ) MsgRefundHTLC
NewMsgRefundHTLC constructs a new MsgRefundHTLC instance
func (*MsgRefundHTLC) Descriptor ¶
func (*MsgRefundHTLC) Descriptor() ([]byte, []int)
func (*MsgRefundHTLC) Equal ¶
func (this *MsgRefundHTLC) Equal(that interface{}) bool
func (MsgRefundHTLC) GetSignBytes ¶
func (msg MsgRefundHTLC) GetSignBytes() []byte
GetSignBytes implements Msg
func (MsgRefundHTLC) GetSigners ¶
func (msg MsgRefundHTLC) GetSigners() []sdk.AccAddress
GetSigners implements Msg
func (*MsgRefundHTLC) Marshal ¶
func (m *MsgRefundHTLC) Marshal() (dAtA []byte, err error)
func (*MsgRefundHTLC) MarshalToSizedBuffer ¶
func (m *MsgRefundHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRefundHTLC) ProtoMessage ¶
func (*MsgRefundHTLC) ProtoMessage()
func (*MsgRefundHTLC) Reset ¶
func (m *MsgRefundHTLC) Reset()
func (*MsgRefundHTLC) Size ¶
func (m *MsgRefundHTLC) Size() (n int)
func (*MsgRefundHTLC) String ¶
func (m *MsgRefundHTLC) String() string
func (*MsgRefundHTLC) Unmarshal ¶
func (m *MsgRefundHTLC) Unmarshal(dAtA []byte) error
func (MsgRefundHTLC) ValidateBasic ¶
func (msg MsgRefundHTLC) ValidateBasic() error
ValidateBasic implements Msg
func (*MsgRefundHTLC) XXX_DiscardUnknown ¶
func (m *MsgRefundHTLC) XXX_DiscardUnknown()
func (*MsgRefundHTLC) XXX_Marshal ¶
func (m *MsgRefundHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRefundHTLC) XXX_Merge ¶
func (m *MsgRefundHTLC) XXX_Merge(src proto.Message)
func (*MsgRefundHTLC) XXX_Size ¶
func (m *MsgRefundHTLC) XXX_Size() int
func (*MsgRefundHTLC) XXX_Unmarshal ¶
func (m *MsgRefundHTLC) XXX_Unmarshal(b []byte) error
type MsgRefundHTLCResponse ¶ added in v1.2.0
type MsgRefundHTLCResponse struct { }
MsgRefundHTLCResponse defines the Msg/RefundHTLC response type
func (*MsgRefundHTLCResponse) Descriptor ¶ added in v1.2.0
func (*MsgRefundHTLCResponse) Descriptor() ([]byte, []int)
func (*MsgRefundHTLCResponse) Marshal ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) Marshal() (dAtA []byte, err error)
func (*MsgRefundHTLCResponse) MarshalTo ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRefundHTLCResponse) MarshalToSizedBuffer ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRefundHTLCResponse) ProtoMessage ¶ added in v1.2.0
func (*MsgRefundHTLCResponse) ProtoMessage()
func (*MsgRefundHTLCResponse) Reset ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) Reset()
func (*MsgRefundHTLCResponse) Size ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) Size() (n int)
func (*MsgRefundHTLCResponse) String ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) String() string
func (*MsgRefundHTLCResponse) Unmarshal ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) Unmarshal(dAtA []byte) error
func (*MsgRefundHTLCResponse) XXX_DiscardUnknown ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) XXX_DiscardUnknown()
func (*MsgRefundHTLCResponse) XXX_Marshal ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRefundHTLCResponse) XXX_Merge ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) XXX_Merge(src proto.Message)
func (*MsgRefundHTLCResponse) XXX_Size ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) XXX_Size() int
func (*MsgRefundHTLCResponse) XXX_Unmarshal ¶ added in v1.2.0
func (m *MsgRefundHTLCResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶ added in v1.2.0
type MsgServer interface { // CreateHTLC defines a method for creating a HTLC. CreateHTLC(context.Context, *MsgCreateHTLC) (*MsgCreateHTLCResponse, error) // ClaimHTLC defines a method for claiming a HTLC ClaimHTLC(context.Context, *MsgClaimHTLC) (*MsgClaimHTLCResponse, error) // RefundHTLC defines a method for refunding a HTLC. RefundHTLC(context.Context, *MsgRefundHTLC) (*MsgRefundHTLCResponse, error) }
MsgServer is the server API for Msg service.
type QueryClient ¶
type QueryClient interface { // HTLC queries the HTLC by the specified hash lock HTLC(ctx context.Context, in *QueryHTLCRequest, opts ...grpc.CallOption) (*QueryHTLCResponse, 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 QueryHTLCParams ¶
QueryHTLCParams defines the params to query an HTLC
type QueryHTLCRequest ¶
type QueryHTLCRequest struct { // address is the address to query balances for HashLock string `protobuf:"bytes,1,opt,name=hash_lock,json=hashLock,proto3" json:"hash_lock,omitempty"` }
QueryHTLCRequest is the request type for the Query/HTLC RPC method
func (*QueryHTLCRequest) Descriptor ¶
func (*QueryHTLCRequest) Descriptor() ([]byte, []int)
func (*QueryHTLCRequest) GetHashLock ¶
func (m *QueryHTLCRequest) GetHashLock() string
func (*QueryHTLCRequest) Marshal ¶
func (m *QueryHTLCRequest) Marshal() (dAtA []byte, err error)
func (*QueryHTLCRequest) MarshalToSizedBuffer ¶
func (m *QueryHTLCRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryHTLCRequest) ProtoMessage ¶
func (*QueryHTLCRequest) ProtoMessage()
func (*QueryHTLCRequest) Reset ¶
func (m *QueryHTLCRequest) Reset()
func (*QueryHTLCRequest) Size ¶
func (m *QueryHTLCRequest) Size() (n int)
func (*QueryHTLCRequest) String ¶
func (m *QueryHTLCRequest) String() string
func (*QueryHTLCRequest) Unmarshal ¶
func (m *QueryHTLCRequest) Unmarshal(dAtA []byte) error
func (*QueryHTLCRequest) XXX_DiscardUnknown ¶
func (m *QueryHTLCRequest) XXX_DiscardUnknown()
func (*QueryHTLCRequest) XXX_Marshal ¶
func (m *QueryHTLCRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryHTLCRequest) XXX_Merge ¶
func (m *QueryHTLCRequest) XXX_Merge(src proto.Message)
func (*QueryHTLCRequest) XXX_Size ¶
func (m *QueryHTLCRequest) XXX_Size() int
func (*QueryHTLCRequest) XXX_Unmarshal ¶
func (m *QueryHTLCRequest) XXX_Unmarshal(b []byte) error
type QueryHTLCResponse ¶
type QueryHTLCResponse struct {
Htlc *HTLC `protobuf:"bytes,1,opt,name=htlc,proto3" json:"htlc,omitempty"`
}
QueryBalanceResponse is the response type for the Query/HTLC RPC method
func (*QueryHTLCResponse) Descriptor ¶
func (*QueryHTLCResponse) Descriptor() ([]byte, []int)
func (*QueryHTLCResponse) GetHtlc ¶
func (m *QueryHTLCResponse) GetHtlc() *HTLC
func (*QueryHTLCResponse) Marshal ¶
func (m *QueryHTLCResponse) Marshal() (dAtA []byte, err error)
func (*QueryHTLCResponse) MarshalTo ¶
func (m *QueryHTLCResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryHTLCResponse) MarshalToSizedBuffer ¶
func (m *QueryHTLCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryHTLCResponse) ProtoMessage ¶
func (*QueryHTLCResponse) ProtoMessage()
func (*QueryHTLCResponse) Reset ¶
func (m *QueryHTLCResponse) Reset()
func (*QueryHTLCResponse) Size ¶
func (m *QueryHTLCResponse) Size() (n int)
func (*QueryHTLCResponse) String ¶
func (m *QueryHTLCResponse) String() string
func (*QueryHTLCResponse) Unmarshal ¶
func (m *QueryHTLCResponse) Unmarshal(dAtA []byte) error
func (*QueryHTLCResponse) XXX_DiscardUnknown ¶
func (m *QueryHTLCResponse) XXX_DiscardUnknown()
func (*QueryHTLCResponse) XXX_Marshal ¶
func (m *QueryHTLCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryHTLCResponse) XXX_Merge ¶
func (m *QueryHTLCResponse) XXX_Merge(src proto.Message)
func (*QueryHTLCResponse) XXX_Size ¶
func (m *QueryHTLCResponse) XXX_Size() int
func (*QueryHTLCResponse) XXX_Unmarshal ¶
func (m *QueryHTLCResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // HTLC queries the HTLC by the specified hash lock HTLC(context.Context, *QueryHTLCRequest) (*QueryHTLCResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶ added in v1.2.0
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) ClaimHTLC ¶ added in v1.2.0
func (*UnimplementedMsgServer) ClaimHTLC(ctx context.Context, req *MsgClaimHTLC) (*MsgClaimHTLCResponse, error)
func (*UnimplementedMsgServer) CreateHTLC ¶ added in v1.2.0
func (*UnimplementedMsgServer) CreateHTLC(ctx context.Context, req *MsgCreateHTLC) (*MsgCreateHTLCResponse, error)
func (*UnimplementedMsgServer) RefundHTLC ¶ added in v1.2.0
func (*UnimplementedMsgServer) RefundHTLC(ctx context.Context, req *MsgRefundHTLC) (*MsgRefundHTLCResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) HTLC ¶
func (*UnimplementedQueryServer) HTLC(ctx context.Context, req *QueryHTLCRequest) (*QueryHTLCResponse, error)