UNPKG

filecoin-pin

Version:

Bridge IPFS content to Filecoin Onchain Cloud using familiar tools

13 lines (11 loc) 380 B
/** * Validation utility for core financial calculations. * Keeps pricing inputs non-zero and positive. * * @param pricePerTiBPerEpoch - Current pricing from storage service */ export function assertPriceNonZero(pricePerTiBPerEpoch: bigint): void { if (pricePerTiBPerEpoch <= 0n) { throw new Error('Invalid pricePerTiBPerEpoch: must be positive non-zero value') } }