The Caldera Trade 3DP Registrar provides your JavaScript & TypeScript applications easy access to Polkadot Judgements.
This library can be used by NodeJS applications, tools, and other automations to provide users Judgements and validate KYC.
You can install the SDK using npm or yarn
npm install @caldera-trade/3dp-registrar
yarn add @caldera-trade/3dp-registrar
import { validateMessageSignature } from "@caldera-trade/3dp-registrar";
process.env['P3D_REGISTRAR_MNEMONIC'] = '<some_mnemonic>'; // We suggest using Doppler or another secrets management syste to inject your secrets instead
// Create new client with your private access tokens
await validateMessageSignature(message, message.content, 1);
import {
extractDataAndSignature,
isJudgementRequestSubmitted,
provideJudgement,
verifyOnChainIdentity,
} from "@caldera-trade/3dp-registrar";
process.env['P3D_REGISTRAR_MNEMONIC'] = '<some_mnemonic>'; // We suggest using Doppler or another secrets management syste to inject your secrets instead
/** Validate Identity */
const { validOnChainIdentity, isReasonable } =
await verifyOnChainIdentity(walletAddress);
/** Check if Judgement Extrinsic is on Blockchain */
const judgmentRequestSubmitted = await isJudgementRequestSubmitted(
walletAddress,
registrarIndex,
registrarFee,
);
/** Provide Judgement */
await provideJudgement(walletAddress, mnemonic, registrarIndex, 'Reasonable');
If you would like any additional features exposed, create an Issue or submit a Pull Request!