New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@polymathnetwork/sdk

Package Overview
Dependencies
Maintainers
6
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymathnetwork/sdk

A Javascript SDK for interacting with the Polymath network for the browser and Node.js

  • 1.0.3-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-25%
Maintainers
6
Weekly downloads
 
Created
Source

Polymath SDK

A Javascript SDK for interacting with the Polymath network for the browser and Node.js

Usage

First, configure your Polymath Client:

// polyClient.ts
import { Polymath, browserUtils } from '@polymathnetwork/sdk';

// create the necessary Web3 providers on its own. You can pass custom ones
// if you want though.
const config = {
  polymathRegistryAddress: '0x1234...',
};

// You could have multiple configs for each network you support:
const networkConfigs = {
  ['1']: {
    /* */
  },
  ['42']: {
    /* */
  },
};
const networkId = await browserUtils.getNetworkId();
const config = networkConfigs[networkId];

// You'll want to reuse the smae instance of the Polymath client in the rest of
// your app for the same network.
export const polyClient = new Polymath(config);

Initializing your client

// Pending

Finally, let's start a procedure to reserve a Security Token

// Builds a list of transactions required to reserve a security token
const transactionQueue = await polyClient.reserveSecurityToken({
  name: 'My Token',
  symbol: 'MY-TOKEN',
});

// We can listen to events for individual transactions as well as the queue
// itself. For now, let's just listen to the whole queue

await transactionQueue.run(); // Will run sequentially every transaction required

// At this point my token has been reserved
const myTokenReservation = await polyClient.getSecurityTokenReservation({
  symbol: 'MY-TOKEN',
});

To be continued...

FAQs

Package last updated on 18 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc