hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
122 stars 81 forks source link

Oob builder for messages crate #949

Open Patrik-Stas opened 1 year ago

Patrik-Stas commented 1 year ago

Building OOB invitation is fundamental way for anyone to get started with aries-vcx, in its current state. The first thing you ever need if you want to simulate a basic use case with aries-vcx is to create the oob invitation. This need came up for example in:

Currently in aries_vcx/src/handlers/out_of_band there's OutOfBandSender which is position on same level like other protocol handlers, but in fact, this is just a builder for OOB messages. More-over, working with the OutOfBandSender is currently difficult, because it's method

pub fn append_service(mut self, service: &OobService) -> Self {

ultimately requires you to import diddoc_legacy into your project, which is not obvious.

Proposal:

Additional note:

There's also OutOfBandReceiver - we'll get rid of that in separate step - it contains method. nonmediated_connection_exists which is being used in some NodeJS tests.

Patrik-Stas commented 1 year ago

We now have builders for Messages crate, but we should yet do something about OutOfBandSender and OutOfBandReceiver