mocks

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMockedSigning = errors.New("mocked signing error")

Functions

func MClose

func MClose(s *SECP256K1)

original: Close() error

func MEnsureExist

func MEnsureExist(m *AccountRetriever, e error)

original: EnsureExists(client.Context, ypes.AccAddress) error

func MGetAccount

func MGetAccount(m *AccountRetriever, acc client.Account, e error)

original: GetAccount(_ client.Context, _ sdk.AccAddress) (client.Account, error)

func MGetAccountNumberSequence

func MGetAccountNumberSequence(m *AccountRetriever, seq, num uint64, e error)

original: GetAccountNumberSequence(client.Context, types.AccAddress) (uint64, uint64, error)

func MGetAddressPubKeySECP256K1

func MGetAddressPubKeySECP256K1(s *SECP256K1, accAddr sdk.AccAddress, pubKey types.PubKey)

original: GetAddressPubKeySECP256K1([]uint32, string) ([]byte, string, error)

func MGetPublicKeySECP256K1

func MGetPublicKeySECP256K1(s *SECP256K1, pubKey types.PubKey)

original: GetPublicKeySECP256K1([]uint32) ([]byte, error)

func MSignSECP256K1

func MSignSECP256K1(s *SECP256K1, f func([]uint32, []byte) ([]byte, error), e error)

original: SignSECP256K1([]uint32, []byte) ([]byte, error)

Types

type AccountRetriever

type AccountRetriever struct {
	mock.Mock
}

AccountRetriever is an autogenerated mock type for the AccountRetriever type

func NewAccountRetriever

func NewAccountRetriever(t mockConstructorTestingTNewAccountRetriever) *AccountRetriever

NewAccountRetriever creates a new instance of AccountRetriever. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AccountRetriever) EnsureExists

func (_m *AccountRetriever) EnsureExists(clientCtx client.Context, addr types.AccAddress) error

EnsureExists provides a mock function with given fields: clientCtx, addr

func (*AccountRetriever) GetAccount

func (_m *AccountRetriever) GetAccount(clientCtx client.Context, addr types.AccAddress) (client.Account, error)

GetAccount provides a mock function with given fields: clientCtx, addr

func (*AccountRetriever) GetAccountNumberSequence

func (_m *AccountRetriever) GetAccountNumberSequence(clientCtx client.Context, addr types.AccAddress) (uint64, uint64, error)

GetAccountNumberSequence provides a mock function with given fields: clientCtx, addr

func (*AccountRetriever) GetAccountWithHeight

func (_m *AccountRetriever) GetAccountWithHeight(clientCtx client.Context, addr types.AccAddress) (client.Account, int64, error)

GetAccountWithHeight provides a mock function with given fields: clientCtx, addr

type MockTendermintRPC

type MockTendermintRPC struct {
	rpcclientmock.Client
	// contains filtered or unexported fields
}

func NewMockTendermintRPC

func NewMockTendermintRPC(respQuery abci.ResponseQuery) MockTendermintRPC

NewMockTendermintRPC returns a mock TendermintRPC implementation. It is used for CLI testing.

func (MockTendermintRPC) ABCIQueryWithOptions

func (MockTendermintRPC) BroadcastTxSync

type SECP256K1

type SECP256K1 struct {
	mock.Mock
}

SECP256K1 is an autogenerated mock type for the SECP256K1 type

func NewSECP256K1

func NewSECP256K1(t mockConstructorTestingTNewSECP256K1) *SECP256K1

NewSECP256K1 creates a new instance of SECP256K1. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SECP256K1) Close

func (_m *SECP256K1) Close() error

Close provides a mock function with given fields:

func (*SECP256K1) GetAddressPubKeySECP256K1

func (_m *SECP256K1) GetAddressPubKeySECP256K1(_a0 []uint32, _a1 string) ([]byte, string, error)

GetAddressPubKeySECP256K1 provides a mock function with given fields: _a0, _a1

func (*SECP256K1) GetPublicKeySECP256K1

func (_m *SECP256K1) GetPublicKeySECP256K1(_a0 []uint32) ([]byte, error)

GetPublicKeySECP256K1 provides a mock function with given fields: _a0

func (*SECP256K1) SignSECP256K1

func (_m *SECP256K1) SignSECP256K1(_a0 []uint32, _a1 []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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