@cryptafriq/react-crypto-wallet-sdk
v0.1.4
Published
React Js SDK for integrating cryptocurrency wallet functionality into your website.
Downloads
305
Readme
Crypto Wallet SDK
A React Js SDK for integrating cryptocurrency wallet functionality into your website. This SDK provides a seamless way to handle crypto transactions and wallet management on your websites.
Installation
Using npm
npm install @cryptafriq/react-crypto-wallet-sdk
Using yarn
yarn add @cryptafriq/react-crypto-wallet-sdk
Usage
Import useCryptoWallet to any component in your application and pass your config
import { useCryptoWallet } from './dist/index';
const config = {
apiKey: 'BSCAPIK_TEST_861d25e1987b1a0e705360Z',
callbackUrl: 'https://www.google.com',
customerEmail: '[email protected]',
businessName: 'Example Business',
businessLogo:
'https://www.google.com/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png',
};
useCryptoWallet(config);
Hooks
import React from 'react';
import { useCryptoWallet } from './dist/index';
export default function App() {
const config = {
apiKey: 'BSCAPIK_TEST_861d25e1987b1a0e705360Z',
callbackUrl: 'https://www.google.com',
customerEmail: '[email protected]',
businessName: 'Example Business',
businessLogo:
'https://www.google.com/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png',
};
const handleCryptoWallet = useCryptoWallet(config);
return (
<div className="App">
<h1>Testing!!1</h1>
<button
onClick={() => {
handleCryptoWallet();
}}
>
Launch Crypto Wallet Modal
</button>
</div>
);
}