0.19.0 • Published 3 days ago

@sphereon/ssi-sdk-ext.did-provider-jwk v0.19.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 days ago

This package contains an implementation of the AbstractIdentifierProvider for the did:jwk method. Enabling creating and resolving of did:jwk entities, conforming to the spec for DID-JWK

Available functions

  • createIdentifier
  • deleteIdentifier
  • resolveDidJwk

Usage

Creating an identifier

When creating a new Veramo Identifier you can choose to import your own keys or have them generated for you. You can also choose to use specific Key IDs for your key, regardless of generation or import. The options object when creating an identifier is as follows:

export interface KeyOpts {
  key?: MinimalImportableKey // Optional key to import. If not specified a key with random kid will be created
  type?: Key // The key type. Defaults to Secp256k1
  use?: KeyUse // The key use
}

Creating an Identifier using auto-generated keys

The example below generates a JWK DID with auto-generated keys.

const identifier: IIdentifier = await agent.didManagerCreate()

Creating an Identifier using imported keys

The example below generates a JWK DID using imported keys.

const identifier: IIdentifier = await agent.didManagerCreate({
  key: {
    privateKeyHex: '06eb9e64569203679b36f834a4d9725c989d32a7fb52c341eae3517b3aff8ee6',
  },
})

Removing the Identifier and DID

Deleting an identifier is straightforward:

const deleted: boolean = await agent.didManagerDelete({ did: identifier.did })

Resolving a DID

The example below resolves a did:jwk to DIDResolutionResult.

const didResolutionResult: DIDResolutionResult = await agent.resolveDid({ didUrl: 'did:jwk:ey....' })

Installation

yarn add @sphereon/ssi-sdk-did-provider-jwk

Build

yarn build
0.18.3-next.16

13 days ago

0.18.3-next.14

14 days ago

0.19.0

13 days ago

0.18.2

14 days ago

0.18.2-next.6

14 days ago

0.18.1

1 month ago

0.18.1-next.3

1 month ago

0.18.1-next.2

1 month ago

0.18.0

2 months ago

0.17.1-next.8

2 months ago

0.17.1-next.7

2 months ago

0.17.1-next.4

2 months ago

0.17.1-next.2

2 months ago

0.17.1-unstable.6

2 months ago

0.17.1-unstable.5

2 months ago

0.17.0

2 months ago

0.16.1-next.3

3 months ago

0.16.1-next.5

3 months ago

0.16.1-next.2

3 months ago

0.14.1-unstable.34

3 months ago

0.15.1-next.13

4 months ago

0.16.0

4 months ago

0.15.1-unstable.10

5 months ago

0.15.1-unstable.11

5 months ago

0.15.1-next.10

5 months ago

0.15.1-unstable.9

5 months ago

0.15.1-unstable.8

5 months ago

0.13.0

9 months ago

0.15.0

7 months ago

0.12.2-next.14

9 months ago

0.12.2-next.13

9 months ago

0.12.2-next.12

9 months ago

0.12.2-unstable.11

9 months ago

0.14.1-next.7

7 months ago

0.14.1-unstable.7

7 months ago

0.14.1-next.6

8 months ago

0.14.2-next.3

7 months ago

0.14.1-next.3

8 months ago

0.13.1-next.14

9 months ago

0.13.1-next.13

9 months ago

0.13.1-next.10

9 months ago

0.13.1-next.11

9 months ago

0.12.2-next.2

10 months ago

0.15.1-next.7

5 months ago

0.12.2-next.4

10 months ago

0.12.2-next.3

10 months ago

0.15.1-next.4

5 months ago

0.15.1-next.3

5 months ago

0.12.2-next.5

10 months ago

0.15.1-next.6

5 months ago

0.15.1-next.5

5 months ago

0.14.0

9 months ago

0.14.1

7 months ago

0.13.1-next.2

9 months ago

0.13.1-next.3

9 months ago

0.13.1-next.4

9 months ago

0.13.1-next.5

9 months ago

0.13.1-next.6

9 months ago

0.13.1-next.7

9 months ago

0.13.1-next.8

9 months ago

0.13.1-next.9

9 months ago

0.13.1-unstable.2

9 months ago

0.13.1-unstable.3

9 months ago

0.13.1-unstable.4

9 months ago

0.12.1-next.8

11 months ago

0.12.1-next.9

11 months ago

0.12.1-next.10

11 months ago

0.12.1

11 months ago

0.12.1-next.2

12 months ago

0.12.1-next.3

11 months ago

0.10.3-next.18

1 year ago

0.12.1-next.4

11 months ago

0.11.1-next.2

1 year ago

0.11.1-next.4

1 year ago

0.11.0

1 year ago

0.12.0

1 year ago

0.10.2-next.20

1 year ago

0.10.2-next.14

1 year ago

0.10.2-next.12

1 year ago

0.10.2-next.8

1 year ago