Skip to main content

Connections

A connection is a secure link between a wallet and an issuer or verifier. In cheqd and Indicio, the wallet needs one before it can receive a credential or answer a proof request. These methods act on one wallet, so create the CloudWallet with that wallet's access token (see Authentication).

Accept connection invitation​

Accepts a connection invitation from an issuer or verifier.

import { CloudWallet } from '@hovi/cloudwallet-sdk';

const wallet = new CloudWallet({
walletAccessToken: '<WALLET_ACCESS_TOKEN>',
apiBaseUrl: 'https://cloudwallet.hovi.id',
});

const result = await wallet.acceptConnectionInvitation({
protocol: 'didcomm',
invitation: '<INVITATION_URL>',
});

Params​

ParameterTypeDescription
protocolstring (Required)Use didcomm.
invitationstring (Required)The invitation URL or string from the issuer or verifier.
labelstring (Optional)A name for the connection.

Get connections​

Lists the wallet's connections.

import { CloudWallet } from '@hovi/cloudwallet-sdk';

const wallet = new CloudWallet({
walletAccessToken: '<WALLET_ACCESS_TOKEN>',
apiBaseUrl: 'https://cloudwallet.hovi.id',
});

const result = await wallet.getConnections();

Get connection by ID​

Gets one of the wallet's connections, for example to check its state.

import { CloudWallet } from '@hovi/cloudwallet-sdk';

const wallet = new CloudWallet({
walletAccessToken: '<WALLET_ACCESS_TOKEN>',
apiBaseUrl: 'https://cloudwallet.hovi.id',
});

const result = await wallet.getConnectionById({
connectionId: '<CONNECTION_ID>',
});

Params​

ParameterTypeDescription
connectionIdstring (Required)The ID of the connection.