@cvbb/sdk
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@cvbb/sdk

@cvbb/sdk is library for helping developer to do integration with Cobo Vault.

the main purpose is to encode and decode data for QR Code usage.

currently we use UR to encode data. check this for detail info about UR

Usage

import sdk from '@cvbb/sdk';
const read = async () => {
    const result = await sdk.read();
}

const play = async () => {
    await sdk.play("any data string");
}

API

Name Parameters result Description
read Promise<{type: 'text' | 'json' | 'ur', data: string} | null> Open a modal and read qrcode with camera, will return null when click Close button
play data: string, options?: {refreshSpeed?: number} Promise Open a modal and display a dynamic qrcode, will resolve when click Finish button

Dependencies (11)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @cvbb/sdk

    Weekly Downloads

    209

    Version

    2.0.0

    License

    ISC

    Unpacked Size

    33.4 kB

    Total Files

    35

    Last publish

    Collaborators

    • soralit