mocks

package
v0.0.0-...-e33f8ab Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestKeyringPair cryptotypes.PrivKey

Functions

func MockChainParams

func MockChainParams(chainID int64, confirmation uint64) observertypes.ChainParams

func MockConnectorNonEth

func MockConnectorNonEth(t *testing.T, chainID int64) *zetaconnector.ZetaConnectorNonEth

func MockERC20Custody

func MockERC20Custody(t *testing.T, chainID int64) *erc20custody.ERC20Custody

func NewKeyring

func NewKeyring() ckeys.Keyring

Types

type BitcoinClient

type BitcoinClient struct {
	mock.Mock
}

BitcoinClient is an autogenerated mock type for the client type

func NewBitcoinClient

func NewBitcoinClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *BitcoinClient

NewBitcoinClient creates a new instance of BitcoinClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*BitcoinClient) CreateRawTransaction

func (_m *BitcoinClient) CreateRawTransaction(ctx context.Context, inputs []btcjson.TransactionInput, amounts map[btcutil.Address]btcutil.Amount, lockTime *int64) (*wire.MsgTx, error)

CreateRawTransaction provides a mock function with given fields: ctx, inputs, amounts, lockTime

func (*BitcoinClient) CreateWallet

func (_m *BitcoinClient) CreateWallet(ctx context.Context, name string, opts ...rpcclient.CreateWalletOpt) (*btcjson.CreateWalletResult, error)

CreateWallet provides a mock function with given fields: ctx, name, opts

func (*BitcoinClient) EstimateSmartFee

func (_m *BitcoinClient) EstimateSmartFee(ctx context.Context, confTarget int64, mode *btcjson.EstimateSmartFeeMode) (*btcjson.EstimateSmartFeeResult, error)

EstimateSmartFee provides a mock function with given fields: ctx, confTarget, mode

func (*BitcoinClient) GenerateToAddress

func (_m *BitcoinClient) GenerateToAddress(ctx context.Context, numBlocks int64, address btcutil.Address, maxTries *int64) ([]*chainhash.Hash, error)

GenerateToAddress provides a mock function with given fields: ctx, numBlocks, address, maxTries

func (*BitcoinClient) GetBalance

func (_m *BitcoinClient) GetBalance(ctx context.Context, account string) (btcutil.Amount, error)

GetBalance provides a mock function with given fields: ctx, account

func (*BitcoinClient) GetBlockCount

func (_m *BitcoinClient) GetBlockCount(ctx context.Context) (int64, error)

GetBlockCount provides a mock function with given fields: ctx

func (*BitcoinClient) GetBlockHash

func (_m *BitcoinClient) GetBlockHash(ctx context.Context, blockHeight int64) (*chainhash.Hash, error)

GetBlockHash provides a mock function with given fields: ctx, blockHeight

func (*BitcoinClient) GetBlockHeader

func (_m *BitcoinClient) GetBlockHeader(ctx context.Context, hash *chainhash.Hash) (*wire.BlockHeader, error)

GetBlockHeader provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetBlockHeightByStr

func (_m *BitcoinClient) GetBlockHeightByStr(ctx context.Context, blockHash string) (int64, error)

GetBlockHeightByStr provides a mock function with given fields: ctx, blockHash

func (*BitcoinClient) GetBlockVerbose

func (_m *BitcoinClient) GetBlockVerbose(ctx context.Context, hash *chainhash.Hash) (*btcjson.GetBlockVerboseTxResult, error)

GetBlockVerbose provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetBlockVerboseByStr

func (_m *BitcoinClient) GetBlockVerboseByStr(ctx context.Context, blockHash string) (*btcjson.GetBlockVerboseTxResult, error)

GetBlockVerboseByStr provides a mock function with given fields: ctx, blockHash

func (*BitcoinClient) GetNetworkInfo

func (_m *BitcoinClient) GetNetworkInfo(ctx context.Context) (*btcjson.GetNetworkInfoResult, error)

GetNetworkInfo provides a mock function with given fields: ctx

func (*BitcoinClient) GetNewAddress

func (_m *BitcoinClient) GetNewAddress(ctx context.Context, account string) (btcutil.Address, error)

GetNewAddress provides a mock function with given fields: ctx, account

func (*BitcoinClient) GetRawTransaction

func (_m *BitcoinClient) GetRawTransaction(ctx context.Context, hash *chainhash.Hash) (*btcutil.Tx, error)

GetRawTransaction provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetRawTransactionByStr

func (_m *BitcoinClient) GetRawTransactionByStr(ctx context.Context, hash string) (*btcutil.Tx, error)

GetRawTransactionByStr provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetRawTransactionResult

func (_m *BitcoinClient) GetRawTransactionResult(ctx context.Context, hash *chainhash.Hash, res *btcjson.GetTransactionResult) (btcjson.TxRawResult, error)

GetRawTransactionResult provides a mock function with given fields: ctx, hash, res

func (*BitcoinClient) GetRawTransactionVerbose

func (_m *BitcoinClient) GetRawTransactionVerbose(ctx context.Context, hash *chainhash.Hash) (*btcjson.TxRawResult, error)

GetRawTransactionVerbose provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetTransaction

func (_m *BitcoinClient) GetTransaction(ctx context.Context, hash *chainhash.Hash) (*btcjson.GetTransactionResult, error)

GetTransaction provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetTransactionByStr

func (_m *BitcoinClient) GetTransactionByStr(ctx context.Context, hash string) (*chainhash.Hash, *btcjson.GetTransactionResult, error)

GetTransactionByStr provides a mock function with given fields: ctx, hash

func (*BitcoinClient) GetTransactionFeeAndRate

func (_m *BitcoinClient) GetTransactionFeeAndRate(ctx context.Context, tx *btcjson.TxRawResult) (int64, int64, error)

GetTransactionFeeAndRate provides a mock function with given fields: ctx, tx

func (*BitcoinClient) Healthcheck

func (_m *BitcoinClient) Healthcheck(ctx context.Context, tssAddress btcutil.Address) (time.Time, error)

Healthcheck provides a mock function with given fields: ctx, tssAddress

func (*BitcoinClient) ImportAddress

func (_m *BitcoinClient) ImportAddress(ctx context.Context, address string) error

ImportAddress provides a mock function with given fields: ctx, address

func (*BitcoinClient) ImportPrivKeyRescan

func (_m *BitcoinClient) ImportPrivKeyRescan(ctx context.Context, privKeyWIF *btcutil.WIF, label string, rescan bool) error

ImportPrivKeyRescan provides a mock function with given fields: ctx, privKeyWIF, label, rescan

func (*BitcoinClient) ListUnspent

func (_m *BitcoinClient) ListUnspent(ctx context.Context) ([]btcjson.ListUnspentResult, error)

ListUnspent provides a mock function with given fields: ctx

func (*BitcoinClient) ListUnspentMinMaxAddresses

func (_m *BitcoinClient) ListUnspentMinMaxAddresses(ctx context.Context, minConf int, maxConf int, addresses []btcutil.Address) ([]btcjson.ListUnspentResult, error)

ListUnspentMinMaxAddresses provides a mock function with given fields: ctx, minConf, maxConf, addresses

func (*BitcoinClient) Ping

func (_m *BitcoinClient) Ping(ctx context.Context) error

Ping provides a mock function with given fields: ctx

func (*BitcoinClient) RawRequest

func (_m *BitcoinClient) RawRequest(ctx context.Context, method string, params []json.RawMessage) (json.RawMessage, error)

RawRequest provides a mock function with given fields: ctx, method, params

func (*BitcoinClient) SendRawTransaction

func (_m *BitcoinClient) SendRawTransaction(ctx context.Context, tx *wire.MsgTx, allowHighFees bool) (*chainhash.Hash, error)

SendRawTransaction provides a mock function with given fields: ctx, tx, allowHighFees

func (*BitcoinClient) SignRawTransactionWithWallet2

func (_m *BitcoinClient) SignRawTransactionWithWallet2(ctx context.Context, tx *wire.MsgTx, inputs []btcjson.RawTxWitnessInput) (*wire.MsgTx, bool, error)

SignRawTransactionWithWallet2 provides a mock function with given fields: ctx, tx, inputs

type CometBFTClient

type CometBFTClient struct {
	mock.Client
	// contains filtered or unexported fields
}

func NewSDKClientWithErr

func NewSDKClientWithErr(t *testing.T, err error, code uint32) *CometBFTClient

func (*CometBFTClient) Block

func (*CometBFTClient) BroadcastTxAsync

func (c *CometBFTClient) BroadcastTxAsync(_ context.Context, _ tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)

func (*CometBFTClient) BroadcastTxCommit

func (c *CometBFTClient) BroadcastTxCommit(
	_ context.Context,
	_ tmtypes.Tx,
) (*coretypes.ResultBroadcastTxCommit, error)

func (*CometBFTClient) BroadcastTxSync

func (*CometBFTClient) PublishToSubscribers

func (c *CometBFTClient) PublishToSubscribers(event coretypes.ResultEvent)

PublishToSubscribers will publish an event to all subscribers (mock only)

func (*CometBFTClient) SetBroadcastTxHash

func (c *CometBFTClient) SetBroadcastTxHash(hash string) *CometBFTClient

func (*CometBFTClient) SetError

func (c *CometBFTClient) SetError(err error) *CometBFTClient

func (*CometBFTClient) Subscribe

func (c *CometBFTClient) Subscribe(
	_ context.Context,
	subscriber, _ string,
	_ ...int,
) (out <-chan coretypes.ResultEvent, err error)

func (*CometBFTClient) Tx

type EVMRPCClient

type EVMRPCClient struct {
	mock.Mock
}

EVMRPCClient is an autogenerated mock type for the EVMRPCClient type

func NewEVMRPCClient

func NewEVMRPCClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *EVMRPCClient

NewEVMRPCClient creates a new instance of EVMRPCClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*EVMRPCClient) BlockByNumberCustom

func (_m *EVMRPCClient) BlockByNumberCustom(ctx context.Context, number *big.Int) (*client.Block, error)

BlockByNumberCustom provides a mock function with given fields: ctx, number

func (*EVMRPCClient) BlockNumber

func (_m *EVMRPCClient) BlockNumber(ctx context.Context) (uint64, error)

BlockNumber provides a mock function with given fields: ctx

func (*EVMRPCClient) CallContract

func (_m *EVMRPCClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

CallContract provides a mock function with given fields: ctx, call, blockNumber

func (*EVMRPCClient) CodeAt

func (_m *EVMRPCClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)

CodeAt provides a mock function with given fields: ctx, contract, blockNumber

func (*EVMRPCClient) EstimateGas

func (_m *EVMRPCClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)

EstimateGas provides a mock function with given fields: ctx, call

func (*EVMRPCClient) FilterLogs

func (_m *EVMRPCClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)

FilterLogs provides a mock function with given fields: ctx, q

func (*EVMRPCClient) HeaderByNumber

func (_m *EVMRPCClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

HeaderByNumber provides a mock function with given fields: ctx, number

func (*EVMRPCClient) HealthCheck

func (_m *EVMRPCClient) HealthCheck(ctx context.Context) (time.Time, error)

HealthCheck provides a mock function with given fields: ctx

func (*EVMRPCClient) PendingCodeAt

func (_m *EVMRPCClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)

PendingCodeAt provides a mock function with given fields: ctx, account

func (*EVMRPCClient) PendingNonceAt

func (_m *EVMRPCClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)

PendingNonceAt provides a mock function with given fields: ctx, account

func (*EVMRPCClient) SendTransaction

func (_m *EVMRPCClient) SendTransaction(ctx context.Context, tx *types.Transaction) error

SendTransaction provides a mock function with given fields: ctx, tx

func (*EVMRPCClient) SubscribeFilterLogs

func (_m *EVMRPCClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)

SubscribeFilterLogs provides a mock function with given fields: ctx, q, ch

func (*EVMRPCClient) SuggestGasPrice

func (_m *EVMRPCClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)

SuggestGasPrice provides a mock function with given fields: ctx

func (*EVMRPCClient) SuggestGasTipCap

func (_m *EVMRPCClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error)

SuggestGasTipCap provides a mock function with given fields: ctx

func (*EVMRPCClient) TransactionByHash

func (_m *EVMRPCClient) TransactionByHash(ctx context.Context, hash common.Hash) (*types.Transaction, bool, error)

TransactionByHash provides a mock function with given fields: ctx, hash

func (*EVMRPCClient) TransactionByHashCustom

func (_m *EVMRPCClient) TransactionByHashCustom(ctx context.Context, hash string) (*client.Transaction, error)

TransactionByHashCustom provides a mock function with given fields: ctx, hash

func (*EVMRPCClient) TransactionReceipt

func (_m *EVMRPCClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

TransactionReceipt provides a mock function with given fields: ctx, txHash

func (*EVMRPCClient) TransactionSender

func (_m *EVMRPCClient) TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error)

TransactionSender provides a mock function with given fields: ctx, tx, block, index

type Keyring

type Keyring struct {
}

func (Keyring) Backend

func (m Keyring) Backend() string

func (Keyring) Delete

func (m Keyring) Delete(_ string) error

func (Keyring) DeleteByAddress

func (m Keyring) DeleteByAddress(_ sdk.Address) error

func (Keyring) ExportPrivKeyArmor

func (m Keyring) ExportPrivKeyArmor(_, _ string) (armor string, err error)

func (Keyring) ExportPrivKeyArmorByAddress

func (m Keyring) ExportPrivKeyArmorByAddress(_ sdk.Address, _ string) (armor string, err error)

func (Keyring) ExportPubKeyArmor

func (m Keyring) ExportPubKeyArmor(_ string) (string, error)

func (Keyring) ExportPubKeyArmorByAddress

func (m Keyring) ExportPubKeyArmorByAddress(_ sdk.Address) (string, error)

func (Keyring) ImportPrivKey

func (m Keyring) ImportPrivKey(_, _, _ string) error

func (Keyring) ImportPrivKeyHex

func (m Keyring) ImportPrivKeyHex(_, _, _ string) error

func (Keyring) ImportPubKey

func (m Keyring) ImportPubKey(_ string, _ string) error

func (Keyring) Key

func (m Keyring) Key(uid string) (*ckeys.Record, error)

func (Keyring) KeyByAddress

func (m Keyring) KeyByAddress(_ sdk.Address) (*ckeys.Record, error)

func (Keyring) List

func (m Keyring) List() ([]*ckeys.Record, error)

func (Keyring) MigrateAll

func (m Keyring) MigrateAll() ([]*ckeys.Record, error)

func (Keyring) NewAccount

func (m Keyring) NewAccount(_, _, _, _ string, _ ckeys.SignatureAlgo) (*ckeys.Record, error)

func (Keyring) NewMnemonic

func (m Keyring) NewMnemonic(
	_ string,
	_ ckeys.Language,
	_, _ string,
	_ ckeys.SignatureAlgo,
) (*ckeys.Record, string, error)

func (Keyring) Rename

func (m Keyring) Rename(_ string, _ string) error

func (Keyring) SaveLedgerKey

func (m Keyring) SaveLedgerKey(_ string, _ ckeys.SignatureAlgo, _ string, _, _, _ uint32) (*ckeys.Record, error)

func (Keyring) SaveMultisig

func (m Keyring) SaveMultisig(_ string, _ cryptotypes.PubKey) (*ckeys.Record, error)

func (Keyring) SaveOfflineKey

func (m Keyring) SaveOfflineKey(_ string, _ cryptotypes.PubKey) (*ckeys.Record, error)

func (Keyring) Sign

func (m Keyring) Sign(_ string, _ []byte, _ signing.SignMode) ([]byte, cryptotypes.PubKey, error)

func (Keyring) SignByAddress

func (m Keyring) SignByAddress(_ sdk.Address, _ []byte, _ signing.SignMode) ([]byte, cryptotypes.PubKey, error)

func (Keyring) SupportedAlgorithms

func (m Keyring) SupportedAlgorithms() (ckeys.SigningAlgoList, ckeys.SigningAlgoList)

type LiteClient

type LiteClient struct {
	mock.Mock
}

LiteClient is an autogenerated mock type for the LiteClient type

func NewLiteClient

func NewLiteClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *LiteClient

NewLiteClient creates a new instance of LiteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*LiteClient) GetBlockHeader

func (_m *LiteClient) GetBlockHeader(ctx context.Context, blockID ton.BlockIDExt, mode uint32) (tlb.BlockInfo, error)

GetBlockHeader provides a mock function with given fields: ctx, blockID, mode

func (*LiteClient) GetConfigParams

func (_m *LiteClient) GetConfigParams(ctx context.Context, mode liteapi.ConfigMode, params []uint32) (tlb.ConfigParams, error)

GetConfigParams provides a mock function with given fields: ctx, mode, params

func (*LiteClient) GetFirstTransaction

func (_m *LiteClient) GetFirstTransaction(ctx context.Context, acc ton.AccountID) (*ton.Transaction, int, error)

GetFirstTransaction provides a mock function with given fields: ctx, acc

func (*LiteClient) GetMasterchainInfo

func (_m *LiteClient) GetMasterchainInfo(ctx context.Context) (liteclient.LiteServerMasterchainInfoC, error)

GetMasterchainInfo provides a mock function with given fields: ctx

func (*LiteClient) GetTransaction

func (_m *LiteClient) GetTransaction(ctx context.Context, acc ton.AccountID, lt uint64, hash ton.Bits256) (ton.Transaction, error)

GetTransaction provides a mock function with given fields: ctx, acc, lt, hash

func (*LiteClient) GetTransactionsSince

func (_m *LiteClient) GetTransactionsSince(ctx context.Context, acc ton.AccountID, lt uint64, hash ton.Bits256) ([]ton.Transaction, error)

GetTransactionsSince provides a mock function with given fields: ctx, acc, lt, hash

type SignerLiteClient

type SignerLiteClient struct {
	mock.Mock
}

SignerLiteClient is an autogenerated mock type for the LiteClient type

func NewSignerLiteClient

func NewSignerLiteClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *SignerLiteClient

NewSignerLiteClient creates a new instance of SignerLiteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*SignerLiteClient) GetAccountState

func (_m *SignerLiteClient) GetAccountState(ctx context.Context, accountID ton.AccountID) (tlb.ShardAccount, error)

GetAccountState provides a mock function with given fields: ctx, accountID

func (*SignerLiteClient) GetTransactionsSince

func (_m *SignerLiteClient) GetTransactionsSince(ctx context.Context, acc ton.AccountID, lt uint64, hash ton.Bits256) ([]ton.Transaction, error)

GetTransactionsSince provides a mock function with given fields: ctx, acc, lt, hash

func (*SignerLiteClient) SendMessage

func (_m *SignerLiteClient) SendMessage(ctx context.Context, payload []byte) (uint32, error)

SendMessage provides a mock function with given fields: ctx, payload

type SolanaRPCClient

type SolanaRPCClient struct {
	mock.Mock
}

SolanaRPCClient is an autogenerated mock type for the SolanaRPCClient type

func NewSolanaRPCClient

func NewSolanaRPCClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *SolanaRPCClient

NewSolanaRPCClient creates a new instance of SolanaRPCClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*SolanaRPCClient) GetAccountInfo

func (_m *SolanaRPCClient) GetAccountInfo(ctx context.Context, account solana.PublicKey) (*rpc.GetAccountInfoResult, error)

GetAccountInfo provides a mock function with given fields: ctx, account

func (*SolanaRPCClient) GetBalance

func (_m *SolanaRPCClient) GetBalance(ctx context.Context, account solana.PublicKey, commitment rpc.CommitmentType) (*rpc.GetBalanceResult, error)

GetBalance provides a mock function with given fields: ctx, account, commitment

func (*SolanaRPCClient) GetBlockTime

func (_m *SolanaRPCClient) GetBlockTime(ctx context.Context, block uint64) (*solana.UnixTimeSeconds, error)

GetBlockTime provides a mock function with given fields: ctx, block

func (*SolanaRPCClient) GetConfirmedTransactionWithOpts

func (_m *SolanaRPCClient) GetConfirmedTransactionWithOpts(ctx context.Context, signature solana.Signature, opts *rpc.GetTransactionOpts) (*rpc.TransactionWithMeta, error)

GetConfirmedTransactionWithOpts provides a mock function with given fields: ctx, signature, opts

func (*SolanaRPCClient) GetHealth

func (_m *SolanaRPCClient) GetHealth(ctx context.Context) (string, error)

GetHealth provides a mock function with given fields: ctx

func (*SolanaRPCClient) GetLatestBlockhash

func (_m *SolanaRPCClient) GetLatestBlockhash(ctx context.Context, commitment rpc.CommitmentType) (*rpc.GetLatestBlockhashResult, error)

GetLatestBlockhash provides a mock function with given fields: ctx, commitment

func (*SolanaRPCClient) GetRecentPrioritizationFees

func (_m *SolanaRPCClient) GetRecentPrioritizationFees(ctx context.Context, accounts solana.PublicKeySlice) ([]rpc.PriorizationFeeResult, error)

GetRecentPrioritizationFees provides a mock function with given fields: ctx, accounts

func (*SolanaRPCClient) GetSignaturesForAddressWithOpts

func (_m *SolanaRPCClient) GetSignaturesForAddressWithOpts(ctx context.Context, account solana.PublicKey, opts *rpc.GetSignaturesForAddressOpts) ([]*rpc.TransactionSignature, error)

GetSignaturesForAddressWithOpts provides a mock function with given fields: ctx, account, opts

func (*SolanaRPCClient) GetSlot

func (_m *SolanaRPCClient) GetSlot(ctx context.Context, commitment rpc.CommitmentType) (uint64, error)

GetSlot provides a mock function with given fields: ctx, commitment

func (*SolanaRPCClient) GetTransaction

GetTransaction provides a mock function with given fields: ctx, txSig, opts

func (*SolanaRPCClient) GetVersion

func (_m *SolanaRPCClient) GetVersion(ctx context.Context) (*rpc.GetVersionResult, error)

GetVersion provides a mock function with given fields: ctx

func (*SolanaRPCClient) SendTransactionWithOpts

func (_m *SolanaRPCClient) SendTransactionWithOpts(ctx context.Context, transaction *solana.Transaction, opts rpc.TransactionOpts) (solana.Signature, error)

SendTransactionWithOpts provides a mock function with given fields: ctx, transaction, opts

type TSS

type TSS struct {
	// contains filtered or unexported fields
}

func NewTSS

func NewTSS(t *testing.T) *TSS

func NewTSSFromPrivateKey

func NewTSSFromPrivateKey(t test, pk *ecdsa.PrivateKey) *TSS

func (*TSS) FakePubKey

func (tss *TSS) FakePubKey(pk any) *TSS

func (*TSS) Pause

func (tss *TSS) Pause()

func (*TSS) PubKey

func (tss *TSS) PubKey() zetatss.PubKey

func (*TSS) Sign

func (tss *TSS) Sign(_ context.Context, digest []byte, _, _ uint64, _ int64) ([65]byte, error)

func (*TSS) SignBatch

func (tss *TSS) SignBatch(_ context.Context, digests [][]byte, _, _ uint64, _ int64) ([][65]byte, error)

func (*TSS) Unpause

func (tss *TSS) Unpause()

func (*TSS) UpdatePrivateKey

func (tss *TSS) UpdatePrivateKey(pk *ecdsa.PrivateKey)

type ZetacoreClient

type ZetacoreClient struct {
	mock.Mock
}

ZetacoreClient is an autogenerated mock type for the ZetacoreClient type

func NewZetacoreClient

func NewZetacoreClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ZetacoreClient

NewZetacoreClient creates a new instance of ZetacoreClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ZetacoreClient) Chain

func (_m *ZetacoreClient) Chain() chains.Chain

Chain provides a mock function with given fields:

func (*ZetacoreClient) GetAdditionalChains

func (_m *ZetacoreClient) GetAdditionalChains(ctx context.Context) ([]chains.Chain, error)

GetAdditionalChains provides a mock function with given fields: ctx

func (*ZetacoreClient) GetAllOutboundTrackerByChain

func (_m *ZetacoreClient) GetAllOutboundTrackerByChain(ctx context.Context, chainID int64, order interfaces.Order) ([]types.OutboundTracker, error)

GetAllOutboundTrackerByChain provides a mock function with given fields: ctx, chainID, order

func (*ZetacoreClient) GetBTCTSSAddress

func (_m *ZetacoreClient) GetBTCTSSAddress(ctx context.Context, chainID int64) (string, error)

GetBTCTSSAddress provides a mock function with given fields: ctx, chainID

func (*ZetacoreClient) GetBlockHeight

func (_m *ZetacoreClient) GetBlockHeight(ctx context.Context) (int64, error)

GetBlockHeight provides a mock function with given fields: ctx

func (*ZetacoreClient) GetCctxByNonce

func (_m *ZetacoreClient) GetCctxByNonce(ctx context.Context, chainID int64, nonce uint64) (*types.CrossChainTx, error)

GetCctxByNonce provides a mock function with given fields: ctx, chainID, nonce

func (*ZetacoreClient) GetChainParams

func (_m *ZetacoreClient) GetChainParams(ctx context.Context) ([]*observertypes.ChainParams, error)

GetChainParams provides a mock function with given fields: ctx

func (*ZetacoreClient) GetCrosschainFlags

func (_m *ZetacoreClient) GetCrosschainFlags(ctx context.Context) (observertypes.CrosschainFlags, error)

GetCrosschainFlags provides a mock function with given fields: ctx

func (*ZetacoreClient) GetInboundTrackersForChain

func (_m *ZetacoreClient) GetInboundTrackersForChain(ctx context.Context, chainID int64) ([]types.InboundTracker, error)

GetInboundTrackersForChain provides a mock function with given fields: ctx, chainID

func (*ZetacoreClient) GetKeyGen

func (_m *ZetacoreClient) GetKeyGen(ctx context.Context) (observertypes.Keygen, error)

GetKeyGen provides a mock function with given fields: ctx

func (*ZetacoreClient) GetKeys

GetKeys provides a mock function with given fields:

func (*ZetacoreClient) GetObserverList

func (_m *ZetacoreClient) GetObserverList(ctx context.Context) ([]string, error)

GetObserverList provides a mock function with given fields: ctx

func (*ZetacoreClient) GetOperationalFlags

func (_m *ZetacoreClient) GetOperationalFlags(ctx context.Context) (observertypes.OperationalFlags, error)

GetOperationalFlags provides a mock function with given fields: ctx

func (*ZetacoreClient) GetOutboundTracker

func (_m *ZetacoreClient) GetOutboundTracker(ctx context.Context, chain chains.Chain, nonce uint64) (*types.OutboundTracker, error)

GetOutboundTracker provides a mock function with given fields: ctx, chain, nonce

func (*ZetacoreClient) GetPendingNoncesByChain

func (_m *ZetacoreClient) GetPendingNoncesByChain(ctx context.Context, chainID int64) (observertypes.PendingNonces, error)

GetPendingNoncesByChain provides a mock function with given fields: ctx, chainID

func (*ZetacoreClient) GetRateLimiterFlags

func (_m *ZetacoreClient) GetRateLimiterFlags(ctx context.Context) (types.RateLimiterFlags, error)

GetRateLimiterFlags provides a mock function with given fields: ctx

func (*ZetacoreClient) GetRateLimiterInput

func (_m *ZetacoreClient) GetRateLimiterInput(ctx context.Context, window int64) (*types.QueryRateLimiterInputResponse, error)

GetRateLimiterInput provides a mock function with given fields: ctx, window

func (*ZetacoreClient) GetSupportedChains

func (_m *ZetacoreClient) GetSupportedChains(ctx context.Context) ([]chains.Chain, error)

GetSupportedChains provides a mock function with given fields: ctx

func (*ZetacoreClient) GetTSS

func (_m *ZetacoreClient) GetTSS(ctx context.Context) (observertypes.TSS, error)

GetTSS provides a mock function with given fields: ctx

func (*ZetacoreClient) GetTSSHistory

func (_m *ZetacoreClient) GetTSSHistory(ctx context.Context) ([]observertypes.TSS, error)

GetTSSHistory provides a mock function with given fields: ctx

func (*ZetacoreClient) GetUpgradePlan

func (_m *ZetacoreClient) GetUpgradePlan(ctx context.Context) (*upgradetypes.Plan, error)

GetUpgradePlan provides a mock function with given fields: ctx

func (*ZetacoreClient) GetZetaHotKeyBalance

func (_m *ZetacoreClient) GetZetaHotKeyBalance(ctx context.Context) (math.Int, error)

GetZetaHotKeyBalance provides a mock function with given fields: ctx

func (*ZetacoreClient) ListPendingCCTX

func (_m *ZetacoreClient) ListPendingCCTX(ctx context.Context, chain chains.Chain) ([]*types.CrossChainTx, uint64, error)

ListPendingCCTX provides a mock function with given fields: ctx, chain

func (*ZetacoreClient) ListPendingCCTXWithinRateLimit

func (_m *ZetacoreClient) ListPendingCCTXWithinRateLimit(ctx context.Context) (*types.QueryListPendingCctxWithinRateLimitResponse, error)

ListPendingCCTXWithinRateLimit provides a mock function with given fields: ctx

func (*ZetacoreClient) NewBlockSubscriber

func (_m *ZetacoreClient) NewBlockSubscriber(ctx context.Context) (chan cometbfttypes.EventDataNewBlock, error)

NewBlockSubscriber provides a mock function with given fields: ctx

func (*ZetacoreClient) PostOutboundTracker

func (_m *ZetacoreClient) PostOutboundTracker(ctx context.Context, chainID int64, nonce uint64, txHash string) (string, error)

PostOutboundTracker provides a mock function with given fields: ctx, chainID, nonce, txHash

func (*ZetacoreClient) PostVoteBlameData

func (_m *ZetacoreClient) PostVoteBlameData(ctx context.Context, _a1 *blame.Blame, chainID int64, index string) (string, error)

PostVoteBlameData provides a mock function with given fields: ctx, _a1, chainID, index

func (*ZetacoreClient) PostVoteGasPrice

func (_m *ZetacoreClient) PostVoteGasPrice(ctx context.Context, chain chains.Chain, gasPrice uint64, priorityFee uint64, blockNum uint64) (string, error)

PostVoteGasPrice provides a mock function with given fields: ctx, chain, gasPrice, priorityFee, blockNum

func (*ZetacoreClient) PostVoteInbound

func (_m *ZetacoreClient) PostVoteInbound(ctx context.Context, gasLimit uint64, retryGasLimit uint64, msg *types.MsgVoteInbound) (string, string, error)

PostVoteInbound provides a mock function with given fields: ctx, gasLimit, retryGasLimit, msg

func (*ZetacoreClient) PostVoteOutbound

func (_m *ZetacoreClient) PostVoteOutbound(ctx context.Context, gasLimit uint64, retryGasLimit uint64, msg *types.MsgVoteOutbound) (string, string, error)

PostVoteOutbound provides a mock function with given fields: ctx, gasLimit, retryGasLimit, msg

func (*ZetacoreClient) PostVoteTSS

func (_m *ZetacoreClient) PostVoteTSS(ctx context.Context, tssPubKey string, keyGenZetaHeight int64, status chains.ReceiveStatus) (string, error)

PostVoteTSS provides a mock function with given fields: ctx, tssPubKey, keyGenZetaHeight, status

func (*ZetacoreClient) WithKeys

func (*ZetacoreClient) WithPendingCctx

func (_m *ZetacoreClient) WithPendingCctx(chainID int64, cctxs []*crosschaintypes.CrossChainTx) *ZetacoreClient

func (*ZetacoreClient) WithPostVoteInbound

func (_m *ZetacoreClient) WithPostVoteInbound(zetaTxHash string, ballotIndex string) *ZetacoreClient

func (*ZetacoreClient) WithPostVoteOutbound

func (_m *ZetacoreClient) WithPostVoteOutbound(zetaTxHash string, ballotIndex string) *ZetacoreClient

func (*ZetacoreClient) WithRateLimiterFlags

func (_m *ZetacoreClient) WithRateLimiterFlags(flags *crosschaintypes.RateLimiterFlags) *ZetacoreClient

func (*ZetacoreClient) WithRateLimiterInput

func (*ZetacoreClient) WithZetaChain

func (_m *ZetacoreClient) WithZetaChain() *ZetacoreClient

Jump to

Keyboard shortcuts

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