@spherity/did-extension-ethr
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Veramo Extension Plugin for did:ethr

This Veramo plugin extends the functionality of did-provider-ethr by exposing a new method ethrChangeControllerKey which allows the owner of a did:ethr to change its owner and therefor its controller. Meta transactions are support as well by providing a metaIdentifierKeyId in the options.

Quick start

  • Clone this repo
  • npm ci
  • npm run build
  • npm run generate-plugin-schema
  • npm run start or VSCode Debugger (CMD + Shift + D) > Run OpenAPI server

Usage

agent = createAgent<IEthrDidExtension & ...>({
  plugins: [
    ...
    new EthrDidExtension({
      store: new DIDStore(dbConnection),
      defaultKms: 'local',
      networks: [
        {
          chainId: 5,
          name: 'goerli',
          provider: new JsonRpcProvider('http://localhost:8545'),
        },
      ],
    }),
    ...
  ],
})

...

const alice = await agent.didManagerImport({...});
const bob = await agent.didManagerImport({...});
const txHash = await agent.ethrChangeControllerKey({ did: alice.did, kid: bob.controllerKeyId! })

Readme

Keywords

none

Package Sidebar

Install

npm i @spherity/did-extension-ethr

Weekly Downloads

21

Version

2.1.1

License

MIT

Unpacked Size

35.1 kB

Total Files

21

Last publish

Collaborators

  • franc.sphe
  • daniyalkhalil16
  • strumswell
  • dennisvonderbey
  • spherity-team