@@ -15,11 +15,12 @@ import { createHelia } from './fixtures/create-helia.js'
1515import type { DelegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
1616import type { Libp2p } from '@libp2p/interface'
1717import type { KadDHT } from '@libp2p/kad-dht'
18+ import type { Keychain } from '@libp2p/keychain'
1819import type { FastifyInstance } from 'fastify'
19- import type { HeliaLibp2p } from 'helia'
20+ import type { Helia } from 'helia'
2021
2122describe ( 'delegated-routing-v1-http-api interop' , ( ) => {
22- let network : Array < HeliaLibp2p < Libp2p < { dht : KadDHT } > > >
23+ let network : Array < Helia < Libp2p < { dht : KadDHT , keychain : Keychain } > > >
2324 let server : FastifyInstance
2425 let client : DelegatedRoutingV1HttpApiClient
2526
@@ -93,11 +94,10 @@ describe('delegated-routing-v1-http-api interop', () => {
9394 // publish a record using a remote host
9495 const i = ipns ( network [ 5 ] )
9596 const cid = CID . parse ( 'bafybeiczsscdsbs7ffqz55asqdf3smv6klcw3gofszvwlyarci47bgf354' )
96- const privateKey = await generateKeyPair ( 'Ed25519' )
97- await i . publish ( privateKey , cid )
97+ const result = await i . publish ( 'key-name' , cid )
9898
9999 // use client to resolve the published record
100- const record = await client . getIPNS ( privateKey . publicKey . toCID ( ) )
100+ const record = await client . getIPNS ( result . publicKey . toCID ( ) )
101101 expect ( record . value ) . to . equal ( `/ipfs/${ cid . toString ( ) } ` )
102102 } )
103103
@@ -111,7 +111,6 @@ describe('delegated-routing-v1-http-api interop', () => {
111111
112112 // resolve the record using a remote host
113113 const i = ipns ( network [ 8 ] )
114- // @ts -expect-error helia needs to be updated to the latest libp2p deps
115114 const result = await i . resolve ( privateKey . publicKey . toCID ( ) )
116115 expect ( result . cid . toString ( ) ) . to . equal ( cid . toString ( ) )
117116 } )
0 commit comments