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
Is your feature request related to a problem? Please describe.
For the DID ION keys in pr #987 I needed to pre-create keys for rotation and recovery. I also needed to be able to assign specific key ids (kid). As I didn't want to duplicate all the logic to retrieve the public keys from different key types, I ended up basically using an in memory KMS for temporary keys (see below). It might be helpful to others to have this exposed as a function
Describe the solution you'd like
expose a function that allows IKey generation completely in memory
Additional context
Right now the DID Ion Provider is dependant on kms-local. If Veramo would provide this function that coupling could be removed.
The full reference how I used it in the ION provider
/** * Create a Veramo Key entirely in Memory. It is not stored * * Didn't want to recreate the logic to extract the pub key for the different key types * So let's create a temp in-mem kms to do it for us * * @param type * @param privateKeyHex * @param kid * @param kms * @param ionMeta */exportconsttempMemoryKey=async(type: KeyType.Ed25519|KeyType.Secp256k1|KeyType,privateKeyHex: string,kid: string,kms: string,ionMeta: IonKeyMetadata): Promise<IKey>=>{consttmpKey=(awaitnewKeyManagementSystem(newMemoryPrivateKeyStore()).importKey({
type,
privateKeyHex,
kid,}))asIKeytmpKey.meta!.ion=JSON.parse(JSON.stringify(ionMeta))tmpKey.meta!.ion.commitment=computeCommitmentFromJwk(toIonPublicKeyJwk(tmpKey.publicKeyHex))tmpKey.kms=kms// tmpKey.privateKeyHex = privateKeyHexreturntmpKey}
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is your feature request related to a problem? Please describe.
For the DID ION keys in pr #987 I needed to pre-create keys for rotation and recovery. I also needed to be able to assign specific key ids (kid). As I didn't want to duplicate all the logic to retrieve the public keys from different key types, I ended up basically using an in memory KMS for temporary keys (see below). It might be helpful to others to have this exposed as a function
Describe the solution you'd like
expose a function that allows IKey generation completely in memory
Additional context
Right now the DID Ion Provider is dependant on kms-local. If Veramo would provide this function that coupling could be removed.
The below line is the import one.
The full reference how I used it in the ION provider
The text was updated successfully, but these errors were encountered: