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

Commit ade01d1

Browse files
feat: support v2 ipns signatures (#3708)
Upgrades `ipns` to support v2 sigs. Should be a backwards-compatible change. Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
1 parent 9e48da3 commit ade01d1

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/browser-ipns-publish/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ipfs": "^0.55.3",
1818
"ipfs-http-client": "^50.1.1",
1919
"ipfs-utils": "^8.1.2",
20-
"ipns": "^0.11.0",
20+
"ipns": "^0.12.0",
2121
"it-last": "^1.0.4",
2222
"p-retry": "^4.2.0",
2323
"uint8arrays": "^2.1.3"

packages/interface-ipfs-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"ipld-block": "^0.11.0",
5252
"ipld-dag-cbor": "^1.0.0",
5353
"ipld-dag-pb": "^0.22.1",
54-
"ipns": "^0.11.0",
54+
"ipns": "^0.12.0",
5555
"is-ipfs": "^5.0.0",
5656
"iso-random-stream": "^2.0.0",
5757
"it-all": "^1.0.4",

packages/ipfs-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"ipld-dag-cbor": "^1.0.0",
8585
"ipld-dag-pb": "^0.22.1",
8686
"ipld-raw": "^7.0.0",
87-
"ipns": "^0.11.0",
87+
"ipns": "^0.12.0",
8888
"is-domain-name": "^1.0.1",
8989
"is-ipfs": "^5.0.0",
9090
"it-all": "^1.0.4",

packages/ipfs-core/src/ipns/publisher.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ class IpnsPublisher {
254254
}
255255

256256
// Determinate the record sequence number
257-
let seqNumber = 0
257+
let seqNumber = 0n
258258

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

263263
let entryData

0 commit comments

Comments
 (0)