Skip to main content

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.

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,
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.
labelstring (Required)The name the holder sees when they accept the invitation.
aliasstring (Optional)An alias for the connection.
imageUrlstring (Optional)A URL of the logo the holder sees.
domainstring (Optional)The domain associated with the invitation.
multiUseInvitationboolean (Optional)Whether more than one holder can use the invitation.
autoAcceptConnectionboolean (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.

import { CheqdEcosystem } from '@hovi/core-sdk';

const cheqd = new CheqdEcosystem({
apiKey: '<YOUR_API_KEY>',
});

const connections = await cheqd.getConnections({
organizationId: '<ORGANIZATION_ID>',
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.

Get connection by ID​

Gets one connection, for example to check whether the holder has accepted the invitation.

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>',
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.
connectionIdstring (Required)The ID of the connection.

Delete connection​

Deletes a connection.

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>',
});

Params​

ParameterTypeDescription
organizationIdstring (Required)Your organization ID.
connectionIdstring (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.