Common

Affinidi TDK common libraries that provides utility functions.

Install Dependency

Package: affinidi-tdk/affinidi-tdk-php

composer require affinidi-tdk/affinidi-tdk-php

Check the latest version on the Packagist repository or view the source on GitHub.

Classes and Methods

VaultUtils

Provides utility functions for Affinidi Vault requests.

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

Parameters

request string Required
Signed request token generated from the prepareRequest method of the Iota Browser library.
client_id string Required
Client ID from the signed request token.

Example

require_once 'vendor/autoload.php';
use AffinidiTdk\Common\Helpers\VaultUtils;

$shareLink = VaultUtils::buildShareLink($request, $client_id);

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

Parameters

credentialOfferUri string Required
Credential Offer URI returned from the startIssuance method of the Credential Issuance client.

Example

require_once 'vendor/autoload.php';
use AffinidiTdk\Common\Helpers\VaultUtils;

$claimLink = VaultUtils::buildClaimLink($credentialOfferUri);