Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: support v2 ipns signatures #3708

Merged
merged 4 commits into from
Jun 18, 2021
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 examples/browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ipfs": "^0.55.3",
"ipfs-http-client": "^50.1.1",
"ipfs-utils": "^8.1.2",
"ipns": "^0.11.0",
"ipns": "^0.12.0",
"it-last": "^1.0.4",
"p-retry": "^4.2.0",
"uint8arrays": "^2.1.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"ipld-block": "^0.11.0",
"ipld-dag-cbor": "^1.0.0",
"ipld-dag-pb": "^0.22.1",
"ipns": "^0.11.0",
"ipns": "^0.12.0",
"is-ipfs": "^5.0.0",
"iso-random-stream": "^2.0.0",
"it-all": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"ipld-dag-cbor": "^1.0.0",
"ipld-dag-pb": "^0.22.1",
"ipld-raw": "^7.0.0",
"ipns": "^0.11.0",
"ipns": "^0.12.0",
"is-domain-name": "^1.0.1",
"is-ipfs": "^5.0.0",
"it-all": "^1.0.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/ipfs-core/src/ipns/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ class IpnsPublisher {
}

// Determinate the record sequence number
let seqNumber = 0
let seqNumber = 0n

if (record && record.sequence !== undefined) {
seqNumber = !uint8ArrayEquals(record.value, value) ? record.sequence + 1 : record.sequence
seqNumber = !uint8ArrayEquals(record.value, value) ? BigInt(record.sequence) + 1n : BigInt(record.sequence)
}

let entryData
Expand Down