Module aries-vcx/src/protocols/ should be a separate crate completely unaware of existence of ledger, wallet or particular credential types. Instead, these particular implementations should be injectable.
Important step toward enabling this has been done by George's modularization PR https://github.com/hyperledger/aries-vcx/pull/648 which is essentially shielding off state machine code from particular implementations - for example function _create_credential in protocols/issuance/issuer/states/state_machine.rs calls anoncreds.issuer_create_credential(...), but the anoncreds object is just BaseAnonCreds trait interface.
It's worth of note that with current approach, the state machines are still aware of anoncreds implementation details, as the interfaces require passing quite specific information like tails_dir or rev_reg_id. So the current state machines are currently not generic enough to support different type of credentials, like LD or BBS, but I think that's fine for now.
Module
aries-vcx/src/protocols/
should be a separate crate completely unaware of existence of ledger, wallet or particular credential types. Instead, these particular implementations should be injectable._create_credential
inprotocols/issuance/issuer/states/state_machine.rs
callsanoncreds.issuer_create_credential(...)
, but theanoncreds
object is justBaseAnonCreds
trait interface.It's worth of note that with current approach, the state machines are still aware of anoncreds implementation details, as the interfaces require passing quite specific information like
tails_dir
orrev_reg_id
. So the current state machines are currently not generic enough to support different type of credentials, like LD or BBS, but I think that's fine for now.