@alixpay/web-sdk
v1.0.3
Published
Alixgate SDK
Downloads
1
Readme
Web SDK
Requirements
- Node.js: Version 14.x or higher.
- TypeScript: Version 4.0 or higher.
- Module Resolution: ES6 or CommonJS.
- React Support (if needed): Support for React version 16.8 or higher if the SDK needs to integrate with React.
Install
$ npm install @alixpay/web-sdk
or
$ yarn add @alixpay/web-sdk
Usage
import React, { useEffect } from 'react'
import alixSDK from '@alixpay/web-sdk'
function Component() {
useEffect(() => {
alixSDK.init({
coin: '...',
walletAddress: '...',
appToken: '...',
theme: 'light',
env: 'Sandbox',
})
}, [])
return (
<div>
<div id="alix-iframe-container" />
<button onClick={alixSDK.launch}>
<p>Launch SDK</p>
</button>
</div>
)
}
Query Params
| Key | Description | Default |
| ------------------- | ------------------------- | --------- |
| coin
| | None |
| walletAddress
| | None |
| appToken
| | None |
| theme
| optional
| light
|
| env
| Sandbox
or Production
| Sandbox
|
| width
| optional
| 800
|
| height
| optional
| 900
|