2.5.0 • Published 2 years ago

@xsolla/babka-overlay-sdk v2.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Babka Overlay SDK

SDK for connecting your Metasite with a Babka Overlay

Allows users to see their orbs amount, wallet, backpack, and more.

Installation

Install with your package manager of choice.

npm install @xsolla/babka-overlay-sdk
yarn add @xsolla/babka-overlay-sdk
pnpm install @xsolla/babka-overlay-sdk

Configuration

Babka Overlay SDK accepts the following params


token (required)

Type: string
JWT user token that you received after authorization with Babka Login. Decode JWT and pass here the value of social_access_token param from received JWT


locale (optional)

Type: string
Language abbreviation (ISO 631 1), dash (-) and country abbreviation (ISO 3166 1).

Supported locales: "en-US", "de-DE", "es-ES", "ja-JP", "ko-KR", "pt-PT", "ru-RU", "cn-CN"

Example: "en-US"
If not provided will be the same locale as user set on Babka account.


pages (optional)

Type: string[]
List of available pages to be enabled in the Babka Overlay.

Supported pages: "wallet", "keychain", "backpack", "orbs", "profile"

Example: ["wallet", "keychain", "orbs"] If not provided, all pages will be enabled as default.


shortcutKeys (optional)

Type: string[]
Combination of key codes to be used as shortcut to trigger Babka Overlay.

Example: "ShiftLeft", "Tab"
If shortcutKeys is not provided, the shortcut will be disabled by default.

Usage

React

import React, { useEffect } from "react"
import { Overlay } from "@xsolla/babka-overlay-sdk";

export const App = () => {
    useEffect(() => {
        const overlay = new Overlay({
            token: "user-token-value",
            locale: "en-US"
        });

        overlay.mount();
    }, [])

    return (
        // your application/component code
    )
}

JavaScript

import { Overlay } from "@xsolla/babka-overlay-sdk";

const overlay = new Overlay({
  token: "user-token-value",
  locale: "en-US",
});

overlay.mount();
2.2.0

2 years ago

2.4.0

2 years ago

2.3.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.5.0

2 years ago

2.1.0

2 years ago

0.0.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

2.0.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.3.3

2 years ago

1.4.1

2 years ago

1.3.2

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

1.4.7

2 years ago

0.1.0

2 years ago