You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The kms-local implementation only supports a fixed set of key types. It is not possible to extend the current implementation as it is today to include a new key type like 'Bls12381G2'.
The asManagedKeyInfoInner method where the key types are checked is private. If you derive the base class to add new key types, you basically need to copy/clone that private method for supporting the existing key types (Ed25519, Secp256k1 and X25519) + new ones (Bls12381G2). Also that method expects 'RequireOnly<ManagedPrivateKey, 'privateKeyHex' | 'type'>)' as input. That assumes the public key can actually be derived from the private key all the time. I haven't found any implementation for Bls12381G2 keys that derive the public key from the private one, so I was expecting to also pass the public key as optional if it can not be derived.
This is for generating a new DID key for Bls12381G2 keys.
I've implemented something that works, but as I said, it is not ideal as I had to duplicate code from your implementation.
@mirceanis I came up with a simple implementation that works fine server-side for issuing VCs signed with BLS key in case you want to take a look. There are some workarounds commented out in the code.
The kms-local implementation only supports a fixed set of key types. It is not possible to extend the current implementation as it is today to include a new key type like 'Bls12381G2'.
The asManagedKeyInfoInner method where the key types are checked is private. If you derive the base class to add new key types, you basically need to copy/clone that private method for supporting the existing key types (Ed25519, Secp256k1 and X25519) + new ones (Bls12381G2). Also that method expects 'RequireOnly<ManagedPrivateKey, 'privateKeyHex' | 'type'>)' as input. That assumes the public key can actually be derived from the private key all the time. I haven't found any implementation for Bls12381G2 keys that derive the public key from the private one, so I was expecting to also pass the public key as optional if it can not be derived.
This is for generating a new DID key for Bls12381G2 keys.
I've implemented something that works, but as I said, it is not ideal as I had to duplicate code from your implementation.
https://github.com/pcibraro/veramo/blob/next/packages/kms-bbs/src/key-management-system.ts
The text was updated successfully, but these errors were encountered: