@sphereon/ssi-sdk-ext.kms-local 0.24.1-unstable.9 → 0.24.1-unstable.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.3"
8
+ "packageVersion": "7.47.5"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk-ext.kms-local",
3
3
  "description": "Sphereon Local Key Management System with support for BLS/BBS+, RSA keys",
4
- "version": "0.24.1-unstable.9+9d7f5c6",
4
+ "version": "0.24.1-unstable.90+75fd054",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -10,9 +10,9 @@
10
10
  "generate-plugin-schema": "sphereon dev generate-plugin-schema"
11
11
  },
12
12
  "dependencies": {
13
- "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.9+9d7f5c6",
14
- "@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.9+9d7f5c6",
15
- "@sphereon/ssi-sdk-ext.x509-utils": "0.24.1-unstable.9+9d7f5c6",
13
+ "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.90+75fd054",
14
+ "@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.90+75fd054",
15
+ "@sphereon/ssi-sdk-ext.x509-utils": "0.24.1-unstable.90+75fd054",
16
16
  "@trust/keyto": "2.0.0-alpha1",
17
17
  "@veramo/core": "4.2.0",
18
18
  "@veramo/key-manager": "4.2.0",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@sphereon/jsencrypt": "3.3.2-unstable.0",
25
- "@sphereon/ssi-sdk.dev": "0.28.0",
25
+ "@sphereon/ssi-sdk.dev": "0.29.1-unstable.75",
26
26
  "@types/elliptic": "6.4.14",
27
27
  "@veramo/cli": "4.2.0"
28
28
  },
@@ -36,7 +36,7 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "repository": "git@github.com:Sphereon-Opensource/SSI-SDK.git",
39
+ "repository": "git@github.com:Sphereon-OpenSource/SSI-SDK-crypto-extensions.git",
40
40
  "author": "Sphereon <dev@sphereon.com>",
41
41
  "license": "Apache-2.0",
42
42
  "keywords": [
@@ -44,5 +44,5 @@
44
44
  "kms",
45
45
  "Veramo"
46
46
  ],
47
- "gitHead": "9d7f5c6eb96a1b39e7b98649a31139da604730bf"
47
+ "gitHead": "75fd0548fa2f4542b7f06c4571ff82ed04d024ad"
48
48
  }
@@ -0,0 +1,35 @@
1
+ import { SphereonKeyManagementSystem } from '../SphereonKeyManagementSystem'
2
+ import { MemoryPrivateKeyStore } from '@veramo/key-manager'
3
+ import { ManagedKeyInfo } from '@veramo/core'
4
+
5
+ describe('Key creation', () => {
6
+ it('should create a RSA key', async () => {
7
+ const kms = new SphereonKeyManagementSystem(new MemoryPrivateKeyStore())
8
+ const key: ManagedKeyInfo = await kms.createKey({ type: 'RSA' })
9
+ expect(key.type).toEqual('RSA')
10
+ expect(key?.meta?.publicKeyJwk?.kty).toEqual('RSA')
11
+ })
12
+
13
+ it('should create a Ed25519 key', async () => {
14
+ const kms = new SphereonKeyManagementSystem(new MemoryPrivateKeyStore())
15
+ const key: ManagedKeyInfo = await kms.createKey({ type: 'Ed25519' })
16
+ expect(key.type).toEqual('Ed25519')
17
+ expect(key?.meta?.algorithms).toContain('Ed25519')
18
+ expect(key.meta).toEqual({ algorithms: ['Ed25519', 'EdDSA'] })
19
+ })
20
+
21
+ it('should create a X25519 key', async () => {
22
+ const kms = new SphereonKeyManagementSystem(new MemoryPrivateKeyStore())
23
+ const key: ManagedKeyInfo = await kms.createKey({ type: 'X25519' })
24
+ expect(key.type).toEqual('X25519')
25
+ expect(key.meta).toEqual({ algorithms: ['ECDH', 'ECDH-ES', 'ECDH-1PU'] })
26
+ })
27
+
28
+ it('should create a Secp256k1 key', async () => {
29
+ const kms = new SphereonKeyManagementSystem(new MemoryPrivateKeyStore())
30
+ const key: ManagedKeyInfo = await kms.createKey({ type: 'Secp256k1' })
31
+ expect(key.type).toEqual('Secp256k1')
32
+ expect(key?.meta?.jwkThumbprint).toBeDefined()
33
+ expect(key?.meta?.algorithms).toContain('ES256K')
34
+ })
35
+ })