Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { CID } from 'multiformats/cid'
import type { MultihashDigest } from 'multiformats/hashes/interface'

const log = logger('ipns')
const DEFAULT_TTL_NS = 60 * 60 * 1e+9 // 1 Hour or 3600 Seconds
const DEFAULT_TTL_NS = 5 * 60 * 1e+9 // 5 Minutes or 300 Seconds, as suggested by https://specs.ipfs.tech/ipns/ipns-record/#ttl-uint64

export const namespace = '/ipns/'
export const namespaceLength = namespace.length
Expand Down
4 changes: 2 additions & 2 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('ipns', function () {

it('should create an ipns record (V1+V2) correctly', async () => {
const sequence = 0
const ttl = BigInt(60 * 60 * 1e+9)
const ttl = BigInt(5 * 60 * 1e+9)
const validity = 1000000

const record = await createIPNSRecord(privateKey, contentPath, sequence, validity)
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('ipns', function () {

it('should create an ipns record (V2) correctly', async () => {
const sequence = 0
const ttl = BigInt(60 * 60 * 1e+9)
const ttl = BigInt(5 * 60 * 1e+9)
const validity = 1000000

const record = await createIPNSRecord(privateKey, contentPath, sequence, validity, { v1Compatible: false })
Expand Down