Versions in this module Expand all Collapse all v0 v0.2.1 Oct 13, 2023 v0.2.0 Sep 27, 2023 Changes in this version + var ErrMoneySystemIdentifierMissing = errors.New("money transaction system identifier is missing") + var ErrStateIsNil = errors.New("state is nil") + var ErrSystemIdentifierMissing = errors.New("system identifier is missing") + var ErrTrustBaseMissing = errors.New("trust base is missing") + type AddFCValidationContext struct + CurrentRoundNumber uint64 + Tx *types.TransactionOrder + Unit *state.Unit + type CloseFCValidationContext struct + Tx *types.TransactionOrder + Unit *state.Unit + type DefaultFeeCreditTxValidator struct + func NewDefaultFeeCreditTxValidator(moneySystemID, systemID []byte, hashAlgorithm crypto.Hash, ...) *DefaultFeeCreditTxValidator + func (v *DefaultFeeCreditTxValidator) ValidateAddFeeCredit(ctx *AddFCValidationContext) error + func (v *DefaultFeeCreditTxValidator) ValidateCloseFC(ctx *CloseFCValidationContext) error + type FeeCalculator func() uint64 + func FixedFee(fee uint64) FeeCalculator + type FeeCredit struct + func NewFeeCreditModule(opts ...Option) (*FeeCredit, error) + func (f *FeeCredit) GenericTransactionValidator() txsystem.GenericTransactionValidator + func (f *FeeCredit) TxExecutors() map[string]txsystem.TxExecutor + type Option func(f *FeeCredit) + func WithFeeCalculator(feeCalculator FeeCalculator) Option + func WithFeeCreditRecordUnitType(feeCreditRecordUnitType []byte) Option + func WithHashAlgorithm(hashAlgorithm crypto.Hash) Option + func WithLogger(logger logger.Logger) Option + func WithMoneySystemIdentifier(moneySystemID []byte) Option + func WithState(s *state.State) Option + func WithSystemIdentifier(systemID []byte) Option + func WithTrustBase(trustBase map[string]abcrypto.Verifier) Option