WEPIN Developer Documentation
WepinBlogContact
English
English
  • Get Started
    • Introduction
  • Wepin
    • Features
    • Architecture
      • Key Generation
      • Signing
      • Key Backup
    • Workspace
      • App Registration and Key Issuance
      • Networks and Assets Addition
      • Widget Design
    • Supported blockchains
    • Account Abstraction
  • login
    • Overview
    • Social Login Auth Providers
      • Email/Password
      • Google
      • Apple
      • Discord
      • Naver
      • Facebook
      • Line
      • Kakao
    • User Interface
    • Simplified Login
    • Resource
  • Widget Integration
    • Prerequisites
    • Web: JavaScript SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
      • Widget
        • Installation
        • Initialization
        • Methods
        • Final Review
      • Provider
        • Ethereum Provider
        • Kaia Provider
        • Solana Provider
        • Wagmi Connector
      • Wallet Adapter
        • Solana Wallet Adapter
    • Android: Java & Kotlin SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
      • Widget Library
        • Installation
        • Initialization
        • Methods
    • iOS: Swift SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
      • Widget Library
        • installation
        • initialization
        • Methods
    • Flutter SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • Widget
        • Installation
        • Initialization
        • Methods
        • Final Review
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
    • React Native SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
    • Unity SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • Compose Multiplatform SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • Widget
        • Installation
        • Initialization
        • Methods
        • Final Review
  • API
    • Overview
    • Registration
    • Login
    • Wallet
    • Token and NFT
    • Transaction
  • Deprecated
    • Web: JavaScript SDK
      • SDK
        • Installation
        • Initialization
        • Methods
        • Final Review
      • Provider
        • EVM-Compatible Networks
      • Wagmi Connector
    • Android: Java & Kotlin SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • iOS: Swift SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • Flutter SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • React Native SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
      • Providers
        • Ethereum Providers
  • MISC
    • Logo & Brand
Powered by GitBook
On this page
  • init
  • Parameters
  • Return value
  • Example
  • isInitialized
  • Parameters
  • Return Value
  • Example
  • changeLanguage
  • Supported Version
  • Parameters
  • Return value
  • Example

Was this helpful?

  1. Widget Integration
  2. Web: JavaScript SDK
  3. PIN Pad Library

Initialization

Here is the instructions on how to initialize the Wepin PIN Pad Library.

init

To create and initialize an instance of the Wepin PIN Pad Library, set the language to be displayed on the PIN pad screen during initialization.

// Create instance
const wepinPin = new WepinPin({
  appKey: 'your-wepin-app-key',
})
// Initialize
await wepinPin.init({
  defaultLanguage: 'ko',
})

Parameters

  • defaultLanguage: <string> It sets the default language of the widget. The default value is 'ko'. Currently supported languages are 'ko', 'en'and 'ja'

Return value

  • Promise<void>

Example

// Create instance
const wepinPin = new WepinPin({
  appKey: 'your-wepin-app-key',
})

or 

// Pass the created WepinLogin instance to WepinPin
const wepinLogin = new WepinLogin()
const wepinPin = new WepinPin({
  appKey: 'your-wepin-api-key',
  wepinLogin,
})
// Initialize
await wepinPin.init({
  defaultLanguage: 'ko',
})
// Execute the required login method based on the login method
const loginRes = await wepinPin.login.loginWithEmailAndPassword(...)
// Log in to Wepin
await wepinPin.login.loginWepin(loginRes)

isInitialized

It checks if the Wepin PIN Pad Library is initialized properly.

wepinPin.isInitialized()

Parameters

  • <void>

Return Value

  • <boolean> It returns true if init was successful, otherwise returns false.

Example

if(wepinPin.isInitialized()) {
  console.log('wepinPin is initialized!')
}

changeLanguage

wepinPin.changeLanguage(language)

Changes the language displayed on the PIN pad screen. Currently, only 'ko', 'en', and 'ja' are supported.

Supported Version

  • Supported from version 0.0.23 and later.

Parameters

  • language <string>

Return value

  • <void>

Example

wepinPin.changeLanguage("ko")
PreviousInstallationNextMethods

Last updated 6 months ago

Was this helpful?

Then, log in to Wepin using the .

Wepin Login Library