1.0.5 • Published 8 months ago

llg-sdk-onboarding v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

LianLian Global Platform Onboarding SDK

Installation

Option 1: Use llg-sdk-onboarding

Install with NPM

npm install llg-sdk-onboarding

Or, with Yarn

yarn add llg-sdk-onboarding

Option 2: Import as a static resource

Staging:

<script src="https://eu-ewallet-share-bucket.lianlianglobal.com/sdk/onboarding/v2/prod/index.min.js" />

Prod:

<script src="https://eu-ewallet-share-bucket.lianlianglobal.com/sdk/onboarding/v2/prod/index.min.js" />

Initialization

<div id="llg-kyc"></div>

import { init } from 'llg-sdk-onboarding';

const options = {
    el: '#llg-kyc',
    env: 'prod',
    langKey: 'en',
    token: 'Bearer US_3AT4IwessFmm8H1FYBmV04tHiKMCy',
    kycType: 'VN',
    options: {
        kycData:{},
        readonly: []
    };
    mountedCb: () => {},
    successCb: () => {},
    failedCb: () => {},
}

await init(options);

// Or
await window.LLGOnboarding.init(options);
OptionTypeRequired?Default valueDescription
elstringYES-SDK mounts to the DOM, eg: #llg-kyc,
envstringNOprodLianLian Global environment you want to integrate your application with. Options include: staging, prod
langKeystringNOenLanguage. Options include: en
tokenstringYES-
kycTypestringYES-KYC type. Options include: VN,SG,TH,US,GB
optionsobjectNO-Optional incoming SDK parameters. Includes kycData and readonly parameters.
mountedCbfunctionNO-Executed when the SDK loads successfully
successCbfunctionNO-Execute after the KYC information is successfully submitted
failedCbfunctionNO-Executed after KYC information submission fails

Destroy Onboarding SDK

import { destroy } from 'llg-sdk-onboarding';

destroy();

// Or
window.LLGOnboarding.destroy();
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

0.0.4

11 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago

0.0.9

1 year ago