Skip to main content

Function: getStampDuration()

getStampDuration(amount, pricePerBlock, blockTime): Duration

Defined in: bee-js/src/utils/stamps.ts:35

Utility function that calculates the TTL of a postage batch based on its amount, price per block and block time.

For more accurate results, get the price per block and block time from the Bee node or the blockchain.

Parameters​

amount​

string | bigint | NumberString

pricePerBlock​

number

blockTime​

number

Returns​

Duration

The TTL of the postage batch.

💬 Get Help