Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twa-dev/sdk

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twa-dev/sdk

[![npm version](https://img.shields.io/npm/v/@twa-dev/sdk)](https://www.npmjs.com/package/@twa-dev/sdk)

  • 8.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-1.72%
Maintainers
0
Weekly downloads
 
Created
Source

SDK

npm version

npm package for Telegram Web Apps (TWA) SDK.

npm i @twa-dev/sdk

Motivation

Telegram distributes SDK via link. It's kinda old fashion way to work with a library:

<html lang="en">
<head>
    <title>TWA</title>
    <meta charset="UTF-8">
    <script src="https://telegram.org/js/telegram-web-app.js"></script>
    <script>
        window.Telegram.WebApp.showAlert('Hey there!');
    </script>
</head>
<body></body>
</html>

This package allows to work with SDK as with a npm package:

import WebApp from '@twa-dev/sdk'

WebApp.showAlert('Hey there!');

And yes, it supports TS.

Demo

Codesandbox

React

If you use React in your project, check out components that we have prepared for you.

These components significantly simplify developer experience.

Keywords

FAQs

Package last updated on 27 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc