{"_id":"@armatofik/tgsnake-core","_rev":"4-c1e18fba81f7063bbc4aace1487207fe","name":"@armatofik/tgsnake-core","dist-tags":{"latest":"1.13.16"},"versions":{"1.0.0":{"name":"@armatofik/tgsnake-core","version":"1.0.0","keywords":["tgsnake","mtproto","telegram"],"author":{"name":"butthx"},"license":"(GPL-3.0 OR LGPL-3.0)","_id":"@armatofik/tgsnake-core@1.0.0","maintainers":[{"name":"armatofik","email":"steam4864@gmail.com"}],"homepage":"https://tgsnake.js.org","bugs":{"url":"https://github.com/tgsnake/core/issues"},"dist":{"shasum":"bd2f1e390d5cfba816f165b8cce181da9e929bd1","tarball":"https://registry.npmjs.org/@armatofik/tgsnake-core/-/tgsnake-core-1.0.0.tgz","fileCount":171,"integrity":"sha512-Bze1+wq2R6P5UdcLPnydH8e/f2tYSLQEsL55kdVZoZV/EFNQBQiDl/q+o0Vny7u1Aa2UTLvJ8zrv9aBCaLpAFA==","signatures":[{"sig":"MEYCIQDe+MDXC9oiSqYTQWY3iep4QkWKBOsFZJl5B5OR8uDPAQIhAO0x5whWVCINL6jQk7XMmpodx8xmN/RAqMAAMEaZgv8C","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6206130},"main":"./lib/src/index.js","types":"./lib/src/index.d.ts","isBeta":false,"engines":{"npm":">=6.0.0","node":">=12.0.0","yarn":">=1.0.0"},"gitHead":"c4982d8709475063978ad6e742008aaa634f748a","scripts":{"build":"deno2node tsconfig.json","prepare":"yarn build","prettier":"NODE_OPTIONS=--max_old_space_size=4096 prettier -w .","build:chglog":"node ./generator/chglog","build:license":"node ./generator/license"},"_npmUser":{"name":"armatofik","email":"steam4864@gmail.com"},"isPrivate":false,"repository":{"url":"git+https://github.com/Armatofik/tgsnake-core.git","type":"git"},"_npmVersion":"9.8.1","description":"Pure Telegram MTProto library for Javascript or Typescript. Fork from @tgsnake-core v1.13.15","directories":{},"_nodeVersion":"20.6.1","dependencies":{"socks":"2.8.4","async-mutex":"0.5.0","big-integer":"1.6.52","@tgsnake/log":"latest"},"engineStrict":true,"_hasShrinkwrap":false,"packageManager":"yarn@4.8.1","devDependencies":{"prettier":"3.5.3","deno2node":"1.15.0","@types/node":"22.14.0"},"_npmOperationalInternal":{"tmp":"tmp/tgsnake-core_1.0.0_1770589989851_0.5941293188835965","host":"s3://npm-registry-packages-npm-production"}},"1.13.16":{"name":"@armatofik/tgsnake-core","version":"1.13.16","description":"Pure Telegram MTProto library for Javascript or Typescript.","main":"./lib/src/index.js","devDependencies":{"@types/node":"22.14.0","deno2node":"1.15.0","prettier":"3.5.3"},"scripts":{"build":"deno2node tsconfig.json","build:license":"node ./generator/license","build:chglog":"node ./generator/chglog","prepare":"yarn build","prettier":"NODE_OPTIONS=--max_old_space_size=4096 prettier -w ."},"homepage":"https://tgsnake.js.org","keywords":["tgsnake","mtproto","telegram"],"bugs":{"url":"https://github.com/tgsnake/core/issues"},"repository":{"type":"git","url":"git+https://github.com/Armatofik/tgsnake-core.git"},"author":{"name":"butthx"},"license":"(GPL-3.0 OR LGPL-3.0)","engineStrict":true,"engines":{"node":">=12.0.0","npm":">=6.0.0","yarn":">=1.0.0"},"packageManager":"yarn@4.8.1","dependencies":{"@tgsnake/log":"latest","async-mutex":"0.5.0","big-integer":"1.6.52","socks":"2.8.4"},"isBeta":false,"isPrivate":false,"_id":"@armatofik/tgsnake-core@1.13.16","gitHead":"9b2dda7825592045c687e1560211d67b4d723182","types":"./lib/src/index.d.ts","_nodeVersion":"20.6.1","_npmVersion":"9.8.1","dist":{"integrity":"sha512-GxV50gInqF1VqJlYBG8ZCOjeO12jy+kqhNmYZJnQtAyRnct4HjekAjiKQFe2Ef2Gn7d+vQBBOrqzpoJYCleqPA==","shasum":"a305fa6ef0babe67f6bf6656a3d47c8640ec014c","tarball":"https://registry.npmjs.org/@armatofik/tgsnake-core/-/tgsnake-core-1.13.16.tgz","fileCount":171,"unpackedSize":6234082,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA0y5y3kbQFm/GannudU3c/aVbFRrl7nYUFKrbChOp+nAiEAhxFwe0cHyetm8Hw00Jgft/9MUrO031KrIPgITcaOQcM="}]},"_npmUser":{"name":"armatofik","email":"steam4864@gmail.com"},"directories":{},"maintainers":[{"name":"armatofik","email":"steam4864@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tgsnake-core_1.13.16_1772622788231_0.3211882050716619"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-08T22:32:22.393Z","modified":"2026-03-04T11:13:08.550Z","1.13.15":"2026-02-08T22:32:22.715Z","1.0.0":"2026-02-08T22:33:10.057Z","1.13.16":"2026-03-04T11:13:08.437Z"},"bugs":{"url":"https://github.com/tgsnake/core/issues"},"author":{"name":"butthx"},"license":"(GPL-3.0 OR LGPL-3.0)","homepage":"https://tgsnake.js.org","keywords":["tgsnake","mtproto","telegram"],"repository":{"type":"git","url":"git+https://github.com/Armatofik/tgsnake-core.git"},"description":"Pure Telegram MTProto library for Javascript or Typescript.","maintainers":[{"name":"armatofik","email":"steam4864@gmail.com"}],"readme":"# tgsnake core\r\n\r\n<center>  \r\n  <b>Layer 224</b>  \r\n</center>\r\n   \r\n---   \r\n  \r\nPure Telegram MTProto framework for Javascript or Typescript.\r\n\r\n⚡ Using less dependencies to make it fast.  \r\n🔓 Open Source, you can contribute to make this framework better.  \r\n🗒️ Using Pure Telegram Raw Api, all JSON object is pure from telegram, nothing has changed at all. So that it makes it easier for you to learn the [telegram schema](https://core.telegram.org/schema) docs.  \r\n🦕 Deno Support.\r\n\r\n## Example use\r\n\r\n```typescript\r\nimport { Client, Raw, Storages } from '@tgsnake/core';\r\nprocess.env.LOGLEVEL = 'debug'; // set log level, see @tgsnake/log for more information.\r\nconst client = new Client(\r\n  // you can fill with Telethon or Pyrogram string session.\r\n  new Storages.StringSession(''),\r\n  apiHash,\r\n  apiId,\r\n);\r\n// handle update\r\nclient.addHandler((update) => {\r\n  console.log(update);\r\n});\r\n\r\n// if you already pass the string session, don't fill any arguments in start function, leave it empty.\r\nclient.start({\r\n  botToken: '', // if you want login as bot, you can login as user too.\r\n  /* Remove \"botToken\" if you want to login as user.\r\n  phoneNumber : async () => {}, // Phone number with international phone code (include plus sign (+)) will be used to login, the return of function must be a string.\r\n  code : async () => {}, // OTP code, the return of function must be a string.\r\n  password : async () => {}, // if you account has 2FA, the return of function must be a string.\r\n  authError : async (error) => {} // when error BadRequest attempt, this function will be running.\r\n  */\r\n});\r\n```\r\n\r\n### Exporting Session.\r\n\r\nFor exporting string session, use `client.exportSession()`. It will be return `Promise<string>`.\r\n\r\n```typescript\r\nconst exported = await client.exportSession();\r\n```\r\n\r\n---\r\n\r\n## Development Guidelines\r\n\r\n- Cloning Repository\r\n\r\n```bash\r\n$ git clone https://github.com/tgsnake/core\r\n```\r\n\r\n- Installing Dependencies\r\n\r\n> Required to use yarn!\r\n\r\n```bash\r\n$ yarn install\r\n```\r\n\r\n- Building TLSchema and Error class\r\n\r\n```bash\r\n$ yarn build:api\r\n$ yarn build:error\r\n```\r\n\r\n- Testing your app! Create `test` folder and you can create `index.js` file for testing the app. This folder will automatically ignored and not pushing to GitHub.\r\n\r\n---\r\n\r\n## Notes\r\n\r\n- This framework is porting of pyrogram for connecting to telegram server. I have dedicated 2 months of my time to complete this framework from scratch. Research after research I do to improve this framework. So big thanks for pyrogram for the source, without that source code, this framework maybe unavailable.\r\n- For more questions, ask on telegram group ([@tgsnake](https://t.me/tgsnake)) or open github issue.\r\n\r\n## GPL v3 License\r\n\r\nBuild with ♥️ by [tgsnake dev](https://t.me/tgsnakechat).\r\n","readmeFilename":"README.md"}