1.0.5 • Published 1 year ago

yy01_test_package v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Transak SDK

A JavaScript library for decentralised applications to onboard their global user base with fiat currency.

Installation

# Using yarn
$ yarn add @transak/transak-sdk

# Using npm
$ npm install @transak/transak-sdk

Example usage

Refer here for the full list of customisation options

import transakSDK from '@transak/transak-sdk';

let transak = new transakSDK({
  apiKey: '<your-api-key>', // (Required)
  environment: '<environment: STAGING/PRODUCTION>', // (Required)
  // .....
  // For the full list of customisation options check the link above
});

transak.init();

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

// This will trigger when the user closed the widget
transak.on(transak.EVENTS.TRANSAK_WIDGET_CLOSE, (orderData) => {
  transak.close();
});

// This will trigger when the user marks payment is made
transak.on(transak.EVENTS.TRANSAK_ORDER_SUCCESSFUL, (orderData) => {
  console.log(orderData);
  transak.close();
});

For in-depth instructions on integrating Transak, view our complete documentation.

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago