Socket
Socket
Sign inDemoInstall

@transak/react-native-sdk

Package Overview
Dependencies
2
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @transak/react-native-sdk

A React Native SDK for decentralised applications to onboard their global user base with fiat currency


Version published
Maintainers
3
Created

Readme

Source

Transak React Native SDK

A React Native SDK for decentralised applications to onboard their global user base with fiat currency.

Installation

# Using yarn
yarn add @transak/react-native-sdk

# Using npm
npm install @transak/react-native-sdk

Install these required peer dependencies to facilitate auto-linking.

# Using yarn
yarn add react-native-webview
yarn add react-native-inappbrowser-reborn
yarn add @react-native-community/netinfo

# Using npm
npm install react-native-webview
npm install react-native-inappbrowser-reborn
npm install @react-native-community/netinfo

Example usage

import TransakWebView from '@transak/react-native-sdk';

function TransakReactNativeSdkIntegration() {
  const transakEventHandler = (event, data) => {
    switch(event) {
      case 'ORDER_PROCESSING':
        console.log(data);
        break;

      case 'ORDER_COMPLETED':
        console.log(data);
        break;

      default:
        console.log(data);
    }
  };

  return (
    <TransakWebView
      queryParams={{
        apiKey: '<your-api-key>',
        environment: '<environment: STAGING/PRODUCTION>',
        // .....
        // For the full list of query params refer Props section below
      }}
      onTransakEventHandler={transakEventHandler}

      style={}          // react-native-webview prop
      onLoadStart={}    // react-native-webview prop
      onLoadEnd={}      // react-native-webview prop
      // .....
      // For the full list of react-native-webview props refer Props section below
    />
  );
}

Props

PropDescription
queryParamsRefer here for the full list of query params
onTransakEventHandlerAccepts callback function to listen to order related events

This component accepts most of the react-native-webview props, except the following: source, injectJavaScript, sharedCookiesEnabled, injectedJavaScript, injectedJavaScriptBeforeContentLoaded

License

ISC Licensed. Copyright (c) 2023 Transak Inc.

FAQs

Last updated on 16 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc