diff --git a/explorer/package.json b/explorer/package.json index bd3a6cd57c..045c96e629 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -27,6 +27,8 @@ "@cosmjs/math": "^0.26.2", "@cosmjs/stargate": "^0.32.0", "@cosmjs/tendermint-rpc": "^0.32.0", + "@cosmos-kit/core": "^2.8.9", + "@cosmos-kit/cosmostation": "^2.6.10", "@cosmos-kit/keplr": "^2.6.9", "@cosmos-kit/ledger": "^2.6.9", "@cosmos-kit/react": "^2.10.10", @@ -38,6 +40,7 @@ "@mui/styles": "^5.0.1", "@mui/system": "^5.0.1", "@mui/x-data-grid": "^5.0.0-beta.5", + "@nymproject/contract-clients": "^1.2.4-rc.1", "@nymproject/mui-theme": "^1.0.0", "@nymproject/node-tester": "^1.0.0", "@nymproject/nym-validator-client": "^0.18.0", diff --git a/explorer/src/components/Wallet/index.ts b/explorer/src/components/Wallet/index.ts new file mode 100644 index 0000000000..645c8b4ffb --- /dev/null +++ b/explorer/src/components/Wallet/index.ts @@ -0,0 +1,2 @@ +export * from './WalletBalance'; +export * from './WalletAddress'; diff --git a/explorer/src/index.tsx b/explorer/src/index.tsx index 57e4315de9..0b76be7ab1 100644 --- a/explorer/src/index.tsx +++ b/explorer/src/index.tsx @@ -2,12 +2,13 @@ import * as React from 'react'; import { createRoot } from 'react-dom/client'; import { BrowserRouter as Router } from 'react-router-dom'; import { ErrorBoundary } from 'react-error-boundary'; -import { App } from './App'; import { MainContextProvider } from './context/main'; import { NetworkExplorerThemeProvider } from './theme'; import { ErrorBoundaryContent } from './errors/ErrorBoundaryContent'; import CosmosKitProvider from './context/cosmos-kit'; import '@interchain-ui/react/styles'; +import { App } from './App'; +import { WalletProvider } from './context/wallet'; import './styles.css'; const elem = document.getElementById('app'); @@ -18,11 +19,13 @@ if (elem) { - - - - - + + + + + + + , diff --git a/explorer/webpack.config.js b/explorer/webpack.config.js index e965fcd0cb..550951cb52 100644 --- a/explorer/webpack.config.js +++ b/explorer/webpack.config.js @@ -16,6 +16,12 @@ module.exports = mergeWithRules({ devtool: 'inline-source-map', module: { rules: [ + { + test: /\.m?js/, + resolve: { + fullySpecified: false, + }, + }, { test: /\.tsx?$/, use: 'ts-loader', diff --git a/yarn.lock b/yarn.lock index 5f49794e06..9b37189b65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1267,6 +1267,26 @@ bfs-path "^1.0.2" cross-fetch "^3.1.5" +"@chain-registry/cosmostation@1.26.0": + version "1.26.0" + resolved "https://registry.yarnpkg.com/@chain-registry/cosmostation/-/cosmostation-1.26.0.tgz#0d3967b8d320168a5c9c7b56b3352dcf3f2945b0" + integrity sha512-MmjThpQ0U0EJF66UJzPy67iKC9hY7ljrpGtQOPfeYGB/lUlKZTsE/mgF2XkKGUf7wJK8LugOqU5Zul7C1/ZA4Q== + dependencies: + "@babel/runtime" "^7.21.0" + "@chain-registry/types" "^0.17.0" + "@chain-registry/utils" "^1.15.0" + "@cosmostation/extension-client" "0.1.15" + +"@chain-registry/cosmostation@^1.26.0": + version "1.32.1" + resolved "https://registry.yarnpkg.com/@chain-registry/cosmostation/-/cosmostation-1.32.1.tgz#bdf079a4f45b5c884a33c48fb0b8d4eeaa26a743" + integrity sha512-U8YUkXKWQWmBbAJILXYqEFMnYES4fs+t8iriy6LucSyhICUs1nniMlulm04PYuiIy+bX0BpP5nlNp/CK/yzQkw== + dependencies: + "@babel/runtime" "^7.21.0" + "@chain-registry/types" "^0.18.1" + "@chain-registry/utils" "^1.18.2" + "@cosmostation/extension-client" "0.1.15" + "@chain-registry/keplr@1.28.0": version "1.28.0" resolved "https://registry.yarnpkg.com/@chain-registry/keplr/-/keplr-1.28.0.tgz#c53d52ff0487eb6798722eb1cf5bd4dc82a141be" @@ -1292,6 +1312,23 @@ dependencies: "@babel/runtime" "^7.21.0" +"@chain-registry/types@^0.18.1": + version "0.18.1" + resolved "https://registry.yarnpkg.com/@chain-registry/types/-/types-0.18.1.tgz#bd926ddf204f2ae986a79b42f0cfe85764e2977a" + integrity sha512-H/UnOyd7WdcWHa2FGKxy4MclDDFrbE2rFwaUh9oubNJOey7UBI4dNF10oZIWM/1by15LUgDz45fVbh6uA6W5Tg== + dependencies: + "@babel/runtime" "^7.21.0" + +"@chain-registry/utils@^1.15.0", "@chain-registry/utils@^1.18.2": + version "1.18.2" + resolved "https://registry.yarnpkg.com/@chain-registry/utils/-/utils-1.18.2.tgz#fa67e8179afad45011c031a1181824133412e6c6" + integrity sha512-X1vBFxdMVRGFW/6fLUQgJ4aG/2RaDYDDEeDA5/x/MlssGtdSBEyytd7M9zO0uS51QYy1ysIhkG3OyZLoyGdurg== + dependencies: + "@babel/runtime" "^7.21.0" + "@chain-registry/types" "^0.18.1" + bignumber.js "9.1.1" + sha.js "^2.4.11" + "@chain-registry/utils@^1.18.0": version "1.18.0" resolved "https://registry.yarnpkg.com/@chain-registry/utils/-/utils-1.18.0.tgz#d711efc2660b3b65077a5bee90b45ddc6af2194f" @@ -1893,6 +1930,32 @@ events "3.3.0" uuid "^9.0.1" +"@cosmos-kit/cosmostation-extension@^2.7.10": + version "2.7.10" + resolved "https://registry.yarnpkg.com/@cosmos-kit/cosmostation-extension/-/cosmostation-extension-2.7.10.tgz#2120fa826c692732e7c539a35141df0f8e832876" + integrity sha512-x0rBk4Ht6uicfZxIXRbwUi5WHrvKsI11oXbf9bYL9nRBfRTgpbO6zIW9791oTVjiJLzHbKaBQoqh1R233YcHbg== + dependencies: + "@chain-registry/cosmostation" "^1.26.0" + "@cosmos-kit/core" "^2.8.9" + cosmjs-types "^0.9.0" + +"@cosmos-kit/cosmostation-mobile@^2.6.9": + version "2.6.9" + resolved "https://registry.yarnpkg.com/@cosmos-kit/cosmostation-mobile/-/cosmostation-mobile-2.6.9.tgz#1c304ac12cccc05de93c9ed927243d51087426f6" + integrity sha512-GjZetNMFrz2oLisdp14ahxftkwPz5v1OYRGvD4MLTdMSA71JUTzX8A4At4uo4M7nwG09H1yQ2/CLQy9XGVRinA== + dependencies: + "@chain-registry/cosmostation" "1.26.0" + "@cosmos-kit/core" "^2.8.9" + "@cosmos-kit/walletconnect" "^2.5.9" + +"@cosmos-kit/cosmostation@^2.6.10": + version "2.6.10" + resolved "https://registry.yarnpkg.com/@cosmos-kit/cosmostation/-/cosmostation-2.6.10.tgz#406d93a29c154e988f4d60425d8edbba4f0cd455" + integrity sha512-DWR28fnkv04yr5Eyo/CS7yOiYr3cwld9lE/F2qGIYGb2Tw/eUWhKSl05+2ly8S15xoKOXT7wxXOsFIXYYUQ8/g== + dependencies: + "@cosmos-kit/cosmostation-extension" "^2.7.10" + "@cosmos-kit/cosmostation-mobile" "^2.6.9" + "@cosmos-kit/keplr-extension@^2.7.9": version "2.7.9" resolved "https://registry.yarnpkg.com/@cosmos-kit/keplr-extension/-/keplr-extension-2.7.9.tgz#16586c94452a5e65713cdead07446447c511fa0e" @@ -1958,6 +2021,11 @@ "@walletconnect/utils" "^2.9.0" events "3.3.0" +"@cosmostation/extension-client@0.1.15": + version "0.1.15" + resolved "https://registry.yarnpkg.com/@cosmostation/extension-client/-/extension-client-0.1.15.tgz#cdc6d8fce42217704c1c0d5814f0ee7ce27e8dab" + integrity sha512-HlXYJjFrNpjiV/GUKhri1UL8/bhlOIFFLpRF78YDSqq16x0+plIqx5CAvEusFcKTDpVfpeD5sfUHiKvP7euNFg== + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -3391,6 +3459,11 @@ resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.10.0.tgz#7410a51d0f8be631eec9552f01b2e5946285927c" integrity sha512-5iV2NKZnzxJwZZ4DM5JVbRG/nkhAbzEskKaLBB82PmYGKzaDHuMHP1lcPoD/rtYMlowZgNA/RQndfKvPBPwmXA== +"@nymproject/contract-clients@^1.2.4-rc.1": + version "1.2.4-rc.1" + resolved "https://registry.yarnpkg.com/@nymproject/contract-clients/-/contract-clients-1.2.4-rc.1.tgz#10b385f63d8b33beea6bf47d948fc7cc0c6c2357" + integrity sha512-WMiEIHNxc9oTZ8GxAE8278ifpNJ2AIZHEw4JifN1WRhn2XViYaDDJaPCA3o0p+WGRySmqdurHmployr3iUEz1Q== + "@nymproject/node-tester@^1.0.0", "@nymproject/node-tester@^1.2.3": version "1.2.3" resolved "https://registry.yarnpkg.com/@nymproject/node-tester/-/node-tester-1.2.3.tgz#79fbde8b69e2d1180eed897557c4610a1aa1038f"