Iota Core

The Iota Core library provides a method for generating the Iota Credentials required to initiate the WebSocket data-sharing mode of the Affinidi Iota Framework.

Install Dependency

Package: @affinidi-tdk/iota-core

npm install @affinidi-tdk/iota-core --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

Iota

Provides methods related to Affinidi Iota Framework to generate credentials to sign the request token.

limitedTokenToIotaCredentials

A static method that fetches the Iota Credentials by passing an Iota JWT Token derived from the AuthProvider.

Parameters

Token [String]

JSON Web Token (iotaJwt) generated from the authProvider.createIotaToken().

Example

import { Iota } from '@affinidi-tdk/iota-core'
import { AuthProvider } from '@affinidi-tdk/auth-provider'

// Create Iota Token from AuthProvider Package
const iotaToken = authProvider.createIotaToken(
    "<IOTA_CONFIGURATION_ID>",
    "<LOGGED_IN_USER_DID>",
)

const iotaCredentials = await Iota.limitedTokenToIotaCredentials(iotaToken.iotaJwt)