LogoLogo
  • LINE's Mini Dapp & Dapp Portal
    • Join Us
    • How to build successful Mini Dapp
  • Mini Dapp
    • Overview
      • Sample Mini Dapp
    • LINE Integration
      • LINE Developers
      • LINE Front-end Framework (LIFF)
        • Essential Settings
      • Official Account
      • Invite Friends
    • Mini Dapp SDK
      • How to Get SDK Authorization
      • Wallet Provider
      • Payment Provider
        • Settlement
        • Policy
          • Payment
          • Refund
          • Cancellation
        • Flow
      • Release Note
        • v1.2.12
        • v1.2.11
        • v1.2.10
        • v1.2.9
        • v1.2.8
        • v1.2.6
        • v1.2.5
        • v1.2.4
        • v1.2.3
        • v1.2.2
        • v1.2.1
        • v1.2.0
    • Integration Guide for Game Engine
      • for Unity
      • for Cocos Creator
    • Design Guide
  • Dapp Portal
    • Mini Dapp Information
    • Collection & Drops
      • Collection Information
      • Upload NFT Information
      • Drops Information
      • Fungible Token Information
      • How to mint NFT
    • Reward
      • Reward System Flow
      • Launching Promotion
  • Extra Packages
    • Gas Fee Delegation
    • Growth Competition
      • Playbook for Teams
      • Historical Data
  • Review Guidelines
  • Update Note
  • Contact Us
Powered by GitBook
On this page
  • Authorization
  • Create Project
  • Install SDK
  • Initiate SDK
  • class DappPortalSDK
  1. Mini Dapp

Mini Dapp SDK

Authorization

Mini Dapp must get clientId and clientSecret to integrate Mini Dapp SDK. This credentials can be activated once service domain has been registered to clientId.

Create Project

To officially open the Mini Dapp, registration of a service domain is mandatory. Be sure to request registration after getting service domain.

If a service domain for the application has not been built, you can use the local environment path for testing. Please use http://localhost:3000.

To use the paymentProvider, a clientSecret is required. DO NOT share clientSecret to public. If it has been exposed, please request to issue a new clientSecret.

Install SDK

Add Mini Dapp SDK into your project via npm or yarn.

npm install @linenext/dapp-portal-sdk

or

yarn add @linenext/dapp-portal-sdk

Initiate SDK

Mini Dapp MUST request DappPortalSDK.Init() when user excutute Mini Dapp. In case of LIFF version, right after requesting liff.Init().

For this phase, you only need to implement up to 'DappPortalSDK.Init()' and completing the Mini Dapp Connect is not required at this stage. As guided, Mini Dapp Connect(Wallet Integration) within the LIFF environment should only be initiated when needed (e.g., to receive on-chain rewards, make item purchases), not upon initial LIFF entry.)

  • Background : This is necessary to handle data for active user verification in the Mini Dapp. This data is crucial for performance measurement and developing user acquisition strategies.

  • Notice : Following this guide will provide LINE NEXT with the encrypted information of LINE users connected to the Mini Dapp.

class DappPortalSDK

1. DappPortalSDK(config: DappPortalSDKClientConfig)

  • Initialize SDK using clientId.

  • The previously provided clientId is used. The SDK only runs on the pre-agreed Host address.

DappPortalSDKClientConfig

  • clientId: string

  • chainId: string

  • SDK is running on production env basically. If you want to connect testnet, use ‘1001’.

2. getWalletProvider(): WalletProvider

  • You can get WalletProvider which is compatible with EIP-1193 interface.

3. getPaymentProvider() : PaymentProvider

  • You can get PaymentProvider which support process and history of payment.

4. isSupportedBrowser(): boolean

  • It is function to verify compatibility between SDK and Browser.

5. showUnsupportedBrowserGuide(): Promise

  • It will show a screen how to use an external browser if current browser is not supported.

PreviousInvite FriendsNextHow to Get SDK Authorization

Last updated 3 months ago