@spritz-finance/widget

0.1.5 • Public • Published

Spritz Widget

A JavaScript library for defi apps to have their users spend crypto easily with Spritz

Installation

# Using yarn
$ yarn add @spritz-finance/widget

# Using npm
$ npm install @spritz-finance/widget

Example usage

Refer here for the full list of customisation options

import SpritzSDK from '@spritz-finance/widget';

let spritz = new SpritzSDK({
    integrationKey: '<your-integration-key>', // required
    environment: '<environment: STAGING|PRODUCTION>', // required
    provider: window.ethereum.provider // optional, an ethers provider. Will bridge your app's web3 provider into the Spritz app
    height: '800px', // optional
    width: '100%' //optional
});

spritz.init();

// To get all the events
spritz.on(spritz.ALL_EVENTS, (data) => {
  console.log(data);
});

Package Sidebar

Install

npm i @spritz-finance/widget

Weekly Downloads

70

Version

0.1.5

License

ISC

Unpacked Size

172 kB

Total Files

42

Last publish

Collaborators

  • ohitslaurence
  • eliyahud