Common

Affinidi TDK common libraries that provides utility functions.

Install Dependency

Package: @affinidi-tdk/common

npm install @affinidi-tdk/common --save

You can check the latest version of this module on the NPM repository or view the source code at the GitHub repository.

Classes and Methods

VaultUtils

Provides utility functions for Affinidi Vault requests.

Generates the Affinidi Iota Framework share link to initiate request to Affinidi Vault.

Parameters

request [String]

The signed request token generated from the prepareRequest of the Iota Browser library.

client_id [String]

The client_id from the signed request token.

Example

import { VaultUtils } from '@affinidi-tdk/common'
const vaultShareLink = VaultUtils.buildShareLink(
      request,
      client_id,
    )

Generates the Credential Issuance claim link to claim the credential from the Affinidi Vault.

Parameters

credentialOfferUri [String]

The Credential Offer URI returned from the startIssuance of the Crendential Issuance client.

Example

import { VaultUtils } from '@affinidi-tdk/common'

const vaultClaimLink = VaultUtils.buildClaimLink(
      credentialOfferUri
    )