# @sphereon/veramo-factom-did-provider

> Veramo Factom DID provider

Latest version **0.1.0** (published 2021-11-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @sphereon/veramo-factom-did-provider
pnpm add @sphereon/veramo-factom-did-provider
yarn add @sphereon/veramo-factom-did-provider
bun add @sphereon/veramo-factom-did-provider
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-11-26 |
| First published | 2021-11-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 75 |
| Author | Sphereon |
| Maintainers | nklomp78, nklomp, spostma, bramtencate |
| Keywords | Factom, DID, Veramo |

## Links

- npm: https://www.npmjs.com/package/@sphereon/veramo-factom-did-provider
- Repository: https://github.com/Sphereon-OpenSource/ssi-sdk
- Homepage: https://github.com/Sphereon-OpenSource/ssi-sdk#readme
- Issues: https://github.com/Sphereon-OpenSource/ssi-sdk/issues
- npm.io page: https://npm.io/package/@sphereon/veramo-factom-did-provider

## Dependencies (9)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [events](https://npm.io/package/events.md) ^3.3.0
- [z-schema](https://npm.io/package/z-schema.md) ^5.0.2
- [did-jwt-vc](https://npm.io/package/did-jwt-vc.md) ^2.1.7
- [@veramo/core](https://npm.io/package/@veramo/core.md) ^3.1.0
- [micro-base58](https://npm.io/package/micro-base58.md) ^0.5.1
- [@veramo/did-manager](https://npm.io/package/@veramo/did-manager.md) ^3.1.0
- [@sphereon/ssi-sdk-core](https://npm.io/package/@sphereon/ssi-sdk-core.md) ^0.1.0
- [@sphereon/did-uni-client](https://npm.io/package/@sphereon/did-uni-client.md) ^0.3.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-11-26
- 0.0.2-unstable.57 (unstable) — 2022-02-02
- 0.0.2-next.48 (next) — 2021-12-14
- 0.0.2-unstable.56 — 2022-02-02
- 0.0.2-unstable.55 — 2022-02-01
- 0.0.2-unstable.85 — 2021-12-17
- 0.0.2-next.42 — 2021-12-10
- 0.1.2-unstable.68 — 2021-12-10
- 0.0.2-unstable.43 — 2021-12-07
- 0.0.2-unstable.42 — 2021-12-07
- 0.0.2-unstable.41 — 2021-12-07
- 0.0.2-unstable.40 — 2021-12-07
- 0.1.2-unstable.54 — 2021-12-02
- 0.1.2-unstable.53 — 2021-12-02
- 0.1.2-unstable.42 — 2021-11-28
- … 9 more at https://npm.io/package/@sphereon/veramo-factom-did-provider/versions

## README

<!--suppress HtmlDeprecatedAttribute -->
<h1 align="center">
  <br>
  <a href="https://www.sphereon.com"><img src="https://sphereon.com/content/themes/sphereon/assets/img/logo.svg" alt="Sphereon" width="400"></a>
  <br>Ssi-sdk-factom-did-provider (Typescript) 
  <br>
</h1>

Lto-factom-provider is a Veramo plugin to create DIDs on Factom Protocol.

### Constructor

During construction of the Factom DID provider you can set the network, universal registrar URL and the Veramo default Key Management System (KMS)

```typescript
import { FactomDIDProvider } from '@sphereon/veramo-factom-did-provider'

const factomDIDProvider = new FactomDIDProvider({ defaultKms: 'local', network: 'testnet', registrarUrl: 'https://your.universal.registrar.here' })
```

### createIdentifier

Creating a DID means you have to create public/private keypairs first both for the DID document itself as well as the management keys. The Factom DID Provider will store these keys using Veramo's Keymanager, so that you can use them later

```typescript
const managementKeys = [
  { priority: 0, privateKeyMultibase: 'z08a58bad89...' },
  { priority: 1, privateKeyMultibase: 'z18a58bad89...' },
]
const didKeys = [{ priorityRequirement: 1, privateKeyMultibase: 'z234a...', purpose: [] }]
const tags = ['my', 'did', 'chain', 'name', 'here'] // Used to populate Factoms external Id values
const nonce = 'random value' // If left out, will be automatically created to make the DID chain unique

const identifier = await factomDIDProvider.createIdentifier(
  {
    options: {
      managementKeys,
      didKeys,
      tags,
      nonce,
    },
  },
  context
)
```

### Installation

```shell
yarn add @sphereon/ssi-sdk-factom-did-provider
```

### Build

```shell
yarn build
```

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