---
# System prepended metadata

title: Integration examples

---

# Integration examples

## Agent configuration
```graphviz
digraph Agent {
  rankdir=LR;
  node [fontname=Courier,shape=box]

  Agent->{rank=same;IKeyManager IDIDManager IResolver IMessageHandler IDataStore ICredentialIssuer IDIDComm ISelectiveDisclosure IDataStoreORM}
  
  IKeyManager->{KeyStore kms}
  kms->{local aws azure metamask ledger}
  
  IDIDManager->{DIDStore providers}
  providers->{EthrDIDProvider KeyDIDProvider WebDIDProvider}
  EthrDIDProvider->{Ethereum}
  
  IResolver->{Resolver}
  Resolver->{rank=same;KeyDidResolver EthrDidResolver WebDidResolver UniResolver}
  UniResolver->{ion elem sov io orther}
  EthrDidResolver->{Ethereum}
  Ethereum->{mainnet rinkeby ropsten kovan goerli private}
  
  IMessageHandler->{DIDCommMessageHandler JwtMessageHandler W3cMessageHandler SdrMessageHandler}
  
  ICredentialIssuer->{JWT JSONLD}
  
  IDataStoreORM->{dbConnection}
  IDataStore->{dbConnection}
  KeyStore->{dbConnection}
  DIDStore->{dbConnection}

  
  dbConnection->{Sqlite Postgres Oracle MySQL Mongo etc}
  
  
  {rank=same;local aws azure metamask ledger ion elem sov io orther mainnet rinkeby ropsten kovan goerli private Sqlite Postgres Oracle MySQL Mongo etc} 
}
```

## Legacy app CRUD


## Simple Agent configuration
```graphviz
digraph Agent {
  rankdir=LR;
  node [fontname=Courier,shape=box]

  Agent->{IKeyManager IDIDManager IResolver  IDataStore ICredentialIssuer }
  
  IKeyManager->{KeyStore kms}
  kms->{local}
  
  IDIDManager->{DIDStore providers}
  providers->{WebDIDProvider}
  
  IResolver->{Resolver}
  Resolver->{WebDidResolver}
  
  
  ICredentialIssuer->{JWT}
  
  IDataStore->{dbConnection}
  KeyStore->{dbConnection}
  DIDStore->{dbConnection}
  
  dbConnection->{Postgres}
  
  
  
}
```

### Create

```sequence
User->App: Submit
App->DB: Create
DB->App: id
App->Agent: didManagerGetOrCreate
Agent->App: IIDentifier
App->Agent: createVerifiableCredential
Agent->App: IVerifiableCredential
App->Agent: saveVerifiableCredential
Agent->App: true
App->DB: Update?
DB->App: true
App->User: ok
```

### Read

```sequence
User->App: Export
App->Agent: getVerifiableCredential
Agent->App: IVerifiableCredential
App->User: json
```

### Update

```sequence
User->App: Submit
App->DB: Update
DB->App: true
App->Agent: didManagerGetOrCreate
Agent->App: IIDentifier
App->Agent: revokeVerifiableCredential
Agent->App: true
App->Agent: createVerifiableCredential
Agent->App: IVerifiableCredential
App->Agent: saveVerifiableCredential
Agent->App: true
App->User: ok
```

### Delete

```sequence
User->App: Submit
App->DB: Delete
DB->App: true
App->Agent: didManagerGetOrCreate
Agent->App: IIDentifier
App->Agent: revokeVerifiableCredential
Agent->App: true
App->User: ok
```