{"id":13409943,"url":"https://github.com/twa-dev/sdk","last_synced_at":"2025-04-07T14:11:05.873Z","repository":{"id":57750731,"uuid":"525268637","full_name":"twa-dev/SDK","owner":"twa-dev","description":"npm package for TWA SDK","archived":false,"fork":false,"pushed_at":"2024-09-10T20:27:21.000Z","size":123,"stargazers_count":245,"open_issues_count":13,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-24T09:14:11.203Z","etag":null,"topics":["react","sdk","telegram","telegram-bot","twa-dev"],"latest_commit_sha":null,"homepage":"https://codesandbox.io/s/sdk-kj5961","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twa-dev.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-16T07:08:54.000Z","updated_at":"2024-11-24T07:12:59.000Z","dependencies_parsed_at":"2024-06-18T22:39:08.796Z","dependency_job_id":"d8b95a62-bab2-42a7-abdc-9e81faf253af","html_url":"https://github.com/twa-dev/SDK","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"2d6f97fba8b5feacc854b0a9dc6e776d84405107"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twa-dev%2FSDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twa-dev%2FSDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twa-dev%2FSDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twa-dev%2FSDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twa-dev","download_url":"https://codeload.github.com/twa-dev/SDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666008,"owners_count":20975787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","sdk","telegram","telegram-bot","twa-dev"],"created_at":"2024-07-30T20:01:04.183Z","updated_at":"2025-04-07T14:11:05.850Z","avatar_url":"https://github.com/twa-dev.png","language":"JavaScript","readme":"## SDK\n[![npm version](https://img.shields.io/npm/v/@twa-dev/sdk)](https://www.npmjs.com/package/@twa-dev/sdk)\n\nnpm package for [Telegram Web Apps (TWA)](https://core.telegram.org/bots/webapps) SDK.\n\n```\nnpm i @twa-dev/sdk\n```\n\n### Motivation\nTelegram distributes SDK via [link](https://core.telegram.org/bots/webapps#initializing-web-apps). It's kinda old fashion way to work with a library:\n\n```html\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003ctitle\u003eTWA\u003c/title\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cscript src=\"https://telegram.org/js/telegram-web-app.js?56\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        window.Telegram.WebApp.showAlert('Hey there!');\n    \u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e\n```\n\nThis package allows to work with SDK as with a npm package:\n\n```js\nimport WebApp from '@twa-dev/sdk'\n\nWebApp.showAlert('Hey there!');\n```\n\nAnd yes, it supports TS.\n\n### Demo\n[Codesandbox](https://codesandbox.io/s/sdk-kj5961)\n\n### React\nIf you use React in your project, check out components that we have prepared for you.\n- [MainButton](src/react/MainButton/Readme.md)\n- [SecondaryButton](src/react/SecondaryButton/Readme.md)\n- [BottomBar](src/react/BottomBar/Readme.md)\n- [BackButton](src/react/BackButton/Readme.md)\n\nThese components significantly simplify developer experience.\n","funding_links":[],"categories":["🔌 Core Integrations"],"sub_categories":["Telegram Web Apps (TWAs)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwa-dev%2Fsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwa-dev%2Fsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwa-dev%2Fsdk/lists"}