react-hyperwallet-dropin

React component to integrate Hyperwallet Drop-In UI

Usage no npm install needed!

<script type="module">
  import reactHyperwalletDropin from 'https://cdn.skypack.dev/react-hyperwallet-dropin';
</script>

README

react-hyperwallet-dropin

React component to integrate Hyperwallet Drop-In UI (Unofficial)

NPM JavaScript Style Guide

Install

npm install --save react-hyperwallet-dropin

Usage

import React, { Component } from 'react'

import HyperwalletTranferMethodDropIn from 'react-hyperwallet-dropin'

class Example extends Component {
  render () {
    return (
      <HyperwalletTranferMethodDropIn
        userToken='unique user identifier prefixed with usr-. generated when creating a user'
        environment='sandbox'
        getAuthenticationToken = {(callback)=>{callback('auth-token')}} //token should be renewed every 10 mins
        onComplete = {(trmObject, completionResult)=>{
          //logic to be executed on completion of setting up transfer method.
        }}
        onError = {() => {
          // handle error
        }}
        template = 'bootstrap3'//Specifies the UI template. Allowed values are:[bootstrap3|plain]
      />
    )
  }
}

License

MIT © lahiru94

react-hyperwallet-dropin