Connections
A connection is a secure link between your organization and a holder's wallet. In cheqd and Indicio you need a connection before you can issue or verify a credential. In Polygon you need one to issue. EU Digital Identity and Microsoft Entra don't use connections, so their classes don't have these methods.
Create connection invitation
Creates an invitation. Show it to the holder as a QR code or link; the connection is made when their wallet accepts it.
cheqd
Indicio
Polygon
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const invitation = await cheqd.createConnectionInvitation({
organizationId: '<ORGANIZATION_ID>',
label: 'Acme University',
multiUseInvitation: false,
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const invitation = await indicio.createConnectionInvitation({
organizationId: '<ORGANIZATION_ID>',
label: 'Acme University',
multiUseInvitation: false,
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const invitation = await privado.createConnectionInvitation({
organizationId: '<ORGANIZATION_ID>',
label: 'Acme University',
multiUseInvitation: false,
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| label | string (Required) | The name the holder sees when they accept the invitation. |
| alias | string (Optional) | An alias for the connection. |
| imageUrl | string (Optional) | A URL of the logo the holder sees. |
| domain | string (Optional) | The domain associated with the invitation. |
| multiUseInvitation | boolean (Optional) | Whether more than one holder can use the invitation. |
| autoAcceptConnection | boolean (Optional) | Whether the connection is accepted automatically. |
The response contains the invitationUrl to show the holder and the invitationId.
Get connections
Lists an organization's connections.
cheqd
Indicio
Polygon
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const connections = await cheqd.getConnections({
organizationId: '<ORGANIZATION_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const connections = await indicio.getConnections({
organizationId: '<ORGANIZATION_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const connections = await privado.getConnections({
organizationId: '<ORGANIZATION_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
Get connection by ID
Gets one connection, for example to check whether the holder has accepted the invitation.
cheqd
Indicio
Polygon
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const connection = await cheqd.getConnectionById({
organizationId: '<ORGANIZATION_ID>',
connectionId: '<CONNECTION_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const connection = await indicio.getConnectionById({
organizationId: '<ORGANIZATION_ID>',
connectionId: '<CONNECTION_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const connection = await privado.getConnectionById({
organizationId: '<ORGANIZATION_ID>',
connectionId: '<CONNECTION_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| connectionId | string (Required) | The ID of the connection. |
Delete connection
Deletes a connection.
cheqd
Indicio
Polygon
import { CheqdEcosystem } from '@hovi/core-sdk';
const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await cheqd.deleteConnection({
organizationId: '<ORGANIZATION_ID>',
connectionId: '<CONNECTION_ID>',
});
import { IndicioEcosystem } from '@hovi/core-sdk';
const indicio = new IndicioEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await indicio.deleteConnection({
organizationId: '<ORGANIZATION_ID>',
connectionId: '<CONNECTION_ID>',
});
import { PrivadoEcosystem } from '@hovi/core-sdk';
const privado = new PrivadoEcosystem({
apiKey: '<YOUR_API_KEY>',
});
const result = await privado.deleteConnection({
organizationId: '<ORGANIZATION_ID>',
connectionId: '<CONNECTION_ID>',
});
Params
| Parameter | Type | Description |
|---|---|---|
| organizationId | string (Required) | Your organization ID. |
| connectionId | string (Required) | The ID of the connection to delete. |
note
- This can't be undone. To issue or verify with this holder again, create a new connection.