{"id":13611847,"url":"https://github.com/grmjs/grm","last_synced_at":"2025-04-13T05:33:44.742Z","repository":{"id":45401865,"uuid":"513607965","full_name":"grmjs/grm","owner":"grmjs","description":"MTProto API Client for Deno 🦕","archived":false,"fork":false,"pushed_at":"2024-03-06T10:59:12.000Z","size":687,"stargazers_count":45,"open_issues_count":5,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T18:07:44.306Z","etag":null,"topics":["deno","gramjs","mtproto","telegram"],"latest_commit_sha":null,"homepage":"https://t.me/grm_news","language":"TypeScript","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/grmjs.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-07-13T17:12:57.000Z","updated_at":"2025-02-08T07:25:33.000Z","dependencies_parsed_at":"2024-01-25T05:29:16.619Z","dependency_job_id":"a50cfd3e-8db2-416c-b136-a42b37d74a58","html_url":"https://github.com/grmjs/grm","commit_stats":{"total_commits":133,"total_committers":4,"mean_commits":33.25,"dds":0.3834586466165414,"last_synced_commit":"b4b2264d8b814aaaf80d94b7959950feeaa2db88"},"previous_names":["dcdunkan/grm"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grmjs%2Fgrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grmjs%2Fgrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grmjs%2Fgrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grmjs%2Fgrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grmjs","download_url":"https://codeload.github.com/grmjs/grm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670514,"owners_count":21142896,"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":["deno","gramjs","mtproto","telegram"],"created_at":"2024-08-01T19:02:13.544Z","updated_at":"2025-04-13T05:33:43.699Z","avatar_url":"https://github.com/grmjs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Grm [![deno module](https://shield.deno.dev/x/grm)](https://deno.land/x/grm)\n\n\u003e [!TIP]\n\u003e As of now, Grm is not regularly updated.\n\u003e [MTKruto](https://github.com/MTKruto/MTKruto) is recommended as an alternative for Deno users.\n\n\u003e MTProto client for Deno ported from [GramJS](https://github.com/gram-js/gramjs).\n\n## Documentation\n\nCurrently, there is no documentation dedicated to Grm.\nYou can use the GramJS documentation and API reference.\n\n- \u003chttps://gram.js.org\u003e\n- \u003chttps://painor.gitbook.io/gramjs\u003e\n- \u003chttps://gram.js.org/beta\u003e\n\n## Quick Start\n\nHere you'll learn how to obtain necessary information to initialize the client, authorize your personal account and send yourself a message.\n\nFirst, you'll need to obtain an API ID and hash:\n\n1. Visit [my.telegram.org](https://my.telegram.org) and sign in.\n2. Click \"API development tools\" and fill your application details (only the app title and the short name are required).\n3. Click \"Create application\".\n\n\u003e Don't leak your API credentials.\n\u003e They can't be revoked.\n\nThen use your API credentials with the following example code:\n\n```ts\nimport { StringSession, TelegramClient } from \"https://deno.land/x/grm/mod.ts\";\n\nconst apiId = 123456;\nconst apiHash = \"abcd1234\";\n\n// Fill in this later with the value from `client.session.save()`,\n// so that you don't have to login every time.\nconst stringSession = new StringSession(\"\");\n\nconsole.log(\"Loading interactive example...\");\nconst client = new TelegramClient(stringSession, apiId, apiHash);\n\nawait client.start({\n  phoneNumber: () =\u003e prompt(\"Phone number:\")!,\n  password: () =\u003e prompt(\"Password:\")!,\n  phoneCode: () =\u003e prompt(\"Verification code:\")!,\n  onError: console.error,\n});\n\nconsole.log(\"Connected.\");\nconsole.log(client.session.save());\n\n// Send yourself a message.\nawait client.sendMessage(\"me\", { message: \"Hello, world!\" });\n```\n\nYou'll be prompted to enter your phone number (in international format), the\ncode you received from Telegram, and your 2FA password if you have one set.\n\nYou can then save output of `client.session.save()` and use it in `new StringSession(\"here\")` to not login again each time.\n\nAfter connecting successfully, you should have a text message saying \"Hello, world!\" in\nyour Saved Messages.\n\nCheck out [examples/](examples/) for more examples.\n\n## Used by\n\nHere are some awesome projects powered by Grm:\n\n- [xorgram/xor](https://github.com/xorgram/xor)\n\nAdd yours to this list by opening a pull request.\n\n## Contributing\n\nFeel free to open pull requests related to improvements and fixes to the core library and documentation.\nWe are currently following API changes in the original GramJS repository applying them here.\n\nWe'd appreciate if you could help with migrating from Node.js modules such as\n[socks](https://github.com/JoshGlazebrook/socks) and\n[websocket](https://github.com/theturtle32/WebSocket-Node) to Deno APIs.\n\n## Credits\n\nThis port wouldn't exist without these wonderful people. Thanks to\n\n- the original\n  [authors and contributors](https://github.com/gram-js/gramjs/graphs/contributors)\n  of GramJS,\n- authors of the dependencies,\n- authors of the already ported dependencies,\n- [contributors](https://github.com/dcdunkan/grm/graphs/contributors) of this\n  repository,\n- and everyone else who were a part of this.\n\n---\n\n## Notes\n\nThis is a _direct_ port of GramJS for Deno.\nThis was just an attempt, which turned out to be a successful one.\nMost of the commonly used features are working as expected.\n\nIt took me like 4 days; a total of 20h6m for this repository alone.\nIncluding dependency porting and reading the original code, it is a total of almost\n34.8h for the first release.\nI didn't just copy and paste stuff — I did, but I\nmanually wrote lot of the files.\nIt made me realize how much effort have been put into the development of [GramJS](https://github.com/gram-js/gramjs).\nYou should definitely give it a star if you're using this library.\n\nI had to port the following Node.js modules to Deno:\n\n- [JoshGlazebrook/socks](https://github.com/JoshGlazebrook/socks) —\n  [deno_socks](https://github.com/dcdunkan/deno_socks)\n- [indutny/node-ip](https://github.com/indutny/node-ip) —\n  [deno_ip](https://github.com/dcdunkan/deno_ip)\n- [JoshGlazebrook/smart-buffer](https://github.com/JoshGlazebrook/smart-buffer)\n  — [deno_smart_buffer](https://github.com/dcdunkan/deno_smart_buffer)\n- [spalt08/cryptography](https://github.com/spalt08/cryptography) —\n  [deno_cryptography](https://github.com/dcdunkan/deno_cryptography)\n\n\u003e I know that some of them should not have been ported, but I didn't realized that then.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrmjs%2Fgrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrmjs%2Fgrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrmjs%2Fgrm/lists"}