1.2.2 • Published 2 months ago

@caldera-trade/3dp-registrar v1.2.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 months ago

Caldera Trade 3DP Registrar

NPM version NPM downloads npm.io

Build Status

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.

Installation

You can install the SDK using npm or yarn

npm install @caldera-trade/3dp-registrar
yarn add @caldera-trade/3dp-registrar

Usage

Discord Validation

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);

Website Validation

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!

1.2.2

2 months ago

1.2.0

2 months ago

1.2.1

2 months ago

1.1.5

7 months ago

1.1.4

10 months ago

1.1.3

12 months ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago