Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- #12

Open
wants to merge 140 commits into
base: master
Choose a base branch
from
Open

- #12

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
ee2696e
chore: rebuild
siandreev Aug 17, 2023
30915ae
fix: ton proof temporary removed
siandreev Aug 17, 2023
34f1c11
fix: default tx changed
siandreev Aug 17, 2023
875911b
chore: rebuild
siandreev Aug 25, 2023
b4053b7
chore: rebuild
siandreev Sep 5, 2023
a3ace08
chore: rebuild
siandreev Sep 6, 2023
463a9fb
chore: rebuild
siandreev Sep 6, 2023
bd2b6ee
chore: rebuild
siandreev Sep 7, 2023
eb30963
chore: rebuild
siandreev Sep 7, 2023
da6c762
chore: rebuild
siandreev Sep 7, 2023
b3c4048
chore: rebuild
siandreev Sep 7, 2023
569921f
chore: rebuild
siandreev Sep 8, 2023
d06506a
chore: rebuild
siandreev Sep 8, 2023
d6f19bf
chore: rebuild
siandreev Sep 8, 2023
70442fd
chore: rebuild
siandreev Sep 8, 2023
d8582ab
fix: ui sdk version updated
siandreev Sep 8, 2023
afd848b
chore: rebuild
siandreev Sep 8, 2023
3f08a2c
chore: rebuild
siandreev Sep 12, 2023
b61f9a6
chore: rebuild
siandreev Sep 12, 2023
a5710a8
chore: rebuild
siandreev Sep 12, 2023
1ff1d58
chore: update @tonconnect/ui-react to 2.0.0-beta.4
thekiba Oct 25, 2023
2ddcf17
chore: rebuild
thekiba Oct 25, 2023
6969966
chore: tc-verify updated. Rebuild
siandreev Oct 30, 2023
6695899
chore: update @tonconnect/ui-react to 2.0.0-beta.6
thekiba Nov 6, 2023
5aad857
fix: add testing with echo contract deployment to prevent users from …
thekiba Nov 6, 2023
73e6f5f
refactor: replace deprecated connectWallet() with openModal()
thekiba Nov 6, 2023
014cdcf
refactor: remove unused import
thekiba Nov 6, 2023
dd4400c
chore: rebuild
thekiba Nov 6, 2023
2f68a96
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 7, 2023
aeb8703
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 7, 2023
5927f48
chore: change bot to @tc_twa_demo_bot
thekiba Nov 7, 2023
963375d
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 7, 2023
8f92141
chore: change wallet uniresal link
thekiba Nov 10, 2023
4ec3695
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 10, 2023
ece9a0c
chore: change wallet uniresal link
thekiba Nov 15, 2023
dbada85
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 15, 2023
e0ebd02
chore: add ton wallet for android
thekiba Nov 25, 2023
6b01ac7
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 25, 2023
216d6fd
chore: add /ton-connect for ton wallet universal link
thekiba Nov 25, 2023
27fd5b0
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Nov 25, 2023
db39c59
chore: rebuild with https://github.com/ton-connect/sdk/pull/115
thekiba Dec 1, 2023
6d71445
chore: update @tonconnect/ui-react to 2.0.0-beta.7
thekiba Dec 1, 2023
8bc4e4b
chore: rebuild
thekiba Dec 1, 2023
34f32a4
chore: update @tonconnect/ui-react to 2.0.0-beta.8
thekiba Dec 2, 2023
c27c570
chore: rebuild
thekiba Dec 2, 2023
2bfa282
chore: rebuild with https://github.com/ton-connect/sdk/pull/127
thekiba Dec 19, 2023
649bd05
chore: update @tonconnect/ui-react to 2.0.0-beta.10
thekiba Dec 19, 2023
21f84ed
chore: rebuild
thekiba Dec 19, 2023
61383e1
chore: update @tonconnect/ui-react to 2.0.0
thekiba Dec 26, 2023
142f231
chore: update @tonconnect/ui-react to 2.0.1-beta.0
thekiba Jan 8, 2024
01190b2
chore: rebuild
thekiba Jan 8, 2024
638cea3
docs: add installation and running instructions to README.md
thekiba Jan 26, 2024
d54df0e
chore: rebuild with safepal
thekiba Feb 20, 2024
390b165
chore: update @tonconnect/ui-react to ^2.0.1-beta.1
thekiba Feb 29, 2024
a71274c
chore: rebuild with @tonconnect/[email protected]
thekiba Feb 29, 2024
95020aa
chore: update @tonconnect/ui-react to 2.0.1-beta.2
thekiba Mar 8, 2024
a3942d6
chore: rebuild
thekiba Mar 8, 2024
e3b56ad
chore: update @tonconnect/ui-react to 2.0.1-beta.3
thekiba Mar 8, 2024
9a52e1c
chore: rebuild
thekiba Mar 8, 2024
6ef0b77
chore: update @tonconnect/ui-react to 2.0.1-beta.4
thekiba Mar 25, 2024
b3b3813
chore: rebuild
thekiba Mar 25, 2024
a9eab4e
chore: update @tonconnect/ui-react to 2.0.1-beta.5
thekiba Apr 12, 2024
3170bbb
chore: rebuild
thekiba Apr 12, 2024
c3cb237
chore: update @tonconnect/ui-react to 2.0.1-beta.6
thekiba Apr 18, 2024
39d2c40
chore: rebuild
thekiba Apr 18, 2024
e28c247
chore: update @tonconnect/ui-react to 2.0.1-beta.7
thekiba Apr 20, 2024
edae179
chore: rebuild
thekiba Apr 20, 2024
7d2ba4d
chore: update @tonconnect/ui-react to 2.0.1-beta.8
thekiba Apr 20, 2024
dd92e1f
chore: rebuild
thekiba Apr 20, 2024
4a5565b
chore: update @tonconnect/ui-react to 2.0.1
thekiba Apr 22, 2024
74c0b3a
chore: rebuild
thekiba Apr 22, 2024
34a1aa2
chore: update @tonconnect/ui-react to 2.0.2-beta.0
thekiba Apr 22, 2024
951e833
chore: rebuild
thekiba Apr 22, 2024
6ff37e7
chore: update @tonconnect/ui-react to 2.0.2-beta.1
thekiba Apr 22, 2024
018dc6e
chore: rebuild
thekiba Apr 22, 2024
09fbe44
chore: update @tonconnect/ui-react to 2.0.2
thekiba Apr 22, 2024
cad605b
chore: update @tonconnect/ui-react to 2.0.3-beta.0
thekiba May 9, 2024
1940bf2
chore: rebuild
thekiba May 9, 2024
4eb2e72
chore: rebuild
thekiba May 9, 2024
39f7a46
add analytics
Dimitreee May 15, 2024
856d620
update token, update data
Dimitreee May 15, 2024
d120255
add webapp init script
Dimitreee May 15, 2024
24cc9fb
fix static data path
Dimitreee May 15, 2024
66cde40
update static files paths
Dimitreee May 15, 2024
51ec06e
update app token/name
Dimitreee May 15, 2024
4364c06
update build script
Dimitreee May 15, 2024
75c9de8
Update index.html
Dimitreee May 15, 2024
4c54f8c
Update index.html
Dimitreee May 15, 2024
56beaa1
change index.html
lesyuk May 15, 2024
b2d1c57
Merge pull request #1 from lesyuk/change-credentials
Dimitreee May 15, 2024
b6ef8f3
change index
lesyuk May 16, 2024
90acb88
Merge pull request #2 from lesyuk/change-credentials
Dimitreee May 16, 2024
1420a98
change index
lesyuk May 16, 2024
a926b99
Merge pull request #3 from lesyuk/change-credentials
Dimitreee May 16, 2024
8e74edb
update index
lesyuk May 16, 2024
996e665
Merge pull request #4 from lesyuk/change-credentials
Dimitreee May 16, 2024
8db3a26
chore: update @tonconnect/ui-react to 2.0.3-beta.1
thekiba May 20, 2024
85c8f65
chore: add configurable analytics url
thekiba May 20, 2024
5450251
chore: update @tonconnect/ui-react to 2.0.3-beta.2
thekiba May 20, 2024
8701783
Merge pull request #5 from thekiba/feat/ton-connect-update
Dimitreee May 21, 2024
528df9b
bump ton connect version number
lesyuk May 28, 2024
8755516
bump ton connect ui version
lesyuk May 28, 2024
45a3413
Merge pull request #6 from Dimitreee/lesyuk/bump_ton_connect
lesyuk May 28, 2024
c6cfca0
update node_modules/yarn.lock
lesyuk May 28, 2024
45ae2c4
Merge pull request #7 from Dimitreee/lesyuk/bump_ton_connect
lesyuk May 28, 2024
ff9859d
add package-lock.json
lesyuk May 28, 2024
502bef8
Merge pull request #8 from Dimitreee/lesyuk/bump_ton_connect
lesyuk May 28, 2024
7b4f86e
change analytics sdk script in index.html
lesyuk Jun 4, 2024
b97b2b4
Merge pull request #9 from Dimitreee/lesyuk/test_batching_script
lesyuk Jun 4, 2024
221e4e9
change vite.config.ts
lesyuk Jun 4, 2024
7eb99bc
Merge pull request #10 from Dimitreee/lesyuk/test_batching_script
lesyuk Jun 4, 2024
b7dfeb7
analytics sdk script updated
lesyuk Jun 5, 2024
3dcc432
Merge pull request #11 from Dimitreee/lesyuk/test_batching_script
lesyuk Jun 5, 2024
3359bbb
change appName and token
lesyuk Jun 6, 2024
1b37463
Merge pull request #12 from Dimitreee/lesyuk/test_batching_script
lesyuk Jun 6, 2024
dcc2de7
analytics sdk script updated
lesyuk Jun 10, 2024
7542e41
Merge pull request #13 from Dimitreee/lesyuk/test_batching_script
lesyuk Jun 10, 2024
ba5c080
change sdk credentials
lesyuk Jun 11, 2024
28b20d3
Merge pull request #14 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 11, 2024
a591913
change app credentials
lesyuk Jun 12, 2024
0118690
Merge pull request #15 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
26e5d9c
change app credentials
lesyuk Jun 12, 2024
367a9ce
Merge pull request #16 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
07f4f57
change tonconnect/ui-react version
lesyuk Jun 12, 2024
2a9ed70
Merge pull request #17 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
60d6b78
change token and appName
lesyuk Jun 12, 2024
ce43a42
Merge pull request #18 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
183020c
change token
lesyuk Jun 12, 2024
a6b055c
Merge pull request #19 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
d9f18c5
change token
lesyuk Jun 12, 2024
a3e3e45
Merge pull request #20 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
8e8cd49
change token
lesyuk Jun 12, 2024
8d87ecb
Merge pull request #21 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 12, 2024
f0910f4
update credentials to production
lesyuk Jun 15, 2024
2dcfabe
Merge pull request #22 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jun 15, 2024
1a122ba
update test app credentials and url for test env
lesyuk Jul 18, 2024
adfbbe9
change credentials
lesyuk Jul 25, 2024
86d88f4
change analytics url
lesyuk Jul 25, 2024
4841829
fix
lesyuk Jul 25, 2024
8f10c10
Merge pull request #24 from Dimitreee/lesyuk/change_sdk_credentials
lesyuk Jul 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 144 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,146 @@
# Demo dapp with @tonconnect/ui-react
# Demo dApp with @tonconnect/ui-react

Try it out https://ton-connect.github.io/demo-dapp-with-react-ui/
This Demo dApp showcases the integration with @tonconnect/ui-react. Experience it live at [Demo dApp with Wallet](https://ton-connect.github.io/demo-dapp-with-wallet/).

## Learn more about Ton Connect
- https://docs.ton.org/develop/dapps/ton-connect/
- https://github.com/ton-connect/sdk/tree/main/packages/ui
## Learn More About Ton Connect

To understand more about Ton Connect and how it enables blockchain functionalities in your applications, refer to the following resources:
- Ton Connect Documentation: [https://docs.ton.org/develop/dapps/ton-connect/](https://docs.ton.org/develop/dapps/ton-connect/)
- Ton Connect SDK and UI Library on GitHub: [https://github.com/ton-connect/sdk/tree/main/packages/ui](https://github.com/ton-connect/sdk/tree/main/packages/ui)

## Installation

### Project Dependencies

Install the necessary packages for this project:

```bash
npm install
```

### ngrok or localtunnel (Optional)

Choose either ngrok or localtunnel to expose your local server to the internet for testing in Telegram.

#### ngrok Installation

```bash
npm install -g ngrok
```

ngrok Documentation: [https://ngrok.com/docs](https://ngrok.com/docs)

#### localtunnel Installation

```bash
npm install -g localtunnel
```

LocalTunnel Documentation: [https://localtunnel.github.io/www/](https://localtunnel.github.io/www/)

### Creating Telegram Mini Apps (Optional)

1. Open [@BotFather](https://t.me/BotFather) in Telegram.
2. Send the `/newbot` command to create a new bot.
3. Follow the prompts to set up your bot, providing all necessary information.
4. After the bot is created, send the `/newapp` command to BotFather.
5. Select your bot from the list.
6. Provide all the required information for your Mini App.


### Returning to the Application (Optional)

To return to the application after interacting with the wallet, you must specify a `twaReturnUrl` in `src/App.tsx`.

Here's a concise guide:

- **twaReturnUrl**: This is the return URL used by Telegram Web Apps. Set it to redirect users back to your application after wallet interaction. Example: `'https://t.me/WebAppWalletBot/myapp'`.

Here is a sample configuration for specifying a return URL:

```jsx
<TonConnectUIProvider
manifestUrl="https://ton-connect.github.io/demo-dapp-with-wallet/tonconnect-manifest.json"
uiPreferences={{ theme: THEME.DARK }}
actionsConfiguration={{
twaReturnUrl: 'https://t.me/WebAppWalletBot/myapp'
}}
></TonConnectUIProvider>
```

### Adding a Custom Wallet (Optional)

To integrate a custom wallet into your application, adjust the `walletsListConfiguration` in `src/App.tsx`. Include your wallet details in `includeWallets` and specify `universalLink`.

Here's a concise guide:

- **universalLink**: This URL is used to open the wallet directly from a web link. It should link to your wallet's bot or app. Example: `'https://t.me/wallet/start'`.

Here is a sample configuration for adding a custom wallet:

```jsx
<TonConnectUIProvider
manifestUrl="https://ton-connect.github.io/demo-dapp-with-wallet/tonconnect-manifest.json"
uiPreferences={{ theme: THEME.DARK }}
walletsListConfiguration={{
includeWallets: [
{
appName: "telegram-wallet",
name: "Wallet",
imageUrl: "https://wallet.tg/images/logo-288.png",
aboutUrl: "https://wallet.tg/",
universalLink: "https://t.me/wallet/start",
bridgeUrl: "https://bridge.tonapi.io/bridge",
platforms: ["ios", "android", "macos", "windows", "linux"]
}
]
}}
actionsConfiguration={{
twaReturnUrl: 'https://t.me/WebAppWalletBot/myapp'
}}
></TonConnectUIProvider>
```

## Running the Application

### Starting the Application

To start the application, run:

```bash
npm dev
```

The application will be accessible at [http://localhost:5173](http://localhost:5173).

### Exposing Your Local Server (Optional)

#### Using ngrok

```bash
ngrok http 5173
```

#### Using localtunnel

```bash
lt --port 5173
```

After setting up ngrok or localtunnel, update your Telegram bot's configuration with the provided URL to ensure the bot points to your local development environment.

### Updating Telegram Bot Configuration (Optional)

#### Update the Menu Button URL in Telegram Bot

1. Open [@BotFather](https://t.me/BotFather) in Telegram.
2. Send the `/mybots` command and select your bot.
3. Choose "Bot Settings" then "Menu Button" and finally "Configure menu button".
4. Enter the ngrok or localtunnel URL as the new destination.

#### Update Mini Apps URL in Telegram

1. Open [@BotFather](https://t.me/BotFather) in Telegram.
2. Send the `/myapps` command and select your Mini App.
3. Choose "Edit Web App URL".
4. Enter the ngrok or localtunnel URL as the new destination.
1,465 changes: 1,465 additions & 0 deletions docs/assets/index-2235795c.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading