@rkfl/transact-client
v1.1.6
Published
## ๐ง Initialization
Maintainers
Readme
๐ RocketFuel SDK Integration Guide
๐ง Initialization
To initialize the SDK, create a new instance of RkflPlugin with your configuration.
installation
Inport CDN
or install via npm
import { RkflPlugin } from '@rkfl/transact-client';๐ Usage
<!-- Container for SDK buttons -->
<div id="sdk-buttons-container"></div>
<script>
const ageplugin = { feature: "AGE_VERIFICATION", containerId: "verification-container" };
const payPlugin = { feature: "PAYIN", containerId: "payNow" };
const sdkConfig = {
plugins: [ageplugin, payPlugin],
environment: 'sandbox', // @default - 'production'
clientId: '<Your-client-Id>',
redirect: (localRedirectStored === 'true') // default false if not set
};
const sdk = new window.RkflPlugin(sdkConfig);
sdk.init() // async process returns true or false
// for more follow the documentation below
</script>Documentation
Click here for more detailed Documentation
๐ Supported Button Types
| Feature Key | Description |
|--------------------|-----------------------------|
| payin | Shows the "Pay Now" button |
| age_verification | Shows the "Verify Age" button|
๐ ๏ธ Development
If you are building the SDK locally:
npm install
npm run buildThe bundled file will be available at:
./dist/sdk.min.js๐ฆ NPM Commands Documentation
1. npm:login
Logs you into your npm account from the terminal. Youโll be prompted for your npm username, password, and email.
npm run npm:loginUse this before your first publish or if youโre logged out.
2. npm:publish
Publishes the current package to npm with public access. The package name and version must be unique on npm.
npm run npm:publish3. npm:patch
Increments the patch version (last digit) in package.json by +1. Used for bug fixes or small improvements.
npm run npm:patchExample Version Change:
1.0.9 โ 1.0.10
1.0.10 โ 1.0.114. npm:minor
Increments the minor version (middle digit) by +1 and resets patch to 0. Used for adding new features without breaking compatibility.
npm run npm:minorExample Version Change:
1.0.5 โ 1.1.0
1.2.7 โ 1.3.05. npm:major
Increments the major version (first digit) by +1 and resets minor and patch to 0. Used for breaking changes or major redesigns.
npm run npm:majorExample Version Change:
1.4.8 โ 2.0.0
2.1.3 โ 3.0.0๐ Recommended Workflow
Login once:
npm run npm:loginMake changes to your code.
Bump version:
npm run npm:patchMinor:
npm run npm:minorMajor:
npm run npm:majorPublish:
npm run npm:publish๐ License
MIT License ยฉ RocketFuel Blockchain, Inc.
