JSPM

  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q65253F
  • License MIT

Node.js module with the Verifier SDK for PureFI decentralized AML protocol. Providing wrappers for communicating with PureFI issuers

Package Exports

  • @purefi/verifier-sdk

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@purefi/verifier-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Logo

@purefi/verifier-sdk

Node.js module with the Verifier SDK for PureFI decentralized AML protocol. Providing wrappers for communicating with PureFI issuers

MIT License

Installation

Using npm:

npm install @purefi/verifier-sdk

Using yarn:

yarn add @purefi/verifier-sdk

Quick Start

CommonJS:

const PureFI = require('@purefi/verifier-sdk').default;

function checkRisk(walletAddress) {
  const config = {
    token: '<security_token>',
  };
  const purefi = new PureFI(config);

  const payload = {
    address: walletAddress,
  };
  
  return purefi.checkRisk(payload).then((response) => response.riskScore);
}

ES6:

import PureFI from '@purefi/verifier-sdk';

const checkRisk = async (walletAddress) => {
  const config = {
    token: '<security_token>',
  };
  const purefi = new PureFI(config);

  const payload = {
    address: walletAddress,
  };

  const response = await purefi.checkRisk(payload);
  return response.riskScore;
}

Typescript:

import PureFI, { PureFIConfig, CheckRiskPayload, CheckRiskResponse } from '@purefi/verifier-sdk';

const checkRisk = async (walletAddress: string): Promise<number | null> => {
  const config: PureFIConfig = {
    token: '<security_token>',
  };
  const purefi = new PureFI(config);

  const payload: CheckRiskPayload = {
    address: walletAddress,
  };

  const response: CheckRiskResponse = await purefi.checkRisk(payload);
  return response.riskScore;
}

License

MIT