identity_storage/key_storage/
jwk_storage_bbs_plus_ext.rs1use async_trait::async_trait;
5use identity_verification::jwk::Jwk;
6use jsonprooftoken::jpa::algs::ProofAlgorithm;
7
8use crate::JwkGenOutput;
9use crate::JwkStorage;
10use crate::KeyId;
11use crate::KeyStorageResult;
12use crate::KeyType;
13use crate::ProofUpdateCtx;
14
15#[cfg_attr(not(feature = "send-sync-storage"), async_trait(?Send))]
17#[cfg_attr(feature = "send-sync-storage", async_trait)]
18pub trait JwkStorageBbsPlusExt: JwkStorage {
19 async fn generate_bbs(&self, key_type: KeyType, alg: ProofAlgorithm) -> KeyStorageResult<JwkGenOutput>;
21
22 async fn sign_bbs(
25 &self,
26 key_id: &KeyId,
27 data: &[Vec<u8>],
28 header: &[u8],
29 public_key: &Jwk,
30 ) -> KeyStorageResult<Vec<u8>>;
31
32 async fn update_signature(
34 &self,
35 key_id: &KeyId,
36 public_key: &Jwk,
37 signature: &[u8],
38 ctx: ProofUpdateCtx,
39 ) -> KeyStorageResult<Vec<u8>>;
40}