Skip to content

Commit

Permalink
dep: update ipns and use new routingkey method
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Nov 14, 2024
1 parent 7a4e056 commit d08dacf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/gateway-conformance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"interface-blockstore": "^5.2.10",
"interface-datastore": "^8.2.11",
"ipfsd-ctl": "^14.1.0",
"ipns": "^9.1.0",
"ipns": "^10.0.0",
"kubo": "^0.32.0",
"kubo-rpc-client": "^4.1.1",
"uint8arrays": "^5.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/gateway-conformance/src/fixtures/kubo-mgmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { peerIdFromString } from '@libp2p/peer-id'
import { $ } from 'execa'
import fg from 'fast-glob'
import { Key } from 'interface-datastore'
import { peerIdToRoutingKey } from 'ipns'
import { multihashToIPNSRoutingKey } from 'ipns'
import { path } from 'kubo'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { GWC_IMAGE } from '../constants.js'
Expand Down Expand Up @@ -98,7 +98,7 @@ export async function loadFixtures (kuboRepoDir: string): Promise<string> {
const relativePath = relative(GWC_FIXTURES_PATH, fsIpnsRecord)
log('Loading *.ipns-record fixture %s', relativePath)
const key = peerIdFromString(peerIdString)
const customRoutingKey = peerIdToRoutingKey(key)
const customRoutingKey = multihashToIPNSRoutingKey(key.toMultihash())
const dhtKey = new Key('/dht/record/' + uint8ArrayToString(customRoutingKey, 'base32'), false)

const dhtRecord = new DhtRecord(customRoutingKey, await readFile(fsIpnsRecord, null), new Date(Date.now() + 9999999))
Expand Down

0 comments on commit d08dacf

Please sign in to comment.