types

package
v6.0.0-...-d56d304 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeTimeout      = "timeout"
	EventTypePacket       = "fungible_token_packet"
	EventTypeSwap         = "ibc_swap"
	EventTypeChannelClose = "channel_closed"
	EventTypeMakeSwap     = "make_swap"
	EventTypeTakeSwap     = "take_swap"
	EventTypeCancelSwap   = "cancel_swap"

	AttributeType          = "type"
	AttributeData          = "data"
	AttributeMemo          = "memo"
	AttributeKeyAmount     = "amount"
	AttributeKeyAckSuccess = "success"
	AttributeKeyAck        = "acknowledgement"
	AttributeKeyAckError   = "error"
	AttributeOrderId       = "order_id"
	AttributeAction        = "action"
	AttributeName          = "name"
)

IBC transfer events

View Source
const (
	EventValueActionMakeOrder   = "make_order"
	EventValueActionTakeOrder   = "take_order"
	EventValueActionCancelOrder = "cancel_order"
	EventOwner                  = "atomic_swap"
)
View Source
const (
	EventValueSuffixReceived     = "received"
	EventValueSuffixAcknowledged = "acknowledged"
)
View Source
const (
	// ModuleName defines the IBC swap name
	ModuleName = "swap"

	// Version defines the current version the IBC swap
	// module supports
	Version = "ics100-1"

	// PortID is the default port id that swap module binds to
	PortID = ModuleName

	// StoreKey is the store key string for IBC swap
	StoreKey = ModuleName

	// RouterKey is the message route for IBC swap
	RouterKey = ModuleName

	// QuerierRoute is the querier route for IBC swap
	QuerierRoute = ModuleName

	MaxOrderCount = 10000000000000
)
View Source
const (
	TypeMsgMakeSwap   = "make_swap"
	TypeMsgTakeSwap   = "take_swap"
	TypeMsgCancelSwap = "cancel_swap"
)

msg types

View Source
const (
	DefaultSwapEnabled = true
	// DefaultMaxFeeRate is 0.0010
	DefaultMaxFeeRate = 10
)

Variables

View Source
var (

	// ModuleCdc references the global x/ibc-transfer module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding.
	//
	// The actual codec used for serialization should be provided to x/ibc transfer and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

	// AminoCdc is a amino codec created to support amino json compatible msgs.
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	ErrInvalidPacketTimeout        = sdkerrors.Register(ModuleName, 2, "invalid packet timeout")
	ErrInvalidDenomForTransfer     = sdkerrors.Register(ModuleName, 3, "invalid denomination for cross-chain transfer")
	ErrInvalidVersion              = sdkerrors.Register(ModuleName, 4, "invalid ICS31 version")
	ErrInvalidAmount               = sdkerrors.Register(ModuleName, 5, "invalid token amount")
	ErrTraceNotFound               = sdkerrors.Register(ModuleName, 6, "denomination trace not found")
	ErrSendDisabled                = sdkerrors.Register(ModuleName, 7, "swap from this chain are disabled")
	ErrReceiveDisabled             = sdkerrors.Register(ModuleName, 8, "swap to this chain are disabled")
	ErrMaxTransferChannels         = sdkerrors.Register(ModuleName, 9, "max transfer channels")
	ErrInvalidCodec                = sdkerrors.Register(ModuleName, 10, "codec is not supported")
	ErrUnknownDataPacket           = sdkerrors.Register(ModuleName, 11, "data packet is not supported")
	ErrOrderDoesNotExists          = sdkerrors.Register(ModuleName, 12, "Make Order does not exist")
	ErrOrderCanceled               = sdkerrors.Register(ModuleName, 13, "Order has been canceled")
	ErrOrderCompleted              = sdkerrors.Register(ModuleName, 14, "Order has completed already")
	ErrOrderDenominationMismatched = sdkerrors.Register(ModuleName, 15, "denomination are not matched")
	ErrOrderInsufficientAmount     = sdkerrors.Register(ModuleName, 16, "amount of taker token is insufficient")
	ErrOrderPermissionIsNotAllowed = sdkerrors.Register(ModuleName, 17, "sender is not the owner of the order")
	ErrNotFoundChannel             = sdkerrors.Register(ModuleName, 18, "did not find channel")
	ErrFailedMakeSwap              = sdkerrors.Register(ModuleName, 19, "Failed to make swap")
	ErrInvalidTakerReceiverAddress = sdkerrors.Register(ModuleName, 20, "Taker Address has counter party chain address")
	ErrInvalidOrderStatus          = sdkerrors.Register(ModuleName, 21, "invalid order status")
	ErrInvalidSellToken            = sdkerrors.Register(ModuleName, 22, "invalid sell token")
	ErrInvalidTakerAddress         = sdkerrors.Register(ModuleName, 23, "invalid taker address")
	ErrAlreadyOrderTook            = sdkerrors.Register(ModuleName, 24, "already order took")
	ErrNotFoundOrder               = sdkerrors.Register(ModuleName, 25, "did not find order")
)

IBC transfer 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 (
	// PortKey defines the key to store the port ID in store
	PortKey = []byte{0x01}
	// LimitOrderBookKey defines the key to store the denomination trace info in store
	//LimitOrderBookKey         = []byte{0x02}
	//LimitOrderBookKeyIndexKey = []byte{0x03}
	// OTCOrderBookKey defines the key to store the denomination trace info in store
	OTCOrderBookKey         = []byte{0x04}
	OTCOrderBookKeyCountKey = []byte{0x05}
	OTCOrderBookKeyIndexKey = []byte{0x06}
)
View Source
var (
	// DefaultRelativePacketTimeoutHeight is the default packet timeout height (in blocks) relative
	// to the current block height of the counterparty chain provided by the client state. The
	// timeout is disabled when set to 0.
	DefaultRelativePacketTimeoutHeight = "0-1000"

	// DefaultRelativePacketTimeoutTimestamp is the default packet timeout timestamp (in nanoseconds)
	// relative to the current block timestamp of the counterparty chain provided by the client
	// state. The timeout is disabled when set to 0. The default is currently set to a 10 minute
	// timeout.
	DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds())
)
View Source
var (
	ErrInvalidLengthPacket        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPacket          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeySwapEnabled    = []byte("SwapEnabled")
	KeySwapMaxFeeRate = []byte("MaxFeeRate")
)
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 (
	ErrInvalidLengthSwap        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSwap          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSwap = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ibc.applications.atomic_swap.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MakeSwap",
			Handler:    _Msg_MakeSwap_Handler,
		},
		{
			MethodName: "TakeSwap",
			Handler:    _Msg_TakeSwap_Handler,
		},
		{
			MethodName: "CancelSwap",
			Handler:    _Msg_CancelSwap_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ibc/applications/atomic_swap/v1/tx.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var OrderType_name = map[int32]string{
	0: "BuyToSell",
	1: "SellToBuy",
}
View Source
var OrderType_value = map[string]int32{
	"BuyToSell": 0,
	"SellToBuy": 1,
}
View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ibc.applications.atomic_swap.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Params",
			Handler:    _Query_Params_Handler,
		},
		{
			MethodName: "EscrowAddress",
			Handler:    _Query_EscrowAddress_Handler,
		},
		{
			MethodName: "GetAllOrders",
			Handler:    _Query_GetAllOrders_Handler,
		},
		{
			MethodName: "GetAllOrdersByType",
			Handler:    _Query_GetAllOrdersByType_Handler,
		},
		{
			MethodName: "GetSubmittedOrders",
			Handler:    _Query_GetSubmittedOrders_Handler,
		},
		{
			MethodName: "GetTookOrders",
			Handler:    _Query_GetTookOrders_Handler,
		},
		{
			MethodName: "GetPrivateOrders",
			Handler:    _Query_GetPrivateOrders_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ibc/applications/atomic_swap/v1/query.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Side_name = map[int32]string{
	0: "TYPE_NATIVE",
	1: "TYPE_REMOTE",
}
View Source
var Side_value = map[string]int32{
	"TYPE_NATIVE": 0,
	"TYPE_REMOTE": 1,
}
View Source
var Status_name = map[int32]string{
	0: "INITIAL",
	1: "SYNC",
	2: "CANCEL",
	3: "COMPLETE",
}
View Source
var Status_value = map[string]int32{
	"INITIAL":  0,
	"SYNC":     1,
	"CANCEL":   2,
	"COMPLETE": 3,
}
View Source
var SwapMessageType_name = map[int32]string{
	0: "TYPE_UNSPECIFIED",
	1: "TYPE_MSG_MAKE_SWAP",
	2: "TYPE_MSG_TAKE_SWAP",
	3: "TYPE_MSG_CANCEL_SWAP",
}
View Source
var SwapMessageType_value = map[string]int32{
	"TYPE_UNSPECIFIED":     0,
	"TYPE_MSG_MAKE_SWAP":   1,
	"TYPE_MSG_TAKE_SWAP":   2,
	"TYPE_MSG_CANCEL_SWAP": 3,
}

Functions

func GenerateRandomString

func GenerateRandomString(chainID string, n int) string

generateRandomString generates a random string of the length n.

func GetDenomPrefix

func GetDenomPrefix(portID, channelID string) string

GetDenomPrefix returns the receiving denomination prefix

func GetEscrowAddress

func GetEscrowAddress(portID, channelID string) sdk.AccAddress

GetEscrowAddress returns the escrow address for the specified channel. The escrow address follows the format as outlined in ADR 028: https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-028-public-key-addresses.md

func GetEventValueWithSuffix

func GetEventValueWithSuffix(value, suffix string) string

func GetPrefixedDenom

func GetPrefixedDenom(portID, channelID, baseDenom string) string

GetPrefixedDenom returns the denomination with the portID and channelID prefixed

func GetTransferCoin

func GetTransferCoin(portID, channelID, baseDenom string, amount sdk.Int) sdk.Coin

GetTransferCoin creates a transfer coin with the port ID and channel ID prefixed to the base denom.

func Hash

func Hash(content []byte) tmbytes.HexBytes

func KeyPrefix

func KeyPrefix(key string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable type declaration for parameters

func ReceiverChainIsSource

func ReceiverChainIsSource(sourcePort, sourceChannel, denom string) bool

ReceiverChainIsSource returns true if the denomination originally came from the receiving chain and false otherwise.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the ibc transfer module interfaces to protobuf Any.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/ibc transfer interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

func SenderChainIsSource

func SenderChainIsSource(sourcePort, sourceChannel, denom string) bool

SenderChainIsSource returns false if the denomination originally came from the receiving chain and true otherwise.

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the contract required for account APIs.

type AtomicSwapPacketData

type AtomicSwapPacketData struct {
	Type    SwapMessageType `protobuf:"varint,1,opt,name=type,proto3,enum=ibc.applications.atomic_swap.v1.SwapMessageType" json:"type,omitempty"`
	Data    []byte          `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	OrderId string          `protobuf:"bytes,3,opt,name=orderId,proto3" json:"orderId,omitempty"`
	Path    string          `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	Memo    string          `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"`
}

AtomicSwapPacketData is comprised of a raw transaction, type of transaction and optional memo field.

func NewAtomicSwapPacketData

func NewAtomicSwapPacketData(
	mType SwapMessageType,
	data []byte,
	memo string,
) AtomicSwapPacketData

NewAtomicSwapPacketData constructs a new AtomicSwapPacketData instance

func (*AtomicSwapPacketData) Descriptor

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

func (AtomicSwapPacketData) GetBytes

func (pd AtomicSwapPacketData) GetBytes() []byte

GetBytes is a helper for serialising

func (*AtomicSwapPacketData) GetData

func (m *AtomicSwapPacketData) GetData() []byte

func (*AtomicSwapPacketData) GetMemo

func (m *AtomicSwapPacketData) GetMemo() string

func (*AtomicSwapPacketData) GetOrderId

func (m *AtomicSwapPacketData) GetOrderId() string

func (*AtomicSwapPacketData) GetPath

func (m *AtomicSwapPacketData) GetPath() string

func (*AtomicSwapPacketData) GetType

func (*AtomicSwapPacketData) Marshal

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

func (*AtomicSwapPacketData) MarshalTo

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

func (*AtomicSwapPacketData) MarshalToSizedBuffer

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

func (*AtomicSwapPacketData) ProtoMessage

func (*AtomicSwapPacketData) ProtoMessage()

func (*AtomicSwapPacketData) Reset

func (m *AtomicSwapPacketData) Reset()

func (*AtomicSwapPacketData) Size

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

func (*AtomicSwapPacketData) String

func (m *AtomicSwapPacketData) String() string

func (*AtomicSwapPacketData) Unmarshal

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

func (AtomicSwapPacketData) ValidateBasic

func (pd AtomicSwapPacketData) ValidateBasic() error

ValidateBasic is used for validating the token swap.

func (*AtomicSwapPacketData) XXX_DiscardUnknown

func (m *AtomicSwapPacketData) XXX_DiscardUnknown()

func (*AtomicSwapPacketData) XXX_Marshal

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

func (*AtomicSwapPacketData) XXX_Merge

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

func (*AtomicSwapPacketData) XXX_Size

func (m *AtomicSwapPacketData) XXX_Size() int

func (*AtomicSwapPacketData) XXX_Unmarshal

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

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	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
	BlockedAddr(addr sdk.AccAddress) bool
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
}

BankKeeper defines the expected bank keeper

type CancelSwapMsg

type CancelSwapMsg struct {
	OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	// the sender address
	MakerAddress string `protobuf:"bytes,5,opt,name=maker_address,json=makerAddress,proto3" json:"maker_address,omitempty" yaml:"maker_address"`
	// Timeout height relative to the current block height.
	// The timeout is disabled when set to 0.
	TimeoutHeight types1.Height `protobuf:"bytes,8,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"`
	// Timeout timestamp in absolute nanoseconds since unix epoch.
	// The timeout is disabled when set to 0.
	TimeoutTimestamp uint64 `` /* 135-byte string literal not displayed */
	CreateTimestamp  int64  `protobuf:"varint,10,opt,name=create_timestamp,json=createTimestamp,proto3" json:"create_timestamp,omitempty"`
}

func NewMsgCancelSwap

func NewMsgCancelSwap(
	senderAddress, orderId string,
	timeoutHeight clienttypes.Height, timeoutTimestamp uint64,
) *CancelSwapMsg

NewMsgCancelSwap creates a new MsgCancelSwapRequest instance

func (*CancelSwapMsg) Descriptor

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

func (*CancelSwapMsg) GetSignBytes

func (msg *CancelSwapMsg) GetSignBytes() []byte

GetSignBytes implements sdk.Msg.

func (*CancelSwapMsg) GetSigners

func (msg *CancelSwapMsg) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*CancelSwapMsg) Marshal

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

func (*CancelSwapMsg) MarshalTo

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

func (*CancelSwapMsg) MarshalToSizedBuffer

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

func (*CancelSwapMsg) ProtoMessage

func (*CancelSwapMsg) ProtoMessage()

func (*CancelSwapMsg) Reset

func (m *CancelSwapMsg) Reset()

func (*CancelSwapMsg) Route

func (*CancelSwapMsg) Route() string

Route implements sdk.Msg

func (*CancelSwapMsg) Size

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

func (*CancelSwapMsg) String

func (m *CancelSwapMsg) String() string

func (*CancelSwapMsg) Type

func (*CancelSwapMsg) Type() string

Type implements sdk.Msg

func (*CancelSwapMsg) Unmarshal

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

func (*CancelSwapMsg) ValidateBasic

func (msg *CancelSwapMsg) ValidateBasic() error

ValidateBasic performs a basic check of the MsgTransfer fields. NOTE: timeout height or timestamp values can be 0 to disable the timeout. NOTE: The recipient addresses format is not validated as the format defined by the chain is not known to IBC.

func (*CancelSwapMsg) XXX_DiscardUnknown

func (m *CancelSwapMsg) XXX_DiscardUnknown()

func (*CancelSwapMsg) XXX_Marshal

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

func (*CancelSwapMsg) XXX_Merge

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

func (*CancelSwapMsg) XXX_Size

func (m *CancelSwapMsg) XXX_Size() int

func (*CancelSwapMsg) XXX_Unmarshal

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

type ChannelKeeper

type ChannelKeeper interface {
	GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool)
	GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
}

ChannelKeeper defines the expected IBC channel keeper

type ClientKeeper

type ClientKeeper interface {
	GetClientConsensusState(ctx sdk.Context, clientID string) (connection ibcexported.ConsensusState, found bool)
}

ClientKeeper defines the expected IBC client keeper

type ConnectionKeeper

type ConnectionKeeper interface {
	GetConnection(ctx sdk.Context, connectionID string) (connection connectiontypes.ConnectionEnd, found bool)
}

ConnectionKeeper defines the expected IBC connection keeper

type GenesisState

type GenesisState struct {
	PortId string   `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	Params Params   `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
	Orders []*Order `protobuf:"bytes,3,rep,name=orders,proto3" json:"orders,omitempty"`
}

GenesisState defines the ibc-transfer genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a GenesisState with "transfer" as the default PortID.

func NewGenesisState

func NewGenesisState(portID string, params Params) *GenesisState

NewGenesisState creates a new ibc-transfer GenesisState instance.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetOrders

func (m *GenesisState) GetOrders() []*Order

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPortId

func (m *GenesisState) GetPortId() string

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) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 ICS4Wrapper

type ICS4Wrapper interface {
	SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error
}

ICS4Wrapper defines the expected ICS4Wrapper for middleware

type MakeSwapMsg

type MakeSwapMsg struct {
	// the port on which the packet will be sent
	SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty" yaml:"source_port"`
	// the channel by which the packet will be sent
	SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty" yaml:"source_channel"`
	// the tokens to be sell
	SellToken types.Coin `protobuf:"bytes,3,opt,name=sell_token,json=sellToken,proto3" json:"sell_token"`
	BuyToken  types.Coin `protobuf:"bytes,4,opt,name=buy_token,json=buyToken,proto3" json:"buy_token"`
	// the sender address
	MakerAddress string `protobuf:"bytes,5,opt,name=maker_address,json=makerAddress,proto3" json:"maker_address,omitempty" yaml:"maker_address"`
	// the sender's address on the destination chain
	MakerReceivingAddress string `` /* 157-byte string literal not displayed */
	// if desired_taker is specified,
	// only the desired_taker is allowed to take this order
	// this is address on destination chain
	DesiredTaker    string `protobuf:"bytes,7,opt,name=desired_taker,json=desiredTaker,proto3" json:"desired_taker,omitempty"`
	CreateTimestamp int64  `protobuf:"varint,8,opt,name=create_timestamp,json=createTimestamp,proto3" json:"create_timestamp,omitempty"`
	// Timeout height relative to the current block height.
	// The timeout is disabled when set to 0.
	TimeoutHeight types1.Height `protobuf:"bytes,9,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"`
	// Timeout timestamp in absolute nanoseconds since unix epoch.
	// The timeout is disabled when set to 0.
	TimeoutTimestamp    uint64 `` /* 136-byte string literal not displayed */
	ExpirationTimestamp uint64 `` /* 148-byte string literal not displayed */
}

func NewMsgMakeSwap

func NewMsgMakeSwap(
	sourcePort, sourceChannel string,
	sellToken, buyToken sdk.Coin,
	senderAddress, senderReceivingAddress, desiredTaker string,
	timeoutHeight clienttypes.Height, timeoutTimestamp uint64,
	createdTimestamp int64,
) *MakeSwapMsg

NewMsgMakeSwap creates a new MsgMakeSwapRequest instance

func (*MakeSwapMsg) Descriptor

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

func (*MakeSwapMsg) GetSignBytes

func (msg *MakeSwapMsg) GetSignBytes() []byte

GetSignBytes implements sdk.Msg.

func (*MakeSwapMsg) GetSigners

func (msg *MakeSwapMsg) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MakeSwapMsg) Marshal

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

func (*MakeSwapMsg) MarshalTo

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

func (*MakeSwapMsg) MarshalToSizedBuffer

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

func (*MakeSwapMsg) ProtoMessage

func (*MakeSwapMsg) ProtoMessage()

func (*MakeSwapMsg) Reset

func (m *MakeSwapMsg) Reset()

func (*MakeSwapMsg) Route

func (*MakeSwapMsg) Route() string

Route implements sdk.Msg

func (*MakeSwapMsg) Size

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

func (*MakeSwapMsg) String

func (m *MakeSwapMsg) String() string

func (*MakeSwapMsg) Type

func (*MakeSwapMsg) Type() string

Type implements sdk.Msg

func (*MakeSwapMsg) Unmarshal

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

func (*MakeSwapMsg) ValidateBasic

func (msg *MakeSwapMsg) ValidateBasic() error

ValidateBasic performs a basic check of the MsgTransfer fields. NOTE: timeout height or timestamp values can be 0 to disable the timeout. NOTE: The recipient addresses format is not validated as the format defined by the chain is not known to IBC.

func (*MakeSwapMsg) XXX_DiscardUnknown

func (m *MakeSwapMsg) XXX_DiscardUnknown()

func (*MakeSwapMsg) XXX_Marshal

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

func (*MakeSwapMsg) XXX_Merge

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

func (*MakeSwapMsg) XXX_Size

func (m *MakeSwapMsg) XXX_Size() int

func (*MakeSwapMsg) XXX_Unmarshal

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

type MsgCancelSwapResponse

type MsgCancelSwapResponse struct {
	OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
}

func (*MsgCancelSwapResponse) Descriptor

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

func (*MsgCancelSwapResponse) GetOrderId

func (m *MsgCancelSwapResponse) GetOrderId() string

func (*MsgCancelSwapResponse) Marshal

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

func (*MsgCancelSwapResponse) MarshalTo

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

func (*MsgCancelSwapResponse) MarshalToSizedBuffer

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

func (*MsgCancelSwapResponse) ProtoMessage

func (*MsgCancelSwapResponse) ProtoMessage()

func (*MsgCancelSwapResponse) Reset

func (m *MsgCancelSwapResponse) Reset()

func (*MsgCancelSwapResponse) Size

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

func (*MsgCancelSwapResponse) String

func (m *MsgCancelSwapResponse) String() string

func (*MsgCancelSwapResponse) Unmarshal

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

func (*MsgCancelSwapResponse) XXX_DiscardUnknown

func (m *MsgCancelSwapResponse) XXX_DiscardUnknown()

func (*MsgCancelSwapResponse) XXX_Marshal

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

func (*MsgCancelSwapResponse) XXX_Merge

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

func (*MsgCancelSwapResponse) XXX_Size

func (m *MsgCancelSwapResponse) XXX_Size() int

func (*MsgCancelSwapResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	MakeSwap(ctx context.Context, in *MakeSwapMsg, opts ...grpc.CallOption) (*MsgMakeSwapResponse, error)
	TakeSwap(ctx context.Context, in *TakeSwapMsg, opts ...grpc.CallOption) (*MsgTakeSwapResponse, error)
	CancelSwap(ctx context.Context, in *CancelSwapMsg, opts ...grpc.CallOption) (*MsgCancelSwapResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgMakeSwapResponse

type MsgMakeSwapResponse struct {
	OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
}

func (*MsgMakeSwapResponse) Descriptor

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

func (*MsgMakeSwapResponse) GetOrderId

func (m *MsgMakeSwapResponse) GetOrderId() string

func (*MsgMakeSwapResponse) Marshal

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

func (*MsgMakeSwapResponse) MarshalTo

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

func (*MsgMakeSwapResponse) MarshalToSizedBuffer

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

func (*MsgMakeSwapResponse) ProtoMessage

func (*MsgMakeSwapResponse) ProtoMessage()

func (*MsgMakeSwapResponse) Reset

func (m *MsgMakeSwapResponse) Reset()

func (*MsgMakeSwapResponse) Size

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

func (*MsgMakeSwapResponse) String

func (m *MsgMakeSwapResponse) String() string

func (*MsgMakeSwapResponse) Unmarshal

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

func (*MsgMakeSwapResponse) XXX_DiscardUnknown

func (m *MsgMakeSwapResponse) XXX_DiscardUnknown()

func (*MsgMakeSwapResponse) XXX_Marshal

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

func (*MsgMakeSwapResponse) XXX_Merge

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

func (*MsgMakeSwapResponse) XXX_Size

func (m *MsgMakeSwapResponse) XXX_Size() int

func (*MsgMakeSwapResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service. All implementations should embed UnimplementedMsgServer for forward compatibility

type MsgTakeSwapResponse

type MsgTakeSwapResponse struct {
	OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
}

func (*MsgTakeSwapResponse) Descriptor

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

func (*MsgTakeSwapResponse) GetOrderId

func (m *MsgTakeSwapResponse) GetOrderId() string

func (*MsgTakeSwapResponse) Marshal

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

func (*MsgTakeSwapResponse) MarshalTo

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

func (*MsgTakeSwapResponse) MarshalToSizedBuffer

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

func (*MsgTakeSwapResponse) ProtoMessage

func (*MsgTakeSwapResponse) ProtoMessage()

func (*MsgTakeSwapResponse) Reset

func (m *MsgTakeSwapResponse) Reset()

func (*MsgTakeSwapResponse) Size

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

func (*MsgTakeSwapResponse) String

func (m *MsgTakeSwapResponse) String() string

func (*MsgTakeSwapResponse) Unmarshal

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

func (*MsgTakeSwapResponse) XXX_DiscardUnknown

func (m *MsgTakeSwapResponse) XXX_DiscardUnknown()

func (*MsgTakeSwapResponse) XXX_Marshal

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

func (*MsgTakeSwapResponse) XXX_Merge

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

func (*MsgTakeSwapResponse) XXX_Size

func (m *MsgTakeSwapResponse) XXX_Size() int

func (*MsgTakeSwapResponse) XXX_Unmarshal

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

type Order

type Order struct {
	Id                string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Side              Side         `protobuf:"varint,2,opt,name=side,proto3,enum=ibc.applications.atomic_swap.v1.Side" json:"side,omitempty"`
	Maker             *MakeSwapMsg `protobuf:"bytes,3,opt,name=maker,proto3" json:"maker,omitempty"`
	Status            Status       `protobuf:"varint,4,opt,name=status,proto3,enum=ibc.applications.atomic_swap.v1.Status" json:"status,omitempty"`
	Path              string       `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
	Takers            *TakeSwapMsg `protobuf:"bytes,6,opt,name=takers,proto3" json:"takers,omitempty"`
	CancelTimestamp   int64        `protobuf:"varint,7,opt,name=cancel_timestamp,json=cancelTimestamp,proto3" json:"cancel_timestamp,omitempty"`
	CompleteTimestamp int64        `protobuf:"varint,8,opt,name=complete_timestamp,json=completeTimestamp,proto3" json:"complete_timestamp,omitempty"`
}

func (*Order) Descriptor

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

func (*Order) GetCancelTimestamp

func (m *Order) GetCancelTimestamp() int64

func (*Order) GetCompleteTimestamp

func (m *Order) GetCompleteTimestamp() int64

func (*Order) GetId

func (m *Order) GetId() string

func (*Order) GetMaker

func (m *Order) GetMaker() *MakeSwapMsg

func (*Order) GetPath

func (m *Order) GetPath() string

func (*Order) GetSide

func (m *Order) GetSide() Side

func (*Order) GetStatus

func (m *Order) GetStatus() Status

func (*Order) GetTakers

func (m *Order) GetTakers() *TakeSwapMsg

func (*Order) Marshal

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

func (*Order) MarshalTo

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

func (*Order) MarshalToSizedBuffer

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

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) Reset

func (m *Order) Reset()

func (*Order) Size

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

func (*Order) String

func (m *Order) String() string

func (*Order) Unmarshal

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

func (*Order) XXX_DiscardUnknown

func (m *Order) XXX_DiscardUnknown()

func (*Order) XXX_Marshal

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

func (*Order) XXX_Merge

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

func (*Order) XXX_Size

func (m *Order) XXX_Size() int

func (*Order) XXX_Unmarshal

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

type OrderType

type OrderType int32
const (
	OrderType_BuyToSell OrderType = 0
	OrderType_SellToBuy OrderType = 1
)

func (OrderType) EnumDescriptor

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

func (OrderType) String

func (x OrderType) String() string

type Params

type Params struct {
	// swap_enabled enables or disables all cross-chain token transfers from this chain.
	SwapEnabled bool `protobuf:"varint,1,opt,name=swap_enabled,json=swapEnabled,proto3" json:"swap_enabled,omitempty" yaml:"swap_enabled"`
	// max_fee_rate set a max value of fee, it's base point, 1/10000
	MaxFeeRate uint32 `protobuf:"varint,2,opt,name=max_fee_rate,json=maxFeeRate,proto3" json:"max_fee_rate,omitempty" yaml:"max_fee_rate"`
}

Params defines the set of IBC swap parameters.

func DefaultParams

func DefaultParams() Params

DefaultParams is the default parameter configuration for the ibc-transfer module

func NewParams

func NewParams(enable bool, feeRate uint32) Params

NewParams creates a new parameter configuration for the ibc transfer module

func (*Params) Descriptor

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

func (*Params) GetMaxFeeRate

func (m *Params) GetMaxFeeRate() uint32

func (*Params) GetSwapEnabled

func (m *Params) GetSwapEnabled() bool

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate all ibc-swap module parameters

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PortKeeper

type PortKeeper interface {
	BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}

PortKeeper defines the expected IBC port keeper

type QueryClient

type QueryClient interface {
	// Params queries all parameters of the ibc-transfer module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// EscrowAddress returns the escrow address for a particular port and channel id.
	EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error)
	GetAllOrders(ctx context.Context, in *QueryOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error)
	GetAllOrdersByType(ctx context.Context, in *QueryOrdersByRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error)
	GetSubmittedOrders(ctx context.Context, in *QuerySubmittedOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error)
	GetTookOrders(ctx context.Context, in *QueryTookOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error)
	GetPrivateOrders(ctx context.Context, in *QueryPrivateOrdersRequest, opts ...grpc.CallOption) (*QueryOrdersResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryEscrowAddressRequest

type QueryEscrowAddressRequest struct {
	// unique port identifier
	PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
	// unique channel identifier
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
}

QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method.

func (*QueryEscrowAddressRequest) Descriptor

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

func (*QueryEscrowAddressRequest) GetChannelId

func (m *QueryEscrowAddressRequest) GetChannelId() string

func (*QueryEscrowAddressRequest) GetPortId

func (m *QueryEscrowAddressRequest) GetPortId() string

func (*QueryEscrowAddressRequest) Marshal

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

func (*QueryEscrowAddressRequest) MarshalTo

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

func (*QueryEscrowAddressRequest) MarshalToSizedBuffer

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

func (*QueryEscrowAddressRequest) ProtoMessage

func (*QueryEscrowAddressRequest) ProtoMessage()

func (*QueryEscrowAddressRequest) Reset

func (m *QueryEscrowAddressRequest) Reset()

func (*QueryEscrowAddressRequest) Size

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

func (*QueryEscrowAddressRequest) String

func (m *QueryEscrowAddressRequest) String() string

func (*QueryEscrowAddressRequest) Unmarshal

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

func (*QueryEscrowAddressRequest) XXX_DiscardUnknown

func (m *QueryEscrowAddressRequest) XXX_DiscardUnknown()

func (*QueryEscrowAddressRequest) XXX_Marshal

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

func (*QueryEscrowAddressRequest) XXX_Merge

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

func (*QueryEscrowAddressRequest) XXX_Size

func (m *QueryEscrowAddressRequest) XXX_Size() int

func (*QueryEscrowAddressRequest) XXX_Unmarshal

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

type QueryEscrowAddressResponse

type QueryEscrowAddressResponse struct {
	// the escrow account address
	EscrowAddress string `protobuf:"bytes,1,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"`
}

QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.

func (*QueryEscrowAddressResponse) Descriptor

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

func (*QueryEscrowAddressResponse) GetEscrowAddress

func (m *QueryEscrowAddressResponse) GetEscrowAddress() string

func (*QueryEscrowAddressResponse) Marshal

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

func (*QueryEscrowAddressResponse) MarshalTo

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

func (*QueryEscrowAddressResponse) MarshalToSizedBuffer

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

func (*QueryEscrowAddressResponse) ProtoMessage

func (*QueryEscrowAddressResponse) ProtoMessage()

func (*QueryEscrowAddressResponse) Reset

func (m *QueryEscrowAddressResponse) Reset()

func (*QueryEscrowAddressResponse) Size

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

func (*QueryEscrowAddressResponse) String

func (m *QueryEscrowAddressResponse) String() string

func (*QueryEscrowAddressResponse) Unmarshal

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

func (*QueryEscrowAddressResponse) XXX_DiscardUnknown

func (m *QueryEscrowAddressResponse) XXX_DiscardUnknown()

func (*QueryEscrowAddressResponse) XXX_Marshal

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

func (*QueryEscrowAddressResponse) XXX_Merge

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

func (*QueryEscrowAddressResponse) XXX_Size

func (m *QueryEscrowAddressResponse) XXX_Size() int

func (*QueryEscrowAddressResponse) XXX_Unmarshal

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

type QueryOrdersByRequest

type QueryOrdersByRequest struct {
	OrderType  OrderType          `` /* 136-byte string literal not displayed */
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryOrdersByRequest) Descriptor

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

func (*QueryOrdersByRequest) GetOrderType

func (m *QueryOrdersByRequest) GetOrderType() OrderType

func (*QueryOrdersByRequest) GetPagination

func (m *QueryOrdersByRequest) GetPagination() *query.PageRequest

func (*QueryOrdersByRequest) Marshal

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

func (*QueryOrdersByRequest) MarshalTo

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

func (*QueryOrdersByRequest) MarshalToSizedBuffer

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

func (*QueryOrdersByRequest) ProtoMessage

func (*QueryOrdersByRequest) ProtoMessage()

func (*QueryOrdersByRequest) Reset

func (m *QueryOrdersByRequest) Reset()

func (*QueryOrdersByRequest) Size

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

func (*QueryOrdersByRequest) String

func (m *QueryOrdersByRequest) String() string

func (*QueryOrdersByRequest) Unmarshal

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

func (*QueryOrdersByRequest) XXX_DiscardUnknown

func (m *QueryOrdersByRequest) XXX_DiscardUnknown()

func (*QueryOrdersByRequest) XXX_Marshal

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

func (*QueryOrdersByRequest) XXX_Merge

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

func (*QueryOrdersByRequest) XXX_Size

func (m *QueryOrdersByRequest) XXX_Size() int

func (*QueryOrdersByRequest) XXX_Unmarshal

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

type QueryOrdersRequest

type QueryOrdersRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryOrdersRequest) Descriptor

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

func (*QueryOrdersRequest) GetPagination

func (m *QueryOrdersRequest) GetPagination() *query.PageRequest

func (*QueryOrdersRequest) Marshal

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

func (*QueryOrdersRequest) MarshalTo

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

func (*QueryOrdersRequest) MarshalToSizedBuffer

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

func (*QueryOrdersRequest) ProtoMessage

func (*QueryOrdersRequest) ProtoMessage()

func (*QueryOrdersRequest) Reset

func (m *QueryOrdersRequest) Reset()

func (*QueryOrdersRequest) Size

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

func (*QueryOrdersRequest) String

func (m *QueryOrdersRequest) String() string

func (*QueryOrdersRequest) Unmarshal

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

func (*QueryOrdersRequest) XXX_DiscardUnknown

func (m *QueryOrdersRequest) XXX_DiscardUnknown()

func (*QueryOrdersRequest) XXX_Marshal

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

func (*QueryOrdersRequest) XXX_Merge

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

func (*QueryOrdersRequest) XXX_Size

func (m *QueryOrdersRequest) XXX_Size() int

func (*QueryOrdersRequest) XXX_Unmarshal

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

type QueryOrdersResponse

type QueryOrdersResponse struct {
	Orders     []*Order            `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryOrdersResponse) Descriptor

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

func (*QueryOrdersResponse) GetOrders

func (m *QueryOrdersResponse) GetOrders() []*Order

func (*QueryOrdersResponse) GetPagination

func (m *QueryOrdersResponse) GetPagination() *query.PageResponse

func (*QueryOrdersResponse) Marshal

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

func (*QueryOrdersResponse) MarshalTo

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

func (*QueryOrdersResponse) MarshalToSizedBuffer

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

func (*QueryOrdersResponse) ProtoMessage

func (*QueryOrdersResponse) ProtoMessage()

func (*QueryOrdersResponse) Reset

func (m *QueryOrdersResponse) Reset()

func (*QueryOrdersResponse) Size

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

func (*QueryOrdersResponse) String

func (m *QueryOrdersResponse) String() string

func (*QueryOrdersResponse) Unmarshal

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

func (*QueryOrdersResponse) XXX_DiscardUnknown

func (m *QueryOrdersResponse) XXX_DiscardUnknown()

func (*QueryOrdersResponse) XXX_Marshal

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

func (*QueryOrdersResponse) XXX_Merge

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

func (*QueryOrdersResponse) XXX_Size

func (m *QueryOrdersResponse) XXX_Size() int

func (*QueryOrdersResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryPrivateOrdersRequest

type QueryPrivateOrdersRequest struct {
	DesireAddress string             `protobuf:"bytes,1,opt,name=desireAddress,proto3" json:"desireAddress,omitempty"`
	Pagination    *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryPrivateOrdersRequest) Descriptor

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

func (*QueryPrivateOrdersRequest) GetDesireAddress

func (m *QueryPrivateOrdersRequest) GetDesireAddress() string

func (*QueryPrivateOrdersRequest) GetPagination

func (m *QueryPrivateOrdersRequest) GetPagination() *query.PageRequest

func (*QueryPrivateOrdersRequest) Marshal

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

func (*QueryPrivateOrdersRequest) MarshalTo

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

func (*QueryPrivateOrdersRequest) MarshalToSizedBuffer

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

func (*QueryPrivateOrdersRequest) ProtoMessage

func (*QueryPrivateOrdersRequest) ProtoMessage()

func (*QueryPrivateOrdersRequest) Reset

func (m *QueryPrivateOrdersRequest) Reset()

func (*QueryPrivateOrdersRequest) Size

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

func (*QueryPrivateOrdersRequest) String

func (m *QueryPrivateOrdersRequest) String() string

func (*QueryPrivateOrdersRequest) Unmarshal

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

func (*QueryPrivateOrdersRequest) XXX_DiscardUnknown

func (m *QueryPrivateOrdersRequest) XXX_DiscardUnknown()

func (*QueryPrivateOrdersRequest) XXX_Marshal

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

func (*QueryPrivateOrdersRequest) XXX_Merge

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

func (*QueryPrivateOrdersRequest) XXX_Size

func (m *QueryPrivateOrdersRequest) XXX_Size() int

func (*QueryPrivateOrdersRequest) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries all parameters of the ibc-transfer module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// EscrowAddress returns the escrow address for a particular port and channel id.
	EscrowAddress(context.Context, *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error)
	GetAllOrders(context.Context, *QueryOrdersRequest) (*QueryOrdersResponse, error)
	GetAllOrdersByType(context.Context, *QueryOrdersByRequest) (*QueryOrdersResponse, error)
	GetSubmittedOrders(context.Context, *QuerySubmittedOrdersRequest) (*QueryOrdersResponse, error)
	GetTookOrders(context.Context, *QueryTookOrdersRequest) (*QueryOrdersResponse, error)
	GetPrivateOrders(context.Context, *QueryPrivateOrdersRequest) (*QueryOrdersResponse, error)
}

QueryServer is the server API for Query service. All implementations should embed UnimplementedQueryServer for forward compatibility

type QuerySubmittedOrdersRequest

type QuerySubmittedOrdersRequest struct {
	MakerAddress string             `protobuf:"bytes,1,opt,name=makerAddress,proto3" json:"makerAddress,omitempty"`
	Pagination   *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

submitted orders

func (*QuerySubmittedOrdersRequest) Descriptor

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

func (*QuerySubmittedOrdersRequest) GetMakerAddress

func (m *QuerySubmittedOrdersRequest) GetMakerAddress() string

func (*QuerySubmittedOrdersRequest) GetPagination

func (m *QuerySubmittedOrdersRequest) GetPagination() *query.PageRequest

func (*QuerySubmittedOrdersRequest) Marshal

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

func (*QuerySubmittedOrdersRequest) MarshalTo

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

func (*QuerySubmittedOrdersRequest) MarshalToSizedBuffer

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

func (*QuerySubmittedOrdersRequest) ProtoMessage

func (*QuerySubmittedOrdersRequest) ProtoMessage()

func (*QuerySubmittedOrdersRequest) Reset

func (m *QuerySubmittedOrdersRequest) Reset()

func (*QuerySubmittedOrdersRequest) Size

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

func (*QuerySubmittedOrdersRequest) String

func (m *QuerySubmittedOrdersRequest) String() string

func (*QuerySubmittedOrdersRequest) Unmarshal

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

func (*QuerySubmittedOrdersRequest) XXX_DiscardUnknown

func (m *QuerySubmittedOrdersRequest) XXX_DiscardUnknown()

func (*QuerySubmittedOrdersRequest) XXX_Marshal

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

func (*QuerySubmittedOrdersRequest) XXX_Merge

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

func (*QuerySubmittedOrdersRequest) XXX_Size

func (m *QuerySubmittedOrdersRequest) XXX_Size() int

func (*QuerySubmittedOrdersRequest) XXX_Unmarshal

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

type QueryTookOrdersRequest

type QueryTookOrdersRequest struct {
	TakerAddress string             `protobuf:"bytes,1,opt,name=takerAddress,proto3" json:"takerAddress,omitempty"`
	Pagination   *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryTookOrdersRequest) Descriptor

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

func (*QueryTookOrdersRequest) GetPagination

func (m *QueryTookOrdersRequest) GetPagination() *query.PageRequest

func (*QueryTookOrdersRequest) GetTakerAddress

func (m *QueryTookOrdersRequest) GetTakerAddress() string

func (*QueryTookOrdersRequest) Marshal

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

func (*QueryTookOrdersRequest) MarshalTo

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

func (*QueryTookOrdersRequest) MarshalToSizedBuffer

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

func (*QueryTookOrdersRequest) ProtoMessage

func (*QueryTookOrdersRequest) ProtoMessage()

func (*QueryTookOrdersRequest) Reset

func (m *QueryTookOrdersRequest) Reset()

func (*QueryTookOrdersRequest) Size

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

func (*QueryTookOrdersRequest) String

func (m *QueryTookOrdersRequest) String() string

func (*QueryTookOrdersRequest) Unmarshal

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

func (*QueryTookOrdersRequest) XXX_DiscardUnknown

func (m *QueryTookOrdersRequest) XXX_DiscardUnknown()

func (*QueryTookOrdersRequest) XXX_Marshal

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

func (*QueryTookOrdersRequest) XXX_Merge

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

func (*QueryTookOrdersRequest) XXX_Size

func (m *QueryTookOrdersRequest) XXX_Size() int

func (*QueryTookOrdersRequest) XXX_Unmarshal

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

type Side

type Side int32

Type defines a classification of swap messages

const (
	// Default zero value enumeration
	NATIVE Side = 0
	REMOTE Side = 1
)

func (Side) EnumDescriptor

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

func (Side) String

func (x Side) String() string

type Status

type Status int32

OTC

const (
	Status_INITIAL  Status = 0
	Status_SYNC     Status = 1
	Status_CANCEL   Status = 2
	Status_COMPLETE Status = 3
)

func (Status) EnumDescriptor

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

func (Status) String

func (x Status) String() string

type SwapMaker

type SwapMaker struct {
	// the port on which the packet will be sent
	SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty" yaml:"source_port"`
	// the channel by which the packet will be sent
	SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty" yaml:"source_channel"`
	// the tokens to be sell
	SellToken types.Coin `protobuf:"bytes,3,opt,name=sell_token,json=sellToken,proto3" json:"sell_token"`
	BuyToken  types.Coin `protobuf:"bytes,4,opt,name=buy_token,json=buyToken,proto3" json:"buy_token"`
	// the sender address
	MakerAddress string `protobuf:"bytes,5,opt,name=maker_address,json=makerAddress,proto3" json:"maker_address,omitempty" yaml:"maker_address"`
	// the sender's address on the destination chain
	MakerReceivingAddress string `` /* 157-byte string literal not displayed */
	// if desired_taker is specified,
	// only the desired_taker is allowed to take this order
	// this is address on destination chain
	DesiredTaker    string `protobuf:"bytes,7,opt,name=desired_taker,json=desiredTaker,proto3" json:"desired_taker,omitempty"`
	CreateTimestamp int64  `protobuf:"varint,8,opt,name=create_timestamp,json=createTimestamp,proto3" json:"create_timestamp,omitempty"`
}

func NewMakerFromMsg

func NewMakerFromMsg(msg *MakeSwapMsg) *SwapMaker

func (*SwapMaker) Descriptor

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

func (*SwapMaker) GetBuyToken

func (m *SwapMaker) GetBuyToken() types.Coin

func (*SwapMaker) GetCreateTimestamp

func (m *SwapMaker) GetCreateTimestamp() int64

func (*SwapMaker) GetDesiredTaker

func (m *SwapMaker) GetDesiredTaker() string

func (*SwapMaker) GetMakerAddress

func (m *SwapMaker) GetMakerAddress() string

func (*SwapMaker) GetMakerReceivingAddress

func (m *SwapMaker) GetMakerReceivingAddress() string

func (*SwapMaker) GetSellToken

func (m *SwapMaker) GetSellToken() types.Coin

func (*SwapMaker) GetSourceChannel

func (m *SwapMaker) GetSourceChannel() string

func (*SwapMaker) GetSourcePort

func (m *SwapMaker) GetSourcePort() string

func (*SwapMaker) Marshal

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

func (*SwapMaker) MarshalTo

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

func (*SwapMaker) MarshalToSizedBuffer

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

func (*SwapMaker) ProtoMessage

func (*SwapMaker) ProtoMessage()

func (*SwapMaker) Reset

func (m *SwapMaker) Reset()

func (*SwapMaker) Size

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

func (*SwapMaker) String

func (m *SwapMaker) String() string

func (*SwapMaker) Unmarshal

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

func (*SwapMaker) XXX_DiscardUnknown

func (m *SwapMaker) XXX_DiscardUnknown()

func (*SwapMaker) XXX_Marshal

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

func (*SwapMaker) XXX_Merge

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

func (*SwapMaker) XXX_Size

func (m *SwapMaker) XXX_Size() int

func (*SwapMaker) XXX_Unmarshal

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

type SwapMessageType

type SwapMessageType int32

Type defines a classification of swap messages

const (
	// Default zero value enumeration
	UNSPECIFIED SwapMessageType = 0
	MAKE_SWAP   SwapMessageType = 1
	TAKE_SWAP   SwapMessageType = 2
	CANCEL_SWAP SwapMessageType = 3
)

func (SwapMessageType) EnumDescriptor

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

func (SwapMessageType) String

func (x SwapMessageType) String() string

type SwapTaker

type SwapTaker struct {
	OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	// the tokens to be sell
	SellToken types.Coin `protobuf:"bytes,2,opt,name=sell_token,json=sellToken,proto3" json:"sell_token"`
	// the sender address
	TakerAddress string `protobuf:"bytes,3,opt,name=taker_address,json=takerAddress,proto3" json:"taker_address,omitempty" yaml:"taker_address"`
	// the sender's address on the destination chain
	TakerReceivingAddress string `` /* 157-byte string literal not displayed */
	CreateTimestamp       int64  `protobuf:"varint,5,opt,name=create_timestamp,json=createTimestamp,proto3" json:"create_timestamp,omitempty"`
}

func NewTakerFromMsg

func NewTakerFromMsg(msg *TakeSwapMsg) *SwapTaker

func (*SwapTaker) Descriptor

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

func (*SwapTaker) GetCreateTimestamp

func (m *SwapTaker) GetCreateTimestamp() int64

func (*SwapTaker) GetOrderId

func (m *SwapTaker) GetOrderId() string

func (*SwapTaker) GetSellToken

func (m *SwapTaker) GetSellToken() types.Coin

func (*SwapTaker) GetTakerAddress

func (m *SwapTaker) GetTakerAddress() string

func (*SwapTaker) GetTakerReceivingAddress

func (m *SwapTaker) GetTakerReceivingAddress() string

func (*SwapTaker) Marshal

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

func (*SwapTaker) MarshalTo

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

func (*SwapTaker) MarshalToSizedBuffer

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

func (*SwapTaker) ProtoMessage

func (*SwapTaker) ProtoMessage()

func (*SwapTaker) Reset

func (m *SwapTaker) Reset()

func (*SwapTaker) Size

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

func (*SwapTaker) String

func (m *SwapTaker) String() string

func (*SwapTaker) Unmarshal

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

func (*SwapTaker) XXX_DiscardUnknown

func (m *SwapTaker) XXX_DiscardUnknown()

func (*SwapTaker) XXX_Marshal

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

func (*SwapTaker) XXX_Merge

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

func (*SwapTaker) XXX_Size

func (m *SwapTaker) XXX_Size() int

func (*SwapTaker) XXX_Unmarshal

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

type TakeSwapMsg

type TakeSwapMsg struct {
	OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	// the tokens to be sell
	SellToken types.Coin `protobuf:"bytes,4,opt,name=sell_token,json=sellToken,proto3" json:"sell_token"`
	// the sender address
	TakerAddress string `protobuf:"bytes,5,opt,name=taker_address,json=takerAddress,proto3" json:"taker_address,omitempty" yaml:"taker_address"`
	// the sender's address on the destination chain
	TakerReceivingAddress string `` /* 157-byte string literal not displayed */
	// Timeout height relative to the current block height.
	// The timeout is disabled when set to 0.
	TimeoutHeight types1.Height `protobuf:"bytes,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"`
	// Timeout timestamp in absolute nanoseconds since unix epoch.
	// The timeout is disabled when set to 0.
	TimeoutTimestamp uint64 `` /* 135-byte string literal not displayed */
	CreateTimestamp  int64  `protobuf:"varint,9,opt,name=create_timestamp,json=createTimestamp,proto3" json:"create_timestamp,omitempty"`
}

func NewMsgTakeSwap

func NewMsgTakeSwap(
	orderId string,
	sellToken sdk.Coin,
	senderAddress, senderReceivingAddress string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
	createdTimestamp int64,
) *TakeSwapMsg

NewMsgTakeSwap creates a new MsgTakeSwapRequest instance

func (*TakeSwapMsg) Descriptor

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

func (*TakeSwapMsg) GetSignBytes

func (msg *TakeSwapMsg) GetSignBytes() []byte

GetSignBytes implements sdk.Msg.

func (*TakeSwapMsg) GetSigners

func (msg *TakeSwapMsg) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*TakeSwapMsg) Marshal

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

func (*TakeSwapMsg) MarshalTo

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

func (*TakeSwapMsg) MarshalToSizedBuffer

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

func (*TakeSwapMsg) ProtoMessage

func (*TakeSwapMsg) ProtoMessage()

func (*TakeSwapMsg) Reset

func (m *TakeSwapMsg) Reset()

func (*TakeSwapMsg) Route

func (*TakeSwapMsg) Route() string

Route implements sdk.Msg

func (*TakeSwapMsg) Size

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

func (*TakeSwapMsg) String

func (m *TakeSwapMsg) String() string

func (*TakeSwapMsg) Type

func (*TakeSwapMsg) Type() string

Type implements sdk.Msg

func (*TakeSwapMsg) Unmarshal

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

func (*TakeSwapMsg) ValidateBasic

func (msg *TakeSwapMsg) ValidateBasic() error

ValidateBasic performs a basic check of the MsgTransfer fields. NOTE: timeout height or timestamp values can be 0 to disable the timeout. NOTE: The recipient addresses format is not validated as the format defined by the chain is not known to IBC.

func (*TakeSwapMsg) XXX_DiscardUnknown

func (m *TakeSwapMsg) XXX_DiscardUnknown()

func (*TakeSwapMsg) XXX_Marshal

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

func (*TakeSwapMsg) XXX_Merge

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

func (*TakeSwapMsg) XXX_Size

func (m *TakeSwapMsg) XXX_Size() int

func (*TakeSwapMsg) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer should be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) CancelSwap

func (UnimplementedMsgServer) MakeSwap

func (UnimplementedMsgServer) TakeSwap

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer should be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) GetAllOrders

func (UnimplementedQueryServer) GetAllOrdersByType

func (UnimplementedQueryServer) GetPrivateOrders

func (UnimplementedQueryServer) GetSubmittedOrders

func (UnimplementedQueryServer) GetTookOrders

func (UnimplementedQueryServer) Params

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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