1.0.0 • Published 4 years ago

@stablepay/stablepayjs v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

StablePayJS

StablePay is a decentralized cryptocurrency payment platform powered by smart-contracts in the ethereum network that allows anyone to receive easily and securely an asset-backed stablecoin through their site, mitigating the risk of high volatility in the cryptocurrency market.

Library and docs are still in development.

Usage

Enable cryptocurrency payments and donations in your site by either:

  • Using the StablePayJS Library by installing our NPM Package in your Javascript App. (Read how to install Here)
  • Using the Widget Component Library by installing our NPM Package in your Javascript App. (Read how to install Here)
  • Using our Embeddable Widget in your site using HTML/JavaScript. (Read our Docs for more information)
  • Directly calling the Smart Contract. (Read our Docs for more information)

Installing

Using npm:

npm install @stablepay/stablepayjs

Using yarn:

yarn add @stablepay/stablepayjs

Example

import StablePayJS from '@stablepa/stablepayjs';

const config = {
    ethereumNetwork: 'ropsten',
    stablepayBackendAPI: 'https://ropsten.api.stablepay.io/api',
    stablepayContractAddress: '0x494ff097f8d4E9C3b2316E3cEC49623bE98B5125',
    signature: 'secret'
};

const stablepay = StablePayJS(config);
const {
    supportedTokens,
    tokenAllowance,
    tokenBalance,
    tokenMetadata,
    tokenRate
} = stablepay;

Acknowledgments