@@ -13,11 +13,14 @@ import * as raw from 'multiformats/codecs/raw'
1313import { sha256 } from 'multiformats/hashes/sha2'
1414import { createHelia } from './fixtures/create-helia.js'
1515import type { DelegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
16+ import type { Libp2p } from '@libp2p/interface'
17+ import type { KadDHT } from '@libp2p/kad-dht'
18+ import type { Keychain } from '@libp2p/keychain'
1619import type { FastifyInstance } from 'fastify'
17- import type { HeliaLibp2p } from 'helia'
20+ import type { Helia } from 'helia'
1821
1922describe ( 'delegated-routing-v1-http-api interop' , ( ) => {
20- let network : Array < HeliaLibp2p >
23+ let network : Array < Helia < Libp2p < { dht : KadDHT , keychain : Keychain } > > >
2124 let server : FastifyInstance
2225 let client : DelegatedRoutingV1HttpApiClient
2326
@@ -91,11 +94,10 @@ describe('delegated-routing-v1-http-api interop', () => {
9194 // publish a record using a remote host
9295 const i = ipns ( network [ 5 ] )
9396 const cid = CID . parse ( 'bafybeiczsscdsbs7ffqz55asqdf3smv6klcw3gofszvwlyarci47bgf354' )
94- const privateKey = await generateKeyPair ( 'Ed25519' )
95- await i . publish ( privateKey , cid )
97+ const result = await i . publish ( 'key-name' , cid )
9698
9799 // use client to resolve the published record
98- const record = await client . getIPNS ( privateKey . publicKey . toCID ( ) )
100+ const record = await client . getIPNS ( result . publicKey . toCID ( ) )
99101 expect ( record . value ) . to . equal ( `/ipfs/${ cid . toString ( ) } ` )
100102 } )
101103
@@ -109,7 +111,6 @@ describe('delegated-routing-v1-http-api interop', () => {
109111
110112 // resolve the record using a remote host
111113 const i = ipns ( network [ 8 ] )
112- // @ts -expect-error helia needs to be updated to the latest libp2p deps
113114 const result = await i . resolve ( privateKey . publicKey . toCID ( ) )
114115 expect ( result . cid . toString ( ) ) . to . equal ( cid . toString ( ) )
115116 } )
0 commit comments