Iota Core

Integrate Affinidi Iota Framework on your applications to request and receive data from Affinidi Vault.

Supported Languages

Package: @affinidi-tdk/iota-core

npm install @affinidi-tdk/iota-core --save

Package: affinidi_tdk_iota_core

pip install affinidi_tdk_iota_core

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().

Module Imports
import { Iota } from '@affinidi-tdk/iota-core'
import { AuthProvider } from '@affinidi-tdk/auth-provider'
import affinidi_tdk_iota_core
import affinidi_tdk_auth_provider
Sample Codes
// Create Iota Token from AuthProvider Package
const iotaToken = authProvider.createIotaToken(
    "<IOTA_CONFIGURATION_ID>",
    "<LOGGED_IN_USER_DID>",
)

const iotaCredentials = await Iota.limitedTokenToIotaCredentials(iotaToken.iotaJwt)
# Create Iota Token from AuthProvider Package
iotaToken = authProvider.create_iota_token("<IOTA_CONFIGURATION_ID>", "<LOGGED_IN_USER_DID>");

iota_credentials = await affinidi_tdk_iota_core.Iota.limited_token_to_iota_credentials(iotaToken.iota_jwt)