npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ambisafe/tabla-client

v0.0.7

Published

Ambisafe Tabla client library

Downloads

23

Readme

tabla-client

This library helps with Tabla API and contract interactions, and moves the maximum amount of work from the client to the blockchain.

Installation

npm i @ambisafe/tabla-client

Usage

  1. Import Tabla client library
import { TablaClient } from '@ambisafe/tabla-client';
  1. Create TablaClient instance
const client = new TablaClient(
    'https://api.tabla.is', // Tabla API url
    '12d2b288-d327-4e0e-9916-f67268b06447', // Platform's public ID on Tabla
    'platform jwt secret' // Platform's JWT secret
);
  1. Request transaction object
const transaction = await client.userWhitelist({
    kycType: 'PERSONAL:BASIC_KYC',
    walletAddress: '0xaddressaddressaddressaddressaddressaddre',
    country: 'US',
    city: 'Paris',
    residenceAddress: '1230 Ocean Avenue',
    region: 'South/Latin America',
    postcode: '12000',
    firstName: 'John',
    lastName: 'Doe',
    birthDate: '1970-01-01',
});
  1. Send returned data from Tabla to a blockchain
const rpcProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth');
const wallet = new ethers.Wallet(
    'private key', // Your private key of the address from which you will perform transactions to whitelist user addresses
    rpcProvider
);

await wallet.sendTransaction({
    to: transaction.to, // Whitelist contract address
    data: transaction.calldata, // Signed and ready calldata
});

How can you receive all required data for whitelist your user's addresses and etc?

You can contact [email protected] to add your platform to Tabla and receive all required instructions to perform user's addresses on-chain whitelist.

Whitelist platform users

KYC data examples

import type { PersonalKYCDataDTO, CorporateKYCDataDTO } from '@ambisafe/tabla-client';

const personalKYCData: PersonalKYCDataDTO = {
    kycType: 'PERSONAL:BASIC_KYC',
    walletAddress: '0xaddressaddressaddressaddressaddressaddre',
    country: 'US',
    city: 'Paris',
    residenceAddress: '1230 Ocean Avenue',
    region: 'South/Latin America',
    postcode: '12000',
    firstName: 'John',
    lastName: 'Doe',
    birthDate: '1970-01-01',
}

const corporateKYCData: CorporateKYCDataDTO = {
    kycType: 'CORPORATE:BASIC_KYC',
    walletAddress: '0xaddressaddressaddressaddressaddressaddre',
    country: 'US',
    city: 'Paris',
    residenceAddress: '1230 Ocean Avenue',
    region: 'South/Latin America',
    postcode: '12000',
    companyName: 'Senia',
    dateOfIncorporation: '1970-01-01',
}

KYC types description

Personal:

  1. PERSONAL:EMPTY - for example can be used to unwhitelist user's address on blockchain side
  2. PERSONAL:BASIC_KYC - for basic kyc that include user's basic information and whitelist user's address for operations with basic tokens
  3. PERSONAL:ACCREDITED_INVESTOR - for users with accredited investor status. Whitelist user's address if it's country require accredited investor status

Corporate:

  1. CORPORATE:EMPTY - for example can be used to unwhitelist company's address on blockchain side
  2. CORPORATE:BASIC_KYC - for basic kyc that include company's basic information and whitelist user's address for operations with basic tokens

Here is example of whitelisting user address on a platform

import { ethers } from 'ethers'; // Or another web3 lib
import { TablaClient, PersonalKYCDataDTO } from '@ambisafe/tabla-client';

// Any PERSONAL KYC
(async () => {
    const rpcProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth');
    const wallet = new ethers.Wallet(
        'private key', // Your private key of the address from which you will perform transactions to whitelist user addresses
        rpcProvider
    );

    const client = new TablaClient(
        'https://api.tabla.is', // Tabla API url
        '12d2b288-d327-4e0e-9916-f67268b06447', // Platform's public ID on Tabla
        'platform jwt secret' // Platform's JWT secret
    );
    const transaction = await client.userWhitelist({
        kycType: 'PERSONAL:BASIC_KYC',
        walletAddress: '0xaddressaddressaddressaddressaddressaddre', // User's address in Ethereum format
        country: 'US', // Alpha-2 country code
        city: 'Paris',
        residenceAddress: '1230 Ocean Avenue', // Street, Building, Apartment
        region: 'South/Latin America', // Optional
        postcode: '12000',
        firstName: 'John',
        lastName: 'Doe',
        birthDate: '1970-01-01',
    });

    await wallet.sendTransaction({
      to: transaction.to,
      data: transaction.calldata,
    });
})();

// Any CORPORATE KYC
(async () => {
    const rpcProvider = new ethers.providers.JsonRpcProvider('https://rpc.ankr.com/eth');
    const wallet = new ethers.Wallet(
        'private key', // Your private key of the address from which you will perform transactions to whitelist user addresses
        rpcProvider
    );

    const client = new TablaClient(
        'https://api.tabla.is', // Tabla API url
        '12d2b288-d327-4e0e-9916-f67268b06447', // Platform's public ID on Tabla
        'platform jwt secret' // Platform's JWT secret
    );
    const transaction = await client.userWhitelist({
        kycType: 'CORPORATE:BASIC_KYC',
        walletAddress: '0xaddressaddressaddressaddressaddressaddre', // User's address in Ethereum format
        country: 'US', // Alpha-2 country code
        city: 'Paris',
        residenceAddress: '1230 Ocean Avenue', // Street, Building, Apartment
        region: 'South/Latin America', // Optional
        postcode: '12000',
        companyName: 'Senia',
        dateOfIncorporation: '1970-01-01',
    });

    await wallet.sendTransaction({
      to: transaction.to,
      data: transaction.calldata,
    });
})();