CKYC Search and Download
With this SDK, you can search for the customer in the CKYC repository. If the customer exists, you can download the CKYC data as well.
1) Registry Setup
Registry setup can be done using the below options -
- NPM
- Yarn
a) Registry Setup Using NPM
echo @decentro1:registry=https://gitlab.com/api/v4/projects/44594794/packages/npm/ >> .npmrc
b) Registry Setup Using Yarn
echo \"@decentro1:registry\" \"https://gitlab.com/api/v4/projects/44594794/packages/npm/\" >> .yarnrc
Note: Replace the below lines in .npmrc file as mentioned below before running the installation. Follow the same for both npm and yarn.
@decentro1:registry=https://gitlab.com/api/v4/projects/44594794/packages/npm/
//gitlab.com/api/v4/projects/44594794/packages/npm/:_authToken=_kRat7totSYbXxWxtToF
2) Installation
Installation can be done using the below options -
- NPM
- Yarn
a) Installation Using NPM
npm i @decentro1/decentro-ckyc-gui-sdk-v2
b) Installation Using Yarn
yarn add @decentro1/decentro-ckyc-gui-sdk-v2
3) SDK Setup
- Import and place the SDK component in the project.
- Create a secrets object for passing the client id, client secret and module secret.
- Use ckycResponse function and pass as props to get status.
- A total of two props will be configured for the mentioned component.
import DecntroCKYC from "@decentro1/decentro-ckyc-gui-sdk-v2";
const ckycResponse = (response) => {
console.log(response);
};
let secrets = {
client_id: "<client_id>",
client_secret: "<client_secret>",
module_secret: "<module_secret>",
};
function Demo() {
return <DecntroCKYC ckycResponse={ckycResponse} secrets={secrets} /> ;
}
export default Demo;
Updated 22 days ago