mirror of
https://github.com/luxfi/proto.git
synced 2026-10-30 15:21:09 +00:00
22 lines
659 B
Go
22 lines
659 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package fee
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/luxfi/proto/p/txs"
|
|
)
|
|
|
|
var ErrUnsupportedTx = errors.New("unsupported transaction type")
|
|
|
|
// Calculator calculates the minimum required fee, in nLUX, that an unsigned
|
|
// transaction must pay for valid inclusion into a block.
|
|
type Calculator interface {
|
|
CalculateFee(tx txs.UnsignedTx) (uint64, error)
|
|
}
|
|
|
|
// Note: The following methods were for a legacy calculator struct that no longer exists.
|
|
// Fee calculation is now handled by staticCalculator and dynamicCalculator in their respective files.
|