@helia/ipns 9.1.4 → 9.1.5-20ba9cf6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -176,16 +176,21 @@ of a record that was created elsewhere.
176
176
  ```TypeScript
177
177
  import { createHelia } from 'helia'
178
178
  import { ipns, ipnsValidator } from '@helia/ipns'
179
- import { createDelegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
179
+ import { delegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
180
180
  import { CID } from 'multiformats/cid'
181
181
  import { multihashToIPNSRoutingKey, marshalIPNSRecord } from 'ipns'
182
+ import { defaultLogger } from '@libp2p/logger'
182
183
 
183
184
  const helia = await createHelia()
184
185
  const name = ipns(helia)
185
186
 
186
187
  const ipnsName = 'k51qzi5uqu5dktsyfv7xz8h631pri4ct7osmb43nibxiojpttxzoft6hdyyzg4'
187
188
  const parsedCid: CID<unknown, 114, 0 | 18, 1> = CID.parse(ipnsName)
188
- const delegatedClient = createDelegatedRoutingV1HttpApiClient('https://delegated-ipfs.dev')
189
+ const delegatedClient = delegatedRoutingV1HttpApiClient({
190
+ url: 'https://delegated-ipfs.dev'
191
+ })({
192
+ logger: defaultLogger()
193
+ })
189
194
  const record = await delegatedClient.getIPNS(parsedCid)
190
195
 
191
196
  const routingKey = multihashToIPNSRoutingKey(parsedCid.multihash)