types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "zkos"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_zkos"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const TypeMsgMintBurnTradingBtc = "mint_burn_trading_btc"
View Source
const TypeMsgTransferTx = "transfer_tx"

Variables

View Source
var (
	ErrTransferTxNotFound                = sdkerrors.Register(ModuleName, 1, "could not find transfer tx")
	ErrMintOrBurnNotFound                = sdkerrors.Register(ModuleName, 2, "could not find mint or burn message")
	ErrInvalidCommitment                 = sdkerrors.Register(ModuleName, 3, "invalid commitment")
	ErrClearingAccountNotFound           = sdkerrors.Register(ModuleName, 4, "could not find clearing account")
	ErrNotEnoughBalanceInPublic          = sdkerrors.Register(ModuleName, 5, "not enough balance in public pool")
	ErrReserveNotFound                   = sdkerrors.Register(ModuleName, 6, "could not find reserve")
	ErrNotEnoughBalanceInPrivate         = sdkerrors.Register(ModuleName, 7, "not enough balance in private pool")
	ErrNotEnoughUserBalanceInReserves    = sdkerrors.Register(ModuleName, 8, "not enough user balance in reserves")
	ErrNotEnoughUserBalanceInBank        = sdkerrors.Register(ModuleName, 9, "not enough user balance in bank")
	ErrInvalidTwilightAddress            = sdkerrors.Register(ModuleName, 10, "invalid twilight address")
	ErrInvalidInput                      = sdkerrors.Register(ModuleName, 11, "invalid input")
	ErrBankBalanceNotEqualReserveBalance = sdkerrors.Register(ModuleName, 12, "bank balance not equal to reserve balance")
)

x/zkos module sentinel errors

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
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 (
	// KeyTransferTx indexes the zkos transfer txs according to the tx id
	KeyTransferTx = forkstypes.HashString("KeyTransferTx")

	// KeyMintOrBurnTradingBtc indexes the mint or burn trading messages
	KeyMintOrBurnTradingBtc = forkstypes.HashString("KeyMintOrBurnTradingBtc")

	// KeyUsedQqAccount indexes the used QqAccounts
	KeyUsedQqAccount = forkstypes.HashString("KeyUsedQqAccount")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetMintOrBurnTradingBtcKey

func GetMintOrBurnTradingBtcKey(twilightAddress string, QqAccount string) []byte

GetMintOrBurnTradingBtcKey returns the following key format prefix twilightAddress [HashString("KeyMintOrBurnTradingBtc")][1]

func GetTransferTxKey

func GetTransferTxKey(txId string) []byte

GetTransferTxKey returns the following key format prefix txid [HashString("KeyTransferTx")][1]

func GetUsedQqAccountKey

func GetUsedQqAccountKey(QqAccount string) []byte

GetUsedQqAccountKey returns the following key format [HashString("KeyUsedQqAccount")][QqAccount]

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, 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 grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

type BankKeeper interface {
	//SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type EventTransferTx

type EventTransferTx struct {
	Message         string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	TxId            string `protobuf:"bytes,2,opt,name=txId,proto3" json:"txId,omitempty"`
	ZkOracleAddress string `protobuf:"bytes,3,opt,name=zkOracleAddress,proto3" json:"zkOracleAddress,omitempty"`
}

func (*EventTransferTx) Descriptor

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

func (*EventTransferTx) GetMessage

func (m *EventTransferTx) GetMessage() string

func (*EventTransferTx) GetTxId

func (m *EventTransferTx) GetTxId() string

func (*EventTransferTx) GetZkOracleAddress

func (m *EventTransferTx) GetZkOracleAddress() string

func (*EventTransferTx) Marshal

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

func (*EventTransferTx) MarshalTo

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

func (*EventTransferTx) MarshalToSizedBuffer

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

func (*EventTransferTx) ProtoMessage

func (*EventTransferTx) ProtoMessage()

func (*EventTransferTx) Reset

func (m *EventTransferTx) Reset()

func (*EventTransferTx) Size

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

func (*EventTransferTx) String

func (m *EventTransferTx) String() string

func (*EventTransferTx) Unmarshal

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

func (*EventTransferTx) XXX_DiscardUnknown

func (m *EventTransferTx) XXX_DiscardUnknown()

func (*EventTransferTx) XXX_Marshal

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

func (*EventTransferTx) XXX_Merge

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

func (*EventTransferTx) XXX_Size

func (m *EventTransferTx) XXX_Size() int

func (*EventTransferTx) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the zkos module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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 MsgClient

type MsgClient interface {
	TransferTx(ctx context.Context, in *MsgTransferTx, opts ...grpc.CallOption) (*MsgTransferTxResponse, error)
	MintBurnTradingBtc(ctx context.Context, in *MsgMintBurnTradingBtc, opts ...grpc.CallOption) (*MsgMintBurnTradingBtcResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgMintBurnTradingBtc

type MsgMintBurnTradingBtc struct {
	MintOrBurn      bool   `protobuf:"varint,1,opt,name=mintOrBurn,proto3" json:"mintOrBurn,omitempty"`
	BtcValue        uint64 `protobuf:"varint,2,opt,name=btcValue,proto3" json:"btcValue,omitempty"`
	QqAccount       string `protobuf:"bytes,3,opt,name=qqAccount,proto3" json:"qqAccount,omitempty"`
	EncryptScalar   string `protobuf:"bytes,4,opt,name=encryptScalar,proto3" json:"encryptScalar,omitempty"`
	TwilightAddress string `protobuf:"bytes,5,opt,name=twilightAddress,proto3" json:"twilightAddress,omitempty"`
}

func NewMsgMintBurnTradingBtc

func NewMsgMintBurnTradingBtc(mintOrBurn bool, btcValue uint64, qqAccount string, encryptScalar string, twilightAddress string) *MsgMintBurnTradingBtc

func (*MsgMintBurnTradingBtc) Descriptor

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

func (*MsgMintBurnTradingBtc) GetBtcValue

func (m *MsgMintBurnTradingBtc) GetBtcValue() uint64

func (*MsgMintBurnTradingBtc) GetEncryptScalar

func (m *MsgMintBurnTradingBtc) GetEncryptScalar() string

func (*MsgMintBurnTradingBtc) GetMintOrBurn

func (m *MsgMintBurnTradingBtc) GetMintOrBurn() bool

func (*MsgMintBurnTradingBtc) GetQqAccount

func (m *MsgMintBurnTradingBtc) GetQqAccount() string

func (*MsgMintBurnTradingBtc) GetSignBytes

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

func (*MsgMintBurnTradingBtc) GetSigners

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

func (*MsgMintBurnTradingBtc) GetTwilightAddress

func (m *MsgMintBurnTradingBtc) GetTwilightAddress() string

func (*MsgMintBurnTradingBtc) Marshal

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

func (*MsgMintBurnTradingBtc) MarshalTo

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

func (*MsgMintBurnTradingBtc) MarshalToSizedBuffer

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

func (*MsgMintBurnTradingBtc) ProtoMessage

func (*MsgMintBurnTradingBtc) ProtoMessage()

func (*MsgMintBurnTradingBtc) Reset

func (m *MsgMintBurnTradingBtc) Reset()

func (*MsgMintBurnTradingBtc) Route

func (msg *MsgMintBurnTradingBtc) Route() string

func (*MsgMintBurnTradingBtc) Size

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

func (*MsgMintBurnTradingBtc) String

func (m *MsgMintBurnTradingBtc) String() string

func (*MsgMintBurnTradingBtc) Type

func (msg *MsgMintBurnTradingBtc) Type() string

func (*MsgMintBurnTradingBtc) Unmarshal

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

func (*MsgMintBurnTradingBtc) ValidateBasic

func (msg *MsgMintBurnTradingBtc) ValidateBasic() error

TwilightAddress = Standard cosmos address EncryptScalar = 32 bytes hex string QuisQuisDepositAccount = Address (69 bytes) + encryption (64 bytes)). Hex string Address = Net(1 byte) + g (32 bytes) + h (32bytes) + checksum(4 bytes) encryption = c (32 bytes) + d (32 bytes)

func (*MsgMintBurnTradingBtc) XXX_DiscardUnknown

func (m *MsgMintBurnTradingBtc) XXX_DiscardUnknown()

func (*MsgMintBurnTradingBtc) XXX_Marshal

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

func (*MsgMintBurnTradingBtc) XXX_Merge

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

func (*MsgMintBurnTradingBtc) XXX_Size

func (m *MsgMintBurnTradingBtc) XXX_Size() int

func (*MsgMintBurnTradingBtc) XXX_Unmarshal

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

type MsgMintBurnTradingBtcResponse

type MsgMintBurnTradingBtcResponse struct {
}

func (*MsgMintBurnTradingBtcResponse) Descriptor

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

func (*MsgMintBurnTradingBtcResponse) Marshal

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

func (*MsgMintBurnTradingBtcResponse) MarshalTo

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

func (*MsgMintBurnTradingBtcResponse) MarshalToSizedBuffer

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

func (*MsgMintBurnTradingBtcResponse) ProtoMessage

func (*MsgMintBurnTradingBtcResponse) ProtoMessage()

func (*MsgMintBurnTradingBtcResponse) Reset

func (m *MsgMintBurnTradingBtcResponse) Reset()

func (*MsgMintBurnTradingBtcResponse) Size

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

func (*MsgMintBurnTradingBtcResponse) String

func (*MsgMintBurnTradingBtcResponse) Unmarshal

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

func (*MsgMintBurnTradingBtcResponse) XXX_DiscardUnknown

func (m *MsgMintBurnTradingBtcResponse) XXX_DiscardUnknown()

func (*MsgMintBurnTradingBtcResponse) XXX_Marshal

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

func (*MsgMintBurnTradingBtcResponse) XXX_Merge

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

func (*MsgMintBurnTradingBtcResponse) XXX_Size

func (m *MsgMintBurnTradingBtcResponse) XXX_Size() int

func (*MsgMintBurnTradingBtcResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	TransferTx(context.Context, *MsgTransferTx) (*MsgTransferTxResponse, error)
	MintBurnTradingBtc(context.Context, *MsgMintBurnTradingBtc) (*MsgMintBurnTradingBtcResponse, error)
}

MsgServer is the server API for Msg service.

type MsgTransferTx

type MsgTransferTx struct {
	TxId            string `protobuf:"bytes,1,opt,name=txId,proto3" json:"txId,omitempty"`
	TxByteCode      string `protobuf:"bytes,2,opt,name=txByteCode,proto3" json:"txByteCode,omitempty"`
	TxFee           uint64 `protobuf:"varint,3,opt,name=txFee,proto3" json:"txFee,omitempty"`
	ZkOracleAddress string `protobuf:"bytes,4,opt,name=zkOracleAddress,proto3" json:"zkOracleAddress,omitempty"`
}

func NewMsgTransferTx

func NewMsgTransferTx(txId string, txByteCode string, txFee uint64, zkOracleAddress string) *MsgTransferTx

func (*MsgTransferTx) Descriptor

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

func (*MsgTransferTx) GetSignBytes

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

func (*MsgTransferTx) GetSigners

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

func (*MsgTransferTx) GetTxByteCode

func (m *MsgTransferTx) GetTxByteCode() string

func (*MsgTransferTx) GetTxFee

func (m *MsgTransferTx) GetTxFee() uint64

func (*MsgTransferTx) GetTxId

func (m *MsgTransferTx) GetTxId() string

func (*MsgTransferTx) GetZkOracleAddress

func (m *MsgTransferTx) GetZkOracleAddress() string

func (*MsgTransferTx) Marshal

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

func (*MsgTransferTx) MarshalTo

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

func (*MsgTransferTx) MarshalToSizedBuffer

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

func (*MsgTransferTx) ProtoMessage

func (*MsgTransferTx) ProtoMessage()

func (*MsgTransferTx) Reset

func (m *MsgTransferTx) Reset()

func (*MsgTransferTx) Route

func (msg *MsgTransferTx) Route() string

func (*MsgTransferTx) Size

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

func (*MsgTransferTx) String

func (m *MsgTransferTx) String() string

func (*MsgTransferTx) Type

func (msg *MsgTransferTx) Type() string

func (*MsgTransferTx) Unmarshal

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

func (*MsgTransferTx) ValidateBasic

func (msg *MsgTransferTx) ValidateBasic() error

func (*MsgTransferTx) XXX_DiscardUnknown

func (m *MsgTransferTx) XXX_DiscardUnknown()

func (*MsgTransferTx) XXX_Marshal

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

func (*MsgTransferTx) XXX_Merge

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

func (*MsgTransferTx) XXX_Size

func (m *MsgTransferTx) XXX_Size() int

func (*MsgTransferTx) XXX_Unmarshal

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

type MsgTransferTxResponse

type MsgTransferTxResponse struct {
}

func (*MsgTransferTxResponse) Descriptor

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

func (*MsgTransferTxResponse) Marshal

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

func (*MsgTransferTxResponse) MarshalTo

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

func (*MsgTransferTxResponse) MarshalToSizedBuffer

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

func (*MsgTransferTxResponse) ProtoMessage

func (*MsgTransferTxResponse) ProtoMessage()

func (*MsgTransferTxResponse) Reset

func (m *MsgTransferTxResponse) Reset()

func (*MsgTransferTxResponse) Size

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

func (*MsgTransferTxResponse) String

func (m *MsgTransferTxResponse) String() string

func (*MsgTransferTxResponse) Unmarshal

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

func (*MsgTransferTxResponse) XXX_DiscardUnknown

func (m *MsgTransferTxResponse) XXX_DiscardUnknown()

func (*MsgTransferTxResponse) XXX_Marshal

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

func (*MsgTransferTxResponse) XXX_Merge

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

func (*MsgTransferTxResponse) XXX_Size

func (m *MsgTransferTxResponse) XXX_Size() int

func (*MsgTransferTxResponse) XXX_Unmarshal

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

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

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 get the 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 (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

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 QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a list of TransferTx items.
	TransferTx(ctx context.Context, in *QueryTransferTxRequest, opts ...grpc.CallOption) (*QueryTransferTxResponse, error)
	// Queries a list of MintOrBurnTradingBtc items.
	MintOrBurnTradingBtc(ctx context.Context, in *QueryMintOrBurnTradingBtcRequest, opts ...grpc.CallOption) (*QueryMintOrBurnTradingBtcResponse, 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 QueryMintOrBurnTradingBtcRequest

type QueryMintOrBurnTradingBtcRequest struct {
	TwilightAddress string `protobuf:"bytes,1,opt,name=twilightAddress,proto3" json:"twilightAddress,omitempty"`
}

func (*QueryMintOrBurnTradingBtcRequest) Descriptor

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

func (*QueryMintOrBurnTradingBtcRequest) GetTwilightAddress

func (m *QueryMintOrBurnTradingBtcRequest) GetTwilightAddress() string

func (*QueryMintOrBurnTradingBtcRequest) Marshal

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

func (*QueryMintOrBurnTradingBtcRequest) MarshalTo

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

func (*QueryMintOrBurnTradingBtcRequest) MarshalToSizedBuffer

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

func (*QueryMintOrBurnTradingBtcRequest) ProtoMessage

func (*QueryMintOrBurnTradingBtcRequest) ProtoMessage()

func (*QueryMintOrBurnTradingBtcRequest) Reset

func (*QueryMintOrBurnTradingBtcRequest) Size

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

func (*QueryMintOrBurnTradingBtcRequest) String

func (*QueryMintOrBurnTradingBtcRequest) Unmarshal

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

func (*QueryMintOrBurnTradingBtcRequest) XXX_DiscardUnknown

func (m *QueryMintOrBurnTradingBtcRequest) XXX_DiscardUnknown()

func (*QueryMintOrBurnTradingBtcRequest) XXX_Marshal

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

func (*QueryMintOrBurnTradingBtcRequest) XXX_Merge

func (*QueryMintOrBurnTradingBtcRequest) XXX_Size

func (m *QueryMintOrBurnTradingBtcRequest) XXX_Size() int

func (*QueryMintOrBurnTradingBtcRequest) XXX_Unmarshal

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

type QueryMintOrBurnTradingBtcResponse

type QueryMintOrBurnTradingBtcResponse struct {
	MintOrBurnTradingBtc []MsgMintBurnTradingBtc `protobuf:"bytes,1,rep,name=MintOrBurnTradingBtc,proto3" json:"MintOrBurnTradingBtc"`
}

func (*QueryMintOrBurnTradingBtcResponse) Descriptor

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

func (*QueryMintOrBurnTradingBtcResponse) GetMintOrBurnTradingBtc

func (m *QueryMintOrBurnTradingBtcResponse) GetMintOrBurnTradingBtc() []MsgMintBurnTradingBtc

func (*QueryMintOrBurnTradingBtcResponse) Marshal

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

func (*QueryMintOrBurnTradingBtcResponse) MarshalTo

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

func (*QueryMintOrBurnTradingBtcResponse) MarshalToSizedBuffer

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

func (*QueryMintOrBurnTradingBtcResponse) ProtoMessage

func (*QueryMintOrBurnTradingBtcResponse) ProtoMessage()

func (*QueryMintOrBurnTradingBtcResponse) Reset

func (*QueryMintOrBurnTradingBtcResponse) Size

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

func (*QueryMintOrBurnTradingBtcResponse) String

func (*QueryMintOrBurnTradingBtcResponse) Unmarshal

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

func (*QueryMintOrBurnTradingBtcResponse) XXX_DiscardUnknown

func (m *QueryMintOrBurnTradingBtcResponse) XXX_DiscardUnknown()

func (*QueryMintOrBurnTradingBtcResponse) XXX_Marshal

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

func (*QueryMintOrBurnTradingBtcResponse) XXX_Merge

func (*QueryMintOrBurnTradingBtcResponse) XXX_Size

func (m *QueryMintOrBurnTradingBtcResponse) XXX_Size() int

func (*QueryMintOrBurnTradingBtcResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is 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 holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is 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 QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a list of TransferTx items.
	TransferTx(context.Context, *QueryTransferTxRequest) (*QueryTransferTxResponse, error)
	// Queries a list of MintOrBurnTradingBtc items.
	MintOrBurnTradingBtc(context.Context, *QueryMintOrBurnTradingBtcRequest) (*QueryMintOrBurnTradingBtcResponse, error)
}

QueryServer is the server API for Query service.

type QueryTransferTxRequest

type QueryTransferTxRequest struct {
	TxId string `protobuf:"bytes,1,opt,name=txId,proto3" json:"txId,omitempty"`
}

func (*QueryTransferTxRequest) Descriptor

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

func (*QueryTransferTxRequest) GetTxId

func (m *QueryTransferTxRequest) GetTxId() string

func (*QueryTransferTxRequest) Marshal

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

func (*QueryTransferTxRequest) MarshalTo

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

func (*QueryTransferTxRequest) MarshalToSizedBuffer

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

func (*QueryTransferTxRequest) ProtoMessage

func (*QueryTransferTxRequest) ProtoMessage()

func (*QueryTransferTxRequest) Reset

func (m *QueryTransferTxRequest) Reset()

func (*QueryTransferTxRequest) Size

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

func (*QueryTransferTxRequest) String

func (m *QueryTransferTxRequest) String() string

func (*QueryTransferTxRequest) Unmarshal

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

func (*QueryTransferTxRequest) XXX_DiscardUnknown

func (m *QueryTransferTxRequest) XXX_DiscardUnknown()

func (*QueryTransferTxRequest) XXX_Marshal

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

func (*QueryTransferTxRequest) XXX_Merge

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

func (*QueryTransferTxRequest) XXX_Size

func (m *QueryTransferTxRequest) XXX_Size() int

func (*QueryTransferTxRequest) XXX_Unmarshal

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

type QueryTransferTxResponse

type QueryTransferTxResponse struct {
	TransferTx MsgTransferTx `protobuf:"bytes,1,opt,name=TransferTx,proto3" json:"TransferTx"`
}

func (*QueryTransferTxResponse) Descriptor

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

func (*QueryTransferTxResponse) GetTransferTx

func (m *QueryTransferTxResponse) GetTransferTx() MsgTransferTx

func (*QueryTransferTxResponse) Marshal

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

func (*QueryTransferTxResponse) MarshalTo

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

func (*QueryTransferTxResponse) MarshalToSizedBuffer

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

func (*QueryTransferTxResponse) ProtoMessage

func (*QueryTransferTxResponse) ProtoMessage()

func (*QueryTransferTxResponse) Reset

func (m *QueryTransferTxResponse) Reset()

func (*QueryTransferTxResponse) Size

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

func (*QueryTransferTxResponse) String

func (m *QueryTransferTxResponse) String() string

func (*QueryTransferTxResponse) Unmarshal

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

func (*QueryTransferTxResponse) XXX_DiscardUnknown

func (m *QueryTransferTxResponse) XXX_DiscardUnknown()

func (*QueryTransferTxResponse) XXX_Marshal

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

func (*QueryTransferTxResponse) XXX_Merge

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

func (*QueryTransferTxResponse) XXX_Size

func (m *QueryTransferTxResponse) XXX_Size() int

func (*QueryTransferTxResponse) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) MintBurnTradingBtc

func (*UnimplementedMsgServer) TransferTx

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) TransferTx

type VoltKeeper

type VoltKeeper interface {
	SetBtcReserve(ctx sdk.Context, reserve *volttypes.BtcReserve) error
	GetBtcReserve(ctx sdk.Context, reserveId uint64) (*volttypes.BtcReserve, error)
	GetClearingAccount(ctx sdk.Context, twilightAddress sdk.AccAddress) (*volttypes.ClearingAccount, bool)
	SetClearingAccount(ctx sdk.Context, twilightAddress sdk.AccAddress, account *volttypes.ClearingAccount) error
}

VoltKeeper defines the expected interface needed for mapping of deposit addresses in a reserve

Jump to

Keyboard shortcuts

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