{"id":13410291,"url":"https://github.com/delab-team/connect","last_synced_at":"2025-03-14T15:32:23.893Z","repository":{"id":62594530,"uuid":"560841282","full_name":"delab-team/connect","owner":"delab-team","description":"Modal package with different TON wallets for React JS","archived":false,"fork":false,"pushed_at":"2023-06-13T23:04:16.000Z","size":6682,"stargazers_count":42,"open_issues_count":4,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-20T14:42:19.869Z","etag":null,"topics":["blockchain","connect","ton","web3"],"latest_commit_sha":null,"homepage":"https://connect-example.delab.team","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/delab-team.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-11-02T11:44:53.000Z","updated_at":"2024-10-03T22:22:10.000Z","dependencies_parsed_at":"2024-09-30T09:00:37.437Z","dependency_job_id":"c22167eb-e20b-413d-848d-888833b79e08","html_url":"https://github.com/delab-team/connect","commit_stats":{"total_commits":45,"total_committers":4,"mean_commits":11.25,"dds":"0.33333333333333337","last_synced_commit":"0427484b30c331de225ec85c25b650a2d5d0de4a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delab-team%2Fconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delab-team%2Fconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delab-team%2Fconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delab-team%2Fconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delab-team","download_url":"https://codeload.github.com/delab-team/connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221481998,"owners_count":16829979,"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":["blockchain","connect","ton","web3"],"created_at":"2024-07-30T20:01:06.018Z","updated_at":"2024-10-26T01:30:49.599Z","avatar_url":"https://github.com/delab-team.png","language":"TypeScript","funding_links":[],"categories":["🔌 Core Integrations"],"sub_categories":["Authentication"],"readme":"# DeLab Connect\r\n\r\n![Typescript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\r\n![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge\u0026logo=react\u0026logoColor=%2361DAFB)\r\n[![TON](https://img.shields.io/badge/based%20on-TON-blue?style=for-the-badge)](https://ton.org/)\r\n[![npm](https://img.shields.io/npm/v/@delab-team/connect?style=for-the-badge)](https://www.npmjs.com/package/@delab-team/connect)\r\n\u003ca href=\"https://github.com/delab-team/connect/blob/main/LICENSE\"\u003e\u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/github/license/delab-team/connect?style=for-the-badge\"\u003e\u003c/a\u003e\r\n\r\nModal package with different TON wallets for React JS.\r\n\r\n![example](./example/img/example.png)\r\n\r\n## Install\r\n\r\n- as local project package\r\n```\r\nyarn add @delab-team/connect\r\n```\r\n\r\n## Usage\r\n\r\npossible types of event\r\n- `connect`\r\n- `disconnect`\r\n- `error`\r\n- `error-transaction`\r\n- `error-toncoinwallet`\r\n- `error-tonhub`\r\n- `error-tonkeeper`\r\n\r\n```typescript\r\nimport {\r\n    DeLabModal,\r\n    DeLabButton,\r\n    DeLabConnect,\r\n    DeLabConnecting,\r\n    DeLabTransaction,\r\n    DeLabEvent\r\n} from '@delab-team/connect'\r\n\r\n// DeLabConnect must be created outside of the React Component\r\nconst DeLabConnector = new DeLabConnect('https://example.com', 'Example', 'mainnet', 'https://yourapp.com/tonconnect_manifest.json')\r\n// - URL your DApp\r\n// - Name your DApp\r\n// - network\r\n// - tonconnect-manifest (optional)\r\n\r\nDeLabConnector.on('connect', (data: DeLabEvent) =\u003e {\r\n    const connectConfig: DeLabConnecting = data.data\r\n    const trans: DeLabTransaction = {\r\n        to: 'EQCkR1cGmnsE45N4K0otPl5EnxnRakmGqeJUNua5fkWhales',\r\n        value: '1000000' // string value in nano-coins\r\n    }\r\n    const data = await DeLabConnector.sendTransaction(trans)\r\n})\r\n\r\nDeLabConnector.on('disconnect', () =\u003e {\r\n    console.log('disconect')\r\n})\r\n\r\n// Use loadWallet() after the subscriptions are installed\r\nDeLabConnector.loadWallet()\r\n```\r\n\r\nDeLabModal must be children of the root React Component\r\n```tsx\r\n// supported scheme: 'light' | 'dark'\r\n\u003cDeLabButton DeLabConnectObject={DeLabConnector} scheme={'dark'} /\u003e\r\n// ...\r\n\u003cDeLabModal DeLabConnectObject={DeLabConnector} scheme={'dark'} /\u003e\r\n```\r\n\r\n# License\r\n\r\n[MIT License Copyright (c) 2022 DeLab Team](LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelab-team%2Fconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelab-team%2Fconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelab-team%2Fconnect/lists"}