smilecoin-sdk-react

1.2.0 • Public • Published

Smile Coin SDK For React

Smile Coin Documentation

1. Download SDK

npm i smilecoin-sdk-react

2. Import package

import { SmileReceiveButton, SmileSendButton } from 'smilecoin-sdk-react'

3. Initialize component:

return (
    <SmileReceiveButton
        amount={100} //(Number: units of smile)
        platform="Test Partner" //(String: platform name)
        platform_address="X" //(String: platform's receive wallet)
        uuid="1" //(String: platform's user identifier in their own records)
        platform_parameters={ custom_parameter_1: "x"... } //(Object: will take any sensitive custom parameters you would like to encrypt and track, this will append to the provided note)
        note="testdk" //(String: note describing the transaction)
        callback={myCallback} //(Function: Returns signed_txn to pass to partner BE)
        env="development" //(String: "development" | "production")
    />
)
return (
    <SmileSendButton
        callback={yourCallback} //(Function: The SmileSend button should call your payout endpoint)
    />
)

Dependencies (4)

Dev Dependencies (3)

Package Sidebar

Install

npm i smilecoin-sdk-react

Weekly Downloads

1

Version

1.2.0

License

none

Unpacked Size

78.7 kB

Total Files

6

Last publish

Collaborators

  • alielassy
  • seannelson