diff --git a/packages/ipns/src/index.ts b/packages/ipns/src/index.ts index c4d23e74..88613e6b 100644 --- a/packages/ipns/src/index.ts +++ b/packages/ipns/src/index.ts @@ -284,10 +284,10 @@ const log = logger('helia:ipns') const MINUTE = 60 * 1000 const HOUR = 60 * MINUTE -const DEFAULT_LIFETIME_MS = 24 * HOUR +const DEFAULT_LIFETIME_MS = 48 * HOUR const DEFAULT_REPUBLISH_INTERVAL_MS = 23 * HOUR -const DEFAULT_TTL_NS = BigInt(HOUR) * 1_000_000n +const DEFAULT_TTL_NS = BigInt(MINUTE) * 5_000_000n // 5 minutes export type PublishProgressEvents = ProgressEvent<'ipns:publish:start'> | @@ -311,7 +311,7 @@ export type ResolveDNSLinkProgressEvents = export interface PublishOptions extends AbortOptions, ProgressOptions { /** - * Time duration of the record in ms (default: 24hrs) + * Time duration of the signature validity in ms (default: 48hrs) */ lifetime?: number @@ -327,7 +327,7 @@ export interface PublishOptions extends AbortOptions, ProgressOptions { const ipnsEntry = await name.publish(key, cid) expect(ipnsEntry).to.have.property('sequence', 1n) - expect(ipnsEntry).to.have.property('ttl', 3_600_000_000_000n) // 1 hour + expect(ipnsEntry).to.have.property('ttl', 300_000_000_000n) // 5 minutes }) it('should publish an IPNS record with a custom lifetime params', async function () {