2.4.0 • Published 7 months ago
@telegram-apps/bridge v2.4.0
@telegram-apps/bridge
The lowest level communication layer with Telegram Mini Apps.
This package provides fundamental utilities and types for developing applications on the Telegram Mini Apps platform.
While a developer can use this package alone, it's recommended to use a higher-level package like @telegram-apps/sdk.
Installation
pnpm i @telegram-apps/bridge
# or
npm i @telegram-apps/bridge
# or
yarn add @telegram-apps/bridge
Usage
Here’s a basic example of how to use this package. For more details, refer to the package complete documentation.
import { on, postEvent } from '@telegram-apps/bridge';
// Show the back button, wait for it to be clicked once,
// then hide it.
postEvent('web_app_setup_back_button', { is_visible: true });
const off = on('back_button_pressed', () => {
postEvent('web_app_setup_back_button', { is_visible: false });
off();
});
2.4.0
7 months ago
2.3.0
8 months ago
2.2.0
8 months ago
2.3.2
8 months ago
2.3.1
8 months ago
2.1.0
8 months ago
2.0.1
8 months ago
2.0.0
8 months ago
1.9.2
9 months ago
1.9.1
9 months ago
1.9.0
10 months ago
1.8.0
10 months ago
1.7.1
10 months ago
1.7.0
10 months ago
1.6.0
10 months ago
1.5.0
10 months ago
1.4.0
11 months ago
1.3.0
12 months ago
1.2.1
1 year ago
1.2.0
1 year ago
1.1.0
1 year ago
1.0.0
1 year ago