---
# System prepended metadata

title: Presentation exchange plugin

---

# Presentation exchange plugin

Instead of writing our own implementation of presentation exchange protocol, maybe we can use `@sphereon/pe-js` for this?

API:

- [ ] getVerifiableCredentialsFromPresentationDefinition
- [ ] validatePresentationAgainstPresentationDefinition

Initial code:
https://github.com/veramolabs/walletconnect-test-wallet/blob/did/src/controllers/plugins/presentation-exchange.ts

# IDataStore plugin for browser localStorage

We need a data store plugin for storing verifiable data in the browser. It will be a dependency for the Presentation Exchange plugin.

Initial code:
https://github.com/veramolabs/walletconnect-test-wallet/blob/did/src/controllers/plugins/data-store.ts


# DIDStore and KeyStore for HD wallets

When integrating Veramo with existing wallets, we usually have access to user's "secret recovery phrase". It should be possible to create DIDs from derived key pairs.

Example:

`seed = 'lorem ipsum ...'`

```
path = 'm/44’/60’/0’/0'
address = '0x123...567'
did1 = 'did:ethr:0x123...567'
did2 = 'did:ethr:rinkeby:0x123...567'
```

```
path = 'm/44’/60’/0’/1'
address = '0x456...789'
did1 = 'did:ethr:0x456...789'
did2 = 'did:ethr:rinkeby:0x456...789'
```

Initial code:

https://github.com/veramolabs/walletconnect-test-wallet/blob/did/src/controllers/plugins/did-store.ts
https://github.com/veramolabs/walletconnect-test-wallet/blob/did/src/controllers/plugins/key-store.ts