mock

package
v0.31.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRetriever

type AccountRetriever sdkClient.AccountRetriever

AccountRetriever wrapper for github.com/cosmos/cosmos-sdk/client.AccountRetriever

type AccountRetrieverMock

type AccountRetrieverMock struct {
	// EnsureExistsFunc mocks the EnsureExists method.
	EnsureExistsFunc func(clientCtx sdkClient.Context, addr sdk.AccAddress) error

	// GetAccountFunc mocks the GetAccount method.
	GetAccountFunc func(clientCtx sdkClient.Context, addr sdk.AccAddress) (sdkClient.Account, error)

	// GetAccountNumberSequenceFunc mocks the GetAccountNumberSequence method.
	GetAccountNumberSequenceFunc func(clientCtx sdkClient.Context, addr sdk.AccAddress) (uint64, uint64, error)

	// GetAccountWithHeightFunc mocks the GetAccountWithHeight method.
	GetAccountWithHeightFunc func(clientCtx sdkClient.Context, addr sdk.AccAddress) (sdkClient.Account, int64, error)
	// contains filtered or unexported fields
}

AccountRetrieverMock is a mock implementation of AccountRetriever.

func TestSomethingThatUsesAccountRetriever(t *testing.T) {

	// make and configure a mocked AccountRetriever
	mockedAccountRetriever := &AccountRetrieverMock{
		EnsureExistsFunc: func(clientCtx sdkClient.Context, addr sdk.AccAddress) error {
			panic("mock out the EnsureExists method")
		},
		GetAccountFunc: func(clientCtx sdkClient.Context, addr sdk.AccAddress) (sdkClient.Account, error) {
			panic("mock out the GetAccount method")
		},
		GetAccountNumberSequenceFunc: func(clientCtx sdkClient.Context, addr sdk.AccAddress) (uint64, uint64, error) {
			panic("mock out the GetAccountNumberSequence method")
		},
		GetAccountWithHeightFunc: func(clientCtx sdkClient.Context, addr sdk.AccAddress) (sdkClient.Account, int64, error) {
			panic("mock out the GetAccountWithHeight method")
		},
	}

	// use mockedAccountRetriever in code that requires AccountRetriever
	// and then make assertions.

}

func (*AccountRetrieverMock) EnsureExists

func (mock *AccountRetrieverMock) EnsureExists(clientCtx sdkClient.Context, addr sdk.AccAddress) error

EnsureExists calls EnsureExistsFunc.

func (*AccountRetrieverMock) EnsureExistsCalls

func (mock *AccountRetrieverMock) EnsureExistsCalls() []struct {
	ClientCtx sdkClient.Context
	Addr      sdk.AccAddress
}

EnsureExistsCalls gets all the calls that were made to EnsureExists. Check the length with:

len(mockedAccountRetriever.EnsureExistsCalls())

func (*AccountRetrieverMock) GetAccount

func (mock *AccountRetrieverMock) GetAccount(clientCtx sdkClient.Context, addr sdk.AccAddress) (sdkClient.Account, error)

GetAccount calls GetAccountFunc.

func (*AccountRetrieverMock) GetAccountCalls

func (mock *AccountRetrieverMock) GetAccountCalls() []struct {
	ClientCtx sdkClient.Context
	Addr      sdk.AccAddress
}

GetAccountCalls gets all the calls that were made to GetAccount. Check the length with:

len(mockedAccountRetriever.GetAccountCalls())

func (*AccountRetrieverMock) GetAccountNumberSequence

func (mock *AccountRetrieverMock) GetAccountNumberSequence(clientCtx sdkClient.Context, addr sdk.AccAddress) (uint64, uint64, error)

GetAccountNumberSequence calls GetAccountNumberSequenceFunc.

func (*AccountRetrieverMock) GetAccountNumberSequenceCalls

func (mock *AccountRetrieverMock) GetAccountNumberSequenceCalls() []struct {
	ClientCtx sdkClient.Context
	Addr      sdk.AccAddress
}

GetAccountNumberSequenceCalls gets all the calls that were made to GetAccountNumberSequence. Check the length with:

len(mockedAccountRetriever.GetAccountNumberSequenceCalls())

func (*AccountRetrieverMock) GetAccountWithHeight

func (mock *AccountRetrieverMock) GetAccountWithHeight(clientCtx sdkClient.Context, addr sdk.AccAddress) (sdkClient.Account, int64, error)

GetAccountWithHeight calls GetAccountWithHeightFunc.

func (*AccountRetrieverMock) GetAccountWithHeightCalls

func (mock *AccountRetrieverMock) GetAccountWithHeightCalls() []struct {
	ClientCtx sdkClient.Context
	Addr      sdk.AccAddress
}

GetAccountWithHeightCalls gets all the calls that were made to GetAccountWithHeight. Check the length with:

len(mockedAccountRetriever.GetAccountWithHeightCalls())

type BroadcasterMock

type BroadcasterMock struct {
	// BroadcastFunc mocks the Broadcast method.
	BroadcastFunc func(ctx context.Context, msgs ...sdk.Msg) (*sdk.TxResponse, error)
	// contains filtered or unexported fields
}

BroadcasterMock is a mock implementation of broadcast.Broadcaster.

func TestSomethingThatUsesBroadcaster(t *testing.T) {

	// make and configure a mocked broadcast.Broadcaster
	mockedBroadcaster := &BroadcasterMock{
		BroadcastFunc: func(ctx context.Context, msgs ...sdk.Msg) (*sdk.TxResponse, error) {
			panic("mock out the Broadcast method")
		},
	}

	// use mockedBroadcaster in code that requires broadcast.Broadcaster
	// and then make assertions.

}

func (*BroadcasterMock) Broadcast

func (mock *BroadcasterMock) Broadcast(ctx context.Context, msgs ...sdk.Msg) (*sdk.TxResponse, error)

Broadcast calls BroadcastFunc.

func (*BroadcasterMock) BroadcastCalls

func (mock *BroadcasterMock) BroadcastCalls() []struct {
	Ctx  context.Context
	Msgs []sdk.Msg
}

BroadcastCalls gets all the calls that were made to Broadcast. Check the length with:

len(mockedBroadcaster.BroadcastCalls())

type Client

type Client rpcclient.Client

Client wrapper for github.com/tendermint/tendermint/rpc/client.Client

type ClientMock

type ClientMock struct {
	// ABCIInfoFunc mocks the ABCIInfo method.
	ABCIInfoFunc func(contextMoqParam context.Context) (*coretypes.ResultABCIInfo, error)

	// ABCIQueryFunc mocks the ABCIQuery method.
	ABCIQueryFunc func(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)

	// ABCIQueryWithOptionsFunc mocks the ABCIQueryWithOptions method.
	ABCIQueryWithOptionsFunc func(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)

	// BlockFunc mocks the Block method.
	BlockFunc func(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)

	// BlockByHashFunc mocks the BlockByHash method.
	BlockByHashFunc func(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error)

	// BlockResultsFunc mocks the BlockResults method.
	BlockResultsFunc func(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error)

	// BlockSearchFunc mocks the BlockSearch method.
	BlockSearchFunc func(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error)

	// BlockchainInfoFunc mocks the BlockchainInfo method.
	BlockchainInfoFunc func(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error)

	// BroadcastEvidenceFunc mocks the BroadcastEvidence method.
	BroadcastEvidenceFunc func(contextMoqParam context.Context, evidence tenderminttypes.Evidence) (*coretypes.ResultBroadcastEvidence, error)

	// BroadcastTxAsyncFunc mocks the BroadcastTxAsync method.
	BroadcastTxAsyncFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error)

	// BroadcastTxCommitFunc mocks the BroadcastTxCommit method.
	BroadcastTxCommitFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTxCommit, error)

	// BroadcastTxSyncFunc mocks the BroadcastTxSync method.
	BroadcastTxSyncFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error)

	// CheckTxFunc mocks the CheckTx method.
	CheckTxFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultCheckTx, error)

	// CommitFunc mocks the Commit method.
	CommitFunc func(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)

	// ConsensusParamsFunc mocks the ConsensusParams method.
	ConsensusParamsFunc func(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error)

	// ConsensusStateFunc mocks the ConsensusState method.
	ConsensusStateFunc func(contextMoqParam context.Context) (*coretypes.ResultConsensusState, error)

	// DumpConsensusStateFunc mocks the DumpConsensusState method.
	DumpConsensusStateFunc func(contextMoqParam context.Context) (*coretypes.ResultDumpConsensusState, error)

	// GenesisFunc mocks the Genesis method.
	GenesisFunc func(contextMoqParam context.Context) (*coretypes.ResultGenesis, error)

	// GenesisChunkedFunc mocks the GenesisChunked method.
	GenesisChunkedFunc func(contextMoqParam context.Context, v uint) (*coretypes.ResultGenesisChunk, error)

	// HealthFunc mocks the Health method.
	HealthFunc func(contextMoqParam context.Context) (*coretypes.ResultHealth, error)

	// IsRunningFunc mocks the IsRunning method.
	IsRunningFunc func() bool

	// NetInfoFunc mocks the NetInfo method.
	NetInfoFunc func(contextMoqParam context.Context) (*coretypes.ResultNetInfo, error)

	// NumUnconfirmedTxsFunc mocks the NumUnconfirmedTxs method.
	NumUnconfirmedTxsFunc func(contextMoqParam context.Context) (*coretypes.ResultUnconfirmedTxs, error)

	// OnResetFunc mocks the OnReset method.
	OnResetFunc func() error

	// OnStartFunc mocks the OnStart method.
	OnStartFunc func() error

	// OnStopFunc mocks the OnStop method.
	OnStopFunc func()

	// QuitFunc mocks the Quit method.
	QuitFunc func() <-chan struct{}

	// ResetFunc mocks the Reset method.
	ResetFunc func() error

	// SetLoggerFunc mocks the SetLogger method.
	SetLoggerFunc func(logger log.Logger)

	// StartFunc mocks the Start method.
	StartFunc func() error

	// StatusFunc mocks the Status method.
	StatusFunc func(contextMoqParam context.Context) (*coretypes.ResultStatus, error)

	// StopFunc mocks the Stop method.
	StopFunc func() error

	// StringFunc mocks the String method.
	StringFunc func() string

	// SubscribeFunc mocks the Subscribe method.
	SubscribeFunc func(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error)

	// TxFunc mocks the Tx method.
	TxFunc func(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)

	// TxSearchFunc mocks the TxSearch method.
	TxSearchFunc func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error)

	// UnconfirmedTxsFunc mocks the UnconfirmedTxs method.
	UnconfirmedTxsFunc func(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error)

	// UnsubscribeFunc mocks the Unsubscribe method.
	UnsubscribeFunc func(ctx context.Context, subscriber string, query string) error

	// UnsubscribeAllFunc mocks the UnsubscribeAll method.
	UnsubscribeAllFunc func(ctx context.Context, subscriber string) error

	// ValidatorsFunc mocks the Validators method.
	ValidatorsFunc func(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error)
	// contains filtered or unexported fields
}

ClientMock is a mock implementation of Client.

func TestSomethingThatUsesClient(t *testing.T) {

	// make and configure a mocked Client
	mockedClient := &ClientMock{
		ABCIInfoFunc: func(contextMoqParam context.Context) (*coretypes.ResultABCIInfo, error) {
			panic("mock out the ABCIInfo method")
		},
		ABCIQueryFunc: func(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) {
			panic("mock out the ABCIQuery method")
		},
		ABCIQueryWithOptionsFunc: func(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) {
			panic("mock out the ABCIQueryWithOptions method")
		},
		BlockFunc: func(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) {
			panic("mock out the Block method")
		},
		BlockByHashFunc: func(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) {
			panic("mock out the BlockByHash method")
		},
		BlockResultsFunc: func(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) {
			panic("mock out the BlockResults method")
		},
		BlockSearchFunc: func(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) {
			panic("mock out the BlockSearch method")
		},
		BlockchainInfoFunc: func(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) {
			panic("mock out the BlockchainInfo method")
		},
		BroadcastEvidenceFunc: func(contextMoqParam context.Context, evidence tenderminttypes.Evidence) (*coretypes.ResultBroadcastEvidence, error) {
			panic("mock out the BroadcastEvidence method")
		},
		BroadcastTxAsyncFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
			panic("mock out the BroadcastTxAsync method")
		},
		BroadcastTxCommitFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTxCommit, error) {
			panic("mock out the BroadcastTxCommit method")
		},
		BroadcastTxSyncFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
			panic("mock out the BroadcastTxSync method")
		},
		CheckTxFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultCheckTx, error) {
			panic("mock out the CheckTx method")
		},
		CommitFunc: func(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) {
			panic("mock out the Commit method")
		},
		ConsensusParamsFunc: func(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) {
			panic("mock out the ConsensusParams method")
		},
		ConsensusStateFunc: func(contextMoqParam context.Context) (*coretypes.ResultConsensusState, error) {
			panic("mock out the ConsensusState method")
		},
		DumpConsensusStateFunc: func(contextMoqParam context.Context) (*coretypes.ResultDumpConsensusState, error) {
			panic("mock out the DumpConsensusState method")
		},
		GenesisFunc: func(contextMoqParam context.Context) (*coretypes.ResultGenesis, error) {
			panic("mock out the Genesis method")
		},
		GenesisChunkedFunc: func(contextMoqParam context.Context, v uint) (*coretypes.ResultGenesisChunk, error) {
			panic("mock out the GenesisChunked method")
		},
		HealthFunc: func(contextMoqParam context.Context) (*coretypes.ResultHealth, error) {
			panic("mock out the Health method")
		},
		IsRunningFunc: func() bool {
			panic("mock out the IsRunning method")
		},
		NetInfoFunc: func(contextMoqParam context.Context) (*coretypes.ResultNetInfo, error) {
			panic("mock out the NetInfo method")
		},
		NumUnconfirmedTxsFunc: func(contextMoqParam context.Context) (*coretypes.ResultUnconfirmedTxs, error) {
			panic("mock out the NumUnconfirmedTxs method")
		},
		OnResetFunc: func() error {
			panic("mock out the OnReset method")
		},
		OnStartFunc: func() error {
			panic("mock out the OnStart method")
		},
		OnStopFunc: func()  {
			panic("mock out the OnStop method")
		},
		QuitFunc: func() <-chan struct{} {
			panic("mock out the Quit method")
		},
		ResetFunc: func() error {
			panic("mock out the Reset method")
		},
		SetLoggerFunc: func(logger log.Logger)  {
			panic("mock out the SetLogger method")
		},
		StartFunc: func() error {
			panic("mock out the Start method")
		},
		StatusFunc: func(contextMoqParam context.Context) (*coretypes.ResultStatus, error) {
			panic("mock out the Status method")
		},
		StopFunc: func() error {
			panic("mock out the Stop method")
		},
		StringFunc: func() string {
			panic("mock out the String method")
		},
		SubscribeFunc: func(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) {
			panic("mock out the Subscribe method")
		},
		TxFunc: func(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) {
			panic("mock out the Tx method")
		},
		TxSearchFunc: func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) {
			panic("mock out the TxSearch method")
		},
		UnconfirmedTxsFunc: func(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error) {
			panic("mock out the UnconfirmedTxs method")
		},
		UnsubscribeFunc: func(ctx context.Context, subscriber string, query string) error {
			panic("mock out the Unsubscribe method")
		},
		UnsubscribeAllFunc: func(ctx context.Context, subscriber string) error {
			panic("mock out the UnsubscribeAll method")
		},
		ValidatorsFunc: func(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error) {
			panic("mock out the Validators method")
		},
	}

	// use mockedClient in code that requires Client
	// and then make assertions.

}

func (*ClientMock) ABCIInfo

func (mock *ClientMock) ABCIInfo(contextMoqParam context.Context) (*coretypes.ResultABCIInfo, error)

ABCIInfo calls ABCIInfoFunc.

func (*ClientMock) ABCIInfoCalls

func (mock *ClientMock) ABCIInfoCalls() []struct {
	ContextMoqParam context.Context
}

ABCIInfoCalls gets all the calls that were made to ABCIInfo. Check the length with:

len(mockedClient.ABCIInfoCalls())

func (*ClientMock) ABCIQuery

func (mock *ClientMock) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)

ABCIQuery calls ABCIQueryFunc.

func (*ClientMock) ABCIQueryCalls

func (mock *ClientMock) ABCIQueryCalls() []struct {
	Ctx  context.Context
	Path string
	Data bytes.HexBytes
}

ABCIQueryCalls gets all the calls that were made to ABCIQuery. Check the length with:

len(mockedClient.ABCIQueryCalls())

func (*ClientMock) ABCIQueryWithOptions

func (mock *ClientMock) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)

ABCIQueryWithOptions calls ABCIQueryWithOptionsFunc.

func (*ClientMock) ABCIQueryWithOptionsCalls

func (mock *ClientMock) ABCIQueryWithOptionsCalls() []struct {
	Ctx  context.Context
	Path string
	Data bytes.HexBytes
	Opts rpcclient.ABCIQueryOptions
}

ABCIQueryWithOptionsCalls gets all the calls that were made to ABCIQueryWithOptions. Check the length with:

len(mockedClient.ABCIQueryWithOptionsCalls())

func (*ClientMock) Block

func (mock *ClientMock) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)

Block calls BlockFunc.

func (*ClientMock) BlockByHash

func (mock *ClientMock) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error)

BlockByHash calls BlockByHashFunc.

func (*ClientMock) BlockByHashCalls

func (mock *ClientMock) BlockByHashCalls() []struct {
	Ctx  context.Context
	Hash []byte
}

BlockByHashCalls gets all the calls that were made to BlockByHash. Check the length with:

len(mockedClient.BlockByHashCalls())

func (*ClientMock) BlockCalls

func (mock *ClientMock) BlockCalls() []struct {
	Ctx    context.Context
	Height *int64
}

BlockCalls gets all the calls that were made to Block. Check the length with:

len(mockedClient.BlockCalls())

func (*ClientMock) BlockResults

func (mock *ClientMock) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error)

BlockResults calls BlockResultsFunc.

func (*ClientMock) BlockResultsCalls

func (mock *ClientMock) BlockResultsCalls() []struct {
	Ctx    context.Context
	Height *int64
}

BlockResultsCalls gets all the calls that were made to BlockResults. Check the length with:

len(mockedClient.BlockResultsCalls())

func (*ClientMock) BlockSearch

func (mock *ClientMock) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error)

BlockSearch calls BlockSearchFunc.

func (*ClientMock) BlockSearchCalls

func (mock *ClientMock) BlockSearchCalls() []struct {
	Ctx     context.Context
	Query   string
	Page    *int
	PerPage *int
	OrderBy string
}

BlockSearchCalls gets all the calls that were made to BlockSearch. Check the length with:

len(mockedClient.BlockSearchCalls())

func (*ClientMock) BlockchainInfo

func (mock *ClientMock) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error)

BlockchainInfo calls BlockchainInfoFunc.

func (*ClientMock) BlockchainInfoCalls

func (mock *ClientMock) BlockchainInfoCalls() []struct {
	Ctx       context.Context
	MinHeight int64
	MaxHeight int64
}

BlockchainInfoCalls gets all the calls that were made to BlockchainInfo. Check the length with:

len(mockedClient.BlockchainInfoCalls())

func (*ClientMock) BroadcastEvidence

func (mock *ClientMock) BroadcastEvidence(contextMoqParam context.Context, evidence tenderminttypes.Evidence) (*coretypes.ResultBroadcastEvidence, error)

BroadcastEvidence calls BroadcastEvidenceFunc.

func (*ClientMock) BroadcastEvidenceCalls

func (mock *ClientMock) BroadcastEvidenceCalls() []struct {
	ContextMoqParam context.Context
	Evidence        tenderminttypes.Evidence
}

BroadcastEvidenceCalls gets all the calls that were made to BroadcastEvidence. Check the length with:

len(mockedClient.BroadcastEvidenceCalls())

func (*ClientMock) BroadcastTxAsync

func (mock *ClientMock) BroadcastTxAsync(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error)

BroadcastTxAsync calls BroadcastTxAsyncFunc.

func (*ClientMock) BroadcastTxAsyncCalls

func (mock *ClientMock) BroadcastTxAsyncCalls() []struct {
	ContextMoqParam context.Context
	Tx              tenderminttypes.Tx
}

BroadcastTxAsyncCalls gets all the calls that were made to BroadcastTxAsync. Check the length with:

len(mockedClient.BroadcastTxAsyncCalls())

func (*ClientMock) BroadcastTxCommit

func (mock *ClientMock) BroadcastTxCommit(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTxCommit, error)

BroadcastTxCommit calls BroadcastTxCommitFunc.

func (*ClientMock) BroadcastTxCommitCalls

func (mock *ClientMock) BroadcastTxCommitCalls() []struct {
	ContextMoqParam context.Context
	Tx              tenderminttypes.Tx
}

BroadcastTxCommitCalls gets all the calls that were made to BroadcastTxCommit. Check the length with:

len(mockedClient.BroadcastTxCommitCalls())

func (*ClientMock) BroadcastTxSync

func (mock *ClientMock) BroadcastTxSync(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error)

BroadcastTxSync calls BroadcastTxSyncFunc.

func (*ClientMock) BroadcastTxSyncCalls

func (mock *ClientMock) BroadcastTxSyncCalls() []struct {
	ContextMoqParam context.Context
	Tx              tenderminttypes.Tx
}

BroadcastTxSyncCalls gets all the calls that were made to BroadcastTxSync. Check the length with:

len(mockedClient.BroadcastTxSyncCalls())

func (*ClientMock) CheckTx

func (mock *ClientMock) CheckTx(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultCheckTx, error)

CheckTx calls CheckTxFunc.

func (*ClientMock) CheckTxCalls

func (mock *ClientMock) CheckTxCalls() []struct {
	ContextMoqParam context.Context
	Tx              tenderminttypes.Tx
}

CheckTxCalls gets all the calls that were made to CheckTx. Check the length with:

len(mockedClient.CheckTxCalls())

func (*ClientMock) Commit

func (mock *ClientMock) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)

Commit calls CommitFunc.

func (*ClientMock) CommitCalls

func (mock *ClientMock) CommitCalls() []struct {
	Ctx    context.Context
	Height *int64
}

CommitCalls gets all the calls that were made to Commit. Check the length with:

len(mockedClient.CommitCalls())

func (*ClientMock) ConsensusParams

func (mock *ClientMock) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error)

ConsensusParams calls ConsensusParamsFunc.

func (*ClientMock) ConsensusParamsCalls

func (mock *ClientMock) ConsensusParamsCalls() []struct {
	Ctx    context.Context
	Height *int64
}

ConsensusParamsCalls gets all the calls that were made to ConsensusParams. Check the length with:

len(mockedClient.ConsensusParamsCalls())

func (*ClientMock) ConsensusState

func (mock *ClientMock) ConsensusState(contextMoqParam context.Context) (*coretypes.ResultConsensusState, error)

ConsensusState calls ConsensusStateFunc.

func (*ClientMock) ConsensusStateCalls

func (mock *ClientMock) ConsensusStateCalls() []struct {
	ContextMoqParam context.Context
}

ConsensusStateCalls gets all the calls that were made to ConsensusState. Check the length with:

len(mockedClient.ConsensusStateCalls())

func (*ClientMock) DumpConsensusState

func (mock *ClientMock) DumpConsensusState(contextMoqParam context.Context) (*coretypes.ResultDumpConsensusState, error)

DumpConsensusState calls DumpConsensusStateFunc.

func (*ClientMock) DumpConsensusStateCalls

func (mock *ClientMock) DumpConsensusStateCalls() []struct {
	ContextMoqParam context.Context
}

DumpConsensusStateCalls gets all the calls that were made to DumpConsensusState. Check the length with:

len(mockedClient.DumpConsensusStateCalls())

func (*ClientMock) Genesis

func (mock *ClientMock) Genesis(contextMoqParam context.Context) (*coretypes.ResultGenesis, error)

Genesis calls GenesisFunc.

func (*ClientMock) GenesisCalls

func (mock *ClientMock) GenesisCalls() []struct {
	ContextMoqParam context.Context
}

GenesisCalls gets all the calls that were made to Genesis. Check the length with:

len(mockedClient.GenesisCalls())

func (*ClientMock) GenesisChunked

func (mock *ClientMock) GenesisChunked(contextMoqParam context.Context, v uint) (*coretypes.ResultGenesisChunk, error)

GenesisChunked calls GenesisChunkedFunc.

func (*ClientMock) GenesisChunkedCalls

func (mock *ClientMock) GenesisChunkedCalls() []struct {
	ContextMoqParam context.Context
	V               uint
}

GenesisChunkedCalls gets all the calls that were made to GenesisChunked. Check the length with:

len(mockedClient.GenesisChunkedCalls())

func (*ClientMock) Health

func (mock *ClientMock) Health(contextMoqParam context.Context) (*coretypes.ResultHealth, error)

Health calls HealthFunc.

func (*ClientMock) HealthCalls

func (mock *ClientMock) HealthCalls() []struct {
	ContextMoqParam context.Context
}

HealthCalls gets all the calls that were made to Health. Check the length with:

len(mockedClient.HealthCalls())

func (*ClientMock) IsRunning

func (mock *ClientMock) IsRunning() bool

IsRunning calls IsRunningFunc.

func (*ClientMock) IsRunningCalls

func (mock *ClientMock) IsRunningCalls() []struct {
}

IsRunningCalls gets all the calls that were made to IsRunning. Check the length with:

len(mockedClient.IsRunningCalls())

func (*ClientMock) NetInfo

func (mock *ClientMock) NetInfo(contextMoqParam context.Context) (*coretypes.ResultNetInfo, error)

NetInfo calls NetInfoFunc.

func (*ClientMock) NetInfoCalls

func (mock *ClientMock) NetInfoCalls() []struct {
	ContextMoqParam context.Context
}

NetInfoCalls gets all the calls that were made to NetInfo. Check the length with:

len(mockedClient.NetInfoCalls())

func (*ClientMock) NumUnconfirmedTxs

func (mock *ClientMock) NumUnconfirmedTxs(contextMoqParam context.Context) (*coretypes.ResultUnconfirmedTxs, error)

NumUnconfirmedTxs calls NumUnconfirmedTxsFunc.

func (*ClientMock) NumUnconfirmedTxsCalls

func (mock *ClientMock) NumUnconfirmedTxsCalls() []struct {
	ContextMoqParam context.Context
}

NumUnconfirmedTxsCalls gets all the calls that were made to NumUnconfirmedTxs. Check the length with:

len(mockedClient.NumUnconfirmedTxsCalls())

func (*ClientMock) OnReset

func (mock *ClientMock) OnReset() error

OnReset calls OnResetFunc.

func (*ClientMock) OnResetCalls

func (mock *ClientMock) OnResetCalls() []struct {
}

OnResetCalls gets all the calls that were made to OnReset. Check the length with:

len(mockedClient.OnResetCalls())

func (*ClientMock) OnStart

func (mock *ClientMock) OnStart() error

OnStart calls OnStartFunc.

func (*ClientMock) OnStartCalls

func (mock *ClientMock) OnStartCalls() []struct {
}

OnStartCalls gets all the calls that were made to OnStart. Check the length with:

len(mockedClient.OnStartCalls())

func (*ClientMock) OnStop

func (mock *ClientMock) OnStop()

OnStop calls OnStopFunc.

func (*ClientMock) OnStopCalls

func (mock *ClientMock) OnStopCalls() []struct {
}

OnStopCalls gets all the calls that were made to OnStop. Check the length with:

len(mockedClient.OnStopCalls())

func (*ClientMock) Quit

func (mock *ClientMock) Quit() <-chan struct{}

Quit calls QuitFunc.

func (*ClientMock) QuitCalls

func (mock *ClientMock) QuitCalls() []struct {
}

QuitCalls gets all the calls that were made to Quit. Check the length with:

len(mockedClient.QuitCalls())

func (*ClientMock) Reset

func (mock *ClientMock) Reset() error

Reset calls ResetFunc.

func (*ClientMock) ResetCalls

func (mock *ClientMock) ResetCalls() []struct {
}

ResetCalls gets all the calls that were made to Reset. Check the length with:

len(mockedClient.ResetCalls())

func (*ClientMock) SetLogger

func (mock *ClientMock) SetLogger(logger log.Logger)

SetLogger calls SetLoggerFunc.

func (*ClientMock) SetLoggerCalls

func (mock *ClientMock) SetLoggerCalls() []struct {
	Logger log.Logger
}

SetLoggerCalls gets all the calls that were made to SetLogger. Check the length with:

len(mockedClient.SetLoggerCalls())

func (*ClientMock) Start

func (mock *ClientMock) Start() error

Start calls StartFunc.

func (*ClientMock) StartCalls

func (mock *ClientMock) StartCalls() []struct {
}

StartCalls gets all the calls that were made to Start. Check the length with:

len(mockedClient.StartCalls())

func (*ClientMock) Status

func (mock *ClientMock) Status(contextMoqParam context.Context) (*coretypes.ResultStatus, error)

Status calls StatusFunc.

func (*ClientMock) StatusCalls

func (mock *ClientMock) StatusCalls() []struct {
	ContextMoqParam context.Context
}

StatusCalls gets all the calls that were made to Status. Check the length with:

len(mockedClient.StatusCalls())

func (*ClientMock) Stop

func (mock *ClientMock) Stop() error

Stop calls StopFunc.

func (*ClientMock) StopCalls

func (mock *ClientMock) StopCalls() []struct {
}

StopCalls gets all the calls that were made to Stop. Check the length with:

len(mockedClient.StopCalls())

func (*ClientMock) String

func (mock *ClientMock) String() string

String calls StringFunc.

func (*ClientMock) StringCalls

func (mock *ClientMock) StringCalls() []struct {
}

StringCalls gets all the calls that were made to String. Check the length with:

len(mockedClient.StringCalls())

func (*ClientMock) Subscribe

func (mock *ClientMock) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error)

Subscribe calls SubscribeFunc.

func (*ClientMock) SubscribeCalls

func (mock *ClientMock) SubscribeCalls() []struct {
	Ctx         context.Context
	Subscriber  string
	Query       string
	OutCapacity []int
}

SubscribeCalls gets all the calls that were made to Subscribe. Check the length with:

len(mockedClient.SubscribeCalls())

func (*ClientMock) Tx

func (mock *ClientMock) Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)

Tx calls TxFunc.

func (*ClientMock) TxCalls

func (mock *ClientMock) TxCalls() []struct {
	Ctx   context.Context
	Hash  []byte
	Prove bool
}

TxCalls gets all the calls that were made to Tx. Check the length with:

len(mockedClient.TxCalls())

func (*ClientMock) TxSearch

func (mock *ClientMock) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error)

TxSearch calls TxSearchFunc.

func (*ClientMock) TxSearchCalls

func (mock *ClientMock) TxSearchCalls() []struct {
	Ctx     context.Context
	Query   string
	Prove   bool
	Page    *int
	PerPage *int
	OrderBy string
}

TxSearchCalls gets all the calls that were made to TxSearch. Check the length with:

len(mockedClient.TxSearchCalls())

func (*ClientMock) UnconfirmedTxs

func (mock *ClientMock) UnconfirmedTxs(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error)

UnconfirmedTxs calls UnconfirmedTxsFunc.

func (*ClientMock) UnconfirmedTxsCalls

func (mock *ClientMock) UnconfirmedTxsCalls() []struct {
	Ctx   context.Context
	Limit *int
}

UnconfirmedTxsCalls gets all the calls that were made to UnconfirmedTxs. Check the length with:

len(mockedClient.UnconfirmedTxsCalls())

func (*ClientMock) Unsubscribe

func (mock *ClientMock) Unsubscribe(ctx context.Context, subscriber string, query string) error

Unsubscribe calls UnsubscribeFunc.

func (*ClientMock) UnsubscribeAll

func (mock *ClientMock) UnsubscribeAll(ctx context.Context, subscriber string) error

UnsubscribeAll calls UnsubscribeAllFunc.

func (*ClientMock) UnsubscribeAllCalls

func (mock *ClientMock) UnsubscribeAllCalls() []struct {
	Ctx        context.Context
	Subscriber string
}

UnsubscribeAllCalls gets all the calls that were made to UnsubscribeAll. Check the length with:

len(mockedClient.UnsubscribeAllCalls())

func (*ClientMock) UnsubscribeCalls

func (mock *ClientMock) UnsubscribeCalls() []struct {
	Ctx        context.Context
	Subscriber string
	Query      string
}

UnsubscribeCalls gets all the calls that were made to Unsubscribe. Check the length with:

len(mockedClient.UnsubscribeCalls())

func (*ClientMock) Validators

func (mock *ClientMock) Validators(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error)

Validators calls ValidatorsFunc.

func (*ClientMock) ValidatorsCalls

func (mock *ClientMock) ValidatorsCalls() []struct {
	Ctx     context.Context
	Height  *int64
	Page    *int
	PerPage *int
}

ValidatorsCalls gets all the calls that were made to Validators. Check the length with:

len(mockedClient.ValidatorsCalls())

type Info

type Info keyring.Info

Info wrapper for github.com/cosmos/cosmos-sdk/crypto/keyring.Info

type InfoMock

type InfoMock struct {
	// GetAddressFunc mocks the GetAddress method.
	GetAddressFunc func() sdk.AccAddress

	// GetAlgoFunc mocks the GetAlgo method.
	GetAlgoFunc func() hd.PubKeyType

	// GetNameFunc mocks the GetName method.
	GetNameFunc func() string

	// GetPathFunc mocks the GetPath method.
	GetPathFunc func() (*hd.BIP44Params, error)

	// GetPubKeyFunc mocks the GetPubKey method.
	GetPubKeyFunc func() cryptotypes.PubKey

	// GetTypeFunc mocks the GetType method.
	GetTypeFunc func() keyring.KeyType
	// contains filtered or unexported fields
}

InfoMock is a mock implementation of Info.

func TestSomethingThatUsesInfo(t *testing.T) {

	// make and configure a mocked Info
	mockedInfo := &InfoMock{
		GetAddressFunc: func() sdk.AccAddress {
			panic("mock out the GetAddress method")
		},
		GetAlgoFunc: func() hd.PubKeyType {
			panic("mock out the GetAlgo method")
		},
		GetNameFunc: func() string {
			panic("mock out the GetName method")
		},
		GetPathFunc: func() (*hd.BIP44Params, error) {
			panic("mock out the GetPath method")
		},
		GetPubKeyFunc: func() cryptotypes.PubKey {
			panic("mock out the GetPubKey method")
		},
		GetTypeFunc: func() keyring.KeyType {
			panic("mock out the GetType method")
		},
	}

	// use mockedInfo in code that requires Info
	// and then make assertions.

}

func (*InfoMock) GetAddress

func (mock *InfoMock) GetAddress() sdk.AccAddress

GetAddress calls GetAddressFunc.

func (*InfoMock) GetAddressCalls

func (mock *InfoMock) GetAddressCalls() []struct {
}

GetAddressCalls gets all the calls that were made to GetAddress. Check the length with:

len(mockedInfo.GetAddressCalls())

func (*InfoMock) GetAlgo

func (mock *InfoMock) GetAlgo() hd.PubKeyType

GetAlgo calls GetAlgoFunc.

func (*InfoMock) GetAlgoCalls

func (mock *InfoMock) GetAlgoCalls() []struct {
}

GetAlgoCalls gets all the calls that were made to GetAlgo. Check the length with:

len(mockedInfo.GetAlgoCalls())

func (*InfoMock) GetName

func (mock *InfoMock) GetName() string

GetName calls GetNameFunc.

func (*InfoMock) GetNameCalls

func (mock *InfoMock) GetNameCalls() []struct {
}

GetNameCalls gets all the calls that were made to GetName. Check the length with:

len(mockedInfo.GetNameCalls())

func (*InfoMock) GetPath

func (mock *InfoMock) GetPath() (*hd.BIP44Params, error)

GetPath calls GetPathFunc.

func (*InfoMock) GetPathCalls

func (mock *InfoMock) GetPathCalls() []struct {
}

GetPathCalls gets all the calls that were made to GetPath. Check the length with:

len(mockedInfo.GetPathCalls())

func (*InfoMock) GetPubKey

func (mock *InfoMock) GetPubKey() cryptotypes.PubKey

GetPubKey calls GetPubKeyFunc.

func (*InfoMock) GetPubKeyCalls

func (mock *InfoMock) GetPubKeyCalls() []struct {
}

GetPubKeyCalls gets all the calls that were made to GetPubKey. Check the length with:

len(mockedInfo.GetPubKeyCalls())

func (*InfoMock) GetType

func (mock *InfoMock) GetType() keyring.KeyType

GetType calls GetTypeFunc.

func (*InfoMock) GetTypeCalls

func (mock *InfoMock) GetTypeCalls() []struct {
}

GetTypeCalls gets all the calls that were made to GetType. Check the length with:

len(mockedInfo.GetTypeCalls())

type Keyring

type Keyring keyring.Keyring

Keyring wrapper for github.com/cosmos/cosmos-sdk/crypto/keyring.Keyring

type KeyringMock

type KeyringMock struct {
	// DeleteFunc mocks the Delete method.
	DeleteFunc func(uid string) error

	// DeleteByAddressFunc mocks the DeleteByAddress method.
	DeleteByAddressFunc func(address sdk.Address) error

	// ExportPrivKeyArmorFunc mocks the ExportPrivKeyArmor method.
	ExportPrivKeyArmorFunc func(uid string, encryptPassphrase string) (string, error)

	// ExportPrivKeyArmorByAddressFunc mocks the ExportPrivKeyArmorByAddress method.
	ExportPrivKeyArmorByAddressFunc func(address sdk.Address, encryptPassphrase string) (string, error)

	// ExportPubKeyArmorFunc mocks the ExportPubKeyArmor method.
	ExportPubKeyArmorFunc func(uid string) (string, error)

	// ExportPubKeyArmorByAddressFunc mocks the ExportPubKeyArmorByAddress method.
	ExportPubKeyArmorByAddressFunc func(address sdk.Address) (string, error)

	// ImportPrivKeyFunc mocks the ImportPrivKey method.
	ImportPrivKeyFunc func(uid string, armor string, passphrase string) error

	// ImportPubKeyFunc mocks the ImportPubKey method.
	ImportPubKeyFunc func(uid string, armor string) error

	// KeyFunc mocks the Key method.
	KeyFunc func(uid string) (keyring.Info, error)

	// KeyByAddressFunc mocks the KeyByAddress method.
	KeyByAddressFunc func(address sdk.Address) (keyring.Info, error)

	// ListFunc mocks the List method.
	ListFunc func() ([]keyring.Info, error)

	// NewAccountFunc mocks the NewAccount method.
	NewAccountFunc func(uid string, mnemonic string, bip39Passphrase string, hdPath string, algo keyring.SignatureAlgo) (keyring.Info, error)

	// NewMnemonicFunc mocks the NewMnemonic method.
	NewMnemonicFunc func(uid string, language keyring.Language, hdPath string, bip39Passphrase string, algo keyring.SignatureAlgo) (keyring.Info, string, error)

	// SaveLedgerKeyFunc mocks the SaveLedgerKey method.
	SaveLedgerKeyFunc func(uid string, algo keyring.SignatureAlgo, hrp string, coinType uint32, account uint32, index uint32) (keyring.Info, error)

	// SaveMultisigFunc mocks the SaveMultisig method.
	SaveMultisigFunc func(uid string, pubkey cryptotypes.PubKey) (keyring.Info, error)

	// SavePubKeyFunc mocks the SavePubKey method.
	SavePubKeyFunc func(uid string, pubkey cryptotypes.PubKey, algo hd.PubKeyType) (keyring.Info, error)

	// SignFunc mocks the Sign method.
	SignFunc func(uid string, msg []byte) ([]byte, cryptotypes.PubKey, error)

	// SignByAddressFunc mocks the SignByAddress method.
	SignByAddressFunc func(address sdk.Address, msg []byte) ([]byte, cryptotypes.PubKey, error)

	// SupportedAlgorithmsFunc mocks the SupportedAlgorithms method.
	SupportedAlgorithmsFunc func() (keyring.SigningAlgoList, keyring.SigningAlgoList)
	// contains filtered or unexported fields
}

KeyringMock is a mock implementation of Keyring.

func TestSomethingThatUsesKeyring(t *testing.T) {

	// make and configure a mocked Keyring
	mockedKeyring := &KeyringMock{
		DeleteFunc: func(uid string) error {
			panic("mock out the Delete method")
		},
		DeleteByAddressFunc: func(address sdk.Address) error {
			panic("mock out the DeleteByAddress method")
		},
		ExportPrivKeyArmorFunc: func(uid string, encryptPassphrase string) (string, error) {
			panic("mock out the ExportPrivKeyArmor method")
		},
		ExportPrivKeyArmorByAddressFunc: func(address sdk.Address, encryptPassphrase string) (string, error) {
			panic("mock out the ExportPrivKeyArmorByAddress method")
		},
		ExportPubKeyArmorFunc: func(uid string) (string, error) {
			panic("mock out the ExportPubKeyArmor method")
		},
		ExportPubKeyArmorByAddressFunc: func(address sdk.Address) (string, error) {
			panic("mock out the ExportPubKeyArmorByAddress method")
		},
		ImportPrivKeyFunc: func(uid string, armor string, passphrase string) error {
			panic("mock out the ImportPrivKey method")
		},
		ImportPubKeyFunc: func(uid string, armor string) error {
			panic("mock out the ImportPubKey method")
		},
		KeyFunc: func(uid string) (keyring.Info, error) {
			panic("mock out the Key method")
		},
		KeyByAddressFunc: func(address sdk.Address) (keyring.Info, error) {
			panic("mock out the KeyByAddress method")
		},
		ListFunc: func() ([]keyring.Info, error) {
			panic("mock out the List method")
		},
		NewAccountFunc: func(uid string, mnemonic string, bip39Passphrase string, hdPath string, algo keyring.SignatureAlgo) (keyring.Info, error) {
			panic("mock out the NewAccount method")
		},
		NewMnemonicFunc: func(uid string, language keyring.Language, hdPath string, bip39Passphrase string, algo keyring.SignatureAlgo) (keyring.Info, string, error) {
			panic("mock out the NewMnemonic method")
		},
		SaveLedgerKeyFunc: func(uid string, algo keyring.SignatureAlgo, hrp string, coinType uint32, account uint32, index uint32) (keyring.Info, error) {
			panic("mock out the SaveLedgerKey method")
		},
		SaveMultisigFunc: func(uid string, pubkey cryptotypes.PubKey) (keyring.Info, error) {
			panic("mock out the SaveMultisig method")
		},
		SavePubKeyFunc: func(uid string, pubkey cryptotypes.PubKey, algo hd.PubKeyType) (keyring.Info, error) {
			panic("mock out the SavePubKey method")
		},
		SignFunc: func(uid string, msg []byte) ([]byte, cryptotypes.PubKey, error) {
			panic("mock out the Sign method")
		},
		SignByAddressFunc: func(address sdk.Address, msg []byte) ([]byte, cryptotypes.PubKey, error) {
			panic("mock out the SignByAddress method")
		},
		SupportedAlgorithmsFunc: func() (keyring.SigningAlgoList, keyring.SigningAlgoList) {
			panic("mock out the SupportedAlgorithms method")
		},
	}

	// use mockedKeyring in code that requires Keyring
	// and then make assertions.

}

func (*KeyringMock) Delete

func (mock *KeyringMock) Delete(uid string) error

Delete calls DeleteFunc.

func (*KeyringMock) DeleteByAddress

func (mock *KeyringMock) DeleteByAddress(address sdk.Address) error

DeleteByAddress calls DeleteByAddressFunc.

func (*KeyringMock) DeleteByAddressCalls

func (mock *KeyringMock) DeleteByAddressCalls() []struct {
	Address sdk.Address
}

DeleteByAddressCalls gets all the calls that were made to DeleteByAddress. Check the length with:

len(mockedKeyring.DeleteByAddressCalls())

func (*KeyringMock) DeleteCalls

func (mock *KeyringMock) DeleteCalls() []struct {
	UID string
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedKeyring.DeleteCalls())

func (*KeyringMock) ExportPrivKeyArmor

func (mock *KeyringMock) ExportPrivKeyArmor(uid string, encryptPassphrase string) (string, error)

ExportPrivKeyArmor calls ExportPrivKeyArmorFunc.

func (*KeyringMock) ExportPrivKeyArmorByAddress

func (mock *KeyringMock) ExportPrivKeyArmorByAddress(address sdk.Address, encryptPassphrase string) (string, error)

ExportPrivKeyArmorByAddress calls ExportPrivKeyArmorByAddressFunc.

func (*KeyringMock) ExportPrivKeyArmorByAddressCalls

func (mock *KeyringMock) ExportPrivKeyArmorByAddressCalls() []struct {
	Address           sdk.Address
	EncryptPassphrase string
}

ExportPrivKeyArmorByAddressCalls gets all the calls that were made to ExportPrivKeyArmorByAddress. Check the length with:

len(mockedKeyring.ExportPrivKeyArmorByAddressCalls())

func (*KeyringMock) ExportPrivKeyArmorCalls

func (mock *KeyringMock) ExportPrivKeyArmorCalls() []struct {
	UID               string
	EncryptPassphrase string
}

ExportPrivKeyArmorCalls gets all the calls that were made to ExportPrivKeyArmor. Check the length with:

len(mockedKeyring.ExportPrivKeyArmorCalls())

func (*KeyringMock) ExportPubKeyArmor

func (mock *KeyringMock) ExportPubKeyArmor(uid string) (string, error)

ExportPubKeyArmor calls ExportPubKeyArmorFunc.

func (*KeyringMock) ExportPubKeyArmorByAddress

func (mock *KeyringMock) ExportPubKeyArmorByAddress(address sdk.Address) (string, error)

ExportPubKeyArmorByAddress calls ExportPubKeyArmorByAddressFunc.

func (*KeyringMock) ExportPubKeyArmorByAddressCalls

func (mock *KeyringMock) ExportPubKeyArmorByAddressCalls() []struct {
	Address sdk.Address
}

ExportPubKeyArmorByAddressCalls gets all the calls that were made to ExportPubKeyArmorByAddress. Check the length with:

len(mockedKeyring.ExportPubKeyArmorByAddressCalls())

func (*KeyringMock) ExportPubKeyArmorCalls

func (mock *KeyringMock) ExportPubKeyArmorCalls() []struct {
	UID string
}

ExportPubKeyArmorCalls gets all the calls that were made to ExportPubKeyArmor. Check the length with:

len(mockedKeyring.ExportPubKeyArmorCalls())

func (*KeyringMock) ImportPrivKey

func (mock *KeyringMock) ImportPrivKey(uid string, armor string, passphrase string) error

ImportPrivKey calls ImportPrivKeyFunc.

func (*KeyringMock) ImportPrivKeyCalls

func (mock *KeyringMock) ImportPrivKeyCalls() []struct {
	UID        string
	Armor      string
	Passphrase string
}

ImportPrivKeyCalls gets all the calls that were made to ImportPrivKey. Check the length with:

len(mockedKeyring.ImportPrivKeyCalls())

func (*KeyringMock) ImportPubKey

func (mock *KeyringMock) ImportPubKey(uid string, armor string) error

ImportPubKey calls ImportPubKeyFunc.

func (*KeyringMock) ImportPubKeyCalls

func (mock *KeyringMock) ImportPubKeyCalls() []struct {
	UID   string
	Armor string
}

ImportPubKeyCalls gets all the calls that were made to ImportPubKey. Check the length with:

len(mockedKeyring.ImportPubKeyCalls())

func (*KeyringMock) Key

func (mock *KeyringMock) Key(uid string) (keyring.Info, error)

Key calls KeyFunc.

func (*KeyringMock) KeyByAddress

func (mock *KeyringMock) KeyByAddress(address sdk.Address) (keyring.Info, error)

KeyByAddress calls KeyByAddressFunc.

func (*KeyringMock) KeyByAddressCalls

func (mock *KeyringMock) KeyByAddressCalls() []struct {
	Address sdk.Address
}

KeyByAddressCalls gets all the calls that were made to KeyByAddress. Check the length with:

len(mockedKeyring.KeyByAddressCalls())

func (*KeyringMock) KeyCalls

func (mock *KeyringMock) KeyCalls() []struct {
	UID string
}

KeyCalls gets all the calls that were made to Key. Check the length with:

len(mockedKeyring.KeyCalls())

func (*KeyringMock) List

func (mock *KeyringMock) List() ([]keyring.Info, error)

List calls ListFunc.

func (*KeyringMock) ListCalls

func (mock *KeyringMock) ListCalls() []struct {
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedKeyring.ListCalls())

func (*KeyringMock) NewAccount

func (mock *KeyringMock) NewAccount(uid string, mnemonic string, bip39Passphrase string, hdPath string, algo keyring.SignatureAlgo) (keyring.Info, error)

NewAccount calls NewAccountFunc.

func (*KeyringMock) NewAccountCalls

func (mock *KeyringMock) NewAccountCalls() []struct {
	UID             string
	Mnemonic        string
	Bip39Passphrase string
	HdPath          string
	Algo            keyring.SignatureAlgo
}

NewAccountCalls gets all the calls that were made to NewAccount. Check the length with:

len(mockedKeyring.NewAccountCalls())

func (*KeyringMock) NewMnemonic

func (mock *KeyringMock) NewMnemonic(uid string, language keyring.Language, hdPath string, bip39Passphrase string, algo keyring.SignatureAlgo) (keyring.Info, string, error)

NewMnemonic calls NewMnemonicFunc.

func (*KeyringMock) NewMnemonicCalls

func (mock *KeyringMock) NewMnemonicCalls() []struct {
	UID             string
	Language        keyring.Language
	HdPath          string
	Bip39Passphrase string
	Algo            keyring.SignatureAlgo
}

NewMnemonicCalls gets all the calls that were made to NewMnemonic. Check the length with:

len(mockedKeyring.NewMnemonicCalls())

func (*KeyringMock) SaveLedgerKey

func (mock *KeyringMock) SaveLedgerKey(uid string, algo keyring.SignatureAlgo, hrp string, coinType uint32, account uint32, index uint32) (keyring.Info, error)

SaveLedgerKey calls SaveLedgerKeyFunc.

func (*KeyringMock) SaveLedgerKeyCalls

func (mock *KeyringMock) SaveLedgerKeyCalls() []struct {
	UID      string
	Algo     keyring.SignatureAlgo
	Hrp      string
	CoinType uint32
	Account  uint32
	Index    uint32
}

SaveLedgerKeyCalls gets all the calls that were made to SaveLedgerKey. Check the length with:

len(mockedKeyring.SaveLedgerKeyCalls())

func (*KeyringMock) SaveMultisig

func (mock *KeyringMock) SaveMultisig(uid string, pubkey cryptotypes.PubKey) (keyring.Info, error)

SaveMultisig calls SaveMultisigFunc.

func (*KeyringMock) SaveMultisigCalls

func (mock *KeyringMock) SaveMultisigCalls() []struct {
	UID    string
	Pubkey cryptotypes.PubKey
}

SaveMultisigCalls gets all the calls that were made to SaveMultisig. Check the length with:

len(mockedKeyring.SaveMultisigCalls())

func (*KeyringMock) SavePubKey

func (mock *KeyringMock) SavePubKey(uid string, pubkey cryptotypes.PubKey, algo hd.PubKeyType) (keyring.Info, error)

SavePubKey calls SavePubKeyFunc.

func (*KeyringMock) SavePubKeyCalls

func (mock *KeyringMock) SavePubKeyCalls() []struct {
	UID    string
	Pubkey cryptotypes.PubKey
	Algo   hd.PubKeyType
}

SavePubKeyCalls gets all the calls that were made to SavePubKey. Check the length with:

len(mockedKeyring.SavePubKeyCalls())

func (*KeyringMock) Sign

func (mock *KeyringMock) Sign(uid string, msg []byte) ([]byte, cryptotypes.PubKey, error)

Sign calls SignFunc.

func (*KeyringMock) SignByAddress

func (mock *KeyringMock) SignByAddress(address sdk.Address, msg []byte) ([]byte, cryptotypes.PubKey, error)

SignByAddress calls SignByAddressFunc.

func (*KeyringMock) SignByAddressCalls

func (mock *KeyringMock) SignByAddressCalls() []struct {
	Address sdk.Address
	Msg     []byte
}

SignByAddressCalls gets all the calls that were made to SignByAddress. Check the length with:

len(mockedKeyring.SignByAddressCalls())

func (*KeyringMock) SignCalls

func (mock *KeyringMock) SignCalls() []struct {
	UID string
	Msg []byte
}

SignCalls gets all the calls that were made to Sign. Check the length with:

len(mockedKeyring.SignCalls())

func (*KeyringMock) SupportedAlgorithms

func (mock *KeyringMock) SupportedAlgorithms() (keyring.SigningAlgoList, keyring.SigningAlgoList)

SupportedAlgorithms calls SupportedAlgorithmsFunc.

func (*KeyringMock) SupportedAlgorithmsCalls

func (mock *KeyringMock) SupportedAlgorithmsCalls() []struct {
}

SupportedAlgorithmsCalls gets all the calls that were made to SupportedAlgorithms. Check the length with:

len(mockedKeyring.SupportedAlgorithmsCalls())

Jump to

Keyboard shortcuts

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