Web: JavaScript SDK

The JavaScript SDK is a Software Development Kit (SDK) that can be used in a browser environment. This document describes the procedure for integrating the Wepin widget into the WEB using the JavaScript SDK.

Package List

  • sdk : @wepin/sdk-js

    • It provides functionalities to use the Wepin Widget.

  • login : @wepin/login-js

    • Tt provides the ability to log in to Wepin using OAuth authentication tokens such as social logins.

  • provider : @wepin/provider-js

    • It provides EIP-1193 compatible JSON-RPC Provider functionalities.

All Wepin packages are designed to work only in Client Side Rendering (CSR) environments. If you are using Wepin packages in a Server Side Rendering (SSR) environment, you need to configure them so that the packages are loaded only on the client side.

Refer to the following code for implementation:

const initWepin = async () => {
    const { WepinSDK } = await import('@wepin/sdk-js');
    const wepinSDK = new WepinSDK({
        appKey: '',
        appId: '',
    });
    await wepinSDK.init({
        defaultLanguage: 'ko',
    });
}

Last updated