# @did-ipns/resolver

> Resolve DID documents using the IPNS method

Latest version **1.0.0** (published 2024-04-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install @did-ipns/resolver
pnpm add @did-ipns/resolver
yarn add @did-ipns/resolver
bun add @did-ipns/resolver
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-04-20 |
| First published | 2024-04-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 107.7 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Upkeep |
| Maintainers | jtsmedley |
| Keywords | did, dnslink, ipns, ipfs, did resolver |

## Links

- npm: https://www.npmjs.com/package/@did-ipns/resolver
- Repository: https://github.com/did-ipns/ipns-did-resolver
- Homepage: https://github.com/did-ipns/ipns-did-resolver#readme
- Issues: https://github.com/did-ipns/ipns-did-resolver/issues
- npm.io page: https://npm.io/package/@did-ipns/resolver

## Dependencies (6)

- [helia](https://npm.io/package/helia.md) 4.1.0
- [did-doc](https://npm.io/package/did-doc.md) 1.0.0
- [validator](https://npm.io/package/validator.md) 13.11.0
- [@helia/ipns](https://npm.io/package/@helia/ipns.md) 7.2.0
- [did-resolver](https://npm.io/package/did-resolver.md) 4.1.0
- [@helia/unixfs](https://npm.io/package/@helia/unixfs.md) 3.0.3

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-04-20

## README

# ipns-did-resolver

A resolver library for the IPNS method, to be used with the
[`did-resolver`](https://www.npmjs.com/package/@did-ipns/resolver) library.

IPNS method resolution works with both IPNS (Peer ID hash) CIDs and DNSLink
domains. Paths will be resolved as UnixFS blocks.

Note: The default DID path is `.well-known/did.json` which is similar to `did:web`.

Documents that resolve but have an ID that doesn't match the DID used to resolve
it will throw an error.

## Usage

```ts
import { Resolver } from "did-resolver";
import { getResolver } from "@did-ipns/resolver";

import { createHeliaHTTP } from '@helia/http'

const helia = await createHeliaHTTP()

const ipnsResolver = getResolver(
    helia
);
const resolver = new Resolver(ipnsResolver);

const result = await resolver.resolve("did:ipns:did.ipfs.io");

console.log(result);
```

## API

The library exports a function `getResolver(helia)`. The
first parameter is an instance of Helia.

---
_Source: https://npm.io/package/@did-ipns/resolver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
