Documentation
¶
Index ¶
- Variables
- type CryptoComponentsHolderStub
- func (stub *CryptoComponentsHolderStub) GetAddressHandler() core.AddressHandler
- func (stub *CryptoComponentsHolderStub) GetBech32() string
- func (stub *CryptoComponentsHolderStub) GetPrivateKey() crypto.PrivateKey
- func (stub *CryptoComponentsHolderStub) GetPublicKey() crypto.PublicKey
- func (stub *CryptoComponentsHolderStub) IsInterfaceNil() bool
- type FinalityProviderStub
- type HTTPClientWrapperStub
- type HeaderSigVerifierStub
- func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
- func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
- type MarshalizerMock
- type MarshalizerStub
- type NodesCoordinatorStub
- func (ncm *NodesCoordinatorStub) ComputeAdditionalLeaving(_ []*state.ShardValidatorInfo) (map[uint32][]nodesCoordinator.Validator, error)
- func (ncm *NodesCoordinatorStub) ComputeConsensusGroup(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []nodesCoordinator.Validator, err error)
- func (ncm *NodesCoordinatorStub) ConsensusGroupSize(shardID uint32) int
- func (ncm *NodesCoordinatorStub) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetAllValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetChance(uint32) uint32
- func (ncm *NodesCoordinatorStub) GetConsensusValidatorsPublicKeys(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
- func (ncm *NodesCoordinatorStub) GetConsensusWhitelistedNodes(_ uint32) (map[string]struct{}, error)
- func (ncm *NodesCoordinatorStub) GetNumTotalEligible() uint64
- func (ncm *NodesCoordinatorStub) GetOwnPublicKey() []byte
- func (ncm *NodesCoordinatorStub) GetSavedStateKey() []byte
- func (ncm *NodesCoordinatorStub) GetSelectedPublicKeys(_ []byte, _ uint32, _ uint32) ([]string, error)
- func (ncm *NodesCoordinatorStub) GetValidatorWithPublicKey(publicKey []byte) (nodesCoordinator.Validator, uint32, error)
- func (ncm *NodesCoordinatorStub) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
- func (ncm *NodesCoordinatorStub) IsEpochInConfig(epoch uint32) bool
- func (ncm *NodesCoordinatorStub) IsInterfaceNil() bool
- func (ncm *NodesCoordinatorStub) LoadState(_ []byte) error
- func (ncm *NodesCoordinatorStub) SetConfig(_ *nodesCoordinator.NodesCoordinatorRegistry) error
- func (ncm *NodesCoordinatorStub) SetNodesConfigFromValidatorsInfo(epoch uint32, randomness []byte, validatorsInfo []*state.ShardValidatorInfo) error
- func (ncm *NodesCoordinatorStub) SetNodesPerShards(_ map[uint32][]nodesCoordinator.Validator, ...) error
- func (ncm *NodesCoordinatorStub) ShardIdForEpoch(_ uint32) (uint32, error)
- func (ncm *NodesCoordinatorStub) ShuffleOutForEpoch(_ uint32)
- func (ncm *NodesCoordinatorStub) ValidatorsWeights(_ []nodesCoordinator.Validator) ([]uint32, error)
- type PrivateKeyStub
- type ProxyStub
- func (stub *ProxyStub) ExecuteVMQuery(ctx context.Context, vmRequest *data.VmValueRequest) (*data.VmValuesResponseData, error)
- func (stub *ProxyStub) GetAccount(_ context.Context, address sdkCore.AddressHandler) (*data.Account, error)
- func (stub *ProxyStub) GetDefaultTransactionArguments(ctx context.Context, address sdkCore.AddressHandler, ...) (transaction.FrontendTransaction, string, error)
- func (stub *ProxyStub) GetEnableEpochsConfig(_ context.Context) (*data.EnableEpochsConfig, error)
- func (stub *ProxyStub) GetGenesisNodesPubKeys(_ context.Context) (*data.GenesisNodes, error)
- func (stub *ProxyStub) GetGuardianData(ctx context.Context, address sdkCore.AddressHandler) (*api.GuardianData, error)
- func (stub *ProxyStub) GetHyperBlockByHash(ctx context.Context, hash string) (*data.HyperBlock, error)
- func (stub *ProxyStub) GetHyperBlockByNonce(ctx context.Context, nonce uint64) (*data.HyperBlock, error)
- func (stub *ProxyStub) GetLatestHyperBlockNonce(ctx context.Context) (uint64, error)
- func (stub *ProxyStub) GetNetworkConfig(_ context.Context) (*data.NetworkConfig, error)
- func (stub *ProxyStub) GetNetworkStatus(ctx context.Context, shardID uint32) (*data.NetworkStatus, error)
- func (stub *ProxyStub) GetNonceAtEpochStart(_ context.Context, shardId uint32) (uint64, error)
- func (stub *ProxyStub) GetRatingsConfig(_ context.Context) (*data.RatingsConfig, error)
- func (stub *ProxyStub) GetRawBlockByHash(_ context.Context, shardId uint32, hash string) ([]byte, error)
- func (stub *ProxyStub) GetRawBlockByNonce(_ context.Context, shardId uint32, nonce uint64) ([]byte, error)
- func (stub *ProxyStub) GetRawMiniBlockByHash(_ context.Context, shardId uint32, hash string, epoch uint32) ([]byte, error)
- func (stub *ProxyStub) GetRawStartOfEpochMetaBlock(_ context.Context, epoch uint32) ([]byte, error)
- func (stub *ProxyStub) GetRestAPIEntityType() sdkCore.RestAPIEntityType
- func (stub *ProxyStub) GetShardOfAddress(ctx context.Context, bech32Address string) (uint32, error)
- func (stub *ProxyStub) GetValidatorsInfoByEpoch(ctx context.Context, epoch uint32) ([]*state.ShardValidatorInfo, error)
- func (stub *ProxyStub) IsInterfaceNil() bool
- func (stub *ProxyStub) SendTransaction(_ context.Context, tx *transaction.FrontendTransaction) (string, error)
- func (stub *ProxyStub) SendTransactions(_ context.Context, txs []*transaction.FrontendTransaction) ([]string, error)
- type PublicKeyStub
- type RawHeaderHandlerStub
- func (rh *RawHeaderHandlerStub) GetMetaBlockByHash(_ context.Context, hash string) (data.MetaHeaderHandler, error)
- func (rh *RawHeaderHandlerStub) GetShardBlockByHash(_ context.Context, shardId uint32, hash string) (data.HeaderHandler, error)
- func (rh *RawHeaderHandlerStub) GetValidatorsInfoPerEpoch(_ context.Context, epoch uint32) ([]*state.ShardValidatorInfo, []byte, error)
- func (rh *RawHeaderHandlerStub) IsInterfaceNil() bool
- type SignerStub
- func (stub *SignerStub) IsInterfaceNil() bool
- func (stub *SignerStub) SignByteSlice(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)
- func (stub *SignerStub) SignMessage(msg []byte, privateKey crypto.PrivateKey) ([]byte, error)
- func (stub *SignerStub) SignTransaction(tx *transaction.FrontendTransaction, privateKey crypto.PrivateKey) ([]byte, error)
- func (stub *SignerStub) VerifyByteSlice(msg []byte, publicKey crypto.PublicKey, sig []byte) error
- func (stub *SignerStub) VerifyMessage(msg []byte, publicKey crypto.PublicKey, sig []byte) error
- type TxBuilderStub
- type TxNonceHandlerV1Stub
- func (stub *TxNonceHandlerV1Stub) Close() error
- func (stub *TxNonceHandlerV1Stub) ForceNonceReFetch(address core.AddressHandler) error
- func (stub *TxNonceHandlerV1Stub) GetNonce(ctx context.Context, address core.AddressHandler) (uint64, error)
- func (stub *TxNonceHandlerV1Stub) IsInterfaceNil() bool
- func (stub *TxNonceHandlerV1Stub) SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
- type TxNonceHandlerV2Stub
- func (stub *TxNonceHandlerV2Stub) ApplyNonceAndGasPrice(ctx context.Context, address core.AddressHandler, ...) error
- func (stub *TxNonceHandlerV2Stub) Close() error
- func (stub *TxNonceHandlerV2Stub) IsInterfaceNil() bool
- func (stub *TxNonceHandlerV2Stub) SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
Constants ¶
This section is empty.
Variables ¶
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 -
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 }
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) 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) 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 ¶
func (ncm *NodesCoordinatorStub) SetConfig(_ *nodesCoordinator.NodesCoordinatorRegistry) error
SetConfig -
func (*NodesCoordinatorStub) SetNodesConfigFromValidatorsInfo ¶
func (ncm *NodesCoordinatorStub) SetNodesConfigFromValidatorsInfo(epoch uint32, randomness []byte, validatorsInfo []*state.ShardValidatorInfo) error
SetNodesConfigFromValidatorsInfo -
func (*NodesCoordinatorStub) SetNodesPerShards ¶
func (ncm *NodesCoordinatorStub) SetNodesPerShards(_ map[uint32][]nodesCoordinator.Validator, _ map[uint32][]nodesCoordinator.Validator, _ []nodesCoordinator.Validator, _ uint32) error
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) 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 ¶
GetEnableEpochsConfig -
func (*ProxyStub) GetGenesisNodesPubKeys ¶
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 ¶
GetLatestHyperBlockNonce -
func (*ProxyStub) GetNetworkConfig ¶
GetNetworkConfig -
func (*ProxyStub) GetNetworkStatus ¶
func (stub *ProxyStub) GetNetworkStatus(ctx context.Context, shardID uint32) (*data.NetworkStatus, error)
GetNetworkStatus -
func (*ProxyStub) GetNonceAtEpochStart ¶
GetNonceAtEpochStart -
func (*ProxyStub) GetRatingsConfig ¶
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 ¶
GetRawStartOfEpochMetaBlock -
func (*ProxyStub) GetRestAPIEntityType ¶
func (stub *ProxyStub) GetRestAPIEntityType() sdkCore.RestAPIEntityType
GetRestAPIEntityType -
func (*ProxyStub) GetShardOfAddress ¶
GetShardOfAddress -
func (*ProxyStub) GetValidatorsInfoByEpoch ¶
func (stub *ProxyStub) GetValidatorsInfoByEpoch(ctx context.Context, epoch uint32) ([]*state.ShardValidatorInfo, error)
GetValidatorsInfoByEpoch -
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) 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) 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
VerifyByteSlice -
func (*SignerStub) VerifyMessage ¶
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) 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) IsInterfaceNil ¶
func (stub *TxNonceHandlerV2Stub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxNonceHandlerV2Stub) SendTransaction ¶
func (stub *TxNonceHandlerV2Stub) SendTransaction(ctx context.Context, tx *transaction.FrontendTransaction) (string, error)
SendTransaction -
Source Files
¶
- cryptoComponentsHolderStub.go
- finalityProviderStub.go
- headerSigVerifierStub.go
- httpClientWrapperStub.go
- marshalizerMock.go
- marshalizerStub.go
- nodesCoordinatorStub.go
- privateKeyStub.go
- proxyStub.go
- publicKeyStub.go
- rawHeaderHandlerStub.go
- signerStub.go
- txBuilderStub.go
- txNonceHandlerV1Stub.go
- txNonceHandlerV2Stub.go