types

package
v0.0.0-...-4696dcf Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

nolint

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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

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
)
View Source
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"

	SecretLength                    = 32    // length for the secret in bytes
	HashLockLength                  = 32    // length for the hash lock in bytes
	MaxLengthForAddressOnOtherChain = 128   // maximum length for the address on other chains
	MinTimeLock                     = 50    // minimum time span for HTLC
	MaxTimeLock                     = 25480 // maximum time span for HTLC
)
View Source
const (
	QueryHTLC = "htlc" // query an HTLC
)

Variables

View Source
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

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 (
	// Keys for store prefixes
	HTLCKey             = []byte{0x01} // prefix for HTLC
	HTLCExpiredQueueKey = []byte{0x02} // prefix for the HTLC expiration queue
)
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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var HTLCState_name = map[int32]string{
	0: "HTLC_STATE_OPEN",
	1: "HTLC_STATE_COMPLETED",
	2: "HTLC_STATE_EXPIRED",
	3: "HTLC_STATE_REFUNDED",
}
View Source
var HTLCState_value = map[string]int32{
	"HTLC_STATE_OPEN":      0,
	"HTLC_STATE_COMPLETED": 1,
	"HTLC_STATE_EXPIRED":   2,
	"HTLC_STATE_REFUNDED":  3,
}
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

ModuleCdc defines the module codec

Functions

func GetHTLCExpiredQueueKey

func GetHTLCExpiredQueueKey(expirationHeight uint64, hashLock []byte) []byte

GetHTLCExpiredQueueKey returns the key for the HTLC expiration queue by the specified height and hash lock VALUE: []byte{}

func GetHTLCExpiredQueueSubspace

func GetHTLCExpiredQueueSubspace(expirationHeight uint64) []byte

GetHTLCExpiredQueueSubspace returns the key prefix for the HTLC expiration queue by the given height

func GetHTLCKey

func GetHTLCKey(hashLock []byte) []byte

GetHTLCKey returns the key for the HTLC with the specified hash lock VALUE: htlc/HTLC

func GetHashLock

func GetHashLock(secret tmbytes.HexBytes, timestamp uint64) []byte

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 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the provided HTLC genesis state to ensure the expected invariants holds.

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 for module accounts (noalias)

type GenesisState

type GenesisState struct {
	PendingHtlcs map[string]HTLC `` /* 175-byte string literal not displayed */
}

GenesisState defines the nft 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) 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) 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               github_com_cosmos_cosmos_sdk_types.AccAddress        `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	To                   github_com_cosmos_cosmos_sdk_types.AccAddress        `protobuf:"bytes,2,opt,name=to,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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               github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 127-byte string literal not displayed */
	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 a struct for 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) Descriptor() ([]byte, []int)

func (*HTLC) Equal

func (this *HTLC) Equal(that interface{}) bool

func (*HTLC) Marshal

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

func (*HTLC) MarshalTo

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

func (*HTLC) MarshalToSizedBuffer

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

func (*HTLC) ProtoMessage

func (*HTLC) ProtoMessage()

func (*HTLC) Reset

func (m *HTLC) Reset()

func (*HTLC) Size

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

func (*HTLC) String

func (m *HTLC) String() string

func (*HTLC) Unmarshal

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

func (HTLC) Validate

func (h HTLC) Validate() error

Validate validates the HTLC

func (*HTLC) XXX_DiscardUnknown

func (m *HTLC) XXX_DiscardUnknown()

func (*HTLC) XXX_Marshal

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

func (*HTLC) XXX_Merge

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

func (*HTLC) XXX_Size

func (m *HTLC) XXX_Size() int

func (*HTLC) XXX_Unmarshal

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

type HTLCState

type HTLCState int32

HTLCState defines a state for an HTLC

const (
	// HTLC_STATE_OPEN defines an open state.
	Open HTLCState = 0
	// HTLC_STATE_COMPLETED defines a completed state.
	Completed HTLCState = 1
	// HTLC_STATE_EXPIRED defines an expired state.
	Expired HTLCState = 2
	// HTLC_STATE_REFUNDED defines a refunded state.
	Refunded HTLCState = 3
)

func (HTLCState) EnumDescriptor

func (HTLCState) EnumDescriptor() ([]byte, []int)

func (HTLCState) String

func (x HTLCState) String() string

type MsgClaimHTLC

type MsgClaimHTLC struct {
	Sender   github_com_cosmos_cosmos_sdk_types.AccAddress        `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	HashLock github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 164-byte string literal not displayed */
	Secret   github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 127-byte string literal not displayed */
}

MsgClaimHTLC defines a message to claim an HTLC

func NewMsgClaimHTLC

func NewMsgClaimHTLC(
	sender sdk.AccAddress,
	hashLock tmbytes.HexBytes,
	secret tmbytes.HexBytes,
) 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) MarshalTo

func (m *MsgClaimHTLC) MarshalTo(dAtA []byte) (int, 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) Route

func (msg MsgClaimHTLC) Route() string

Route implements Msg

func (*MsgClaimHTLC) Size

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

func (*MsgClaimHTLC) String

func (m *MsgClaimHTLC) String() string

func (MsgClaimHTLC) Type

func (msg MsgClaimHTLC) Type() string

Type implements Msg

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 MsgCreateHTLC

type MsgCreateHTLC struct {
	Sender               github_com_cosmos_cosmos_sdk_types.AccAddress        `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	To                   github_com_cosmos_cosmos_sdk_types.AccAddress        `protobuf:"bytes,2,opt,name=to,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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             github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 164-byte string literal not displayed */
	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 sdk.AccAddress,
	to sdk.AccAddress,
	receiverOnOtherChain string,
	amount sdk.Coins,
	hashLock tmbytes.HexBytes,
	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) MarshalTo

func (m *MsgCreateHTLC) MarshalTo(dAtA []byte) (int, 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) Route

func (msg MsgCreateHTLC) Route() string

Route implements Msg

func (*MsgCreateHTLC) Size

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

func (*MsgCreateHTLC) String

func (m *MsgCreateHTLC) String() string

func (MsgCreateHTLC) Type

func (msg MsgCreateHTLC) Type() string

Type implements Msg

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 MsgRefundHTLC

type MsgRefundHTLC struct {
	Sender   github_com_cosmos_cosmos_sdk_types.AccAddress        `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	HashLock github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 164-byte string literal not displayed */
}

MsgRefundHTLC defines a message to refund an HTLC

func NewMsgRefundHTLC

func NewMsgRefundHTLC(
	sender sdk.AccAddress,
	hashLock tmbytes.HexBytes,
) 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) MarshalTo

func (m *MsgRefundHTLC) MarshalTo(dAtA []byte) (int, 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) Route

func (msg MsgRefundHTLC) Route() string

Route implements Msg

func (*MsgRefundHTLC) Size

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

func (*MsgRefundHTLC) String

func (m *MsgRefundHTLC) String() string

func (MsgRefundHTLC) Type

func (msg MsgRefundHTLC) Type() string

Type implements Msg

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 QueryClient

type QueryClient interface {
	// Balance queries the balance of a single coin for a single account
	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

type QueryHTLCParams struct {
	HashLock tmbytes.HexBytes
}

QueryHTLCParams defines the params to query an HTLC

type QueryHTLCRequest

type QueryHTLCRequest struct {
	// address is the address to query balances for
	HashLock github_com_tendermint_tendermint_libs_bytes.HexBytes `` /* 147-byte string literal not displayed */
}

QueryHTLCRequest is the request type for the Query/HTLC RPC method

func (*QueryHTLCRequest) Descriptor

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

func (*QueryHTLCRequest) GetHashLock

func (*QueryHTLCRequest) Marshal

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

func (*QueryHTLCRequest) MarshalTo

func (m *QueryHTLCRequest) MarshalTo(dAtA []byte) (int, 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 {
	// Balance queries the balance of a single coin for a single account
	HTLC(context.Context, *QueryHTLCRequest) (*QueryHTLCResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) HTLC

Jump to

Keyboard shortcuts

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