diff --git a/example/starter/public/assets/wallet-icon-station.svg b/example/starter/public/assets/wallet-icon-station.svg new file mode 100644 index 00000000..549c4473 --- /dev/null +++ b/example/starter/public/assets/wallet-icon-station.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/example/starter/src/utils/graz.ts b/example/starter/src/utils/graz.ts index bec4b5da..303ce2fc 100644 --- a/example/starter/src/utils/graz.ts +++ b/example/starter/src/utils/graz.ts @@ -26,6 +26,10 @@ export const listedWallets = { name: "Vectis", imgSrc: "/assets/wallet-icon-vectis.svg", }, + [WalletType.STATION]: { + name: "Station", + imgSrc: "/assets/wallet-icon-station.svg", + }, [WalletType.METAMASK_SNAP_LEAP]: { name: "Metamask Snap Leap", imgSrc: "/assets/wallet-icon-metamask.png", diff --git a/packages/graz-adapter-station/.eslintrc.js b/packages/graz-adapter-station/.eslintrc.js new file mode 100644 index 00000000..f5d493c3 --- /dev/null +++ b/packages/graz-adapter-station/.eslintrc.js @@ -0,0 +1,8 @@ +// @ts-check + +const { extendEslint } = require("@graz-sh/style-guide"); + +module.exports = extendEslint(["browser-node", "react", "typescript", "tsup"], { + ignorePatterns: ["dist/**"], + root: true, +}); diff --git a/packages/graz-adapter-station/.gitignore b/packages/graz-adapter-station/.gitignore new file mode 100644 index 00000000..319962b7 --- /dev/null +++ b/packages/graz-adapter-station/.gitignore @@ -0,0 +1,4 @@ +/chains/* +/dist/**/* +!/chains/*.stub +!/dist/**/.gitkeep diff --git a/packages/graz-adapter-station/LICENSE b/packages/graz-adapter-station/LICENSE new file mode 100644 index 00000000..0d962460 --- /dev/null +++ b/packages/graz-adapter-station/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Graz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/graz-adapter-station/README.md b/packages/graz-adapter-station/README.md new file mode 100644 index 00000000..e6c1fdab --- /dev/null +++ b/packages/graz-adapter-station/README.md @@ -0,0 +1,9 @@ +# graz-adapter-station + +[![npm/v](https://badgen.net/npm/v/graz-adapter-station)](https://www.npmjs.com/package/graz-adapter-station) +[![npm/dt](https://badgen.net/npm/dt/graz-adapter-station)](https://www.npmjs.com/package/graz-adapter-station) +[![stars](https://badgen.net/github/stars/graz-sh/graz)](https://github.com/graz-sh/graz) + +React hooks for Cosmos. Learn more about graz on the [official GitHub repository](https://github.com/graz-sh/graz). + +[MIT License, Copyright (c) 2023 Graz](./LICENSE) diff --git a/packages/graz-adapter-station/dist/.gitkeep b/packages/graz-adapter-station/dist/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/packages/graz-adapter-station/env.d.ts b/packages/graz-adapter-station/env.d.ts new file mode 100644 index 00000000..897a7eed --- /dev/null +++ b/packages/graz-adapter-station/env.d.ts @@ -0,0 +1,6 @@ +import Station from "@terra-money/station-connector"; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +declare interface Window { + station?: Station; +} diff --git a/packages/graz-adapter-station/package.json b/packages/graz-adapter-station/package.json new file mode 100644 index 00000000..033510bb --- /dev/null +++ b/packages/graz-adapter-station/package.json @@ -0,0 +1,39 @@ +{ + "name": "graz-adapter-station", + "description": "Graz adapter for Station Wallet", + "version": "0.0.2", + "repository": "https://github.com/graz-sh/graz.git", + "homepage": "https://github.com/graz-sh/graz", + "bugs": "https://github.com/graz-sh/graz/issues", + "files": [ + "dist/*.d.ts", + "dist/*.js", + "dist/*.mjs" + ], + "sideEffects": false, + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "lint": "eslint --fix \"src/**/*.{ts,tsx}\"", + "prepublishOnly": "pnpm build" + }, + "peerDependencies": { + "graz": ">=0.0.37" + }, + "devDependencies": { + "graz": "*", + "typescript": "^5.2.2" + }, + "keywords": [ + "graz", + "graz-adapter", + "graz-adapter-station", + "station-wallet", + "station", + "use-station" + ], + "license": "MIT", + "dependencies": { + "@terra-money/station-connector": "^1.0.15" + } +} diff --git a/packages/graz-adapter-station/src/index.ts b/packages/graz-adapter-station/src/index.ts new file mode 100644 index 00000000..a91cebd1 --- /dev/null +++ b/packages/graz-adapter-station/src/index.ts @@ -0,0 +1,149 @@ +import type { ChainInfo } from "@keplr-wallet/types"; +import type { AccountData, GrazAdapter } from "graz"; +import { SignDoc } from "cosmjs-types/cosmos/tx/v1beta1/tx"; +import { DirectSignResponse } from "@cosmjs/proto-signing"; +import { ChainInfoResponse } from "@terra-money/station-connector/keplrConnector"; + +export class StationAdapter implements GrazAdapter { + name = "Station"; + id = "station"; + keystoreEvent = "station_wallet_change"; + + private getConnector() { + if (typeof window.station !== "undefined") return window.station.keplr; + throw new Error("window.keplr is not defined"); + } + + checkConnector() { + try { + this.getConnector(); + return true; + } catch (error) { + console.error(error); + return false; + } + } + + async enable(chainId: string) { + try { + const isAvailable = this.checkConnector(); + if (!isAvailable) { + throw new Error("Station is not available"); + } + await this.getConnector().enable(chainId); + } catch (error) { + console.error(error); + throw error; + } + } + + async experimentalSuggestChain(chainInfo: ChainInfo) { + try { + const isAvailable = this.checkConnector(); + if (!isAvailable) { + throw new Error("Station is not available"); + } + + const chainInfoResponse: ChainInfoResponse = Object.assign(chainInfo, { + chainSymbolImageUrl: chainInfo.chainSymbolImageUrl || "", + stakeCurrency: { + coinDecimals: chainInfo.stakeCurrency.coinDecimals, + coinDenom: chainInfo.stakeCurrency.coinDenom, + coinImageUrl: chainInfo.stakeCurrency.coinImageUrl || "", + coinMinimalDenom: chainInfo.stakeCurrency.coinMinimalDenom, + }, + currencies: chainInfo.currencies.map((currency) => ({ + coinDecimals: currency.coinDecimals, + coinDenom: currency.coinDenom, + coinImageUrl: currency.coinImageUrl || "", + coinMinimalDenom: currency.coinMinimalDenom, + })), + feeCurrencies: chainInfo.feeCurrencies.map((currency) => ({ + coinDecimals: currency.coinDecimals, + coinDenom: currency.coinDenom, + coinImageUrl: currency.coinImageUrl || "", + coinMinimalDenom: currency.coinMinimalDenom, + gasPriceStep: { + average: currency.gasPriceStep?.average || 0, + high: currency.gasPriceStep?.high || 0, + low: currency.gasPriceStep?.low || 0, + }, + })), + }); + + await this.getConnector().experimentalSuggestChain(chainInfoResponse); + } catch (error) { + console.error(error); + throw error; + } + } + + async getAccount(chainId: string, prefix?: string): Promise { + try { + const isAvailable = this.checkConnector(); + if (!isAvailable) { + throw new Error("Station is not available"); + } + const key = await this.getConnector().getKey(chainId); + return { + address: key.address, + bech32Address: key.bech32Address, + pubKey: key.pubKey, + algo: key.algo, + }; + } catch (error) { + console.error(error); + throw error; + } + } + + getOfflineSigner(chainId: string) { + try { + const isAvailable = this.checkConnector(); + if (!isAvailable) { + throw new Error("Station is not available"); + } + const signerOnlyAmino = this.getConnector().getOfflineSignerOnlyAmino(chainId); + const signDirect: (signerAddress: string, signDoc: SignDoc) => Promise = async ( + signerAddress: string, + signDoc: SignDoc, + ) => { + throw new Error("signDirect not supported by Station"); + }; + const signer = Object.assign(signerOnlyAmino, { signDirect }); + + return signer; + } catch (error) { + console.error(error); + throw error; + } + } + + getOfflineSignerOnlyAmino(chainId: string) { + try { + const isAvailable = this.checkConnector(); + if (!isAvailable) { + throw new Error("Station is not available"); + } + const signer = this.getConnector().getOfflineSignerOnlyAmino(chainId); + return signer; + } catch (error) { + console.error(error); + throw error; + } + } + + async getOfflineSignerAuto(chainId: string) { + try { + const isAvailable = this.checkConnector(); + if (!isAvailable) { + throw new Error("Station is not available"); + } + const signer = await this.getConnector().getOfflineSignerAuto(chainId); + return signer; + } catch (error) { + console.error(error); + throw error; + } + } +} diff --git a/packages/graz-adapter-station/tsconfig.json b/packages/graz-adapter-station/tsconfig.json new file mode 100644 index 00000000..6c60b94d --- /dev/null +++ b/packages/graz-adapter-station/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@graz-sh/style-guide/tsconfig.json", + "compilerOptions": { + "moduleResolution": "node", + "resolveJsonModule": true + }, + "exclude": ["node_modules"], + "include": ["env.d.ts", "**/*.ts", "**/*.tsx"] +} diff --git a/packages/graz-adapter-station/tsup.config.ts b/packages/graz-adapter-station/tsup.config.ts new file mode 100644 index 00000000..57f3e09a --- /dev/null +++ b/packages/graz-adapter-station/tsup.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "tsup"; + +export default defineConfig(({ watch }) => ({ + cjsInterop: true, + clean: !watch, + dts: true, + entry: ["src/*.ts"], + format: ["cjs", "esm"], + minify: !watch, + shims: true, + splitting: true, + treeshake: true, +})); diff --git a/packages/graz/package.json b/packages/graz/package.json index 1421cdc0..cb79031f 100644 --- a/packages/graz/package.json +++ b/packages/graz/package.json @@ -61,6 +61,7 @@ "@keplr-wallet/types": "^0.12.23", "@metamask/providers": "^12.0.0", "@tanstack/react-query": "^4.35.0", + "@terra-money/station-connector": "^1.0.15", "@vectis/extension-client": "^0.7.2", "@walletconnect/sign-client": "^2.10.0", "@walletconnect/types": "^2.10.0", diff --git a/packages/graz/src/actions/wallet/cosmostation.ts b/packages/graz/src/actions/wallet/cosmostation.ts index 83f18b8e..5f9f175b 100644 --- a/packages/graz/src/actions/wallet/cosmostation.ts +++ b/packages/graz/src/actions/wallet/cosmostation.ts @@ -19,16 +19,14 @@ import { clearSession } from "."; export const getCosmostation = (): Wallet => { if (typeof window.cosmostation.providers.keplr !== "undefined") { const cosmostation = window.cosmostation.providers.keplr; - const subscription: (reconnect: () => void) => void = (reconnect) => { - window.cosmostation.cosmos.on("accountChanged", () => { + const subscription: (reconnect: () => void) => () => void = (reconnect) => { + const listener = () => { clearSession(); reconnect(); - }); + }; + window.cosmostation.cosmos.on("accountChanged", listener); return () => { - window.cosmostation.cosmos.off("accountChanged", () => { - clearSession(); - reconnect(); - }); + window.cosmostation.cosmos.off("accountChanged", listener); }; }; const res = Object.assign(cosmostation, { diff --git a/packages/graz/src/actions/wallet/index.ts b/packages/graz/src/actions/wallet/index.ts index ca92cc36..5eb9609f 100644 --- a/packages/graz/src/actions/wallet/index.ts +++ b/packages/graz/src/actions/wallet/index.ts @@ -11,6 +11,7 @@ import { getWalletConnect } from "./wallet-connect"; import { getWCCosmostation } from "./wallet-connect/cosmostation"; import { getWCKeplr } from "./wallet-connect/keplr"; import { getWCLeap } from "./wallet-connect/leap"; +import { getStation } from "./station"; /** * Function to check whether given {@link WalletType} or default configured wallet exists. @@ -76,6 +77,9 @@ export const getWallet = (type: WalletType = useGrazInternalStore.getState().wal case WalletType.METAMASK_SNAP_LEAP: { return getMetamaskSnapLeap(); } + case WalletType.STATION: { + return getStation(); + } default: { throw new Error("Unknown wallet type"); } diff --git a/packages/graz/src/actions/wallet/keplr.ts b/packages/graz/src/actions/wallet/keplr.ts index e3487ba1..eebc4176 100644 --- a/packages/graz/src/actions/wallet/keplr.ts +++ b/packages/graz/src/actions/wallet/keplr.ts @@ -19,16 +19,14 @@ import { clearSession } from "."; export const getKeplr = (): Wallet => { if (typeof window.keplr !== "undefined") { const keplr = window.keplr; - const subscription: (reconnect: () => void) => void = (reconnect) => { - window.addEventListener("keplr_keystorechange", () => { + const subscription: (reconnect: () => void) => () => void = (reconnect) => { + const listener = () => { clearSession(); reconnect(); - }); + }; + window.addEventListener("keplr_keystorechange", listener); return () => { - window.removeEventListener("keplr_keystorechange", () => { - clearSession(); - reconnect(); - }); + window.removeEventListener("keplr_keystorechange", listener); }; }; const res = Object.assign(keplr, { diff --git a/packages/graz/src/actions/wallet/leap.ts b/packages/graz/src/actions/wallet/leap.ts index 89eed3e9..8575c8e3 100644 --- a/packages/graz/src/actions/wallet/leap.ts +++ b/packages/graz/src/actions/wallet/leap.ts @@ -19,16 +19,14 @@ import { clearSession } from "."; export const getLeap = (): Wallet => { if (typeof window.leap !== "undefined") { const leap = window.leap; - const subscription: (reconnect: () => void) => void = (reconnect) => { - window.addEventListener("leap_keystorechange", () => { + const subscription: (reconnect: () => void) => () => void = (reconnect) => { + const listener = () => { clearSession(); reconnect(); - }); + }; + window.addEventListener("leap_keystorechange", listener); return () => { - window.removeEventListener("leap_keystorechange", () => { - clearSession(); - reconnect(); - }); + window.removeEventListener("leap_keystorechange", listener); }; }; const res = Object.assign(leap, { diff --git a/packages/graz/src/actions/wallet/station.ts b/packages/graz/src/actions/wallet/station.ts new file mode 100644 index 00000000..41c30ee9 --- /dev/null +++ b/packages/graz/src/actions/wallet/station.ts @@ -0,0 +1,113 @@ +import type { ChainInfo, DirectSignResponse, KeplrSignOptions, Key, SignDoc, StdSignDoc } from "@keplr-wallet/types"; +import type { ChainInfoResponse } from "@terra-money/station-connector/keplrConnector"; + +import { useGrazInternalStore } from "../../store"; +import type { Wallet } from "../../types/wallet"; +import { clearSession } from "."; + +/** + * Function to return Station object (which is {@link Wallet}) and throws and error if it does not exist on `window`. + * + * @example + * ```ts + * try { + * const station = getStation(); + * } catch (error: Error) { + * console.error(error.message); + * } + * ``` + */ +export const getStation = (): Wallet => { + if (typeof window.station !== "undefined") { + const station = window.station.keplr; + + const subscription: (reconnect: () => void) => () => void = (reconnect) => { + const listener = () => { + clearSession(); + reconnect(); + }; + window.addEventListener("station_wallet_change", listener); + return () => { + window.removeEventListener("station_wallet_change", listener); + }; + }; + + const getKey = async (chainId: string): Promise => { + const key = await station.getKey(chainId); + return { + isKeystone: false, + ...key, + }; + }; + + const getOfflineSigner = (chainId: string) => { + try { + const signerOnlyAmino = station.getOfflineSignerOnlyAmino(chainId); + const signDirect: (signerAddress: string, signDoc: SignDoc) => Promise = ( + _signerAddress: string, + _signDoc: SignDoc, + ) => { + throw new Error("signDirect not supported by Station"); + }; + const signer = Object.assign(signerOnlyAmino, { signDirect }); + + return signer; + } catch (error) { + console.error(error); + throw error; + } + }; + + const experimentalSuggestChain = async (chainInfo: ChainInfo) => { + try { + const chainInfoResponse: ChainInfoResponse = Object.assign(chainInfo, { + chainSymbolImageUrl: chainInfo.chainSymbolImageUrl || "", + stakeCurrency: { + coinDecimals: chainInfo.stakeCurrency.coinDecimals, + coinDenom: chainInfo.stakeCurrency.coinDenom, + coinImageUrl: chainInfo.stakeCurrency.coinImageUrl || "", + coinMinimalDenom: chainInfo.stakeCurrency.coinMinimalDenom, + }, + currencies: chainInfo.currencies.map((currency) => ({ + coinDecimals: currency.coinDecimals, + coinDenom: currency.coinDenom, + coinImageUrl: currency.coinImageUrl || "", + coinMinimalDenom: currency.coinMinimalDenom, + })), + feeCurrencies: chainInfo.feeCurrencies.map((currency) => ({ + coinDecimals: currency.coinDecimals, + coinDenom: currency.coinDenom, + coinImageUrl: currency.coinImageUrl || "", + coinMinimalDenom: currency.coinMinimalDenom, + gasPriceStep: { + average: currency.gasPriceStep?.average || 0, + high: currency.gasPriceStep?.high || 0, + low: currency.gasPriceStep?.low || 0, + }, + })), + }); + + await station.experimentalSuggestChain(chainInfoResponse); + } catch (error) { + console.error(error); + throw error; + } + }; + + return { + subscription, + getKey, + getOfflineSigner, + experimentalSuggestChain, + enable: (chainIds: string | string[]) => station.enable(chainIds), + getOfflineSignerAuto: (chainId: string) => station.getOfflineSignerAuto(chainId), + getOfflineSignerOnlyAmino: (chainId: string) => station.getOfflineSignerOnlyAmino(chainId), + signDirect: () => station.signDirect(), + signAmino: (chainId: string, signer: string, signDoc: StdSignDoc, _signOptions?: KeplrSignOptions) => + station.signAmino(chainId, signer, signDoc), + }; + } + + useGrazInternalStore.getState()._notFoundFn(); + throw new Error("window.station is not defined"); +}; diff --git a/packages/graz/src/actions/wallet/vectis.ts b/packages/graz/src/actions/wallet/vectis.ts index 4cb633bb..b71c07c7 100644 --- a/packages/graz/src/actions/wallet/vectis.ts +++ b/packages/graz/src/actions/wallet/vectis.ts @@ -26,16 +26,14 @@ import { clearSession } from "."; export const getVectis = (): Wallet => { if (typeof window.vectis !== "undefined") { const vectis = window.vectis.cosmos; - const subscription: (reconnect: () => void) => void = (reconnect) => { - window.addEventListener("vectis_accountChanged", () => { + const subscription: (reconnect: () => void) => () => void = (reconnect) => { + const listener = () => { clearSession(); reconnect(); - }); + }; + window.addEventListener("vectis_accountChanged", listener); return () => { - window.removeEventListener("vectis_accountChanged", () => { - clearSession(); - reconnect(); - }); + window.removeEventListener("vectis_accountChanged", listener); }; }; const getOfflineSignerOnlyAmino = (...args: Parameters) => { diff --git a/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts b/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts index 6a988939..862b1739 100644 --- a/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts +++ b/packages/graz/src/actions/wallet/wallet-connect/cosmostation.ts @@ -10,7 +10,7 @@ export const getWCCosmostation = (): Wallet => { throw new Error("walletConnect.options.projectId is not defined"); } - if (!isMobile()) throw new Error("WalletConnect Leap mobile is only supported in mobile"); + if (!isMobile()) throw new Error("WalletConnect Cosmostation mobile is only supported in mobile"); const params: GetWalletConnectParams = { encoding: "hex", @@ -20,7 +20,7 @@ export const getWCCosmostation = (): Wallet => { android: "cosmostation://", }, }, - walletType: WalletType.WC_LEAP_MOBILE, + walletType: WalletType.WC_COSMOSTATION_MOBILE, formatNativeUrl: (appUrl, wcUri, _os) => { const plainAppUrl = appUrl.replaceAll("/", "").replaceAll(":", ""); return `${plainAppUrl}://wc?${wcUri}`; diff --git a/packages/graz/src/actions/wallet/wallet-connect/index.ts b/packages/graz/src/actions/wallet/wallet-connect/index.ts index aa82f1a6..b7537bc2 100644 --- a/packages/graz/src/actions/wallet/wallet-connect/index.ts +++ b/packages/graz/src/actions/wallet/wallet-connect/index.ts @@ -146,9 +146,10 @@ export const getWalletConnect = (params?: GetWalletConnectParams): Wallet => { return signClient; }; - const subscription: (reconnect: () => void) => void = (reconnect) => { + const subscription: (reconnect: () => void) => () => void = (reconnect) => { const { wcSignClient } = useGrazSessionStore.getState(); - if (!wcSignClient) return; + // eslint-disable-next-line @typescript-eslint/no-empty-function + if (!wcSignClient) return () => {}; wcSignClient.events.on("session_delete", (_) => { _disconnect(); @@ -274,9 +275,13 @@ export const getWalletConnect = (params?: GetWalletConnectParams): Wallet => { return resolve(d); }) .catch(reject); - signal.addEventListener("abort", () => { - reject(new Error("User closed wallet connect")); - }); + signal.addEventListener( + "abort", + () => { + reject(new Error("User closed wallet connect")); + }, + { once: true }, + ); }); }; diff --git a/packages/graz/src/actions/wallet/wallet-connect/types.ts b/packages/graz/src/actions/wallet/wallet-connect/types.ts index af400c74..ca3eee1c 100644 --- a/packages/graz/src/actions/wallet/wallet-connect/types.ts +++ b/packages/graz/src/actions/wallet/wallet-connect/types.ts @@ -16,7 +16,7 @@ export interface WalletConnectSignDirectResponse { export interface GetWalletConnectParams { encoding: BufferEncoding; - walletType: WalletType.WC_KEPLR_MOBILE | WalletType.WC_LEAP_MOBILE; + walletType: WalletType.WC_KEPLR_MOBILE | WalletType.WC_LEAP_MOBILE | WalletType.WC_COSMOSTATION_MOBILE; appUrl: { mobile: { ios: string; diff --git a/packages/graz/src/hooks/wallet.ts b/packages/graz/src/hooks/wallet.ts index d8157e0b..c96d8d73 100644 --- a/packages/graz/src/hooks/wallet.ts +++ b/packages/graz/src/hooks/wallet.ts @@ -28,6 +28,7 @@ export const useActiveWalletType = () => { isVectis: x.walletType === WalletType.VECTIS, isWalletConnect: x.walletType === WalletType.WALLETCONNECT, isMetamaskSnapLeap: x.walletType === WalletType.METAMASK_SNAP_LEAP, + isStation: x.walletType === WalletType.STATION, }), shallow, ); diff --git a/packages/graz/src/provider/events.tsx b/packages/graz/src/provider/events.tsx index bd7d17b6..3deaabec 100644 --- a/packages/graz/src/provider/events.tsx +++ b/packages/graz/src/provider/events.tsx @@ -11,6 +11,7 @@ import { getWalletConnect } from "../actions/wallet/wallet-connect"; import { RECONNECT_SESSION_KEY } from "../constant"; import { useGrazInternalStore, useGrazSessionStore } from "../store"; import { WalletType } from "../types/wallet"; +import { getStation } from "../actions/wallet/station"; /** * Graz custom hook to track `keplr_keystorechange`, `leap_keystorechange`, `accountChanged` event and reconnect state @@ -75,6 +76,11 @@ export const useGrazEvents = () => { }); } } + if (_reconnectConnector === WalletType.STATION) { + getStation().subscription?.(() => { + void reconnect({ onError: _onReconnectFailed }); + }); + } } // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/packages/graz/src/types/wallet.ts b/packages/graz/src/types/wallet.ts index b451236f..4e1da3e1 100644 --- a/packages/graz/src/types/wallet.ts +++ b/packages/graz/src/types/wallet.ts @@ -14,6 +14,7 @@ export enum WalletType { WC_COSMOSTATION_MOBILE = "wc_cosmostation_mobile", // eslint-disable-next-line @typescript-eslint/naming-convention METAMASK_SNAP_LEAP = "metamask_snap_leap", + STATION = "station", } export const WALLET_TYPES = [ @@ -26,6 +27,7 @@ export const WALLET_TYPES = [ WalletType.WC_LEAP_MOBILE, WalletType.WC_COSMOSTATION_MOBILE, WalletType.METAMASK_SNAP_LEAP, + WalletType.STATION, ]; export type Wallet = Pick< @@ -39,7 +41,7 @@ export type Wallet = Pick< | "signDirect" | "signAmino" > & { - subscription?: (reconnect: () => void) => void; + subscription?: (reconnect: () => void) => () => void; init?: () => Promise; }; diff --git a/packages/graz/types/global.d.ts b/packages/graz/types/global.d.ts index 52c2fc41..811951d5 100644 --- a/packages/graz/types/global.d.ts +++ b/packages/graz/types/global.d.ts @@ -1,16 +1,20 @@ type KeplrWindow = import("@keplr-wallet/types").Window; type VectisWindow = import("@vectis/extension-client").VectisWindow; +import Station from "@terra-money/station-connector"; -interface Window extends KeplrWindow, VectisWindow { - leap: KeplrWindow["keplr"]; - cosmostation: { - cosmos: { - on: (type: string, listener: EventListenerOrEventListenerObject) => void; - off: (type: string, listener: EventListenerOrEventListenerObject) => void; +declare global { + interface Window extends KeplrWindow, VectisWindow { + leap: KeplrWindow["keplr"]; + cosmostation: { + cosmos: { + on: (type: string, listener: EventListenerOrEventListenerObject) => void; + off: (type: string, listener: EventListenerOrEventListenerObject) => void; + }; + providers: { + keplr: KeplrWindow["keplr"]; + }; }; - providers: { - keplr: KeplrWindow["keplr"]; - }; - }; - ethereum?: import("@metamask/providers").MetaMaskInpageProvider; + ethereum?: import("@metamask/providers").MetaMaskInpageProvider; + station?: Station; + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 567d7d95..1e4a330b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -126,7 +126,7 @@ importers: version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.21)(react@18.2.0) '@graz-sh/types': specifier: ^0.0.4 - version: 0.0.4(long@4.0.0) + version: 0.0.4(long@5.2.3) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -240,6 +240,9 @@ importers: '@tanstack/react-query': specifier: ^4.35.0 version: 4.35.0(react@18.2.0) + '@terra-money/station-connector': + specifier: ^1.0.15 + version: 1.0.15(@cosmjs/amino@0.31.0)(@terra-money/feather.js@1.2.1)(axios@0.27.2) '@vectis/extension-client': specifier: ^0.7.2 version: 0.7.2 @@ -308,6 +311,19 @@ importers: specifier: ^5.2.2 version: 5.2.2 + packages/graz-adapter-station: + dependencies: + '@terra-money/station-connector': + specifier: ^1.0.15 + version: 1.0.15(@cosmjs/amino@0.31.0)(@terra-money/feather.js@1.2.1)(axios@0.27.2) + devDependencies: + graz: + specifier: '*' + version: link:../graz + typescript: + specifier: ^5.2.2 + version: 5.2.2 + packages/graz-adapter-vectis: dependencies: '@vectis/extension-client': @@ -4476,7 +4492,7 @@ packages: '@cosmjs/encoding': 0.31.0 '@cosmjs/math': 0.31.0 '@cosmjs/utils': 0.31.0 - '@noble/hashes': 1.3.0 + '@noble/hashes': 1.3.2 bn.js: 5.2.1 elliptic: 6.5.4 libsodium-wrappers-sumo: 0.7.11 @@ -4548,7 +4564,7 @@ packages: dependencies: '@cosmjs/stream': 0.31.0 isomorphic-ws: 4.0.1(ws@7.5.9) - ws: 7.5.9 + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) xstream: 11.14.0 transitivePeerDependencies: - bufferutil @@ -5960,6 +5976,42 @@ packages: micro-ftch: 0.3.1 dev: false + /@ethersproject/abi@5.7.0: + resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + + /@ethersproject/abstract-provider@5.7.0: + resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + dev: false + + /@ethersproject/abstract-signer@5.7.0: + resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + dev: false + /@ethersproject/address@5.7.0: resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} dependencies: @@ -5970,6 +6022,19 @@ packages: '@ethersproject/rlp': 5.7.0 dev: false + /@ethersproject/base64@5.7.0: + resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} + dependencies: + '@ethersproject/bytes': 5.7.0 + dev: false + + /@ethersproject/basex@5.7.0: + resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/properties': 5.7.0 + dev: false + /@ethersproject/bignumber@5.7.0: resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} dependencies: @@ -5984,6 +6049,76 @@ packages: '@ethersproject/logger': 5.7.0 dev: false + /@ethersproject/constants@5.7.0: + resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + dev: false + + /@ethersproject/contracts@5.7.0: + resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + dev: false + + /@ethersproject/hash@5.7.0: + resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + + /@ethersproject/hdnode@5.7.0: + resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + dev: false + + /@ethersproject/json-wallets@5.7.0: + resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + aes-js: 3.0.0 + scrypt-js: 3.0.1 + dev: false + /@ethersproject/keccak256@5.7.0: resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} dependencies: @@ -5995,6 +6130,60 @@ packages: resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} dev: false + /@ethersproject/networks@5.7.1: + resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/pbkdf2@5.7.0: + resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 + dev: false + + /@ethersproject/properties@5.7.0: + resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): + resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + bech32: 1.1.4 + ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + + /@ethersproject/random@5.7.0: + resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: false + /@ethersproject/rlp@5.7.0: resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} dependencies: @@ -6002,6 +6191,106 @@ packages: '@ethersproject/logger': 5.7.0 dev: false + /@ethersproject/sha2@5.7.0: + resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + hash.js: 1.1.7 + dev: false + + /@ethersproject/signing-key@5.7.0: + resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + bn.js: 5.2.1 + elliptic: 6.5.4 + hash.js: 1.1.7 + dev: false + + /@ethersproject/solidity@5.7.0: + resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + + /@ethersproject/strings@5.7.0: + resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/transactions@5.7.0: + resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + dev: false + + /@ethersproject/units@5.7.0: + resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/wallet@5.7.0: + resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + dev: false + + /@ethersproject/web@5.7.1: + resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} + dependencies: + '@ethersproject/base64': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + + /@ethersproject/wordlists@5.7.0: + resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + /@graz-sh/style-guide@4.0.1(eslint@8.49.0)(prettier@3.0.3)(tailwindcss@3.3.3)(typescript@5.2.2): resolution: {integrity: sha512-0vh1v2TbdmDyMT+9QWW2GIsAv81gnUhfBYqH9CzXkwvrbvlNQuo7lawoLQ83ph8TL2CP09q6ZzgQ2g6uzNjGrw==} peerDependencies: @@ -6054,6 +6343,14 @@ packages: long: 4.0.0 dev: false + /@graz-sh/types@0.0.4(long@5.2.3): + resolution: {integrity: sha512-9kj2MzQs5qIzr7eQUPeZv6/5N+To5hauPd7rQ/zmXpXPOhhZ4qDiU0Rceknm4q2ZsG3ed4uEYogd8JzyJI5dQA==} + peerDependencies: + long: '*' + dependencies: + long: 5.2.3 + dev: false + /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} @@ -6079,6 +6376,15 @@ packages: /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@improbable-eng/grpc-web@0.14.1(google-protobuf@3.21.2): + resolution: {integrity: sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==} + peerDependencies: + google-protobuf: ^3.14.0 + dependencies: + browser-headers: 0.4.1 + google-protobuf: 3.21.2 + dev: false + /@jest/schemas@29.4.3: resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6990,6 +7296,66 @@ packages: use-sync-external-store: 1.2.0(react@18.2.0) dev: false + /@terra-money/feather.js@1.2.1: + resolution: {integrity: sha512-OyXkWriNwb0lCF45eMmtjdOPEmfGKJxgGSnxpM7VxD0Vqr1qqtlcYyQG9wOHXNQrExvZv+uo922B2ZA4S77HsQ==} + engines: {node: '>=16'} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@terra-money/legacy.proto': /@terra-money/terra.proto@0.1.7 + '@terra-money/terra.proto': 4.0.4 + assert: 2.0.0 + axios: 0.27.2 + bech32: 2.0.0 + bip32: 2.0.6 + bip39: 3.1.0 + bufferutil: 4.0.8 + crypto-browserify: 3.12.0 + decimal.js: 10.4.3 + ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + jscrypto: 1.0.3 + keccak256: 1.0.6 + long: 5.2.3 + readable-stream: 3.6.2 + secp256k1: 4.0.3 + tmp: 0.2.1 + utf-8-validate: 5.0.10 + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - debug + dev: false + + /@terra-money/station-connector@1.0.15(@cosmjs/amino@0.31.0)(@terra-money/feather.js@1.2.1)(axios@0.27.2): + resolution: {integrity: sha512-iCLXPPmQXyP8egOi7FA3U5MuEeMMrVnUaRiCUrBLuh4QNPCmJar082ilKDEavgkczKXNIqEGCAAT0LVrky/TPA==} + engines: {node: '>=16'} + peerDependencies: + '@cosmjs/amino': ^0.31.0 + '@terra-money/feather.js': ^1.0.8 + axios: ^0.27.2 + dependencies: + '@cosmjs/amino': 0.31.0 + '@terra-money/feather.js': 1.2.1 + axios: 0.27.2 + bech32: 2.0.0 + dev: false + + /@terra-money/terra.proto@0.1.7: + resolution: {integrity: sha512-NXD7f6pQCulvo6+mv6MAPzhOkUzRjgYVuHZE/apih+lVnPG5hDBU0rRYnOGGofwvKT5/jQoOENnFn/gioWWnyQ==} + dependencies: + google-protobuf: 3.21.2 + long: 4.0.0 + protobufjs: 6.11.3 + dev: false + + /@terra-money/terra.proto@4.0.4: + resolution: {integrity: sha512-Xju3ObFvMWXCDpeOXwa+WpmcbvUFOgJ4shSSfbgocnX5q3250aTaIAaycxkArUtg1QoqV4B5qoboRAplMHYDZw==} + dependencies: + '@improbable-eng/grpc-web': 0.14.1(google-protobuf@3.21.2) + browser-headers: 0.4.1 + google-protobuf: 3.21.2 + long: 4.0.0 + protobufjs: 6.11.3 + dev: false + /@trysound/sax@0.2.0: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} @@ -7587,7 +7953,7 @@ packages: '@walletconnect/safe-json': 1.0.2 events: 3.3.0 tslib: 1.14.1 - ws: 7.5.9 + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -7896,6 +8262,10 @@ packages: engines: {node: '>= 10.0.0'} dev: false + /aes-js@3.0.0: + resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + dev: false + /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -8159,7 +8529,6 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 safer-buffer: 2.1.2 - dev: true /assert@2.0.0: resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} @@ -8168,7 +8537,6 @@ packages: is-nan: 1.3.2 object-is: 1.1.5 util: 0.12.5 - dev: true /ast-types-flow@0.0.7: resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} @@ -8180,6 +8548,10 @@ packages: has-symbols: 1.0.3 dev: true + /asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: false + /at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} @@ -8225,7 +8597,6 @@ packages: /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - dev: true /axe-core@4.8.0: resolution: {integrity: sha512-ZtlVZobOeDQhb/y2lMK6mznDw7TJHDNcKx5/bbBkFvArIQ5CVFhSI6hWWQnMx9I8cNmNmZ30wpDyOC2E2nvgbQ==} @@ -8248,6 +8619,15 @@ packages: - debug dev: false + /axios@0.27.2: + resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + dependencies: + follow-redirects: 1.15.2 + form-data: 4.0.0 + transitivePeerDependencies: + - debug + dev: false + /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} dependencies: @@ -8400,6 +8780,10 @@ packages: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} dev: false + /bech32@2.0.0: + resolution: {integrity: sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==} + dev: false + /big-integer@1.6.51: resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} engines: {node: '>=0.6'} @@ -8438,7 +8822,7 @@ packages: /bip39@3.1.0: resolution: {integrity: sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==} dependencies: - '@noble/hashes': 1.3.0 + '@noble/hashes': 1.3.2 dev: false /bn.js@4.12.0: @@ -8530,6 +8914,10 @@ packages: /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + /browser-headers@0.4.1: + resolution: {integrity: sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==} + dev: false + /browser-resolve@2.0.0: resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==} dependencies: @@ -8545,7 +8933,6 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true /browserify-cipher@1.0.1: resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} @@ -8553,7 +8940,6 @@ packages: browserify-aes: 1.2.0 browserify-des: 1.0.2 evp_bytestokey: 1.0.3 - dev: true /browserify-des@1.0.2: resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} @@ -8562,14 +8948,12 @@ packages: des.js: 1.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true /browserify-rsa@4.1.0: resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} dependencies: bn.js: 5.2.1 randombytes: 2.1.0 - dev: true /browserify-sign@4.2.1: resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} @@ -8583,7 +8967,6 @@ packages: parse-asn1: 5.1.6 readable-stream: 3.6.2 safe-buffer: 5.2.1 - dev: true /browserify-zlib@0.2.0: resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} @@ -8641,7 +9024,6 @@ packages: /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: true /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -8657,6 +9039,14 @@ packages: ieee754: 1.2.1 dev: false + /bufferutil@4.0.8: + resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} + engines: {node: '>=6.14.2'} + requiresBuild: true + dependencies: + node-gyp-build: 4.7.0 + dev: false + /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} @@ -8721,7 +9111,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -8975,6 +9365,13 @@ packages: engines: {node: '>=10'} dev: false + /combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: false + /comma-separated-tokens@1.0.8: resolution: {integrity: sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==} dev: false @@ -9181,7 +9578,7 @@ packages: resolution: {integrity: sha512-WIdaQ8uW1vIbYvNnAVunkC6yxTrneJC7VQ5UUQ0kuw8b0C0A39KTIpoQHCfc8tV7o9vF4niwRhdXEdfAgQEsQQ==} dependencies: cosmos-directory-types: 0.0.6 - node-fetch-native: 1.4.0 + node-fetch-native: 1.4.1 dev: false /cosmos-directory-types@0.0.6: @@ -9199,7 +9596,6 @@ packages: dependencies: bn.js: 4.12.0 elliptic: 6.5.4 - dev: true /create-hash@1.2.0: resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} @@ -9254,7 +9650,6 @@ packages: public-encrypt: 4.0.3 randombytes: 2.1.0 randomfill: 1.0.4 - dev: true /crypto-js@4.1.1: resolution: {integrity: sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==} @@ -9565,6 +9960,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /decimal.js@10.4.3: + resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + dev: false + /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} @@ -9655,6 +10054,11 @@ packages: engines: {node: '>=6'} dev: false + /delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: false + /depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} engines: {node: '>= 0.6'} @@ -9675,7 +10079,6 @@ packages: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 - dev: true /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} @@ -9732,7 +10135,6 @@ packages: bn.js: 4.12.0 miller-rabin: 4.0.1 randombytes: 2.1.0 - dev: true /dijkstrajs@1.0.3: resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} @@ -10054,7 +10456,6 @@ packages: /es6-object-assign@1.1.0: resolution: {integrity: sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==} - dev: true /esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} @@ -10606,6 +11007,44 @@ packages: '@scure/bip39': 1.2.1 dev: false + /ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): + resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/solidity': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/units': 5.7.0 + '@ethersproject/wallet': 5.7.0 + '@ethersproject/web': 5.7.1 + '@ethersproject/wordlists': 5.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + /eval@0.1.8: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} @@ -10627,7 +11066,6 @@ packages: dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 - dev: true /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} @@ -10928,7 +11366,6 @@ packages: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 - dev: true /fork-ts-checker-webpack-plugin@6.5.3(eslint@8.49.0)(typescript@5.2.2)(webpack@5.83.1): resolution: {integrity: sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==} @@ -10962,6 +11399,15 @@ packages: webpack: 5.83.1(esbuild@0.18.4) dev: false + /form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: false + /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -11070,13 +11516,6 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: false - /get-intrinsic@1.1.3: - resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -11248,11 +11687,14 @@ packages: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} dev: false + /google-protobuf@3.21.2: + resolution: {integrity: sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==} + dev: false + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.1 - dev: true /got@9.6.0: resolution: {integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==} @@ -11315,7 +11757,7 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.1 /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} @@ -11330,7 +11772,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 - dev: true /has-yarn@2.1.0: resolution: {integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==} @@ -11746,7 +12187,6 @@ packages: dependencies: call-bind: 1.0.2 has-tostringtag: 1.0.0 - dev: true /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} @@ -11801,7 +12241,6 @@ packages: /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - dev: true /is-ci@2.0.0: resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} @@ -11868,7 +12307,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -11906,7 +12344,6 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - dev: true /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} @@ -12015,23 +12452,11 @@ packages: has-symbols: 1.0.3 dev: true - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - dev: true - /is-typed-array@1.1.12: resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.11 - dev: true /is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} @@ -12101,7 +12526,7 @@ packages: peerDependencies: ws: '*' dependencies: - ws: 7.5.9 + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) dev: false /iterator.prototype@1.1.1: @@ -12193,6 +12618,11 @@ packages: dependencies: argparse: 2.0.1 + /jscrypto@1.0.3: + resolution: {integrity: sha512-lryZl0flhodv4SZHOqyb1bx5sKcJxj0VBo0Kzb4QMAg3L021IC9uGpl0RCZa+9KJwlRGSK2C80ITcwbe19OKLQ==} + hasBin: true + dev: false + /jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -12266,6 +12696,24 @@ packages: object.values: 1.1.7 dev: true + /keccak256@1.0.6: + resolution: {integrity: sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==} + dependencies: + bn.js: 5.2.1 + buffer: 6.0.3 + keccak: 3.0.4 + dev: false + + /keccak@3.0.4: + resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} + engines: {node: '>=10.0.0'} + requiresBuild: true + dependencies: + node-addon-api: 2.0.2 + node-gyp-build: 4.7.0 + readable-stream: 3.6.2 + dev: false + /keyv@3.1.0: resolution: {integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==} dependencies: @@ -12465,6 +12913,10 @@ packages: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} dev: false + /long@5.2.3: + resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + dev: false + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -12613,7 +13065,6 @@ packages: dependencies: bn.js: 4.12.0 brorand: 1.1.0 - dev: true /mime-db@1.33.0: resolution: {integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==} @@ -12834,14 +13285,18 @@ packages: tslib: 2.5.3 dev: false + /node-addon-api@2.0.2: + resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + dev: false + /node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} dependencies: lodash: 4.17.21 dev: false - /node-fetch-native@1.4.0: - resolution: {integrity: sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA==} + /node-fetch-native@1.4.1: + resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} dev: false /node-fetch@2.6.11: @@ -12861,6 +13316,11 @@ packages: engines: {node: '>= 6.13.0'} dev: false + /node-gyp-build@4.7.0: + resolution: {integrity: sha512-PbZERfeFdrHQOOXiAKOY0VPbykZy90ndPKk0d+CFDegTKmWp1VgOTz2xACVbr1BjCWxrQp68CXtvNsveFhqDJg==} + hasBin: true + dev: false + /node-releases@2.0.12: resolution: {integrity: sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==} @@ -12970,7 +13430,6 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.2.0 - dev: true /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} @@ -13204,7 +13663,6 @@ packages: evp_bytestokey: 1.0.3 pbkdf2: 3.1.2 safe-buffer: 5.2.1 - dev: true /parse-entities@2.0.0: resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} @@ -13319,7 +13777,6 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -14305,7 +14762,6 @@ packages: parse-asn1: 5.1.6 randombytes: 2.1.0 safe-buffer: 5.2.1 - dev: true /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} @@ -14387,7 +14843,6 @@ packages: dependencies: randombytes: 2.1.0 safe-buffer: 5.2.1 - dev: true /range-parser@1.2.0: resolution: {integrity: sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==} @@ -15180,10 +15635,24 @@ packages: ajv-keywords: 5.1.0(ajv@8.12.0) dev: false + /scrypt-js@3.0.1: + resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + dev: false + /search-insights@2.8.2: resolution: {integrity: sha512-PxA9M5Q2bpBelVvJ3oDZR8nuY00Z6qwOxL53wNpgzV28M/D6u9WUbImDckjLSILBF8F1hn/mgyuUaOPtjow4Qw==} dev: false + /secp256k1@4.0.3: + resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} + engines: {node: '>=10.0.0'} + requiresBuild: true + dependencies: + elliptic: 6.5.4 + node-addon-api: 2.0.2 + node-gyp-build: 4.7.0 + dev: false + /section-matter@1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} @@ -16012,6 +16481,13 @@ packages: engines: {node: '>=12'} dev: true + /tmp@0.2.1: + resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} + engines: {node: '>=8.17.0'} + dependencies: + rimraf: 3.0.2 + dev: false + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -16620,6 +17096,14 @@ packages: react: 18.2.0 dev: false + /utf-8-validate@5.0.10: + resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} + engines: {node: '>=6.14.2'} + requiresBuild: true + dependencies: + node-gyp-build: 4.7.0 + dev: false + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -16629,9 +17113,8 @@ packages: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 - is-typed-array: 1.1.10 - which-typed-array: 1.1.9 - dev: true + is-typed-array: 1.1.12 + which-typed-array: 1.1.11 /utila@0.4.0: resolution: {integrity: sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==} @@ -16827,7 +17310,7 @@ packages: lodash: 4.17.21 opener: 1.5.2 sirv: 1.0.19 - ws: 7.5.9 + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -17040,19 +17523,6 @@ packages: for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - dev: true - - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 - dev: true /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} @@ -17130,7 +17600,23 @@ packages: typedarray-to-buffer: 3.1.5 dev: false - /ws@7.5.9: + /ws@7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10): + resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + dev: false + + /ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10): resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} peerDependencies: @@ -17141,6 +17627,9 @@ packages: optional: true utf-8-validate: optional: true + dependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 dev: false /ws@8.13.0: