testsCommon

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMockMarshalizer = errors.New("MarshalizerMock generic error")

ErrMockMarshalizer -

Functions

This section is empty.

Types

type CryptoComponentsHolderStub

type CryptoComponentsHolderStub struct {
	GetPublicKeyCalled      func() crypto.PublicKey
	GetPrivateKeyCalled     func() crypto.PrivateKey
	GetBech32Called         func() string
	GetAddressHandlerCalled func() core.AddressHandler
}

CryptoComponentsHolderStub -

func (*CryptoComponentsHolderStub) GetAddressHandler

func (stub *CryptoComponentsHolderStub) GetAddressHandler() core.AddressHandler

GetAddressHandler -

func (*CryptoComponentsHolderStub) GetBech32

func (stub *CryptoComponentsHolderStub) GetBech32() string

GetBech32 -

func (*CryptoComponentsHolderStub) GetPrivateKey

func (stub *CryptoComponentsHolderStub) GetPrivateKey() crypto.PrivateKey

GetPrivateKey -

func (*CryptoComponentsHolderStub) GetPublicKey

func (stub *CryptoComponentsHolderStub) GetPublicKey() crypto.PublicKey

GetPublicKey -

func (*CryptoComponentsHolderStub) IsInterfaceNil

func (stub *CryptoComponentsHolderStub) IsInterfaceNil() bool

IsInterfaceNil -

type FinalityProviderStub

type FinalityProviderStub struct {
	CheckShardFinalizationCalled func(ctx context.Context, targetShardID uint32, maxNoncesDelta uint64) error
}

FinalityProviderStub -

func (*FinalityProviderStub) CheckShardFinalization

func (stub *FinalityProviderStub) CheckShardFinalization(ctx context.Context, targetShardID uint32, maxNoncesDelta uint64) error

CheckShardFinalization -

func (*FinalityProviderStub) IsInterfaceNil

func (stub *FinalityProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

type HTTPClientWrapperStub

type HTTPClientWrapperStub struct {
	GetHTTPCalled  func(ctx context.Context, endpoint string) ([]byte, int, error)
	PostHTTPCalled func(ctx context.Context, endpoint string, data []byte) ([]byte, int, error)
}

HTTPClientWrapperStub -

func (*HTTPClientWrapperStub) GetHTTP

func (stub *HTTPClientWrapperStub) GetHTTP(ctx context.Context, endpoint string) ([]byte, int, error)

GetHTTP -

func (*HTTPClientWrapperStub) IsInterfaceNil

func (stub *HTTPClientWrapperStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HTTPClientWrapperStub) PostHTTP

func (stub *HTTPClientWrapperStub) PostHTTP(ctx context.Context, endpoint string, data []byte) ([]byte, int, error)

PostHTTP -

type HeaderSigVerifierStub

type HeaderSigVerifierStub struct {
	VerifyLeaderSignatureCalled            func(header data.HeaderHandler) error
	VerifyRandSeedCalled                   func(header data.HeaderHandler) error
	VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error
	VerifySignatureCalled                  func(header data.HeaderHandler) error
}

HeaderSigVerifierStub -

func (*HeaderSigVerifierStub) IsInterfaceNil

func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HeaderSigVerifierStub) VerifyLeaderSignature

func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error

VerifyLeaderSignature -

func (*HeaderSigVerifierStub) VerifyRandSeed

func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error

VerifyRandSeed -

func (*HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature

func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error

VerifyRandSeedAndLeaderSignature -

func (*HeaderSigVerifierStub) VerifySignature

func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error

VerifySignature -

type MarshalizerMock

type MarshalizerMock struct {
	Fail bool
}

MarshalizerMock that will be used for testing

func (MarshalizerMock) IsInterfaceNil

func (mm MarshalizerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (MarshalizerMock) Marshal

func (mm MarshalizerMock) Marshal(obj interface{}) ([]byte, error)

Marshal converts the input object in a slice of bytes

func (MarshalizerMock) Unmarshal

func (mm MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error

Unmarshal applies the serialized values over an instantiated object

type MarshalizerStub

type MarshalizerStub struct {
	MarshalCalled   func(obj interface{}) ([]byte, error)
	UnmarshalCalled func(obj interface{}, buff []byte) error
}

MarshalizerStub -

func (*MarshalizerStub) IsInterfaceNil

func (ms *MarshalizerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*MarshalizerStub) Marshal

func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)

Marshal -

func (*MarshalizerStub) Unmarshal

func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error

Unmarshal -

type NodesCoordinatorStub

type NodesCoordinatorStub struct {
	ComputeValidatorsGroupCalled                func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]nodesCoordinator.Validator, error)
	GetValidatorsPublicKeysCalled               func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
	GetValidatorsRewardsAddressesCalled         func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
	GetValidatorWithPublicKeyCalled             func(publicKey []byte) (validator nodesCoordinator.Validator, shardId uint32, err error)
	GetAllValidatorsPublicKeysCalled            func() (map[uint32][][]byte, error)
	ConsensusGroupSizeCalled                    func(shardID uint32) int
	SetNodesConfigFromValidatorsInfoCalled      func(epoch uint32, randomness []byte, validatorsInfo []*state.ShardValidatorInfo) error
	IsEpochInConfigCalled                       func(epoch uint32) bool
	GetAllShuffledOutValidatorsPublicKeysCalled func(epoch uint32) (map[uint32][][]byte, error)
	GetWaitingEpochsLeftForPublicKeyCalled      func(publicKey []byte) (uint32, error)
}

NodesCoordinatorStub -

func (*NodesCoordinatorStub) ComputeAdditionalLeaving

func (ncm *NodesCoordinatorStub) ComputeAdditionalLeaving(_ []*state.ShardValidatorInfo) (map[uint32][]nodesCoordinator.Validator, error)

ComputeAdditionalLeaving -

func (*NodesCoordinatorStub) ComputeConsensusGroup

func (ncm *NodesCoordinatorStub) ComputeConsensusGroup(
	randomness []byte,
	round uint64,
	shardId uint32,
	epoch uint32,
) (validatorsGroup []nodesCoordinator.Validator, err error)

ComputeConsensusGroup -

func (*NodesCoordinatorStub) ConsensusGroupSize

func (ncm *NodesCoordinatorStub) ConsensusGroupSize(shardID uint32) int

ConsensusGroupSize -

func (*NodesCoordinatorStub) GetAllEligibleValidatorsPublicKeys

func (ncm *NodesCoordinatorStub) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllEligibleValidatorsPublicKeys -

func (*NodesCoordinatorStub) GetAllLeavingValidatorsPublicKeys

func (ncm *NodesCoordinatorStub) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllLeavingValidatorsPublicKeys -

func (*NodesCoordinatorStub) GetAllShuffledOutValidatorsPublicKeys added in v1.4.0

func (ncm *NodesCoordinatorStub) GetAllShuffledOutValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error)

GetAllShuffledOutValidatorsPublicKeys -

func (*NodesCoordinatorStub) GetAllValidatorsPublicKeys

func (ncm *NodesCoordinatorStub) GetAllValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllValidatorsPublicKeys -

func (*NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys

func (ncm *NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllWaitingValidatorsPublicKeys -

func (*NodesCoordinatorStub) GetChance

func (ncm *NodesCoordinatorStub) GetChance(uint32) uint32

GetChance -

func (*NodesCoordinatorStub) GetConsensusValidatorsPublicKeys

func (ncm *NodesCoordinatorStub) GetConsensusValidatorsPublicKeys(
	randomness []byte,
	round uint64,
	shardId uint32,
	epoch uint32,
) ([]string, error)

GetConsensusValidatorsPublicKeys -

func (*NodesCoordinatorStub) GetConsensusWhitelistedNodes

func (ncm *NodesCoordinatorStub) GetConsensusWhitelistedNodes(
	_ uint32,
) (map[string]struct{}, error)

GetConsensusWhitelistedNodes return the whitelisted nodes allowed to send consensus messages, for each of the shards

func (*NodesCoordinatorStub) GetNumTotalEligible

func (ncm *NodesCoordinatorStub) GetNumTotalEligible() uint64

GetNumTotalEligible -

func (*NodesCoordinatorStub) GetOwnPublicKey

func (ncm *NodesCoordinatorStub) GetOwnPublicKey() []byte

GetOwnPublicKey -

func (*NodesCoordinatorStub) GetSavedStateKey

func (ncm *NodesCoordinatorStub) GetSavedStateKey() []byte

GetSavedStateKey -

func (*NodesCoordinatorStub) GetSelectedPublicKeys

func (ncm *NodesCoordinatorStub) GetSelectedPublicKeys(_ []byte, _ uint32, _ uint32) ([]string, error)

GetSelectedPublicKeys -

func (*NodesCoordinatorStub) GetValidatorWithPublicKey

func (ncm *NodesCoordinatorStub) GetValidatorWithPublicKey(publicKey []byte) (nodesCoordinator.Validator, uint32, error)

GetValidatorWithPublicKey -

func (*NodesCoordinatorStub) GetValidatorsIndexes

func (ncm *NodesCoordinatorStub) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)

GetValidatorsIndexes -

func (*NodesCoordinatorStub) GetWaitingEpochsLeftForPublicKey added in v1.4.0

func (ncm *NodesCoordinatorStub) GetWaitingEpochsLeftForPublicKey(publicKey []byte) (uint32, error)

GetWaitingEpochsLeftForPublicKey -

func (*NodesCoordinatorStub) IsEpochInConfig

func (ncm *NodesCoordinatorStub) IsEpochInConfig(epoch uint32) bool

IsEpochInConfig -

func (*NodesCoordinatorStub) IsInterfaceNil

func (ncm *NodesCoordinatorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*NodesCoordinatorStub) LoadState

func (ncm *NodesCoordinatorStub) LoadState(_ []byte) error

LoadState -

func (*NodesCoordinatorStub) SetConfig

SetConfig -

func (*NodesCoordinatorStub) SetNodesConfigFromValidatorsInfo

func (ncm *NodesCoordinatorStub) SetNodesConfigFromValidatorsInfo(epoch uint32, randomness []byte, validatorsInfo []*state.ShardValidatorInfo) error

SetNodesConfigFromValidatorsInfo -

func (*NodesCoordinatorStub) SetNodesPerShards

SetNodesPerShards -

func (*NodesCoordinatorStub) ShardIdForEpoch

func (ncm *NodesCoordinatorStub) ShardIdForEpoch(_ uint32) (uint32, error)

ShardIdForEpoch returns the nodesCoordinator configured ShardId for specified epoch if epoch configuration exists, otherwise error

func (*NodesCoordinatorStub) ShuffleOutForEpoch

func (ncm *NodesCoordinatorStub) ShuffleOutForEpoch(_ uint32)

ShuffleOutForEpoch verifies if the shards changed in the new epoch and calls the shuffleOutHandler

func (*NodesCoordinatorStub) ValidatorsWeights

func (ncm *NodesCoordinatorStub) ValidatorsWeights(_ []nodesCoordinator.Validator) ([]uint32, error)

ValidatorsWeights -

type PrivateKeyStub

type PrivateKeyStub struct {
	ToByteArrayCalled    func() ([]byte, error)
	SuiteCalled          func() crypto.Suite
	GeneratePublicCalled func() crypto.PublicKey
	ScalarCalled         func() crypto.Scalar
}

PrivateKeyStub -

func (*PrivateKeyStub) GeneratePublic

func (stub *PrivateKeyStub) GeneratePublic() crypto.PublicKey

GeneratePublic -

func (*PrivateKeyStub) IsInterfaceNil

func (stub *PrivateKeyStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PrivateKeyStub) Scalar

func (stub *PrivateKeyStub) Scalar() crypto.Scalar

Scalar -

func (*PrivateKeyStub) Suite

func (stub *PrivateKeyStub) Suite() crypto.Suite

Suite -

func (*PrivateKeyStub) ToByteArray

func (stub *PrivateKeyStub) ToByteArray() ([]byte, error)

ToByteArray -

type ProxyStub

type ProxyStub struct {
	GetNetworkConfigCalled               func() (*data.NetworkConfig, error)
	GetRatingsConfigCalled               func() (*data.RatingsConfig, error)
	GetEnableEpochsConfigCalled          func() (*data.EnableEpochsConfig, error)
	GetAccountCalled                     func(address sdkCore.AddressHandler) (*data.Account, error)
	SendTransactionCalled                func(tx *transaction.FrontendTransaction) (string, error)
	SendTransactionsCalled               func(txs []*transaction.FrontendTransaction) ([]string, error)
	ExecuteVMQueryCalled                 func(ctx context.Context, vmRequest *data.VmValueRequest) (*data.VmValuesResponseData, error)
	GetNonceAtEpochStartCalled           func(shardId uint32) (uint64, error)
	GetRawMiniBlockByHashCalled          func(shardId uint32, hash string, epoch uint32) ([]byte, error)
	GetRawBlockByNonceCalled             func(shardId uint32, nonce uint64) ([]byte, error)
	GetRawBlockByHashCalled              func(shardId uint32, hash string) ([]byte, error)
	GetRawStartOfEpochMetaBlockCalled    func(epoch uint32) ([]byte, error)
	GetGenesisNodesPubKeysCalled         func() (*data.GenesisNodes, error)
	GetNetworkStatusCalled               func(ctx context.Context, shardID uint32) (*data.NetworkStatus, error)
	GetShardOfAddressCalled              func(ctx context.Context, bech32Address string) (uint32, error)
	GetRestAPIEntityTypeCalled           func() sdkCore.RestAPIEntityType
	GetLatestHyperBlockNonceCalled       func(ctx context.Context) (uint64, error)
	GetHyperBlockByNonceCalled           func(ctx context.Context, nonce uint64) (*data.HyperBlock, error)
	GetHyperBlockByHashCalled            func(ctx context.Context, hash string) (*data.HyperBlock, error)
	GetDefaultTransactionArgumentsCalled func(ctx context.Context, address sdkCore.AddressHandler, networkConfigs *data.NetworkConfig) (transaction.FrontendTransaction, string, error)
	GetValidatorsInfoByEpochCalled       func(ctx context.Context, epoch uint32) ([]*state.ShardValidatorInfo, error)
	GetGuardianDataCalled                func(ctx context.Context, address sdkCore.AddressHandler) (*api.GuardianData, error)
}

ProxyStub -

func (*ProxyStub) ExecuteVMQuery

func (stub *ProxyStub) ExecuteVMQuery(ctx context.Context, vmRequest *data.VmValueRequest) (*data.VmValuesResponseData, error)

ExecuteVMQuery -

func (*ProxyStub) GetAccount

func (stub *ProxyStub) GetAccount(_ context.Context, address sdkCore.AddressHandler) (*data.Account, error)

GetAccount -

func (*ProxyStub) GetDefaultTransactionArguments

func (stub *ProxyStub) GetDefaultTransactionArguments(ctx context.Context, address sdkCore.AddressHandler, networkConfigs *data.NetworkConfig) (transaction.FrontendTransaction, string, error)

GetDefaultTransactionArguments -

func (*ProxyStub) GetEnableEpochsConfig

func (stub *ProxyStub) GetEnableEpochsConfig(_ context.Context) (*data.EnableEpochsConfig, error)

GetEnableEpochsConfig -

func (*ProxyStub) GetGenesisNodesPubKeys

func (stub *ProxyStub) GetGenesisNodesPubKeys(_ context.Context) (*data.GenesisNodes, error)

GetGenesisNodesPubKeys -

func (*ProxyStub) GetGuardianData added in v1.3.3

func (stub *ProxyStub) GetGuardianData(ctx context.Context, address sdkCore.AddressHandler) (*api.GuardianData, error)

GetGuardianData -

func (*ProxyStub) GetHyperBlockByHash added in v1.3.3

func (stub *ProxyStub) GetHyperBlockByHash(ctx context.Context, hash string) (*data.HyperBlock, error)

GetHyperBlockByHash -

func (*ProxyStub) GetHyperBlockByNonce

func (stub *ProxyStub) GetHyperBlockByNonce(ctx context.Context, nonce uint64) (*data.HyperBlock, error)

GetHyperBlockByNonce -

func (*ProxyStub) GetLatestHyperBlockNonce

func (stub *ProxyStub) GetLatestHyperBlockNonce(ctx context.Context) (uint64, error)

GetLatestHyperBlockNonce -

func (*ProxyStub) GetNetworkConfig

func (stub *ProxyStub) GetNetworkConfig(_ context.Context) (*data.NetworkConfig, error)

GetNetworkConfig -

func (*ProxyStub) GetNetworkStatus

func (stub *ProxyStub) GetNetworkStatus(ctx context.Context, shardID uint32) (*data.NetworkStatus, error)

GetNetworkStatus -

func (*ProxyStub) GetNonceAtEpochStart

func (stub *ProxyStub) GetNonceAtEpochStart(_ context.Context, shardId uint32) (uint64, error)

GetNonceAtEpochStart -

func (*ProxyStub) GetRatingsConfig

func (stub *ProxyStub) GetRatingsConfig(_ context.Context) (*data.RatingsConfig, error)

GetRatingsConfig -

func (*ProxyStub) GetRawBlockByHash

func (stub *ProxyStub) GetRawBlockByHash(_ context.Context, shardId uint32, hash string) ([]byte, error)

GetRawBlockByHash -

func (*ProxyStub) GetRawBlockByNonce

func (stub *ProxyStub) GetRawBlockByNonce(_ context.Context, shardId uint32, nonce uint64) ([]byte, error)

GetRawBlockByNonce -

func (*ProxyStub) GetRawMiniBlockByHash

func (stub *ProxyStub) GetRawMiniBlockByHash(_ context.Context, shardId uint32, hash string, epoch uint32) ([]byte, error)

GetRawMiniBlockByHash -

func (*ProxyStub) GetRawStartOfEpochMetaBlock

func (stub *ProxyStub) GetRawStartOfEpochMetaBlock(_ context.Context, epoch uint32) ([]byte, error)

GetRawStartOfEpochMetaBlock -

func (*ProxyStub) GetRestAPIEntityType

func (stub *ProxyStub) GetRestAPIEntityType() sdkCore.RestAPIEntityType

GetRestAPIEntityType -

func (*ProxyStub) GetShardOfAddress

func (stub *ProxyStub) GetShardOfAddress(ctx context.Context, bech32Address string) (uint32, error)

GetShardOfAddress -

func (*ProxyStub) GetValidatorsInfoByEpoch

func (stub *ProxyStub) GetValidatorsInfoByEpoch(ctx context.Context, epoch uint32) ([]*state.ShardValidatorInfo, error)

GetValidatorsInfoByEpoch -

func (*ProxyStub) IsInterfaceNil

func (stub *ProxyStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ProxyStub) SendTransaction

func (stub *ProxyStub) SendTransaction(_ context.Context, tx *transaction.FrontendTransaction) (string, error)

SendTransaction -

func (*ProxyStub) SendTransactions

func (stub *ProxyStub) SendTransactions(_ context.Context, txs []*transaction.FrontendTransaction) ([]string, error)

SendTransactions -

type PublicKeyStub

type PublicKeyStub struct {
	ToByteArrayCalled func() ([]byte, error)
	SuiteCalled       func() crypto.Suite
	PointCalled       func() crypto.Point
}

PublicKeyStub -

func (*PublicKeyStub) IsInterfaceNil

func (stub *PublicKeyStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PublicKeyStub) Point

func (stub *PublicKeyStub) Point() crypto.Point

Point -

func (*PublicKeyStub) Suite

func (stub *PublicKeyStub) Suite() crypto.Suite

Suite -

func (*PublicKeyStub) ToByteArray

func (stub *PublicKeyStub) ToByteArray() ([]byte, error)

ToByteArray -

type RawHeaderHandlerStub

type RawHeaderHandlerStub struct {
	GetMetaBlockByHashCalled        func(hash string) (data.MetaHeaderHandler, error)
	GetShardBlockByHashCalled       func(shardId uint32, hash string) (data.HeaderHandler, error)
	GetValidatorsInfoPerEpochCalled func(epoch uint32) ([]*state.ShardValidatorInfo, []byte, error)
}

RawHeaderHandlerStub -

func (*RawHeaderHandlerStub) GetMetaBlockByHash

func (rh *RawHeaderHandlerStub) GetMetaBlockByHash(_ context.Context, hash string) (data.MetaHeaderHandler, error)

GetMetaBlockByHash -

func (*RawHeaderHandlerStub) GetShardBlockByHash

func (rh *RawHeaderHandlerStub) GetShardBlockByHash(_ context.Context, shardId uint32, hash string) (data.HeaderHandler, error)

GetShardBlockByHash -

func (*RawHeaderHandlerStub) GetValidatorsInfoPerEpoch

func (rh *RawHeaderHandlerStub) GetValidatorsInfoPerEpoch(_ context.Context, epoch uint32) ([]*state.ShardValidatorInfo, []byte, error)

GetValidatorsInfoPerEpoch -

func (*RawHeaderHandlerStub) IsInterfaceNil

func (rh *RawHeaderHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

type SignerStub

type SignerStub struct {
	SignTransactionCalled       func(tx *transaction.FrontendTransaction, privateKey crypto.PrivateKey) ([]byte, error)
	SignTransactionBufferCalled func(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)
	SignMessageCalled           func(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)
	VerifyMessageCalled         func(msg []byte, publicKey crypto.PublicKey, sig []byte) error
	SignByteSliceCalled         func(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)
	VerifyByteSliceCalled       func(msg []byte, publicKey crypto.PublicKey, sig []byte) error
}

SignerStub -

func (*SignerStub) IsInterfaceNil

func (stub *SignerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*SignerStub) SignByteSlice

func (stub *SignerStub) SignByteSlice(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)

SignByteSlice -

func (*SignerStub) SignMessage

func (stub *SignerStub) SignMessage(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)

SignMessage -

func (*SignerStub) SignTransaction

func (stub *SignerStub) SignTransaction(tx *transaction.FrontendTransaction, privateKey crypto.PrivateKey) ([]byte, error)

SignTransaction -

func (*SignerStub) VerifyByteSlice added in v1.3.3

func (stub *SignerStub) VerifyByteSlice(msg []byte, publicKey crypto.PublicKey, sig []byte) error

VerifyByteSlice -

func (*SignerStub) VerifyMessage

func (stub *SignerStub) VerifyMessage(msg []byte, publicKey crypto.PublicKey, sig []byte) error

VerifyMessage -

type TxBuilderStub

type TxBuilderStub struct {
	ApplyUserSignatureCalled func(cryptoHolder sdkCore.CryptoComponentsHolder, tx *transaction.FrontendTransaction) error
}

TxBuilderStub -

func (*TxBuilderStub) ApplyUserSignature added in v1.3.3

func (stub *TxBuilderStub) ApplyUserSignature(cryptoHolder sdkCore.CryptoComponentsHolder, tx *transaction.FrontendTransaction) error

ApplyUserSignature -

func (*TxBuilderStub) IsInterfaceNil

func (stub *TxBuilderStub) IsInterfaceNil() bool

IsInterfaceNil -

type TxNonceHandlerV1Stub

type TxNonceHandlerV1Stub struct {
	GetNonceCalled          func(ctx context.Context, address core.AddressHandler) (uint64, error)
	SendTransactionCalled   func(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
	ForceNonceReFetchCalled func(address core.AddressHandler) error
	CloseCalled             func() error
}

TxNonceHandlerV1Stub -

func (*TxNonceHandlerV1Stub) Close

func (stub *TxNonceHandlerV1Stub) Close() error

Close -

func (*TxNonceHandlerV1Stub) ForceNonceReFetch

func (stub *TxNonceHandlerV1Stub) ForceNonceReFetch(address core.AddressHandler) error

ForceNonceReFetch -

func (*TxNonceHandlerV1Stub) GetNonce

func (stub *TxNonceHandlerV1Stub) GetNonce(ctx context.Context, address core.AddressHandler) (uint64, error)

GetNonce -

func (*TxNonceHandlerV1Stub) IsInterfaceNil

func (stub *TxNonceHandlerV1Stub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TxNonceHandlerV1Stub) SendTransaction

func (stub *TxNonceHandlerV1Stub) SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)

SendTransaction -

type TxNonceHandlerV2Stub

type TxNonceHandlerV2Stub struct {
	ApplyNonceAndGasPriceCalled func(ctx context.Context, address core.AddressHandler, tx *transaction.FrontendTransaction) error
	SendTransactionCalled       func(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
	ForceNonceReFetchCalled     func(address core.AddressHandler) error
	CloseCalled                 func() error
}

TxNonceHandlerV2Stub -

func (*TxNonceHandlerV2Stub) ApplyNonceAndGasPrice

func (stub *TxNonceHandlerV2Stub) ApplyNonceAndGasPrice(ctx context.Context, address core.AddressHandler, tx *transaction.FrontendTransaction) error

ApplyNonceAndGasPrice -

func (*TxNonceHandlerV2Stub) Close

func (stub *TxNonceHandlerV2Stub) Close() error

Close -

func (*TxNonceHandlerV2Stub) IsInterfaceNil

func (stub *TxNonceHandlerV2Stub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TxNonceHandlerV2Stub) SendTransaction

func (stub *TxNonceHandlerV2Stub) SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)

SendTransaction -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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