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

Commit

Permalink
feat: support v2 ipns signatures (#3708)
Browse files Browse the repository at this point in the history
Upgrades `ipns` to support v2 sigs. Should be a backwards-compatible change.

Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
  • Loading branch information
achingbrain and vasco-santos authored Jun 18, 2021
1 parent 9e48da3 commit ade01d1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit ade01d1

Please sign in to comment.