From d08dacf9e5987924236488c64623631213c10a10 Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:02:11 -0600 Subject: [PATCH] dep: update ipns and use new routingkey method --- packages/gateway-conformance/package.json | 2 +- packages/gateway-conformance/src/fixtures/kubo-mgmt.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/gateway-conformance/package.json b/packages/gateway-conformance/package.json index 029f35e..eb0db03 100644 --- a/packages/gateway-conformance/package.json +++ b/packages/gateway-conformance/package.json @@ -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", diff --git a/packages/gateway-conformance/src/fixtures/kubo-mgmt.ts b/packages/gateway-conformance/src/fixtures/kubo-mgmt.ts index d1dd81a..7f0ac9f 100644 --- a/packages/gateway-conformance/src/fixtures/kubo-mgmt.ts +++ b/packages/gateway-conformance/src/fixtures/kubo-mgmt.ts @@ -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' @@ -98,7 +98,7 @@ export async function loadFixtures (kuboRepoDir: string): Promise { 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))