1.0.2 • Published 2 years ago
smilecoin-sdk-react-native v1.0.2
Smile Coin SDK For React Native
1. Download SDK and dependencies
npm i smilecoin-sdk-react-native && npm i react-native-linear-gradient && npm i react-native-webview
2. Link and install necessary pods
cd ios && pod install && cd ..
3. Import package
import { SmileReceiveButton, SmileSendButton } from 'smilecoin-sdk-react-native'
4. 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="dev" //(String: "dev" | "prod")
/>
)
return (
<SmileSendButton
callback={myCallback}
/>
)