@identity.com/did-io-driver-sol
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.0 • Public • Published

DID.io SOL Driver

A SOL driver for the did.io DID client.

Usage

The SOL driver supports the generate() and get() functions only, and generates 'sparse' DID documents, i.e. those derived from an initial private key with no additional properties.

To generate a DID:

import { CachedResolver } from '@digitalbazaar/did-io';
import didSol from '@identity.com/did-io-driver-sol';

const resolver = new CachedResolver(); 
resolver.use(didSol.driver({payer: PAYER_KEY}))

// Generate a DID
const did = await resolver.generate({
  method: 'sol',
  cluster: 'devnet'   // omit for mainnet
})

where PAYER_KEY is the private key of the transaction payer on solana and OWNER_KEY is the public key of the owner of the DID, both encrypted as base58 strings.

Readme

Keywords

none

Package Sidebar

Install

npm i @identity.com/did-io-driver-sol

Weekly Downloads

197

Version

1.0.0-beta.0

License

MIT

Unpacked Size

223 kB

Total Files

11

Last publish

Collaborators

  • rleonard333
  • tbarri
  • chriteixeira
  • rado0x54
  • mitchcivic
  • dankelleher
  • flippiescholtz
  • kevinhcolgan
  • pbshoemaker
  • tyronemichael
  • lucmir