diff --git a/package-lock.json b/package-lock.json index b994a0f..7813742 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", - "@tonconnect/ui-react": "^1.0.0-beta.6", + "@ton-defi.org/ton-connection": "^0.8.1", "@types/jest": "^27.5.1", "@types/node": "^16.11.36", "@types/react": "^18.0.9", @@ -3513,6 +3513,11 @@ "node": ">= 8" } }, + "node_modules/@openland/patterns": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@openland/patterns/-/patterns-0.0.2.tgz", + "integrity": "sha512-ttgJELwtG8cIER1JeWjkIMg3e+MlAL6n4wFPSNPoBCl+5t3G/HIz9kolvxBmN5/3RXEgh68NnePzGiUBaUHmRQ==" + }, "node_modules/@orbs-network/ton-access": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@orbs-network/ton-access/-/ton-access-2.2.2.tgz", @@ -4194,61 +4199,60 @@ "@testing-library/dom": ">=7.21.4" } }, - "node_modules/@tonconnect/isomorphic-eventsource": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@tonconnect/isomorphic-eventsource/-/isomorphic-eventsource-0.0.1.tgz", - "integrity": "sha512-ODk48pMlqLSOvu3fM0R1sdlz/Cv2y4hSfwtXmLq9ky9+H7ZQfw/16ElpIJ69B4lUvHycxrueNgrRtF9PJHoGMw==", + "node_modules/@ton-defi.org/ton-connection": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@ton-defi.org/ton-connection/-/ton-connection-0.8.1.tgz", + "integrity": "sha512-p3uHra5Ye8P6a4xUz7aP6wPFilEDiivHASI69VGenbnGTEE0LFizUQWnhdkwTiUh/YanJWnza8CTgXZc2EPbvA==", "dependencies": { - "eventsource": "^2.0.2" + "@aws-crypto/sha256-js": "^2.0.1", + "@tonconnect/sdk": "^2.0.7", + "axios-request-throttle": "^1.0.0", + "dotenv": "^16.0.0", + "ton": "^12.1.5", + "ton-contracts": "^3.1.0", + "ton-crypto": "^3.1.0", + "ton-x": "^2.0.0-beta9" + }, + "engines": { + "node": ">=16.0.0" } }, - "node_modules/@tonconnect/isomorphic-fetch": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@tonconnect/isomorphic-fetch/-/isomorphic-fetch-0.0.2.tgz", - "integrity": "sha512-DAyA4oL7MqbBo9k8+8E+YiWsGCYi6UMhDTcsZjhgzhESkBNG6b+NBkpb1KH4oi0xDZQoknFtY9XogJLuQtSMQQ==", + "node_modules/@ton-defi.org/ton-connection/node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@ton-defi.org/ton-connection/node_modules/ton-crypto": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-3.2.0.tgz", + "integrity": "sha512-fltdBNQ45gARMuGMEOjPZWPJ5eSql8p3CA0Dj7tPv5lhU5ziT8SxXLAzDraR9HJ8YpjBHLVvYyhMLRiEwxgtMQ==", "dependencies": { - "node-fetch": "^2.6.9" + "jssha": "3.2.0", + "ton-crypto-primitives": "2.0.0", + "tweetnacl": "1.0.3" } }, "node_modules/@tonconnect/protocol": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.2.5.tgz", - "integrity": "sha512-kR0E+CWZl6JrE/30283v+sRiAvEu21t1xOLFx6f/BxlCNLY2wki39+L32+iicX8gn/Ig99L1flr9TAI9QW9bnQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.0.1.tgz", + "integrity": "sha512-jkSj6EKjIlHnJxrtxdlO7KqVJe41yrIgqamGZiqziKH6iwx0m9YyKvuIREd6CmWY2jbsev3BvBWqPp9KH6HrRw==", "dependencies": { - "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1" } }, "node_modules/@tonconnect/sdk": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@tonconnect/sdk/-/sdk-2.1.3.tgz", - "integrity": "sha512-LxHJr96NvGTqj4qSKYPPS/7fMlUpHNyj5bCNlzY5xMW8JmdgPj+jXxm5wEI00xBWy478dbE9ZaBhLMLH1V2wZw==", - "dependencies": { - "@tonconnect/isomorphic-eventsource": "^0.0.1", - "@tonconnect/isomorphic-fetch": "^0.0.2", - "@tonconnect/protocol": "^2.2.5" - } - }, - "node_modules/@tonconnect/ui": { - "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@tonconnect/ui/-/ui-1.0.0-beta.5.tgz", - "integrity": "sha512-F1Z/GAsuebvmMSS5SkY90DyIYogUYNx+b7I8A2LF8nbwDVA0ImsN6oOiOl5PzOhBlNZru8LXJuUUfqgDv1ZHuw==", - "dependencies": { - "@tonconnect/sdk": "^2.1.3", - "classnames": "^2.3.2", - "deepmerge": "^4.2.2" - } - }, - "node_modules/@tonconnect/ui-react": { - "version": "1.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@tonconnect/ui-react/-/ui-react-1.0.0-beta.6.tgz", - "integrity": "sha512-j4ziq+5JHmAI74XXodjIomqvLKEwfomJ4mv1LulYWs7izNBDwlpzIW/Un0UzsGZq9fjnuJ/A2Xb9M30j9ucOEg==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@tonconnect/sdk/-/sdk-2.0.7.tgz", + "integrity": "sha512-MDbA5RhkVbSQQYXsLuVXLATROSQgDJSIx9Y2HIPohfU44PH6vaJ1cBrv9nogIoAQUM2tNuBXC0w+RcFT+eRTCg==", "dependencies": { - "@tonconnect/ui": "^1.0.0-beta.5" - }, - "peerDependencies": { - "react": ">=17.0.0", - "react-dom": ">=17.0.0" + "@tonconnect/protocol": "^2.0.1", + "deepmerge": "^4.2.2", + "eventsource": "^2.0.2", + "node-fetch": "^2.6.7", + "tweetnacl": "^1.0.3" } }, "node_modules/@tootallnate/once": { @@ -4272,6 +4276,15 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==" }, + "node_modules/@types/axios": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", + "integrity": "sha512-KqQnQbdYE54D7oa/UmYVMZKq7CO4l8DEENzOKc4aBRwxCXSlJXGz83flFx5L7AWrOQnmuN3kVsRdt+GZPPjiVQ==", + "deprecated": "This is a stub types definition for axios (https://github.com/mzabriskie/axios). axios provides its own type definitions, so you don't need @types/axios installed!", + "dependencies": { + "axios": "*" + } + }, "node_modules/@types/babel__core": { "version": "7.1.19", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", @@ -4313,7 +4326,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, "dependencies": { "@types/node": "*" } @@ -5582,6 +5594,18 @@ "follow-redirects": "^1.14.7" } }, + "node_modules/axios-request-throttle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/axios-request-throttle/-/axios-request-throttle-1.0.0.tgz", + "integrity": "sha512-NYh7kZkgSJZyIohqrvQEzr4uygqbxXb769kbphkwgYNAJm5eDg33mqHLA2pwHKC1uqbTfNpmjmzWdUdo+ptBWg==", + "dependencies": { + "@types/axios": "^0.14.0", + "promise-throttle": "^1.1.2" + }, + "peerDependencies": { + "axios": "*" + } + }, "node_modules/axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -6482,11 +6506,6 @@ "node": ">=0.10.0" } }, - "node_modules/classnames": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", - "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" - }, "node_modules/clean-css": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.0.tgz", @@ -14005,9 +14024,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -16125,6 +16144,11 @@ "asap": "~2.0.6" } }, + "node_modules/promise-throttle": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/promise-throttle/-/promise-throttle-1.1.2.tgz", + "integrity": "sha512-dij7vjyXNewuuN/gyr+TX2KRjw48mbV5FEtgyXaIoJjGYAKT0au23/voNvy9eS4UNJjx2KUdEcO5Yyfc1h7vWQ==" + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -18914,6 +18938,18 @@ "tweetnacl": "1.0.3" } }, + "node_modules/ton-contracts": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ton-contracts/-/ton-contracts-3.1.0.tgz", + "integrity": "sha512-nT1CAdKsCS/XA/PMczJOgX42Cr2ZQa4NIwSifbd9M1Ukws4l7VjjFXQYPoWhEb2m43oqZqj3NO8X3WojWvFarA==", + "dependencies": { + "@openland/patterns": "^0.0.2" + }, + "peerDependencies": { + "ton": ">=9.1.0", + "ton-crypto": ">=1.6.0" + } + }, "node_modules/ton-crypto": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-2.1.0.tgz", @@ -18932,6 +18968,89 @@ "jssha": "3.2.0" } }, + "node_modules/ton-x": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ton-x/-/ton-x-2.0.0.tgz", + "integrity": "sha512-APzTmKydNVre2IaDuC8gxmVK/TcJpA5jUER+OrwxKDwRWckzFFzElxVHu6AGilljRHYd45At4QDoHTfsBkUuZA==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "axios": "^0.27.0", + "bn.js": "^5.2.0", + "fp-ts": "^2.12.0", + "io-ts": "^2.2.16", + "teslabot": "^1.5.0", + "ton": "9.8.0", + "ton-crypto": "^3.0.0" + } + }, + "node_modules/ton-x/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/ton-x/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ton-x/node_modules/ton": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/ton/-/ton-9.8.0.tgz", + "integrity": "sha512-aH/7ODiEulPRZracSfQ4KeaV6iDmzjn14+YMsZ9x0sNlzhtP4blMIFXPJFp4BOc4INb5vTrfA0u+JtOoXlBO0A==", + "dependencies": { + "axios": "^0.25.0", + "bn.js": "5.2.0", + "dataloader": "^2.0.0", + "ethjs-unit": "0.1.6", + "fp-ts": "^2.11.1", + "io-ts": "^2.2.16", + "io-ts-reporters": "^2.0.0", + "symbol.inspect": "1.0.1", + "teslabot": "^1.3.0", + "ton-crypto": "2.1.0", + "tweetnacl": "1.0.3" + } + }, + "node_modules/ton-x/node_modules/ton-crypto": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-3.2.0.tgz", + "integrity": "sha512-fltdBNQ45gARMuGMEOjPZWPJ5eSql8p3CA0Dj7tPv5lhU5ziT8SxXLAzDraR9HJ8YpjBHLVvYyhMLRiEwxgtMQ==", + "dependencies": { + "jssha": "3.2.0", + "ton-crypto-primitives": "2.0.0", + "tweetnacl": "1.0.3" + } + }, + "node_modules/ton-x/node_modules/ton/node_modules/axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "dependencies": { + "follow-redirects": "^1.14.7" + } + }, + "node_modules/ton-x/node_modules/ton/node_modules/ton-crypto": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-2.1.0.tgz", + "integrity": "sha512-PZnmCOShfgq9tCRM8E7hG8nCkpkOyZvDLPXmZN92ZEBrfTT0NKKf0imndkxG5DkgWMjc6IKfgpnEaJDH9qN6ZQ==", + "dependencies": { + "jssha": "3.2.0", + "ton-crypto-primitives": "2.0.0", + "tweetnacl": "1.0.3" + } + }, "node_modules/tough-cookie": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", @@ -22941,6 +23060,11 @@ "fastq": "^1.6.0" } }, + "@openland/patterns": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@openland/patterns/-/patterns-0.0.2.tgz", + "integrity": "sha512-ttgJELwtG8cIER1JeWjkIMg3e+MlAL6n4wFPSNPoBCl+5t3G/HIz9kolvxBmN5/3RXEgh68NnePzGiUBaUHmRQ==" + }, "@orbs-network/ton-access": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@orbs-network/ton-access/-/ton-access-2.2.2.tgz", @@ -23376,57 +23500,56 @@ "@babel/runtime": "^7.12.5" } }, - "@tonconnect/isomorphic-eventsource": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@tonconnect/isomorphic-eventsource/-/isomorphic-eventsource-0.0.1.tgz", - "integrity": "sha512-ODk48pMlqLSOvu3fM0R1sdlz/Cv2y4hSfwtXmLq9ky9+H7ZQfw/16ElpIJ69B4lUvHycxrueNgrRtF9PJHoGMw==", - "requires": { - "eventsource": "^2.0.2" - } - }, - "@tonconnect/isomorphic-fetch": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@tonconnect/isomorphic-fetch/-/isomorphic-fetch-0.0.2.tgz", - "integrity": "sha512-DAyA4oL7MqbBo9k8+8E+YiWsGCYi6UMhDTcsZjhgzhESkBNG6b+NBkpb1KH4oi0xDZQoknFtY9XogJLuQtSMQQ==", + "@ton-defi.org/ton-connection": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@ton-defi.org/ton-connection/-/ton-connection-0.8.1.tgz", + "integrity": "sha512-p3uHra5Ye8P6a4xUz7aP6wPFilEDiivHASI69VGenbnGTEE0LFizUQWnhdkwTiUh/YanJWnza8CTgXZc2EPbvA==", "requires": { - "node-fetch": "^2.6.9" + "@aws-crypto/sha256-js": "^2.0.1", + "@tonconnect/sdk": "^2.0.7", + "axios-request-throttle": "^1.0.0", + "dotenv": "^16.0.0", + "ton": "^12.1.5", + "ton-contracts": "^3.1.0", + "ton-crypto": "^3.1.0", + "ton-x": "^2.0.0-beta9" + }, + "dependencies": { + "dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" + }, + "ton-crypto": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-3.2.0.tgz", + "integrity": "sha512-fltdBNQ45gARMuGMEOjPZWPJ5eSql8p3CA0Dj7tPv5lhU5ziT8SxXLAzDraR9HJ8YpjBHLVvYyhMLRiEwxgtMQ==", + "requires": { + "jssha": "3.2.0", + "ton-crypto-primitives": "2.0.0", + "tweetnacl": "1.0.3" + } + } } }, "@tonconnect/protocol": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.2.5.tgz", - "integrity": "sha512-kR0E+CWZl6JrE/30283v+sRiAvEu21t1xOLFx6f/BxlCNLY2wki39+L32+iicX8gn/Ig99L1flr9TAI9QW9bnQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tonconnect/protocol/-/protocol-2.0.1.tgz", + "integrity": "sha512-jkSj6EKjIlHnJxrtxdlO7KqVJe41yrIgqamGZiqziKH6iwx0m9YyKvuIREd6CmWY2jbsev3BvBWqPp9KH6HrRw==", "requires": { - "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1" } }, "@tonconnect/sdk": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@tonconnect/sdk/-/sdk-2.1.3.tgz", - "integrity": "sha512-LxHJr96NvGTqj4qSKYPPS/7fMlUpHNyj5bCNlzY5xMW8JmdgPj+jXxm5wEI00xBWy478dbE9ZaBhLMLH1V2wZw==", - "requires": { - "@tonconnect/isomorphic-eventsource": "^0.0.1", - "@tonconnect/isomorphic-fetch": "^0.0.2", - "@tonconnect/protocol": "^2.2.5" - } - }, - "@tonconnect/ui": { - "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@tonconnect/ui/-/ui-1.0.0-beta.5.tgz", - "integrity": "sha512-F1Z/GAsuebvmMSS5SkY90DyIYogUYNx+b7I8A2LF8nbwDVA0ImsN6oOiOl5PzOhBlNZru8LXJuUUfqgDv1ZHuw==", - "requires": { - "@tonconnect/sdk": "^2.1.3", - "classnames": "^2.3.2", - "deepmerge": "^4.2.2" - } - }, - "@tonconnect/ui-react": { - "version": "1.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@tonconnect/ui-react/-/ui-react-1.0.0-beta.6.tgz", - "integrity": "sha512-j4ziq+5JHmAI74XXodjIomqvLKEwfomJ4mv1LulYWs7izNBDwlpzIW/Un0UzsGZq9fjnuJ/A2Xb9M30j9ucOEg==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@tonconnect/sdk/-/sdk-2.0.7.tgz", + "integrity": "sha512-MDbA5RhkVbSQQYXsLuVXLATROSQgDJSIx9Y2HIPohfU44PH6vaJ1cBrv9nogIoAQUM2tNuBXC0w+RcFT+eRTCg==", "requires": { - "@tonconnect/ui": "^1.0.0-beta.5" + "@tonconnect/protocol": "^2.0.1", + "deepmerge": "^4.2.2", + "eventsource": "^2.0.2", + "node-fetch": "^2.6.7", + "tweetnacl": "^1.0.3" } }, "@tootallnate/once": { @@ -23444,6 +23567,14 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==" }, + "@types/axios": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", + "integrity": "sha512-KqQnQbdYE54D7oa/UmYVMZKq7CO4l8DEENzOKc4aBRwxCXSlJXGz83flFx5L7AWrOQnmuN3kVsRdt+GZPPjiVQ==", + "requires": { + "axios": "*" + } + }, "@types/babel__core": { "version": "7.1.19", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", @@ -23485,7 +23616,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, "requires": { "@types/node": "*" } @@ -24479,6 +24609,15 @@ "follow-redirects": "^1.14.7" } }, + "axios-request-throttle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/axios-request-throttle/-/axios-request-throttle-1.0.0.tgz", + "integrity": "sha512-NYh7kZkgSJZyIohqrvQEzr4uygqbxXb769kbphkwgYNAJm5eDg33mqHLA2pwHKC1uqbTfNpmjmzWdUdo+ptBWg==", + "requires": { + "@types/axios": "^0.14.0", + "promise-throttle": "^1.1.2" + } + }, "axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -25149,11 +25288,6 @@ } } }, - "classnames": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", - "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" - }, "clean-css": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.0.tgz", @@ -30542,9 +30676,9 @@ } }, "node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "requires": { "whatwg-url": "^5.0.0" }, @@ -31888,6 +32022,11 @@ "asap": "~2.0.6" } }, + "promise-throttle": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/promise-throttle/-/promise-throttle-1.1.2.tgz", + "integrity": "sha512-dij7vjyXNewuuN/gyr+TX2KRjw48mbV5FEtgyXaIoJjGYAKT0au23/voNvy9eS4UNJjx2KUdEcO5Yyfc1h7vWQ==" + }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -33982,6 +34121,14 @@ "tweetnacl": "1.0.3" } }, + "ton-contracts": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ton-contracts/-/ton-contracts-3.1.0.tgz", + "integrity": "sha512-nT1CAdKsCS/XA/PMczJOgX42Cr2ZQa4NIwSifbd9M1Ukws4l7VjjFXQYPoWhEb2m43oqZqj3NO8X3WojWvFarA==", + "requires": { + "@openland/patterns": "^0.0.2" + } + }, "ton-crypto": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-2.1.0.tgz", @@ -34000,6 +34147,90 @@ "jssha": "3.2.0" } }, + "ton-x": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ton-x/-/ton-x-2.0.0.tgz", + "integrity": "sha512-APzTmKydNVre2IaDuC8gxmVK/TcJpA5jUER+OrwxKDwRWckzFFzElxVHu6AGilljRHYd45At4QDoHTfsBkUuZA==", + "requires": { + "@types/bn.js": "^5.1.0", + "axios": "^0.27.0", + "bn.js": "^5.2.0", + "fp-ts": "^2.12.0", + "io-ts": "^2.2.16", + "teslabot": "^1.5.0", + "ton": "9.8.0", + "ton-crypto": "^3.0.0" + }, + "dependencies": { + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "ton": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/ton/-/ton-9.8.0.tgz", + "integrity": "sha512-aH/7ODiEulPRZracSfQ4KeaV6iDmzjn14+YMsZ9x0sNlzhtP4blMIFXPJFp4BOc4INb5vTrfA0u+JtOoXlBO0A==", + "requires": { + "axios": "^0.25.0", + "bn.js": "5.2.0", + "dataloader": "^2.0.0", + "ethjs-unit": "0.1.6", + "fp-ts": "^2.11.1", + "io-ts": "^2.2.16", + "io-ts-reporters": "^2.0.0", + "symbol.inspect": "1.0.1", + "teslabot": "^1.3.0", + "ton-crypto": "2.1.0", + "tweetnacl": "1.0.3" + }, + "dependencies": { + "axios": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "requires": { + "follow-redirects": "^1.14.7" + } + }, + "ton-crypto": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-2.1.0.tgz", + "integrity": "sha512-PZnmCOShfgq9tCRM8E7hG8nCkpkOyZvDLPXmZN92ZEBrfTT0NKKf0imndkxG5DkgWMjc6IKfgpnEaJDH9qN6ZQ==", + "requires": { + "jssha": "3.2.0", + "ton-crypto-primitives": "2.0.0", + "tweetnacl": "1.0.3" + } + } + } + }, + "ton-crypto": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ton-crypto/-/ton-crypto-3.2.0.tgz", + "integrity": "sha512-fltdBNQ45gARMuGMEOjPZWPJ5eSql8p3CA0Dj7tPv5lhU5ziT8SxXLAzDraR9HJ8YpjBHLVvYyhMLRiEwxgtMQ==", + "requires": { + "jssha": "3.2.0", + "ton-crypto-primitives": "2.0.0", + "tweetnacl": "1.0.3" + } + } + } + }, "tough-cookie": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", diff --git a/package.json b/package.json index 7d539bd..e6fd843 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", - "@tonconnect/ui-react": "^1.0.0-beta.6", + "@ton-defi.org/ton-connection": "^0.8.1", "@types/jest": "^27.5.1", "@types/node": "^16.11.36", "@types/react": "^18.0.9", diff --git a/src/App.tsx b/src/App.tsx index 1d872cc..0eb1d33 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,11 @@ import { styled } from "@mui/material"; import { Box } from "@mui/system"; import { createContext, useEffect } from "react"; +import useConnectionStore from "store/connection-store/useConnectionStore"; import { APP_GRID, ROUTES } from "consts"; import { Navigate, Outlet, Route, Routes, useLocation } from "react-router-dom"; import { DeployerPage, Jetton } from "pages"; +import ConnectPopup from "components/connectPopup"; import analytics from "services/analytics"; import { Footer } from "components/footer"; import { Header } from "components/header"; @@ -78,6 +80,7 @@ const ContentWrapper = ({ children }: ContentWrapperProps) => { }; const App = () => { + const { connectOnLoad } = useConnectionStore(); const { resetJetton } = useJettonLogo(); const location = useLocation(); @@ -85,6 +88,10 @@ const App = () => { resetJetton(); }, [location.pathname]); + useEffect(() => { + connectOnLoad(); + }, []); + return ( { +