JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 93
  • Score
    100M100P100Q43331F
  • License Apache-2.0

Package Exports

  • @oxydev/subscrypt

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 (@oxydev/subscrypt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

SubsCrypt-npm-library

npm Test status npm module downloads

Import Package

We have made this wrapper over SubsCrypt contract to make uses of our api easier. You have to option right now, either you can use the latest version of code on repo or use the npm package on npm repository which is the latest version of this repo's release.

  • Clone the repo and add this to package.json of your project.
    "@oxydev/subscrypt": "file:../SubsCrypt-npm-library",
  • Or run this command, and then you can use latest SubsCrypt npm package
    yarn add @oxydev/subscrypt

Use Package in your project

import subscrypt from '@oxydev/subscrypt';

or

const subscrypt = require('@oxydev/subscrypt');

Now you can easily use the SubsCrypt library to get data from blockchain. Below are some examples:

console.log(await subscrypt.getPlanData('5Dyu5YxLufavjPg8vP31BhKs5xz8ncdkQcNdGwf5XtW4C9Ym', 2));

console.log(await subscrypt.checkSubscription('5Dyu5YxLufavjPg8vP31BhKs5xz8ncdkQcNdGwf5XtW4C9Ym','5Dyu5YxLufavjPg8vP31BhKs5xz8ncdkQcNdGwf5XtW4C9Ym', 2));

console.log(await subscrypt.retrieveWholeDataWithPassword('5Dyu5YxLufavjPg8vP31BhKs5xz8ncdkQcNdGwf5XtW4C9Ym',"token", "pass_phrase"));

More Samples will be added to the documents of project here.

Use SubsCrypt CLI

Install package

npm install -g @oxydev/subscrypt

Use CLI

subscrypt --version

Docs

You can access the docs here