Documentation ¶
Index ¶
- Constants
- Variables
- func InitCosmosKeyring(cosmosKeyringDir string, cosmosKeyringAppName string, ...) (cosmtypes.AccAddress, keyring.Keyring, error)
- func KeyringForPrivKey(name string, privKey cryptotypes.PrivKey) (keyring.Keyring, error)
- func NewClientContext(chainId, fromSpec string, kb keyring.Keyring) (client.Context, error)
- func NewTxConfig(signModes []signingtypes.SignMode) client.TxConfig
- func NewTxFactory(clientCtx client.Context) tx.Factory
- type ChainClient
- type DerivativeOrderData
- type EncodingConfig
- type ExchangeAuthz
- type MarketsAssistant
- func NewMarketsAssistant(networkName string) (MarketsAssistant, error)deprecated
- func NewMarketsAssistantInitializedFromChain(ctx context.Context, exchangeClient exchange.ExchangeClient) (MarketsAssistant, error)
- func NewMarketsAssistantWithAllTokens(ctx context.Context, exchangeClient exchange.ExchangeClient, ...) (MarketsAssistant, error)
- type MockChainClient
- func (c *MockChainClient) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxResponse, error)
- func (c *MockChainClient) AsyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastTxResponse, error)
- func (c *MockChainClient) BuildExchangeAuthz(granter string, grantee string, authzType ExchangeAuthz, subaccountId string, ...) *authztypes.MsgGrant
- func (c *MockChainClient) BuildExchangeBatchUpdateOrdersAuthz(granter string, grantee string, subaccountId string, spotMarkets []string, ...) *authztypes.MsgGrant
- func (c *MockChainClient) BuildGenericAuthz(granter string, grantee string, msgtype string, expireIn time.Time) *authztypes.MsgGrant
- func (c *MockChainClient) BuildSignedTx(clientCtx client.Context, accNum, accSeq, initialGas uint64, msg ...sdk.Msg) ([]byte, error)
- func (c *MockChainClient) CanSignTransactions() bool
- func (c *MockChainClient) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error)
- func (c *MockChainClient) ClientContext() client.Context
- func (c *MockChainClient) Close()
- func (c *MockChainClient) ComputeOrderHashes(spotOrders []exchangetypes.SpotOrder, ...) (OrderHashes, error)
- func (c *MockChainClient) CreateDerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData, ...) *exchangetypes.DerivativeOrder
- func (c *MockChainClient) CreateSpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData, ...) *exchangetypes.SpotOrder
- func (c *MockChainClient) DefaultSubaccount(acc sdk.AccAddress) eth.Hash
- func (c *MockChainClient) DerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData) *exchangetypes.DerivativeOrder
- func (c *MockChainClient) FetchAllContractsState(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryAllContractStateResponse, error)
- func (c *MockChainClient) FetchCode(ctx context.Context, codeId uint64) (*wasmtypes.QueryCodeResponse, error)
- func (c *MockChainClient) FetchCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryCodesResponse, error)
- func (c *MockChainClient) FetchContractHistory(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryContractHistoryResponse, error)
- func (c *MockChainClient) FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error)
- func (c *MockChainClient) FetchContractsByCode(ctx context.Context, codeId uint64, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCodeResponse, error)
- func (c *MockChainClient) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error)
- func (c *MockChainClient) FetchDenomAuthorityMetadata(ctx context.Context, creator string, subDenom string) (*tokenfactorytypes.QueryDenomAuthorityMetadataResponse, error)
- func (c *MockChainClient) FetchDenomsFromCreator(ctx context.Context, creator string) (*tokenfactorytypes.QueryDenomsFromCreatorResponse, error)
- func (c *MockChainClient) FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error)
- func (c *MockChainClient) FetchTokenfactoryModuleState(ctx context.Context) (*tokenfactorytypes.QueryModuleStateResponse, error)
- func (c *MockChainClient) FromAddress() sdk.AccAddress
- func (c *MockChainClient) GetAccNonce() (accNum uint64, accSeq uint64)
- func (c *MockChainClient) GetAccount(ctx context.Context, address string) (*authtypes.QueryAccountResponse, error)
- func (c *MockChainClient) GetAuthzGrants(ctx context.Context, req authztypes.QueryGrantsRequest) (*authztypes.QueryGrantsResponse, error)
- func (c *MockChainClient) GetBankBalance(ctx context.Context, address string, denom string) (*banktypes.QueryBalanceResponse, error)
- func (c *MockChainClient) GetBankBalances(ctx context.Context, address string) (*banktypes.QueryAllBalancesResponse, error)
- func (c *MockChainClient) GetBankSendEnabled(ctx context.Context, denoms []string, pagination *query.PageRequest) (*banktypes.QuerySendEnabledResponse, error)
- func (c *MockChainClient) GetBankSpendableBalances(ctx context.Context, address string, pagination *query.PageRequest) (*banktypes.QuerySpendableBalancesResponse, error)
- func (c *MockChainClient) GetBankSpendableBalancesByDenom(ctx context.Context, address string, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error)
- func (c *MockChainClient) GetBankSupplyOf(ctx context.Context, denom string) (*banktypes.QuerySupplyOfResponse, error)
- func (c *MockChainClient) GetBankTotalSupply(ctx context.Context, pagination *query.PageRequest) (*banktypes.QueryTotalSupplyResponse, error)
- func (c *MockChainClient) GetDenomMetadata(ctx context.Context, denom string) (*banktypes.QueryDenomMetadataResponse, error)
- func (c *MockChainClient) GetDenomOwners(ctx context.Context, denom string, pagination *query.PageRequest) (*banktypes.QueryDenomOwnersResponse, error)
- func (c *MockChainClient) GetDenomsMetadata(ctx context.Context, pagination *query.PageRequest) (*banktypes.QueryDenomsMetadataResponse, error)
- func (c *MockChainClient) GetFeeDiscountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error)
- func (c *MockChainClient) GetGasFee() (string, error)
- func (c *MockChainClient) GetSubAccountNonce(ctx context.Context, subaccountId eth.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error)
- func (c *MockChainClient) GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error)
- func (c *MockChainClient) OrderCancel(defaultSubaccountID eth.Hash, d *OrderCancelData) *exchangetypes.OrderData
- func (c *MockChainClient) QueryClient() *grpc.ClientConn
- func (c *MockChainClient) QueueBroadcastMsg(msgs ...sdk.Msg) error
- func (c *MockChainClient) RawContractState(ctx context.Context, contractAddress string, queryData []byte) (*wasmtypes.QueryRawContractStateResponse, error)
- func (c *MockChainClient) SimulateMsg(clientCtx client.Context, msgs ...sdk.Msg) (*txtypes.SimulateResponse, error)
- func (c *MockChainClient) SmartContractState(ctx context.Context, contractAddress string, queryData []byte) (*wasmtypes.QuerySmartContractStateResponse, error)
- func (c *MockChainClient) SpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData) *exchangetypes.SpotOrder
- func (c *MockChainClient) StreamEventOrderFail(sender string, failEventCh chan map[string]uint)
- func (c *MockChainClient) StreamEventOrderFailWithWebsocket(sender string, websocket *rpchttp.HTTP, failEventCh chan map[string]uint)
- func (c *MockChainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIds []string, ...)
- func (c *MockChainClient) StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIds []string, websocket *rpchttp.HTTP, ...)
- func (c *MockChainClient) Subaccount(account sdk.AccAddress, index int) eth.Hash
- func (c *MockChainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxResponse, error)
- func (c *MockChainClient) SyncBroadcastSignedTx(tyBytes []byte) (*txtypes.BroadcastTxResponse, error)
- func (c *MockChainClient) SynchronizeSubaccountNonce(subaccountId eth.Hash) error
- func (c *MockChainClient) UpdateSubaccountNonceFromChain() error
- type OrderCancelData
- type OrderHashes
- type OrderbookType
- type SpotOrderData
Constants ¶
View Source
const ( SpotOrderbook = "injective.exchange.v1beta1.EventOrderbookUpdate.spot_orderbooks" DerivativeOrderbook = "injective.exchange.v1beta1.EventOrderbookUpdate.derivative_orderbooks" )
Variables ¶
View Source
var ( ErrTimedOut = errors.New("tx timed out") ErrQueueClosed = errors.New("queue is closed") ErrEnqueueTimeout = errors.New("enqueue timeout") ErrReadOnly = errors.New("client is in read-only mode") )
View Source
var ( CreateSpotLimitOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateSpotLimitOrderAuthz{})) CreateSpotMarketOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateSpotMarketOrderAuthz{})) BatchCreateSpotLimitOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCreateSpotLimitOrdersAuthz{})) CancelSpotOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CancelSpotOrderAuthz{})) BatchCancelSpotOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCancelSpotOrdersAuthz{})) CreateDerivativeLimitOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateDerivativeLimitOrderAuthz{})) CreateDerivativeMarketOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CreateDerivativeMarketOrderAuthz{})) BatchCreateDerivativeLimitOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCreateDerivativeLimitOrdersAuthz{})) CancelDerivativeOrderAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.CancelDerivativeOrderAuthz{})) BatchCancelDerivativeOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchCancelDerivativeOrdersAuthz{})) BatchUpdateOrdersAuthz = ExchangeAuthz("/" + proto.MessageName(&exchangetypes.BatchUpdateOrdersAuthz{})) )
View Source
var AuctionSubaccountID = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")
Functions ¶
func InitCosmosKeyring ¶
func KeyringForPrivKey ¶
KeyringForPrivKey creates a temporary in-mem keyring for a PrivKey. Allows to init Context when the key has been provided in plaintext and parsed.
func NewClientContext ¶
NewClientContext creates a new Cosmos Client context, where chainID corresponds to Cosmos chain ID, fromSpec is either name of the key, or bech32-address of the Cosmos account. Keyring is required to contain the specified key.
func NewTxConfig ¶
func NewTxConfig(signModes []signingtypes.SignMode) client.TxConfig
NewTxConfig initializes new Cosmos TxConfig with certain signModes enabled.
Types ¶
type ChainClient ¶
type ChainClient interface { CanSignTransactions() bool FromAddress() sdk.AccAddress QueryClient() *grpc.ClientConn ClientContext() client.Context // return account number and sequence without increasing sequence GetAccNonce() (accNum uint64, accSeq uint64) SimulateMsg(clientCtx client.Context, msgs ...sdk.Msg) (*txtypes.SimulateResponse, error) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxResponse, error) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxResponse, error) // Build signed tx with given accNum and accSeq, useful for offline siging // If simulate is set to false, initialGas will be used BuildSignedTx(clientCtx client.Context, accNum, accSeq, initialGas uint64, msg ...sdk.Msg) ([]byte, error) SyncBroadcastSignedTx(tyBytes []byte) (*txtypes.BroadcastTxResponse, error) AsyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastTxResponse, error) QueueBroadcastMsg(msgs ...sdk.Msg) error // Bank Module GetBankBalances(ctx context.Context, address string) (*banktypes.QueryAllBalancesResponse, error) GetBankBalance(ctx context.Context, address string, denom string) (*banktypes.QueryBalanceResponse, error) GetBankSpendableBalances(ctx context.Context, address string, pagination *query.PageRequest) (*banktypes.QuerySpendableBalancesResponse, error) GetBankSpendableBalancesByDenom(ctx context.Context, address string, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error) GetBankTotalSupply(ctx context.Context, pagination *query.PageRequest) (*banktypes.QueryTotalSupplyResponse, error) GetBankSupplyOf(ctx context.Context, denom string) (*banktypes.QuerySupplyOfResponse, error) GetDenomMetadata(ctx context.Context, denom string) (*banktypes.QueryDenomMetadataResponse, error) GetDenomsMetadata(ctx context.Context, pagination *query.PageRequest) (*banktypes.QueryDenomsMetadataResponse, error) GetDenomOwners(ctx context.Context, denom string, pagination *query.PageRequest) (*banktypes.QueryDenomOwnersResponse, error) GetBankSendEnabled(ctx context.Context, denoms []string, pagination *query.PageRequest) (*banktypes.QuerySendEnabledResponse, error) GetAuthzGrants(ctx context.Context, req authztypes.QueryGrantsRequest) (*authztypes.QueryGrantsResponse, error) GetAccount(ctx context.Context, address string) (*authtypes.QueryAccountResponse, error) BuildGenericAuthz(granter string, grantee string, msgtype string, expireIn time.Time) *authztypes.MsgGrant BuildExchangeAuthz(granter string, grantee string, authzType ExchangeAuthz, subaccountId string, markets []string, expireIn time.Time) *authztypes.MsgGrant BuildExchangeBatchUpdateOrdersAuthz( granter string, grantee string, subaccountId string, spotMarkets []string, derivativeMarkets []string, expireIn time.Time, ) *authztypes.MsgGrant DefaultSubaccount(acc cosmtypes.AccAddress) eth.Hash Subaccount(account cosmtypes.AccAddress, index int) eth.Hash GetSubAccountNonce(ctx context.Context, subaccountId eth.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error) GetFeeDiscountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error) UpdateSubaccountNonceFromChain() error SynchronizeSubaccountNonce(subaccountId eth.Hash) error ComputeOrderHashes(spotOrders []exchangetypes.SpotOrder, derivativeOrders []exchangetypes.DerivativeOrder, subaccountId eth.Hash) (OrderHashes, error) SpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData) *exchangetypes.SpotOrder CreateSpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData, marketsAssistant MarketsAssistant) *exchangetypes.SpotOrder DerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData) *exchangetypes.DerivativeOrder CreateDerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder OrderCancel(defaultSubaccountID eth.Hash, d *OrderCancelData) *exchangetypes.OrderData GetGasFee() (string, error) StreamEventOrderFail(sender string, failEventCh chan map[string]uint) StreamEventOrderFailWithWebsocket(sender string, websocket *rpchttp.HTTP, failEventCh chan map[string]uint) StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIds []string, orderbookCh chan exchangetypes.Orderbook) StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIds []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error) // get tx from chain node GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error) // wasm module FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error) FetchContractHistory(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryContractHistoryResponse, error) FetchContractsByCode(ctx context.Context, codeId uint64, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCodeResponse, error) FetchAllContractsState(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryAllContractStateResponse, error) RawContractState( ctx context.Context, contractAddress string, queryData []byte, ) (*wasmtypes.QueryRawContractStateResponse, error) SmartContractState( ctx context.Context, contractAddress string, queryData []byte, ) (*wasmtypes.QuerySmartContractStateResponse, error) FetchCode(ctx context.Context, codeId uint64) (*wasmtypes.QueryCodeResponse, error) FetchCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryCodesResponse, error) FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error) // tokenfactory module FetchDenomAuthorityMetadata(ctx context.Context, creator string, subDenom string) (*tokenfactorytypes.QueryDenomAuthorityMetadataResponse, error) FetchDenomsFromCreator(ctx context.Context, creator string) (*tokenfactorytypes.QueryDenomsFromCreatorResponse, error) FetchTokenfactoryModuleState(ctx context.Context) (*tokenfactorytypes.QueryModuleStateResponse, error) Close() }
func NewChainClient ¶
func NewChainClient( ctx client.Context, network common.Network, options ...common.ClientOption, ) (ChainClient, error)
type DerivativeOrderData ¶ added in v1.34.0
type EncodingConfig ¶
type ExchangeAuthz ¶ added in v1.38.1
type ExchangeAuthz string
type MarketsAssistant ¶ added in v1.49.0
type MarketsAssistant struct {
// contains filtered or unexported fields
}
func NewMarketsAssistant
deprecated
added in
v1.49.0
func NewMarketsAssistant(networkName string) (MarketsAssistant, error)
Deprecated: use NewMarketsAssistantInitializedFromChain instead
func NewMarketsAssistantInitializedFromChain ¶ added in v1.49.0
func NewMarketsAssistantInitializedFromChain(ctx context.Context, exchangeClient exchange.ExchangeClient) (MarketsAssistant, error)
func NewMarketsAssistantWithAllTokens ¶ added in v1.49.0
func NewMarketsAssistantWithAllTokens(ctx context.Context, exchangeClient exchange.ExchangeClient, chainClient ChainClient) (MarketsAssistant, error)
func (MarketsAssistant) AllDerivativeMarkets ¶ added in v1.49.0
func (assistant MarketsAssistant) AllDerivativeMarkets() map[string]core.DerivativeMarket
func (MarketsAssistant) AllSpotMarkets ¶ added in v1.49.0
func (assistant MarketsAssistant) AllSpotMarkets() map[string]core.SpotMarket
type MockChainClient ¶ added in v1.49.0
type MockChainClient struct {
DenomsMetadataResponses []*banktypes.QueryDenomsMetadataResponse
}
func (*MockChainClient) AsyncBroadcastMsg ¶ added in v1.49.0
func (c *MockChainClient) AsyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxResponse, error)
func (*MockChainClient) AsyncBroadcastSignedTx ¶ added in v1.49.0
func (c *MockChainClient) AsyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastTxResponse, error)
func (*MockChainClient) BuildExchangeAuthz ¶ added in v1.49.0
func (c *MockChainClient) BuildExchangeAuthz(granter string, grantee string, authzType ExchangeAuthz, subaccountId string, markets []string, expireIn time.Time) *authztypes.MsgGrant
func (*MockChainClient) BuildExchangeBatchUpdateOrdersAuthz ¶ added in v1.49.0
func (c *MockChainClient) BuildExchangeBatchUpdateOrdersAuthz( granter string, grantee string, subaccountId string, spotMarkets []string, derivativeMarkets []string, expireIn time.Time, ) *authztypes.MsgGrant
func (*MockChainClient) BuildGenericAuthz ¶ added in v1.49.0
func (c *MockChainClient) BuildGenericAuthz(granter string, grantee string, msgtype string, expireIn time.Time) *authztypes.MsgGrant
func (*MockChainClient) BuildSignedTx ¶ added in v1.49.0
func (*MockChainClient) CanSignTransactions ¶ added in v1.49.0
func (c *MockChainClient) CanSignTransactions() bool
func (*MockChainClient) ChainStream ¶ added in v1.49.0
func (c *MockChainClient) ChainStream(ctx context.Context, req chainstreamtypes.StreamRequest) (chainstreamtypes.Stream_StreamClient, error)
func (*MockChainClient) ClientContext ¶ added in v1.49.0
func (c *MockChainClient) ClientContext() client.Context
func (*MockChainClient) Close ¶ added in v1.49.0
func (c *MockChainClient) Close()
func (*MockChainClient) ComputeOrderHashes ¶ added in v1.49.0
func (c *MockChainClient) ComputeOrderHashes(spotOrders []exchangetypes.SpotOrder, derivativeOrders []exchangetypes.DerivativeOrder, subaccountId eth.Hash) (OrderHashes, error)
func (*MockChainClient) CreateDerivativeOrder ¶ added in v1.49.0
func (c *MockChainClient) CreateDerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData, marketAssistant MarketsAssistant) *exchangetypes.DerivativeOrder
func (*MockChainClient) CreateSpotOrder ¶ added in v1.49.0
func (c *MockChainClient) CreateSpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData, marketsAssistant MarketsAssistant) *exchangetypes.SpotOrder
func (*MockChainClient) DefaultSubaccount ¶ added in v1.49.0
func (c *MockChainClient) DefaultSubaccount(acc sdk.AccAddress) eth.Hash
func (*MockChainClient) DerivativeOrder ¶ added in v1.49.0
func (c *MockChainClient) DerivativeOrder(defaultSubaccountID eth.Hash, network common.Network, d *DerivativeOrderData) *exchangetypes.DerivativeOrder
func (*MockChainClient) FetchAllContractsState ¶ added in v1.49.0
func (c *MockChainClient) FetchAllContractsState(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryAllContractStateResponse, error)
func (*MockChainClient) FetchCode ¶ added in v1.49.0
func (c *MockChainClient) FetchCode(ctx context.Context, codeId uint64) (*wasmtypes.QueryCodeResponse, error)
func (*MockChainClient) FetchCodes ¶ added in v1.49.0
func (c *MockChainClient) FetchCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryCodesResponse, error)
func (*MockChainClient) FetchContractHistory ¶ added in v1.49.0
func (c *MockChainClient) FetchContractHistory(ctx context.Context, address string, pagination *query.PageRequest) (*wasmtypes.QueryContractHistoryResponse, error)
func (*MockChainClient) FetchContractInfo ¶ added in v1.49.0
func (c *MockChainClient) FetchContractInfo(ctx context.Context, address string) (*wasmtypes.QueryContractInfoResponse, error)
func (*MockChainClient) FetchContractsByCode ¶ added in v1.49.0
func (c *MockChainClient) FetchContractsByCode(ctx context.Context, codeId uint64, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCodeResponse, error)
func (*MockChainClient) FetchContractsByCreator ¶ added in v1.49.0
func (c *MockChainClient) FetchContractsByCreator(ctx context.Context, creator string, pagination *query.PageRequest) (*wasmtypes.QueryContractsByCreatorResponse, error)
func (*MockChainClient) FetchDenomAuthorityMetadata ¶ added in v1.49.0
func (c *MockChainClient) FetchDenomAuthorityMetadata(ctx context.Context, creator string, subDenom string) (*tokenfactorytypes.QueryDenomAuthorityMetadataResponse, error)
func (*MockChainClient) FetchDenomsFromCreator ¶ added in v1.49.0
func (c *MockChainClient) FetchDenomsFromCreator(ctx context.Context, creator string) (*tokenfactorytypes.QueryDenomsFromCreatorResponse, error)
func (*MockChainClient) FetchPinnedCodes ¶ added in v1.49.0
func (c *MockChainClient) FetchPinnedCodes(ctx context.Context, pagination *query.PageRequest) (*wasmtypes.QueryPinnedCodesResponse, error)
func (*MockChainClient) FetchTokenfactoryModuleState ¶ added in v1.49.0
func (c *MockChainClient) FetchTokenfactoryModuleState(ctx context.Context) (*tokenfactorytypes.QueryModuleStateResponse, error)
func (*MockChainClient) FromAddress ¶ added in v1.49.0
func (c *MockChainClient) FromAddress() sdk.AccAddress
func (*MockChainClient) GetAccNonce ¶ added in v1.49.0
func (c *MockChainClient) GetAccNonce() (accNum uint64, accSeq uint64)
func (*MockChainClient) GetAccount ¶ added in v1.49.0
func (c *MockChainClient) GetAccount(ctx context.Context, address string) (*authtypes.QueryAccountResponse, error)
func (*MockChainClient) GetAuthzGrants ¶ added in v1.49.0
func (c *MockChainClient) GetAuthzGrants(ctx context.Context, req authztypes.QueryGrantsRequest) (*authztypes.QueryGrantsResponse, error)
func (*MockChainClient) GetBankBalance ¶ added in v1.49.0
func (c *MockChainClient) GetBankBalance(ctx context.Context, address string, denom string) (*banktypes.QueryBalanceResponse, error)
func (*MockChainClient) GetBankBalances ¶ added in v1.49.0
func (c *MockChainClient) GetBankBalances(ctx context.Context, address string) (*banktypes.QueryAllBalancesResponse, error)
func (*MockChainClient) GetBankSendEnabled ¶ added in v1.49.0
func (c *MockChainClient) GetBankSendEnabled(ctx context.Context, denoms []string, pagination *query.PageRequest) (*banktypes.QuerySendEnabledResponse, error)
func (*MockChainClient) GetBankSpendableBalances ¶ added in v1.49.0
func (c *MockChainClient) GetBankSpendableBalances(ctx context.Context, address string, pagination *query.PageRequest) (*banktypes.QuerySpendableBalancesResponse, error)
func (*MockChainClient) GetBankSpendableBalancesByDenom ¶ added in v1.49.0
func (c *MockChainClient) GetBankSpendableBalancesByDenom(ctx context.Context, address string, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error)
func (*MockChainClient) GetBankSupplyOf ¶ added in v1.49.0
func (c *MockChainClient) GetBankSupplyOf(ctx context.Context, denom string) (*banktypes.QuerySupplyOfResponse, error)
func (*MockChainClient) GetBankTotalSupply ¶ added in v1.49.0
func (c *MockChainClient) GetBankTotalSupply(ctx context.Context, pagination *query.PageRequest) (*banktypes.QueryTotalSupplyResponse, error)
func (*MockChainClient) GetDenomMetadata ¶ added in v1.49.0
func (c *MockChainClient) GetDenomMetadata(ctx context.Context, denom string) (*banktypes.QueryDenomMetadataResponse, error)
func (*MockChainClient) GetDenomOwners ¶ added in v1.49.0
func (c *MockChainClient) GetDenomOwners(ctx context.Context, denom string, pagination *query.PageRequest) (*banktypes.QueryDenomOwnersResponse, error)
func (*MockChainClient) GetDenomsMetadata ¶ added in v1.49.0
func (c *MockChainClient) GetDenomsMetadata(ctx context.Context, pagination *query.PageRequest) (*banktypes.QueryDenomsMetadataResponse, error)
func (*MockChainClient) GetFeeDiscountInfo ¶ added in v1.49.0
func (c *MockChainClient) GetFeeDiscountInfo(ctx context.Context, account string) (*exchangetypes.QueryFeeDiscountAccountInfoResponse, error)
func (*MockChainClient) GetGasFee ¶ added in v1.49.0
func (c *MockChainClient) GetGasFee() (string, error)
func (*MockChainClient) GetSubAccountNonce ¶ added in v1.49.0
func (c *MockChainClient) GetSubAccountNonce(ctx context.Context, subaccountId eth.Hash) (*exchangetypes.QuerySubaccountTradeNonceResponse, error)
func (*MockChainClient) GetTx ¶ added in v1.49.0
func (c *MockChainClient) GetTx(ctx context.Context, txHash string) (*txtypes.GetTxResponse, error)
func (*MockChainClient) OrderCancel ¶ added in v1.49.0
func (c *MockChainClient) OrderCancel(defaultSubaccountID eth.Hash, d *OrderCancelData) *exchangetypes.OrderData
func (*MockChainClient) QueryClient ¶ added in v1.49.0
func (c *MockChainClient) QueryClient() *grpc.ClientConn
func (*MockChainClient) QueueBroadcastMsg ¶ added in v1.49.0
func (c *MockChainClient) QueueBroadcastMsg(msgs ...sdk.Msg) error
func (*MockChainClient) RawContractState ¶ added in v1.49.0
func (c *MockChainClient) RawContractState( ctx context.Context, contractAddress string, queryData []byte, ) (*wasmtypes.QueryRawContractStateResponse, error)
func (*MockChainClient) SimulateMsg ¶ added in v1.49.0
func (c *MockChainClient) SimulateMsg(clientCtx client.Context, msgs ...sdk.Msg) (*txtypes.SimulateResponse, error)
func (*MockChainClient) SmartContractState ¶ added in v1.49.0
func (c *MockChainClient) SmartContractState( ctx context.Context, contractAddress string, queryData []byte, ) (*wasmtypes.QuerySmartContractStateResponse, error)
func (*MockChainClient) SpotOrder ¶ added in v1.49.0
func (c *MockChainClient) SpotOrder(defaultSubaccountID eth.Hash, network common.Network, d *SpotOrderData) *exchangetypes.SpotOrder
func (*MockChainClient) StreamEventOrderFail ¶ added in v1.49.0
func (c *MockChainClient) StreamEventOrderFail(sender string, failEventCh chan map[string]uint)
func (*MockChainClient) StreamEventOrderFailWithWebsocket ¶ added in v1.49.0
func (*MockChainClient) StreamOrderbookUpdateEvents ¶ added in v1.49.0
func (c *MockChainClient) StreamOrderbookUpdateEvents(orderbookType OrderbookType, marketIds []string, orderbookCh chan exchangetypes.Orderbook)
func (*MockChainClient) StreamOrderbookUpdateEventsWithWebsocket ¶ added in v1.49.0
func (c *MockChainClient) StreamOrderbookUpdateEventsWithWebsocket(orderbookType OrderbookType, marketIds []string, websocket *rpchttp.HTTP, orderbookCh chan exchangetypes.Orderbook)
func (*MockChainClient) Subaccount ¶ added in v1.49.0
func (c *MockChainClient) Subaccount(account sdk.AccAddress, index int) eth.Hash
func (*MockChainClient) SyncBroadcastMsg ¶ added in v1.49.0
func (c *MockChainClient) SyncBroadcastMsg(msgs ...sdk.Msg) (*txtypes.BroadcastTxResponse, error)
func (*MockChainClient) SyncBroadcastSignedTx ¶ added in v1.49.0
func (c *MockChainClient) SyncBroadcastSignedTx(tyBytes []byte) (*txtypes.BroadcastTxResponse, error)
func (*MockChainClient) SynchronizeSubaccountNonce ¶ added in v1.49.0
func (c *MockChainClient) SynchronizeSubaccountNonce(subaccountId eth.Hash) error
func (*MockChainClient) UpdateSubaccountNonceFromChain ¶ added in v1.49.0
func (c *MockChainClient) UpdateSubaccountNonceFromChain() error
type OrderCancelData ¶ added in v1.34.0
type OrderHashes ¶ added in v1.38.0
type OrderbookType ¶ added in v1.43.1
type OrderbookType string
Click to show internal directories.
Click to hide internal directories.