Skip to content

Commit

Permalink
Merge pull request #16 from howardpen9/main
Browse files Browse the repository at this point in the history
Updates  @tonconnect/ui-react
  • Loading branch information
shaharyakir authored Oct 20, 2023
2 parents 176feb1 + f074129 commit 40cccab
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 104 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
# twa-template
> Starter template for a new TWA interacting with the TON blockchain

> Starter template for a new TWA interacting with the TON blockchain
# Overview

The project is highly-opinionated, and there are many other alternate routes it could have taken. Some examples:

- Supports Ton Connect 2 wallets
- Uses vite with react (alternative to create-react-app)
- Uses the `ton` npm package

# Prerequesities
* Node.js v16 (other versions may work, needs more testing)
* A TON Connect compatible wallet (e.g. [Tonkeeper](https://tonkeeper.com/))

- Node.js v16 (other versions may work, needs more testing)
- A TON Connect compatible wallet (e.g. [Tonkeeper](https://tonkeeper.com/))

# What does this repo contain?
* A react-based TWA-ready app, interacting with TON
* Github actions set to deploy app to github pages
* A script to connect a telegram bot to the deployed app

- A react-based TWA-ready app, interacting with TON
- Github actions set to deploy app to github pages
- A script to connect a telegram bot to the deployed app

# How to use

1. Create a template from this repo with the "Use this template" button

1. Choose a name for your repo
2. Important! mark "Include all branches", otherwise github pages deployment will not work.
![image](https://user-images.githubusercontent.com/5641469/191731317-14e742fd-accb-47d4-a794-fad01148a377.png)
2. `**IMPORTANT!!**` mark "Include all branches", otherwise github pages deployment will not work.
![image](https://user-images.githubusercontent.com/5641469/191731317-14e742fd-accb-47d4-a794-fad01148a377.png)

2. Clone this repo and run `yarn`

Expand All @@ -32,11 +39,14 @@ The project is highly-opinionated, and there are many other alternate routes it
5. Run `yarn configbot` to link your bot to the webapp

# Development

1. Run `npm run dev` and edit the code as needed
2. On push to the `main` branch, the app will be automatically deployed via github actions.

# Roadmap

- [ ] Jetton transfer support

# License

MIT
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@orbs-network/ton-access": "^2.2.2",
"@tanstack/react-query": "^4.24.4",
"@tonconnect/ui-react": "^0.0.14",
"@tonconnect/ui-react": "^2.0.0-beta.2",
"@twa-dev/sdk": "^6.4.2",
"buffer": "^6.0.3",
"is-mobile": "^3.1.1",
Expand Down
148 changes: 53 additions & 95 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,6 @@
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz#c5a1a4bfe1b57f0c3e61b29883525c6da3e5c091"
integrity sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==

"@floating-ui/core@^1.1.0":
version "1.1.1"
resolved "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.1.tgz"
integrity sha512-PL7g3dhA4dHgZfujkuD8Q+tfJJynEtnNQSPzmucCnxMvkxf4cLBJw/ZYqZUn4HCh33U3WHrAfv2R2tbi9UCSmw==

"@floating-ui/dom@^1.0.12":
version "1.1.1"
resolved "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.1.1.tgz"
integrity sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==
dependencies:
"@floating-ui/core" "^1.1.0"

"@jridgewell/gen-mapping@^0.1.0":
version "0.1.1"
resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz"
Expand Down Expand Up @@ -430,11 +418,6 @@
resolved "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.1.1.tgz"
integrity sha512-VGbKDbk1RFIaSmdVb0cNjjWJoRWRI/Weo23AjRCC2nryO0iAS8pzsToJfPVPtVs74WHw4L1UTADNdIYRLkirZQ==

"@solid-primitives/i18n@^1.1.2":
version "1.1.3"
resolved "https://registry.npmjs.org/@solid-primitives/i18n/-/i18n-1.1.3.tgz"
integrity sha512-VbX4FZfIkqIrelFeGC1KgXME4aeS7kiAFb6IhIY7Ey4S+wOSGCiEesIwGeMHxyJ1xk0yCFS5YUVEXcQIBZysVw==

"@tanstack/[email protected]":
version "4.24.4"
resolved "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.24.4.tgz"
Expand All @@ -448,50 +431,53 @@
"@tanstack/query-core" "4.24.4"
use-sync-external-store "^1.2.0"

"@tonconnect/protocol@^2.0.1":
version "2.0.1"
resolved "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.0.1.tgz"
integrity sha512-jkSj6EKjIlHnJxrtxdlO7KqVJe41yrIgqamGZiqziKH6iwx0m9YyKvuIREd6CmWY2jbsev3BvBWqPp9KH6HrRw==
"@tonconnect/isomorphic-eventsource@^0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@tonconnect/isomorphic-eventsource/-/isomorphic-eventsource-0.0.1.tgz#199e5a86c31dad706b79826f65879e0d77d3dd51"
integrity sha512-ODk48pMlqLSOvu3fM0R1sdlz/Cv2y4hSfwtXmLq9ky9+H7ZQfw/16ElpIJ69B4lUvHycxrueNgrRtF9PJHoGMw==
dependencies:
tweetnacl-util "^0.15.1"
eventsource "^2.0.2"

"@tonconnect/sdk@^2.0.7":
version "2.0.7"
resolved "https://registry.npmjs.org/@tonconnect/sdk/-/sdk-2.0.7.tgz"
integrity sha512-MDbA5RhkVbSQQYXsLuVXLATROSQgDJSIx9Y2HIPohfU44PH6vaJ1cBrv9nogIoAQUM2tNuBXC0w+RcFT+eRTCg==
"@tonconnect/isomorphic-fetch@^0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@tonconnect/isomorphic-fetch/-/isomorphic-fetch-0.0.2.tgz#c09ff05a409ec89262c369d4bf27305820cdaa33"
integrity sha512-DAyA4oL7MqbBo9k8+8E+YiWsGCYi6UMhDTcsZjhgzhESkBNG6b+NBkpb1KH4oi0xDZQoknFtY9XogJLuQtSMQQ==
dependencies:
node-fetch "^2.6.9"

"@tonconnect/protocol@^2.2.5":
version "2.2.5"
resolved "https://registry.yarnpkg.com/@tonconnect/protocol/-/protocol-2.2.5.tgz#15369801708354821295a6d284f0267799ac48cc"
integrity sha512-kR0E+CWZl6JrE/30283v+sRiAvEu21t1xOLFx6f/BxlCNLY2wki39+L32+iicX8gn/Ig99L1flr9TAI9QW9bnQ==
dependencies:
"@tonconnect/protocol" "^2.0.1"
deepmerge "^4.2.2"
eventsource "^2.0.2"
node-fetch "^2.6.7"
tweetnacl "^1.0.3"
tweetnacl-util "^0.15.1"

"@tonconnect/ui-react@^0.0.14":
version "0.0.14"
resolved "https://registry.npmjs.org/@tonconnect/ui-react/-/ui-react-0.0.14.tgz"
integrity sha512-tmPS6ZEDUlUCoQNiypm7ekbgWGr+fxSifJGxzQy1m0jrNXt+a1HHX/ntDuS2i/B/YYYiBqAFC42mPzEpc0DtkA==
"@tonconnect/sdk@^3.0.0-beta.1":
version "3.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@tonconnect/sdk/-/sdk-3.0.0-beta.1.tgz#522d88409dd8ae9b3aa2eabfddfd3cee28bdb514"
integrity sha512-YcTO3USLNblaB+ClPFcQ8LwR68GaZ78kFbxBLANi6tvRORP0d0aSSjTODRs0lDOfVN0gkLCwo+7JxrRBoF/20w==
dependencies:
"@tonconnect/sdk" "^2.0.7"
"@tonconnect/ui" "^0.0.17"
react "^18.0.0"
react-dom "^18.0.0"
"@tonconnect/isomorphic-eventsource" "^0.0.1"
"@tonconnect/isomorphic-fetch" "^0.0.2"
"@tonconnect/protocol" "^2.2.5"

"@tonconnect/ui@^0.0.17":
version "0.0.17"
resolved "https://registry.npmjs.org/@tonconnect/ui/-/ui-0.0.17.tgz"
integrity sha512-uKHpQPzE4BYG65nuzA/DTrGgVkBnaKGWzmT4WcJ2yJ+OJ/MJH2sCv17vNDIiDW62PL+MG790KX0MUNcDT2ojEQ==
"@tonconnect/ui-react@^2.0.0-beta.2":
version "2.0.0-beta.2"
resolved "https://registry.yarnpkg.com/@tonconnect/ui-react/-/ui-react-2.0.0-beta.2.tgz#3251334c556686147e6635bc00a952c2a508a136"
integrity sha512-h3n8dg2BilyegmGh0cdcoX/e/zaYg0NTJ8U/s6ZloXz47fqLNLk5wjtDqInxLM8zDuMOyuLnx1clN4uGT4P23g==
dependencies:
"@floating-ui/dom" "^1.0.12"
"@solid-primitives/i18n" "^1.1.2"
"@tonconnect/sdk" "^2.0.7"
"@tonconnect/ui" "^2.0.0-beta.2"

"@tonconnect/ui@^2.0.0-beta.2":
version "2.0.0-beta.2"
resolved "https://registry.yarnpkg.com/@tonconnect/ui/-/ui-2.0.0-beta.2.tgz#36ed411dfe109e090dbf2f83d3e6c2bd34e88a8c"
integrity sha512-oVaJ/o8+inYNDA4Jq1WbZm8mdexyW+FjSBnYKQhqneH883HeLpiIA63dmbIWMiHAbkY8S6uRO9ffKPUjEWzGjw==
dependencies:
"@tonconnect/sdk" "^3.0.0-beta.1"
classnames "^2.3.2"
deepmerge "^4.2.2"
is-plain-object "^5.0.0"
qrcode-generator "^1.4.4"
solid-floating-ui "^0.2.0"
solid-js "^1.5.1"
solid-styled-components "^0.28.5"
solid-transition-group "^0.0.12"
ua-parser-js "^1.0.35"

"@twa-dev/sdk@^6.4.2":
version "6.4.2"
Expand Down Expand Up @@ -882,7 +868,7 @@ css-to-react-native@^3.0.0:
css-color-keywords "^1.0.0"
postcss-value-parser "^4.0.2"

csstype@^3.0.2, csstype@^3.1.0:
csstype@^3.0.2:
version "3.1.1"
resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz"
integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==
Expand Down Expand Up @@ -1072,11 +1058,6 @@ globals@^11.1.0:
resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==

goober@^2.1.10:
version "2.1.11"
resolved "https://registry.npmjs.org/goober/-/goober-2.1.11.tgz"
integrity sha512-5SS2lmxbhqH0u9ABEWq7WPU69a4i2pYcHeCxqaNq6Cw3mnrF0ghWNM4tEGid4dKy8XNIAUbuThuozDHHKJVh3A==

gopd@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz"
Expand Down Expand Up @@ -1215,11 +1196,6 @@ is-nan@^1.2.1:
call-bind "^1.0.0"
define-properties "^1.1.3"

is-plain-object@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz"
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==

is-typed-array@^1.1.10, is-typed-array@^1.1.3:
version "1.1.10"
resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz"
Expand Down Expand Up @@ -1334,13 +1310,20 @@ nanoid@^3.3.4:
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==

node-fetch@^2.6.1, node-fetch@^2.6.7:
node-fetch@^2.6.1:
version "2.6.9"
resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz"
integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==
dependencies:
whatwg-url "^5.0.0"

node-fetch@^2.6.9:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

node-releases@^2.0.8:
version "2.0.9"
resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.9.tgz"
Expand Down Expand Up @@ -1511,11 +1494,6 @@ punycode@^1.4.1:
resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz"
integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==

qrcode-generator@^1.4.4:
version "1.4.4"
resolved "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-1.4.4.tgz"
integrity sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==

querystring-es3@^0.2.1:
version "0.2.1"
resolved "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz"
Expand All @@ -1541,7 +1519,7 @@ randomfill@^1.0.3:
randombytes "^2.0.5"
safe-buffer "^5.1.0"

react-dom@^18.0.0, react-dom@^18.2.0:
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
Expand All @@ -1559,7 +1537,7 @@ react-refresh@^0.14.0:
resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==

react@^18.0.0, react@^18.2.0:
react@^18.2.0:
version "18.2.0"
resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
Expand Down Expand Up @@ -1639,31 +1617,6 @@ shallowequal@^1.1.0:
resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz"
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==

solid-floating-ui@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/solid-floating-ui/-/solid-floating-ui-0.2.0.tgz"
integrity sha512-c1iXyQ8AU62bzZtPVggpp+rzTAuE1PkGs2HI9jIoaJV/RfOjGiM4HTOcAVGwkg/Gm0XFqj8w4bTptAM3rqbrRA==

solid-js@^1.5.1:
version "1.6.9"
resolved "https://registry.npmjs.org/solid-js/-/solid-js-1.6.9.tgz"
integrity sha512-kV3fMmm+1C2J95c8eDOPKGfZHnuAkHUBLG4hX1Xu08bXeAIPqmxuz/QdH3B8SIdTp3EatBVIyA6RCes3hrGzpg==
dependencies:
csstype "^3.1.0"

solid-styled-components@^0.28.5:
version "0.28.5"
resolved "https://registry.npmjs.org/solid-styled-components/-/solid-styled-components-0.28.5.tgz"
integrity sha512-vwTcdp76wZNnESIzB6rRZ3U55NgcSAQXCiiRIiEFhxTFqT0bEh/warNT1qaRZu4OkAzrBkViOngF35ktI8sc4A==
dependencies:
csstype "^3.1.0"
goober "^2.1.10"

solid-transition-group@^0.0.12:
version "0.0.12"
resolved "https://registry.npmjs.org/solid-transition-group/-/solid-transition-group-0.0.12.tgz"
integrity sha512-Eu4MfNZSSxM67C+4EXaoDiWr4BFbDLg3j30JQJgQEIH9UDOfgNPfZlsFDhT/PxwJqhe6sn85W+dbmYJzBmjpAA==

source-map-js@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz"
Expand Down Expand Up @@ -1805,6 +1758,11 @@ typescript@^4.9.5:
resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

ua-parser-js@^1.0.35:
version "1.0.36"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.36.tgz#a9ab6b9bd3a8efb90bb0816674b412717b7c428c"
integrity sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==

update-browserslist-db@^1.0.10:
version "1.0.10"
resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz"
Expand Down

0 comments on commit 40cccab

Please sign in to comment.