diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..fce1c26540 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/packages-release.yml b/.github/workflows/packages-release.yml new file mode 100644 index 0000000000..5ded708a54 --- /dev/null +++ b/.github/workflows/packages-release.yml @@ -0,0 +1,58 @@ +name: Packages Release + +on: + workflow_call: + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + turbo-all: + name: Compile, lint, test, & build + uses: ./.github/workflows/turbo-ci.yml + + packages-release: + name: Packages Release + environment: labs-approval + runs-on: buildjet-2vcpu-ubuntu-2204 + needs: turbo-all + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Access build cache + id: built + uses: buildjet/cache@v3 + with: + path: .turbo + key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built + restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Setup Node.js 21.x + uses: buildjet/setup-node@v4 + with: + node-version: '21' + cache: 'pnpm' + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Disable telemetry + run: pnpm turbo telemetry disable + + - name: Build packages + run: pnpm turbo build --cache-dir=.turbo + + # If there are changesets, this action will create a PR on the repo to version packages + # If there are none, it will publish newer-versioned public packages to npm + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm changeset:publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/apps/extension/package.json b/apps/extension/package.json index 6d7cb6d063..2a286582c1 100644 --- a/apps/extension/package.json +++ b/apps/extension/package.json @@ -1,6 +1,7 @@ { "name": "chrome-extension", - "version": "1.0.0", + "version": "4.2.0", + "private": true, "description": "chrome-extension", "type": "module", "scripts": { @@ -21,6 +22,7 @@ "@penumbra-zone/storage": "workspace:*", "@penumbra-zone/transport-chrome": "workspace:*", "@penumbra-zone/transport-dom": "workspace:*", + "@penumbra-zone/types": "workspace:*", "@penumbra-zone/ui": "workspace:*", "@penumbra-zone/wasm": "workspace:*", "@tanstack/react-query": "^5.25.0", diff --git a/apps/extension/src/approve-origin.ts b/apps/extension/src/approve-origin.ts index 065d095d28..98aee0c52d 100644 --- a/apps/extension/src/approve-origin.ts +++ b/apps/extension/src/approve-origin.ts @@ -4,7 +4,7 @@ import { errorFromJson } from '@connectrpc/connect/protocol-connect'; import { localExtStorage } from '@penumbra-zone/storage'; import { OriginApproval, PopupType } from './message/popup'; import { popup } from './popup'; -import Map from '@penumbra-zone/polyfills/Map.groupBy'; +import Map from '@penumbra-zone/polyfills/src/Map.groupBy'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; export const originAlreadyApproved = async (url: string): Promise => { diff --git a/apps/extension/src/clients.ts b/apps/extension/src/clients.ts index 46ae37521b..0d914296e6 100644 --- a/apps/extension/src/clients.ts +++ b/apps/extension/src/clients.ts @@ -1,8 +1,8 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { createPromiseClient } from '@connectrpc/connect'; -import { transportOptions } from '@penumbra-zone/types/registry'; -import { createChannelTransport } from '@penumbra-zone/transport-dom/create'; +import { createChannelTransport } from '@penumbra-zone/transport-dom/src/create'; import { CRSessionClient } from '@penumbra-zone/transport-chrome/session-client'; +import { transportOptions } from '@penumbra-zone/types/src/registry'; const port = CRSessionClient.init(PRAX); diff --git a/apps/extension/src/content-scripts/injected-penumbra-global.ts b/apps/extension/src/content-scripts/injected-penumbra-global.ts index 7e8ac13196..00812a4e11 100644 --- a/apps/extension/src/content-scripts/injected-penumbra-global.ts +++ b/apps/extension/src/content-scripts/injected-penumbra-global.ts @@ -17,7 +17,7 @@ * other content scripts could interfere or intercept connections. */ -import { PenumbraSymbol, PenumbraProvider } from '@penumbra-zone/client/global'; +import { PenumbraProvider, PenumbraSymbol } from '@penumbra-zone/client/src/global'; import { isPraxConnectionPortMessageEvent, isPraxRequestResponseMessageEvent, @@ -25,7 +25,7 @@ import { } from './message'; import { Prax } from '../message/prax'; -import '@penumbra-zone/polyfills/Promise.withResolvers'; +import '@penumbra-zone/polyfills/src/Promise.withResolvers'; const requestMessage: PraxMessage = { [PRAX]: Prax.RequestConnection }; @@ -76,8 +76,9 @@ const praxProvider: PenumbraProvider = Object.freeze({ }); // if the global isn't present, create it. -if (!window[PenumbraSymbol]) - Object.defineProperty(window, PenumbraSymbol, { value: new Object(), writable: false }); +if (!window[PenumbraSymbol]) { + Object.defineProperty(window, PenumbraSymbol, { value: {}, writable: false }); +} // reveal Object.defineProperty(window[PenumbraSymbol], PRAX_ORIGIN, { diff --git a/apps/extension/src/impls.ts b/apps/extension/src/impls.ts index a0ab7447ae..647b83b886 100644 --- a/apps/extension/src/impls.ts +++ b/apps/extension/src/impls.ts @@ -1,6 +1,6 @@ -import { ServiceImpl, createPromiseClient } from '@connectrpc/connect'; +import { createPromiseClient, ServiceImpl } from '@connectrpc/connect'; import { createGrpcWebTransport } from '@connectrpc/connect-web'; -import { createProxyImpl } from '@penumbra-zone/transport-dom/proxy'; +import { createProxyImpl } from '@penumbra-zone/transport-dom/src/proxy'; import { rethrowImplErrors } from './utils/rethrow-impl-errors'; import { Query as IbcProxy } from '@buf/cosmos_ibc.connectrpc_es/ibc/core/client/v1/query_connect'; import { QueryService as AppService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/app/v1/app_connect'; @@ -23,6 +23,7 @@ import { viewImpl } from '@penumbra-zone/router/src/grpc/view-protocol-server'; import { localExtStorage } from '@penumbra-zone/storage'; import { ServiceType } from '@bufbuild/protobuf'; + const grpcEndpoint = await localExtStorage.get('grpcEndpoint'); type RpcImplTuple = [T, Partial>]; diff --git a/apps/extension/src/message/popup.ts b/apps/extension/src/message/popup.ts index a9896ce1c3..b07512200a 100644 --- a/apps/extension/src/message/popup.ts +++ b/apps/extension/src/message/popup.ts @@ -5,8 +5,8 @@ import type { InternalRequest, InternalResponse, } from '@penumbra-zone/types/src/internal-msg/shared'; +import type { UserChoice } from '@penumbra-zone/types/src/user-choice'; import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; export enum PopupType { TxApproval = 'TxApproval', diff --git a/apps/extension/src/popup.ts b/apps/extension/src/popup.ts index e6b23c0648..7ca9022b2e 100644 --- a/apps/extension/src/popup.ts +++ b/apps/extension/src/popup.ts @@ -1,10 +1,10 @@ import { sessionExtStorage } from '@penumbra-zone/storage'; +import { PopupMessage, PopupRequest, PopupResponse, PopupType } from './message/popup'; +import { PopupPath } from './routes/popup/paths'; import type { InternalRequest, InternalResponse, } from '@penumbra-zone/types/src/internal-msg/shared'; -import { PopupMessage, PopupRequest, PopupResponse, PopupType } from './message/popup'; -import { PopupPath } from './routes/popup/paths'; export const popup = async ( req: PopupRequest, diff --git a/apps/extension/src/routes/popup/approval/origin.tsx b/apps/extension/src/routes/popup/approval/origin.tsx index d4abd16fd6..d3d6883c96 100644 --- a/apps/extension/src/routes/popup/approval/origin.tsx +++ b/apps/extension/src/routes/popup/approval/origin.tsx @@ -4,9 +4,9 @@ import { originApprovalSelector } from '../../../state/origin-approval'; import { ApproveDeny } from './approve-deny'; import { LinkGradientIcon } from '../../../icons'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; import { DisplayOriginURL } from '../../../shared/components/display-origin-url'; import { cn } from '@penumbra-zone/ui/lib/utils'; +import { UserChoice } from '@penumbra-zone/types/src/user-choice'; export const OriginApproval = () => { const { requestOrigin, favIconUrl, title, lastRequest, setChoice, sendResponse } = diff --git a/apps/extension/src/routes/popup/approval/transaction/index.tsx b/apps/extension/src/routes/popup/approval/transaction/index.tsx index 4208644cb6..d1a9c6351a 100644 --- a/apps/extension/src/routes/popup/approval/transaction/index.tsx +++ b/apps/extension/src/routes/popup/approval/transaction/index.tsx @@ -2,12 +2,12 @@ import { TransactionViewComponent } from '@penumbra-zone/ui'; import { useStore } from '../../../../state'; import { txApprovalSelector } from '../../../../state/tx-approval'; import { JsonViewer } from '@penumbra-zone/ui/components/ui/json-viewer'; -import { Jsonified } from '@penumbra-zone/types'; import { AuthorizeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/custody/v1/custody_pb'; import { useTransactionViewSwitcher } from './use-transaction-view-switcher'; import { ViewTabs } from './view-tabs'; import { ApproveDeny } from '../approve-deny'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; export const TransactionApproval = () => { const { authorizeRequest: authReqString, setChoice, sendResponse } = useStore(txApprovalSelector); diff --git a/apps/extension/src/routes/popup/settings/settings-connected-sites.tsx b/apps/extension/src/routes/popup/settings/settings-connected-sites.tsx index 9f417a2d2d..15b974f5a5 100644 --- a/apps/extension/src/routes/popup/settings/settings-connected-sites.tsx +++ b/apps/extension/src/routes/popup/settings/settings-connected-sites.tsx @@ -5,9 +5,9 @@ import { LinkGradientIcon } from '../../../icons'; import { SettingsHeader } from '../../../shared'; import { OriginRecord } from '@penumbra-zone/storage'; import { DisplayOriginURL } from '../../../shared/components/display-origin-url'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; import { useStore } from '../../../state'; import { connectedSitesSelector } from '../../../state/connected-sites'; +import { UserChoice } from '@penumbra-zone/types/src/user-choice'; export const SettingsConnectedSites = () => { const { diff --git a/apps/extension/src/routes/popup/settings/settings-rpc.tsx b/apps/extension/src/routes/popup/settings/settings-rpc.tsx index 0d3571dcdf..f10e92e46d 100644 --- a/apps/extension/src/routes/popup/settings/settings-rpc.tsx +++ b/apps/extension/src/routes/popup/settings/settings-rpc.tsx @@ -8,9 +8,9 @@ import { ShareGradientIcon } from '../../../icons'; import { SettingsHeader } from '../../../shared'; import { useStore } from '../../../state'; import { networkSelector } from '../../../state/network'; -import { ServicesMessage } from '@penumbra-zone/types/src/services'; -import '@penumbra-zone/polyfills/Promise.withResolvers'; +import '@penumbra-zone/polyfills/src/Promise.withResolvers'; import { TrashIcon } from '@radix-ui/react-icons'; +import { ServicesMessage } from '@penumbra-zone/types/src/services'; export const SettingsRPC = () => { const { chainId: currentChainId } = useChainIdQuery(); diff --git a/apps/extension/src/service-worker.ts b/apps/extension/src/service-worker.ts index 3652fb17eb..be6d37dff9 100644 --- a/apps/extension/src/service-worker.ts +++ b/apps/extension/src/service-worker.ts @@ -16,10 +16,11 @@ import { Services } from '@penumbra-zone/services'; import { localExtStorage } from '@penumbra-zone/storage'; // adapter -import { ConnectRouter, PromiseClient, createContextValues } from '@connectrpc/connect'; +import { ConnectRouter, createContextValues, PromiseClient } from '@connectrpc/connect'; import { CRSessionManager } from '@penumbra-zone/transport-chrome/session-manager'; -import { connectChannelAdapter } from '@penumbra-zone/transport-dom/adapter'; -import { transportOptions } from '@penumbra-zone/types/registry'; +import { createDirectClient } from '@penumbra-zone/transport-dom/src/direct'; +import { connectChannelAdapter } from '@penumbra-zone/transport-dom/src/adapter'; +import { transportOptions } from '@penumbra-zone/types/src/registry'; // context import { CustodyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/custody/v1/custody_connect'; @@ -30,7 +31,6 @@ import { servicesCtx, stakingClientCtx, } from '@penumbra-zone/router/src/ctx'; -import { createDirectClient } from '@penumbra-zone/transport-dom/direct'; import { approveTransaction } from './approve-transaction'; // all rpc implementations, local and proxy diff --git a/apps/extension/src/state/connected-sites.ts b/apps/extension/src/state/connected-sites.ts index 1a9272bc53..b2e6b77fa5 100644 --- a/apps/extension/src/state/connected-sites.ts +++ b/apps/extension/src/state/connected-sites.ts @@ -1,7 +1,7 @@ import { ExtensionStorage, LocalStorageState, OriginRecord } from '@penumbra-zone/storage'; import { AllSlices, SliceCreator } from '.'; -import Map from '@penumbra-zone/polyfills/Map.groupBy'; +import Map from '@penumbra-zone/polyfills/src/Map.groupBy'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; export interface ConnectedSitesSlice { diff --git a/apps/extension/src/state/origin-approval.ts b/apps/extension/src/state/origin-approval.ts index 07116d42e4..be57caab4e 100644 --- a/apps/extension/src/state/origin-approval.ts +++ b/apps/extension/src/state/origin-approval.ts @@ -1,8 +1,11 @@ import { ConnectError } from '@connectrpc/connect'; -import { PopupType, OriginApproval } from '../message/popup'; +import { OriginApproval, PopupType } from '../message/popup'; import { AllSlices, SliceCreator } from '.'; -import { InternalRequest, InternalResponse } from '@penumbra-zone/types/src/internal-msg/shared'; import { errorToJson } from '@connectrpc/connect/protocol-connect'; +import type { + InternalRequest, + InternalResponse, +} from '@penumbra-zone/types/src/internal-msg/shared'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; export interface OriginApprovalSlice { diff --git a/apps/extension/src/state/persist.ts b/apps/extension/src/state/persist.ts index cacab21a3a..d69c3482c8 100644 --- a/apps/extension/src/state/persist.ts +++ b/apps/extension/src/state/persist.ts @@ -9,7 +9,7 @@ import { SessionStorageState, StorageItem, } from '@penumbra-zone/storage'; -import { walletsFromJson } from '@penumbra-zone/types'; +import { walletsFromJson } from '@penumbra-zone/types/src/wallet'; export type Middleware = < T, diff --git a/apps/extension/src/state/tx-approval.ts b/apps/extension/src/state/tx-approval.ts index b3285268c1..597c1cf033 100644 --- a/apps/extension/src/state/tx-approval.ts +++ b/apps/extension/src/state/tx-approval.ts @@ -1,19 +1,24 @@ import { AuthorizeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/custody/v1/custody_pb'; -import type { Jsonified, Stringified, TransactionClassification } from '@penumbra-zone/types'; import { AllSlices, SliceCreator } from '.'; -import { InternalRequest, InternalResponse } from '@penumbra-zone/types/src/internal-msg/shared'; import { PopupType, TxApproval } from '../message/popup'; import { TransactionView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { viewClient } from '../clients'; - -import { - asPublicTransactionView, - asReceiverTransactionView, - classifyTransaction, -} from '@penumbra-zone/types'; import { ConnectError } from '@connectrpc/connect'; import { errorToJson } from '@connectrpc/connect/protocol-connect'; +import type { + InternalRequest, + InternalResponse, +} from '@penumbra-zone/types/src/internal-msg/shared'; +import type { Jsonified, Stringified } from '@penumbra-zone/types/src/jsonified'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { + classifyTransaction, + TransactionClassification, +} from '@penumbra-zone/types/src/transaction'; +import { + asPublicTransactionView, + asReceiverTransactionView, +} from '@penumbra-zone/types/src/translators'; export interface TxApprovalSlice { /** diff --git a/apps/extension/src/state/wallets.test.ts b/apps/extension/src/state/wallets.test.ts index 0fe71843d2..803937b4ec 100644 --- a/apps/extension/src/state/wallets.test.ts +++ b/apps/extension/src/state/wallets.test.ts @@ -8,7 +8,7 @@ import { mockLocalExtStorage, mockSessionExtStorage, } from '@penumbra-zone/storage'; -import { WalletCreate } from '@penumbra-zone/types'; +import type { WalletCreate } from '@penumbra-zone/types/src/wallet'; vi.stubGlobal('crypto', webcrypto); diff --git a/apps/extension/src/state/wallets.ts b/apps/extension/src/state/wallets.ts index 32836570c7..e13e28b537 100644 --- a/apps/extension/src/state/wallets.ts +++ b/apps/extension/src/state/wallets.ts @@ -8,8 +8,8 @@ import { } from '@penumbra-zone/wasm'; import { Key } from '@penumbra-zone/crypto-web'; import { ExtensionStorage, LocalStorageState } from '@penumbra-zone/storage'; -import { Wallet, WalletCreate } from '@penumbra-zone/types'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; +import { Wallet, WalletCreate } from '@penumbra-zone/types/src/wallet'; export interface WalletsSlice { all: Wallet[]; diff --git a/apps/extension/src/wasm-build-action.ts b/apps/extension/src/wasm-build-action.ts index e018bd48e6..4be0906f20 100644 --- a/apps/extension/src/wasm-build-action.ts +++ b/apps/extension/src/wasm-build-action.ts @@ -2,8 +2,8 @@ import { TransactionPlan, WitnessData, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; -import type { ActionBuildRequest } from '@penumbra-zone/types/src/internal-msg/offscreen'; import type { JsonValue } from '@bufbuild/protobuf'; +import type { ActionBuildRequest } from '@penumbra-zone/types/src/internal-msg/offscreen'; // necessary to propagate errors that occur in promises // see: https://stackoverflow.com/questions/39992417/how-to-bubble-a-web-worker-error-in-a-promise-via-worker-onerror diff --git a/apps/minifront/.eslintrc.cjs b/apps/minifront/.eslintrc.cjs index 12beb0569e..5b0e7dac10 100644 --- a/apps/minifront/.eslintrc.cjs +++ b/apps/minifront/.eslintrc.cjs @@ -1,6 +1,6 @@ module.exports = { root: true, - env: { browser: true, es2020: true }, + env: { browser: true, es2022: true }, extends: ['custom'], parserOptions: { project: true, diff --git a/apps/minifront/package.json b/apps/minifront/package.json index 1b4cfde5b4..863fc9a9c5 100644 --- a/apps/minifront/package.json +++ b/apps/minifront/package.json @@ -1,6 +1,7 @@ { "name": "minifront", "version": "2.0.0", + "private": true, "type": "module", "scripts": { "dev": "vite --port 5173", @@ -16,11 +17,12 @@ "@penumbra-zone/crypto-web": "workspace:*", "@penumbra-zone/getters": "workspace:*", "@penumbra-zone/transport-dom": "workspace:*", + "@penumbra-zone/types": "workspace:*", "@penumbra-zone/ui": "workspace:*", "@radix-ui/react-icons": "^1.3.0", - "@tanstack/react-query": "^5.25.0", + "@tanstack/react-query": "^5.26.3", "bignumber.js": "^9.1.2", - "date-fns": "^3.3.1", + "date-fns": "^3.4.0", "immer": "^10.0.4", "lodash": "^4.17.21", "react": "^18.2.0", diff --git a/apps/minifront/src/clients.ts b/apps/minifront/src/clients.ts index 504930f46a..dfe8424416 100644 --- a/apps/minifront/src/clients.ts +++ b/apps/minifront/src/clients.ts @@ -1,4 +1,4 @@ -import { createPraxClient } from '@penumbra-zone/client/prax'; +import { createPraxClient } from '@penumbra-zone/client'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { SimulationService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/component/dex/v1/dex_connect'; import { CustodyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/custody/v1/custody_connect'; diff --git a/apps/minifront/src/components/dashboard/assets-table.tsx b/apps/minifront/src/components/dashboard/assets-table.tsx index 16f86ac715..334e532c95 100644 --- a/apps/minifront/src/components/dashboard/assets-table.tsx +++ b/apps/minifront/src/components/dashboard/assets-table.tsx @@ -4,7 +4,7 @@ import { AddressComponent } from '@penumbra-zone/ui/components/ui/address-compon import { BalancesByAccount, getBalancesByAccount } from '../../fetchers/balances/by-account'; import { Table, TableBody, TableCell, TableRow } from '@penumbra-zone/ui'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; -import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client/prax'; +import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client'; export const AssetsLoader: LoaderFunction = async (): Promise => { await throwIfPraxNotConnectedTimeout(); diff --git a/apps/minifront/src/components/dashboard/transaction-table.tsx b/apps/minifront/src/components/dashboard/transaction-table.tsx index 4c2c597ac9..fc47ecec6f 100644 --- a/apps/minifront/src/components/dashboard/transaction-table.tsx +++ b/apps/minifront/src/components/dashboard/transaction-table.tsx @@ -1,8 +1,8 @@ -import { shorten } from '@penumbra-zone/types'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@penumbra-zone/ui'; import { Link, LoaderFunction, useLoaderData } from 'react-router-dom'; import { getAllTransactions, TransactionSummary } from '../../fetchers/transactions'; -import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client/prax'; +import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client'; +import { shorten } from '@penumbra-zone/types/src/string'; export const TxsLoader: LoaderFunction = async (): Promise => { await throwIfPraxNotConnectedTimeout(); diff --git a/apps/minifront/src/components/extension-not-connected.tsx b/apps/minifront/src/components/extension-not-connected.tsx index b793b6904a..bfa627356f 100644 --- a/apps/minifront/src/components/extension-not-connected.tsx +++ b/apps/minifront/src/components/extension-not-connected.tsx @@ -1,7 +1,7 @@ import { Button, SplashPage } from '@penumbra-zone/ui'; import { HeadTag } from './metadata/head-tag'; -import { requestPraxConnection } from '@penumbra-zone/client/prax'; +import { requestPraxConnection } from '@penumbra-zone/client'; import { useEffect, useState } from 'react'; export const ExtensionNotConnected = () => { diff --git a/apps/minifront/src/components/layout.tsx b/apps/minifront/src/components/layout.tsx index 9349ee68fe..c0922f906c 100644 --- a/apps/minifront/src/components/layout.tsx +++ b/apps/minifront/src/components/layout.tsx @@ -7,11 +7,7 @@ import '@penumbra-zone/ui/styles/globals.css'; import { ExtensionNotConnected } from './extension-not-connected'; import { ExtensionNotInstalled } from './extension-not-installed'; import { Footer } from './footer'; -import { - isPraxInstalled, - isPraxConnected, - isPraxConnectedTimeout, -} from '@penumbra-zone/client/prax'; +import { isPraxConnected, isPraxConnectedTimeout, isPraxInstalled } from '@penumbra-zone/client'; export type LayoutLoaderResult = | { isInstalled: boolean; isConnected: boolean } diff --git a/apps/minifront/src/components/send/helpers.ts b/apps/minifront/src/components/send/helpers.ts index fc488254c2..979a811846 100644 --- a/apps/minifront/src/components/send/helpers.ts +++ b/apps/minifront/src/components/send/helpers.ts @@ -1,5 +1,5 @@ -import { isPenumbraAddr } from '@penumbra-zone/types'; import { Validation } from '../shared/validation-result'; +import { isPenumbraAddr } from '@penumbra-zone/types/src/address'; export const penumbraAddrValidation = (): Validation => { return { diff --git a/apps/minifront/src/components/send/ibc/chain-selector.tsx b/apps/minifront/src/components/send/ibc/chain-selector.tsx index 262fdf3e57..a3371c841a 100644 --- a/apps/minifront/src/components/send/ibc/chain-selector.tsx +++ b/apps/minifront/src/components/send/ibc/chain-selector.tsx @@ -3,7 +3,7 @@ import { cn } from '@penumbra-zone/ui/lib/utils'; import { useState } from 'react'; import { useStore } from '../../../state'; import { ibcSelector } from '../../../state/ibc'; -import { testnetIbcChains } from '@penumbra-zone/constants'; +import { testnetIbcChains } from '@penumbra-zone/constants/src/chains'; export const ChainSelector = () => { const { chain, setChain } = useStore(ibcSelector); diff --git a/apps/minifront/src/components/send/ibc/ibc-form.tsx b/apps/minifront/src/components/send/ibc/ibc-form.tsx index e212f28b5d..2a37db8e62 100644 --- a/apps/minifront/src/components/send/ibc/ibc-form.tsx +++ b/apps/minifront/src/components/send/ibc/ibc-form.tsx @@ -8,7 +8,7 @@ import { validateAmount } from '../../../state/send'; import { useMemo } from 'react'; import { LoaderFunction, useLoaderData } from 'react-router-dom'; import { getBalances } from '../../../fetchers/balances'; -import { testnetIbcChains } from '@penumbra-zone/constants'; +import { testnetIbcChains } from '@penumbra-zone/constants/src/chains'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; export const IbcAssetBalanceLoader: LoaderFunction = async (): Promise => { diff --git a/apps/minifront/src/components/send/send-form/index.tsx b/apps/minifront/src/components/send/send-form/index.tsx index db18ca2974..1c910bf3cf 100644 --- a/apps/minifront/src/components/send/send-form/index.tsx +++ b/apps/minifront/src/components/send/send-form/index.tsx @@ -6,7 +6,7 @@ import { LoaderFunction, useLoaderData } from 'react-router-dom'; import { getBalances } from '../../../fetchers/balances'; import { useMemo } from 'react'; import { penumbraAddrValidation } from '../helpers'; -import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client/prax'; +import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client'; import InputToken from '../../shared/input-token'; import { useRefreshFee } from './use-refresh-fee'; import { GasFee } from '../../shared/gas-fee'; diff --git a/apps/minifront/src/components/shared/error-boundary.tsx b/apps/minifront/src/components/shared/error-boundary.tsx index 2b47e34f29..06ab2a2619 100644 --- a/apps/minifront/src/components/shared/error-boundary.tsx +++ b/apps/minifront/src/components/shared/error-boundary.tsx @@ -1,5 +1,5 @@ import { useRouteError } from 'react-router-dom'; -import { PraxNotConnectedError } from '@penumbra-zone/client/prax'; +import { PraxNotConnectedError } from '@penumbra-zone/client'; import { ExtensionNotConnected } from '../extension-not-connected'; export const ErrorBoundary = () => { diff --git a/apps/minifront/src/components/shared/gas-fee.tsx b/apps/minifront/src/components/shared/gas-fee.tsx index f0208c1b94..0eb50dbeca 100644 --- a/apps/minifront/src/components/shared/gas-fee.tsx +++ b/apps/minifront/src/components/shared/gas-fee.tsx @@ -4,7 +4,7 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/fee/v1/fee_pb'; import { SegmentedPicker, SegmentedPickerOption } from '@penumbra-zone/ui'; import { InputBlock } from './input-block'; -import { localAssets } from '@penumbra-zone/constants'; +import { localAssets } from '@penumbra-zone/constants/src/assets'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; diff --git a/apps/minifront/src/components/shared/select-token-modal.tsx b/apps/minifront/src/components/shared/select-token-modal.tsx index 000a91f5c7..d8c7acb678 100644 --- a/apps/minifront/src/components/shared/select-token-modal.tsx +++ b/apps/minifront/src/components/shared/select-token-modal.tsx @@ -10,8 +10,8 @@ import { } from '@penumbra-zone/ui'; import { cn } from '@penumbra-zone/ui/lib/utils'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; -import { getAddressIndex } from '@penumbra-zone/getters'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { getAddressIndex } from '@penumbra-zone/getters/src/address-view'; interface SelectTokenModalProps { selection: BalancesResponse | undefined; diff --git a/apps/minifront/src/components/staking/account/delegation-value-view/index.tsx b/apps/minifront/src/components/staking/account/delegation-value-view/index.tsx index 3045a20c25..fafa63f27d 100644 --- a/apps/minifront/src/components/staking/account/delegation-value-view/index.tsx +++ b/apps/minifront/src/components/staking/account/delegation-value-view/index.tsx @@ -2,8 +2,8 @@ import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core import { ValidatorInfoComponent } from './validator-info-component'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; import { StakingActions } from './staking-actions'; -import { getValidatorInfoFromValueView } from '@penumbra-zone/getters'; import { memo } from 'react'; +import { getValidatorInfoFromValueView } from '@penumbra-zone/getters/src/value-view'; /** * Renders a `ValueView` that contains a delegation token, along with the diff --git a/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/form-dialog.tsx b/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/form-dialog.tsx index e7b4fd0ac1..a32500f77c 100644 --- a/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/form-dialog.tsx +++ b/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/form-dialog.tsx @@ -1,17 +1,17 @@ -import { getIdentityKey } from '@penumbra-zone/getters'; import { + Button, Dialog, DialogContent, DialogHeader, IdentityKeyComponent, Input, - Button, } from '@penumbra-zone/ui'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; import { InputBlock } from '../../../../shared/input-block'; import { Validator } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { FormEvent } from 'react'; +import { getIdentityKey } from '@penumbra-zone/getters/src/validator'; const getCapitalizedAction = (action: 'delegate' | 'undelegate') => action.replace(/^./, firstCharacter => firstCharacter.toLocaleUpperCase()); diff --git a/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/index.tsx b/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/index.tsx index 29b5800088..3768199b54 100644 --- a/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/index.tsx +++ b/apps/minifront/src/components/staking/account/delegation-value-view/staking-actions/index.tsx @@ -1,12 +1,13 @@ import { Button } from '@penumbra-zone/ui'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { getAmount, getValidator } from '@penumbra-zone/getters'; -import { joinLoHiAmount } from '@penumbra-zone/types'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { FormDialog } from './form-dialog'; import { useMemo } from 'react'; import { AllSlices } from '../../../../../state'; import { useStoreShallow } from '../../../../../utils/use-store-shallow'; +import { getValidator } from '@penumbra-zone/getters/src/validator-info'; +import { getAmount } from '@penumbra-zone/getters/src/value-view'; +import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; const stakingActionsSelector = (state: AllSlices) => ({ action: state.staking.action, diff --git a/apps/minifront/src/components/staking/account/delegation-value-view/validator-info-component.tsx b/apps/minifront/src/components/staking/account/delegation-value-view/validator-info-component.tsx index 4a38d8a792..ebe4435c8d 100644 --- a/apps/minifront/src/components/staking/account/delegation-value-view/validator-info-component.tsx +++ b/apps/minifront/src/components/staking/account/delegation-value-view/validator-info-component.tsx @@ -1,6 +1,4 @@ import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { bech32IdentityKey, calculateCommissionAsPercentage } from '@penumbra-zone/types'; -import { getIdentityKeyFromValidatorInfo, getValidator } from '@penumbra-zone/getters'; import { Identicon, IdentityKeyComponent, @@ -10,6 +8,12 @@ import { TooltipTrigger, } from '@penumbra-zone/ui'; import { useStore } from '../../../../state'; +import { + getIdentityKeyFromValidatorInfo, + getValidator, +} from '@penumbra-zone/getters/src/validator-info'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; +import { calculateCommissionAsPercentage } from '@penumbra-zone/types/src/staking'; /** * Renders a single `ValidatorInfo`: its name, bech32-encoded identity key, diff --git a/apps/minifront/src/components/staking/account/delegations.tsx b/apps/minifront/src/components/staking/account/delegations.tsx index 4f1ca4dd7b..c5ba615569 100644 --- a/apps/minifront/src/components/staking/account/delegations.tsx +++ b/apps/minifront/src/components/staking/account/delegations.tsx @@ -1,9 +1,10 @@ -import { getIdentityKeyFromValueView } from '@penumbra-zone/getters'; -import { VotingPowerAsIntegerPercentage, bech32IdentityKey } from '@penumbra-zone/types'; import { AllSlices } from '../../../state'; import { DelegationValueView } from './delegation-value-view'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { useStoreShallow } from '../../../utils/use-store-shallow'; +import { getIdentityKeyFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; +import { VotingPowerAsIntegerPercentage } from '@penumbra-zone/types/src/staking'; const getVotingPowerAsIntegerPercentage = ( votingPowerByValidatorInfo: Record, diff --git a/apps/minifront/src/components/staking/account/header/index.tsx b/apps/minifront/src/components/staking/account/header/index.tsx index 77e4f87e17..59af19ed52 100644 --- a/apps/minifront/src/components/staking/account/header/index.tsx +++ b/apps/minifront/src/components/staking/account/header/index.tsx @@ -1,20 +1,20 @@ -import { getDisplayDenomFromView } from '@penumbra-zone/getters'; import { + Button, Card, CardContent, - TooltipProvider, Tooltip, - TooltipTrigger, TooltipContent, - Button, + TooltipProvider, + TooltipTrigger, } from '@penumbra-zone/ui'; import { AccountSwitcher } from '@penumbra-zone/ui/components/ui/account-switcher'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; import { Stat } from './stat'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { STAKING_TOKEN_METADATA } from '@penumbra-zone/constants'; +import { STAKING_TOKEN_METADATA } from '@penumbra-zone/constants/src/assets'; import { accountsSelector, stakingSelector } from '../../../../state/staking'; import { useStore } from '../../../../state'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; /** * A default `ValueView` to render when we don't have any balance data for a diff --git a/apps/minifront/src/components/staking/layout.tsx b/apps/minifront/src/components/staking/layout.tsx index 3213f6a1ae..5bad3e4edd 100644 --- a/apps/minifront/src/components/staking/layout.tsx +++ b/apps/minifront/src/components/staking/layout.tsx @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { useStore } from '../../state'; import { stakingSelector } from '../../state/staking'; -import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client/prax'; +import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client'; import { Account } from './account'; export const StakingLoader = async () => { diff --git a/apps/minifront/src/components/staking/validator-info-row.tsx b/apps/minifront/src/components/staking/validator-info-row.tsx index 53e61f56d9..1e5c6280d1 100644 --- a/apps/minifront/src/components/staking/validator-info-row.tsx +++ b/apps/minifront/src/components/staking/validator-info-row.tsx @@ -1,9 +1,9 @@ import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { getValidator } from '@penumbra-zone/getters'; -import { calculateCommissionAsPercentage } from '@penumbra-zone/types'; -import { TableRow, TableCell } from '@penumbra-zone/ui'; +import { TableCell, TableRow } from '@penumbra-zone/ui'; import { ReactNode } from 'react'; import { Oval } from 'react-loader-spinner'; +import { getValidator } from '@penumbra-zone/getters/src/validator-info'; +import { calculateCommissionAsPercentage } from '@penumbra-zone/types/src/staking'; export const ValidatorInfoRow = ({ loading, diff --git a/apps/minifront/src/components/staking/validators-table.tsx b/apps/minifront/src/components/staking/validators-table.tsx index 4af994f37f..d6c9abecfe 100644 --- a/apps/minifront/src/components/staking/validators-table.tsx +++ b/apps/minifront/src/components/staking/validators-table.tsx @@ -1,10 +1,10 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@penumbra-zone/ui'; -import { getValidator } from '@penumbra-zone/getters'; -import { VotingPowerAsIntegerPercentage } from '@penumbra-zone/types'; import { Oval } from 'react-loader-spinner'; import { ValidatorInfoRow } from './validator-info-row'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ReactNode } from 'react'; +import { getValidator } from '@penumbra-zone/getters/src/validator-info'; +import { VotingPowerAsIntegerPercentage } from '@penumbra-zone/types/src/staking'; const HEADERS = ['Validator', 'Voting power', 'Commission', 'Staking']; diff --git a/apps/minifront/src/components/swap/asset-out-box.tsx b/apps/minifront/src/components/swap/asset-out-box.tsx index a3e4076f0d..7c1a711203 100644 --- a/apps/minifront/src/components/swap/asset-out-box.tsx +++ b/apps/minifront/src/components/swap/asset-out-box.tsx @@ -17,8 +17,9 @@ import { groupByAsset } from '../../fetchers/balances/by-asset'; import { cn } from '@penumbra-zone/ui/lib/utils'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; -import { getAmount } from '@penumbra-zone/getters'; -import { isZero } from '@penumbra-zone/types'; + +import { isZero } from '@penumbra-zone/types/src/amount'; +import { getAmount } from '@penumbra-zone/getters/src/value-view'; const findMatchingBalance = ( metadata: Metadata | undefined, diff --git a/apps/minifront/src/components/swap/asset-out-selector.tsx b/apps/minifront/src/components/swap/asset-out-selector.tsx index c22b1f2928..3abe85fbca 100644 --- a/apps/minifront/src/components/swap/asset-out-selector.tsx +++ b/apps/minifront/src/components/swap/asset-out-selector.tsx @@ -4,7 +4,7 @@ import { Metadata, ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { localAssets } from '@penumbra-zone/constants'; +import { localAssets } from '@penumbra-zone/constants/src/assets'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; diff --git a/apps/minifront/src/components/swap/swap-loader.tsx b/apps/minifront/src/components/swap/swap-loader.tsx index 4cdd55576a..9d30347db8 100644 --- a/apps/minifront/src/components/swap/swap-loader.tsx +++ b/apps/minifront/src/components/swap/swap-loader.tsx @@ -1,7 +1,7 @@ import { LoaderFunction } from 'react-router-dom'; import { getBalances } from '../../fetchers/balances'; import { useStore } from '../../state'; -import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client/prax'; +import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client'; import { BalancesResponse, SwapRecord, @@ -9,9 +9,10 @@ import { import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { fetchUnclaimedSwaps } from '../../fetchers/unclaimed-swaps'; import { viewClient } from '../../clients'; -import { getDisplayDenomFromView, getSwapAsset1, getSwapAsset2 } from '@penumbra-zone/getters'; -import { uint8ArrayToBase64 } from '@penumbra-zone/types'; -import { assetPatterns, localAssets } from '@penumbra-zone/constants'; +import { assetPatterns, localAssets } from '@penumbra-zone/constants/src/assets'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; +import { getSwapAsset1, getSwapAsset2 } from '@penumbra-zone/getters/src/swap-record'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; export interface UnclaimedSwapsWithMetadata { swap: SwapRecord; diff --git a/apps/minifront/src/components/swap/unclaimed-swaps.tsx b/apps/minifront/src/components/swap/unclaimed-swaps.tsx index 911e1ab703..0ecd3c177d 100644 --- a/apps/minifront/src/components/swap/unclaimed-swaps.tsx +++ b/apps/minifront/src/components/swap/unclaimed-swaps.tsx @@ -2,10 +2,10 @@ import { Button, Card } from '@penumbra-zone/ui'; import { useLoaderData, useRevalidator } from 'react-router-dom'; import { SwapLoaderResponse, UnclaimedSwapsWithMetadata } from './swap-loader'; import { AssetIcon } from '@penumbra-zone/ui/components/ui/tx/view/asset-icon'; -import { getSwapRecordCommitment } from '@penumbra-zone/getters'; -import { uint8ArrayToBase64 } from '@penumbra-zone/types'; import { useStore } from '../../state'; import { unclaimedSwapsSelector } from '../../state/unclaimed-swaps'; +import { getSwapRecordCommitment } from '@penumbra-zone/getters/src/swap-record'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; export const UnclaimedSwaps = () => { const { unclaimedSwaps } = useLoaderData() as SwapLoaderResponse; diff --git a/apps/minifront/src/components/tx-details/hash-parser.tsx b/apps/minifront/src/components/tx-details/hash-parser.tsx index 663f25a6bf..0c862872a8 100644 --- a/apps/minifront/src/components/tx-details/hash-parser.tsx +++ b/apps/minifront/src/components/tx-details/hash-parser.tsx @@ -6,9 +6,10 @@ import { TabsTrigger, TransactionViewComponent, } from '@penumbra-zone/ui'; -import { Jsonified, viewFromEmptyPerspective } from '@penumbra-zone/types'; import { TxDetailsLoaderResult } from '.'; import { TransactionInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; +import { viewFromEmptyPerspective } from '@penumbra-zone/types/src/transaction'; export enum TxDetailsTab { PUBLIC = 'public', diff --git a/apps/minifront/src/components/tx-details/index.tsx b/apps/minifront/src/components/tx-details/index.tsx index 5a09fd054e..a614e0ecbd 100644 --- a/apps/minifront/src/components/tx-details/index.tsx +++ b/apps/minifront/src/components/tx-details/index.tsx @@ -5,7 +5,7 @@ import { EduPanel } from '../shared/edu-panels/content'; import { LoaderFunction, useLoaderData, useRouteError } from 'react-router-dom'; import { getTxInfoByHash } from '../../fetchers/tx-info-by-hash'; import { TransactionInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client/prax'; +import { throwIfPraxNotConnectedTimeout } from '@penumbra-zone/client'; export interface TxDetailsLoaderResult { hash: string; diff --git a/apps/minifront/src/fetchers/address.ts b/apps/minifront/src/fetchers/address.ts index dda1a7226c..9945e77582 100644 --- a/apps/minifront/src/fetchers/address.ts +++ b/apps/minifront/src/fetchers/address.ts @@ -1,6 +1,6 @@ import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32Address } from '@penumbra-zone/types'; import { viewClient } from '../clients'; +import { bech32Address } from '@penumbra-zone/types/src/address'; type Index = number; type Bech32Address = string; diff --git a/apps/minifront/src/fetchers/assets.ts b/apps/minifront/src/fetchers/assets.ts index 663dfca37a..be907e9e6f 100644 --- a/apps/minifront/src/fetchers/assets.ts +++ b/apps/minifront/src/fetchers/assets.ts @@ -1,4 +1,4 @@ -import Array from '@penumbra-zone/polyfills/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; import { AssetsRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { viewClient } from '../clients'; diff --git a/apps/minifront/src/fetchers/balances/by-account.ts b/apps/minifront/src/fetchers/balances/by-account.ts index 6e205ba004..f5a99c4bab 100644 --- a/apps/minifront/src/fetchers/balances/by-account.ts +++ b/apps/minifront/src/fetchers/balances/by-account.ts @@ -4,7 +4,7 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { getBalances } from '.'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { getAddress, getAddressIndex } from '@penumbra-zone/getters'; +import { getAddress, getAddressIndex } from '@penumbra-zone/getters/src/address-view'; export interface BalancesByAccount { index: AddressIndex; diff --git a/apps/minifront/src/fetchers/balances/by-asset.ts b/apps/minifront/src/fetchers/balances/by-asset.ts index 770bfac0e1..5e1f1ea287 100644 --- a/apps/minifront/src/fetchers/balances/by-asset.ts +++ b/apps/minifront/src/fetchers/balances/by-asset.ts @@ -1,7 +1,7 @@ import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { addAmounts } from '@penumbra-zone/types'; -import { getAssetIdFromValueView } from '@penumbra-zone/getters'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { getAssetIdFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { addAmounts } from '@penumbra-zone/types/src/amount'; const hasMatchingAssetId = (vA: ValueView, vB: ValueView) => { return getAssetIdFromValueView(vA).equals(getAssetIdFromValueView(vB)); diff --git a/apps/minifront/src/fetchers/balances/index.ts b/apps/minifront/src/fetchers/balances/index.ts index d4e9d56ed3..53eaf1656e 100644 --- a/apps/minifront/src/fetchers/balances/index.ts +++ b/apps/minifront/src/fetchers/balances/index.ts @@ -2,7 +2,7 @@ import { BalancesRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbr import { AssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { AddressIndex } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { viewClient } from '../../clients'; -import Array from '@penumbra-zone/polyfills/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; interface BalancesProps { accountFilter?: AddressIndex; diff --git a/apps/minifront/src/fetchers/transactions.ts b/apps/minifront/src/fetchers/transactions.ts index 1a137c6444..9e3c35838b 100644 --- a/apps/minifront/src/fetchers/transactions.ts +++ b/apps/minifront/src/fetchers/transactions.ts @@ -1,6 +1,7 @@ import { viewClient } from '../clients'; -import Array from '@penumbra-zone/polyfills/Array.fromAsync'; -import { getTransactionClassificationLabel, uint8ArrayToHex } from '@penumbra-zone/types'; +import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import { getTransactionClassificationLabel } from '@penumbra-zone/types/src/transaction'; +import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; export interface TransactionSummary { height: number; diff --git a/apps/minifront/src/fetchers/tx-info-by-hash.ts b/apps/minifront/src/fetchers/tx-info-by-hash.ts index 60a4a0a8c6..8cf9e119d9 100644 --- a/apps/minifront/src/fetchers/tx-info-by-hash.ts +++ b/apps/minifront/src/fetchers/tx-info-by-hash.ts @@ -1,7 +1,7 @@ -import { hexToUint8Array } from '@penumbra-zone/types'; import { viewClient } from '../clients'; import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; import { TransactionInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { hexToUint8Array } from '@penumbra-zone/types/src/hex'; export const getTxInfoByHash = async (hash: string): Promise => { const res = await viewClient.transactionInfoByHash({ diff --git a/apps/minifront/src/fetchers/unclaimed-swaps.ts b/apps/minifront/src/fetchers/unclaimed-swaps.ts index 1e1d733865..849ca486ab 100644 --- a/apps/minifront/src/fetchers/unclaimed-swaps.ts +++ b/apps/minifront/src/fetchers/unclaimed-swaps.ts @@ -1,7 +1,7 @@ import { viewClient } from '../clients'; -import Array from '@penumbra-zone/polyfills/Array.fromAsync'; -import { getUnclaimedSwaps } from '@penumbra-zone/getters'; +import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; import { SwapRecord } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { getUnclaimedSwaps } from '@penumbra-zone/getters/src/unclaimed-swaps-response'; export const fetchUnclaimedSwaps = async (): Promise => { const responses = await Array.fromAsync(viewClient.unclaimedSwaps({})); diff --git a/apps/minifront/src/state/helpers.ts b/apps/minifront/src/state/helpers.ts index 3e553fd132..46bf4f9db6 100644 --- a/apps/minifront/src/state/helpers.ts +++ b/apps/minifront/src/state/helpers.ts @@ -1,14 +1,13 @@ import { AuthorizeAndBuildRequest, + AuthorizeAndBuildResponse, BroadcastTransactionRequest, + BroadcastTransactionResponse, TransactionPlannerRequest, WitnessAndBuildRequest, WitnessAndBuildResponse, - AuthorizeAndBuildResponse, - BroadcastTransactionResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { viewClient } from '../clients'; -import { uint8ArrayToHex } from '@penumbra-zone/types'; import { sha256Hash } from '@penumbra-zone/crypto-web'; import { Transaction, @@ -17,6 +16,7 @@ import { import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; import { PartialMessage } from '@bufbuild/protobuf'; import { ConnectError } from '@connectrpc/connect'; +import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; export const plan = async ( req: PartialMessage, diff --git a/apps/minifront/src/state/ibc.test.ts b/apps/minifront/src/state/ibc.test.ts index 6ae2e098d0..8283b497fb 100644 --- a/apps/minifront/src/state/ibc.test.ts +++ b/apps/minifront/src/state/ibc.test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, test } from 'vitest'; import { create, StoreApi, UseBoundStore } from 'zustand'; import { AllSlices, initializeStore } from '.'; -import { bech32ToUint8Array, Chain } from '@penumbra-zone/types'; +import { Chain } from '@penumbra-zone/constants/src/chains'; import { Metadata, ValueView, @@ -11,6 +11,7 @@ import { sendValidationErrors } from './send'; import { AddressView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { produce } from 'immer'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; // TODO: Revisit tests when re-implementing ibc form diff --git a/apps/minifront/src/state/ibc.ts b/apps/minifront/src/state/ibc.ts index 0277386c8b..80e411f861 100644 --- a/apps/minifront/src/state/ibc.ts +++ b/apps/minifront/src/state/ibc.ts @@ -1,21 +1,22 @@ -import { Chain, toBaseUnit } from '@penumbra-zone/types'; -import { - getAddressIndex, - getDisplayDenomExponentFromValueView, - getMetadata, -} from '@penumbra-zone/getters'; import { AllSlices, SliceCreator } from '.'; import { BalancesResponse, TransactionPlannerRequest, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { BigNumber } from 'bignumber.js'; -import { typeRegistry } from '@penumbra-zone/types/registry'; import { ClientState } from '@buf/cosmos_ibc.bufbuild_es/ibc/lightclients/tendermint/v1/tendermint_pb'; import { Height } from '@buf/cosmos_ibc.bufbuild_es/ibc/core/client/v1/client_pb'; import { ibcClient, viewClient } from '../clients'; import { authWitnessBuild, broadcast, getTxHash, plan, userDeniedTransaction } from './helpers'; import { TransactionToast } from '@penumbra-zone/ui'; +import { Chain } from '@penumbra-zone/constants/src/chains'; +import { + getDisplayDenomExponentFromValueView, + getMetadata, +} from '@penumbra-zone/getters/src/value-view'; +import { getAddressIndex } from '@penumbra-zone/getters/src/address-view'; +import { typeRegistry } from '@penumbra-zone/types/src/registry'; +import { toBaseUnit } from '@penumbra-zone/types/src/lo-hi'; export interface IbcSendSlice { selection: BalancesResponse | undefined; diff --git a/apps/minifront/src/state/send.test.ts b/apps/minifront/src/state/send.test.ts index 56c3879e6e..c7dd79506a 100644 --- a/apps/minifront/src/state/send.test.ts +++ b/apps/minifront/src/state/send.test.ts @@ -4,7 +4,6 @@ import { AllSlices, initializeStore } from '.'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; import { sendValidationErrors } from './send'; import { AddressView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32ToUint8Array, stringToUint8Array } from '@penumbra-zone/types'; import { Metadata, ValueView, @@ -16,6 +15,8 @@ import { TransactionPlannerResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { Fee } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/fee/v1/fee_pb'; +import { stringToUint8Array } from '@penumbra-zone/types/src/string'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; vi.mock('../fetchers/address', () => ({ getAddressByIndex: vi.fn(), diff --git a/apps/minifront/src/state/send.ts b/apps/minifront/src/state/send.ts index 7bc70ba7ec..41712a6e3c 100644 --- a/apps/minifront/src/state/send.ts +++ b/apps/minifront/src/state/send.ts @@ -1,11 +1,5 @@ import { AllSlices, SliceCreator } from '.'; -import { - getAddress, - getAddressIndex, - getAssetIdFromValueView, - getDisplayDenomExponentFromValueView, -} from '@penumbra-zone/getters'; -import { fromValueView, isPenumbraAddr, toBaseUnit } from '@penumbra-zone/types'; + import { BalancesResponse, TransactionPlannerRequest, @@ -19,6 +13,14 @@ import { FeeTier_Tier, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/fee/v1/fee_pb'; import { TransactionToast } from '@penumbra-zone/ui'; +import { + getAssetIdFromValueView, + getDisplayDenomExponentFromValueView, +} from '@penumbra-zone/getters/src/value-view'; +import { getAddress, getAddressIndex } from '@penumbra-zone/getters/src/address-view'; +import { toBaseUnit } from '@penumbra-zone/types/src/lo-hi'; +import { fromValueView } from '@penumbra-zone/types/src/amount'; +import { isPenumbraAddr } from '@penumbra-zone/types/src/address'; export interface SendSlice { selection: BalancesResponse | undefined; diff --git a/apps/minifront/src/state/staking/assemble-undelegate-claim-request.ts b/apps/minifront/src/state/staking/assemble-undelegate-claim-request.ts index 2db1fe3f86..58ee5240a4 100644 --- a/apps/minifront/src/state/staking/assemble-undelegate-claim-request.ts +++ b/apps/minifront/src/state/staking/assemble-undelegate-claim-request.ts @@ -1,15 +1,16 @@ import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { - TransactionPlannerRequest_UndelegateClaim, TransactionPlannerRequest, + TransactionPlannerRequest_UndelegateClaim, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; + +import { sctClient, stakeClient, viewClient } from '../../clients'; import { + getAmount, getStartEpochIndexFromValueView, getValidatorIdentityKeyAsBech32StringFromValueView, - asIdentityKey, - getAmount, -} from '@penumbra-zone/getters'; -import { stakeClient, viewClient, sctClient } from '../../clients'; +} from '@penumbra-zone/getters/src/value-view'; +import { asIdentityKey } from '@penumbra-zone/getters/src/string'; const getUndelegateClaimPlannerRequest = (endEpochIndex: bigint) => async (unbondingToken: ValueView) => { diff --git a/apps/minifront/src/state/staking/index.test.ts b/apps/minifront/src/state/staking/index.test.ts index 685029764c..c5fdc525a2 100644 --- a/apps/minifront/src/state/staking/index.test.ts +++ b/apps/minifront/src/state/staking/index.test.ts @@ -1,18 +1,18 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; -import { StoreApi, UseBoundStore, create } from 'zustand'; +import { create, StoreApi, UseBoundStore } from 'zustand'; import { AllSlices, initializeStore } from '..'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { Metadata, ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { bech32IdentityKey } from '@penumbra-zone/types'; -import { getValidatorInfoFromValueView } from '@penumbra-zone/getters'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; +import { getValidatorInfoFromValueView } from '@penumbra-zone/getters/src/value-view'; import { AddressView, IdentityKey, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { THROTTLE_MS, accountsSelector } from '.'; +import { accountsSelector, THROTTLE_MS } from '.'; import { DelegationsByAddressIndexResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; const validator1IdentityKey = new IdentityKey({ ik: new Uint8Array([1, 2, 3]) }); diff --git a/apps/minifront/src/state/staking/index.ts b/apps/minifront/src/state/staking/index.ts index 1a8e56e6fe..fcc063b8a0 100644 --- a/apps/minifront/src/state/staking/index.ts +++ b/apps/minifront/src/state/staking/index.ts @@ -1,32 +1,14 @@ import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { AllSlices, SliceCreator } from '..'; -import { - getAmount, - getAssetIdFromValueView, - getDisplayDenomExponent, - getDisplayDenomExponentFromValueView, - getDisplayDenomFromView, - getRateData, - getValidatorInfoFromValueView, - getValueView, - getVotingPowerFromValidatorInfo, -} from '@penumbra-zone/getters'; -import { - VotingPowerAsIntegerPercentage, - getVotingPowerByValidatorInfo, - isDelegationTokenForValidator, - joinLoHiAmount, - toBaseUnit, - splitLoHi, -} from '@penumbra-zone/types'; +import { getDisplayDenomExponent } from '@penumbra-zone/getters/src/metadata'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { BalancesByAccount, getBalancesByAccount } from '../../fetchers/balances/by-account'; import { + assetPatterns, localAssets, STAKING_TOKEN, STAKING_TOKEN_METADATA, - assetPatterns, -} from '@penumbra-zone/constants'; +} from '@penumbra-zone/constants/src/assets'; import { AddressIndex } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { TransactionToast } from '@penumbra-zone/ui'; import { authWitnessBuild, broadcast, getTxHash, plan, userDeniedTransaction } from '../helpers'; @@ -34,7 +16,26 @@ import { TransactionPlannerRequest } from '@buf/penumbra-zone_penumbra.bufbuild_ import { BigNumber } from 'bignumber.js'; import { assembleUndelegateClaimRequest } from './assemble-undelegate-claim-request'; import throttle from 'lodash/throttle'; +import { + getAmount, + getAssetIdFromValueView, + getDisplayDenomExponentFromValueView, + getDisplayDenomFromView, + getValidatorInfoFromValueView, +} from '@penumbra-zone/getters/src/value-view'; +import { + getRateData, + getVotingPowerFromValidatorInfo, +} from '@penumbra-zone/getters/src/validator-info'; +import { + getVotingPowerByValidatorInfo, + isDelegationTokenForValidator, + VotingPowerAsIntegerPercentage, +} from '@penumbra-zone/types/src/staking'; +import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { splitLoHi, toBaseUnit } from '@penumbra-zone/types/src/lo-hi'; import { viewClient } from '../../clients'; +import { getValueView } from '@penumbra-zone/getters/src/delegations-by-address-index-response'; const STAKING_TOKEN_DISPLAY_DENOM_EXPONENT = (() => { const stakingAsset = localAssets.find(asset => asset.display === STAKING_TOKEN); diff --git a/apps/minifront/src/state/swap.test.ts b/apps/minifront/src/state/swap.test.ts index 2747ec21d4..1b0f832437 100644 --- a/apps/minifront/src/state/swap.test.ts +++ b/apps/minifront/src/state/swap.test.ts @@ -6,10 +6,10 @@ import { ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; -import { bech32ToUint8Array } from '@penumbra-zone/types'; -import { localAssets } from '@penumbra-zone/constants'; +import { localAssets } from '@penumbra-zone/constants/src/assets'; import { AddressView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; describe('Swap Slice', () => { const selectionExample = new BalancesResponse({ diff --git a/apps/minifront/src/state/swap.ts b/apps/minifront/src/state/swap.ts index d8cbc3a2c8..63b3e957af 100644 --- a/apps/minifront/src/state/swap.ts +++ b/apps/minifront/src/state/swap.ts @@ -16,22 +16,22 @@ import { Value, ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { - getAddressIndex, - getAssetId, - getAssetIdFromValueView, - getDisplayDenomExponentFromValueView, - getMetadata, - getSwapCommitmentFromTx, -} from '@penumbra-zone/getters'; import { BigNumber } from 'bignumber.js'; import { getAddressByIndex } from '../fetchers/address'; import { StateCommitment } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/crypto/tct/v1/tct_pb'; import { errorToast, TransactionToast } from '@penumbra-zone/ui'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; -import { toBaseUnit } from '@penumbra-zone/types'; import { SimulateTradeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; import { simulateClient } from '../clients'; +import { + getAssetIdFromValueView, + getDisplayDenomExponentFromValueView, + getMetadata, +} from '@penumbra-zone/getters/src/value-view'; +import { getAssetId } from '@penumbra-zone/getters/src/metadata'; +import { getSwapCommitmentFromTx } from '@penumbra-zone/getters/src/transaction'; +import { getAddressIndex } from '@penumbra-zone/getters/src/address-view'; +import { toBaseUnit } from '@penumbra-zone/types/src/lo-hi'; export interface SimulateSwapResult { output: ValueView; diff --git a/apps/minifront/src/state/unclaimed-swaps.ts b/apps/minifront/src/state/unclaimed-swaps.ts index 9d9f941b8a..b50ccb7132 100644 --- a/apps/minifront/src/state/unclaimed-swaps.ts +++ b/apps/minifront/src/state/unclaimed-swaps.ts @@ -1,7 +1,7 @@ import { AllSlices, SliceCreator } from '.'; import { SwapRecord } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { getSwapRecordCommitment } from '@penumbra-zone/getters'; import { issueSwapClaim } from './swap'; +import { getSwapRecordCommitment } from '@penumbra-zone/getters/src/swap-record'; type SwapCommitmentId = string; diff --git a/apps/node-status/package.json b/apps/node-status/package.json index 758c0b6205..e112b8110f 100644 --- a/apps/node-status/package.json +++ b/apps/node-status/package.json @@ -1,15 +1,18 @@ { "name": "node-status", "version": "1.0.0", + "private": true, "type": "module", "scripts": { "dev": "vite --port 5174", "build": "tsc && vite build", + "clean": "rm -rfv dist", "lint": "eslint . --ext ts,tsx", "preview": "vite preview" }, "dependencies": { "@penumbra-zone/crypto-web": "workspace:*", + "@penumbra-zone/types": "workspace:*", "@penumbra-zone/ui": "workspace:*", "date-fns": "^3.3.1", "react": "^18.2.0", diff --git a/apps/node-status/src/components/node-info.tsx b/apps/node-status/src/components/node-info.tsx index 502bac32c5..a1f56a6eb5 100644 --- a/apps/node-status/src/components/node-info.tsx +++ b/apps/node-status/src/components/node-info.tsx @@ -1,7 +1,7 @@ import { useLoaderData } from 'react-router-dom'; -import { uint8ArrayToString } from '@penumbra-zone/types'; import { Card, Identicon } from '@penumbra-zone/ui'; import { IndexLoaderResponse } from '../fetching/loader'; +import { uint8ArrayToString } from '@penumbra-zone/types/src/string'; export const NodeInfo = () => { const { diff --git a/apps/node-status/src/components/validator-info.tsx b/apps/node-status/src/components/validator-info.tsx index d884e5cf43..4a8b97299b 100644 --- a/apps/node-status/src/components/validator-info.tsx +++ b/apps/node-status/src/components/validator-info.tsx @@ -1,8 +1,9 @@ import { useLoaderData } from 'react-router-dom'; -import { uint8ArrayToHex, uint8ArrayToString } from '@penumbra-zone/types'; import { Card } from '@penumbra-zone/ui'; import { IndexLoaderResponse } from '../fetching/loader'; import { PublicKey } from '@buf/tendermint_tendermint.bufbuild_es/tendermint/crypto/keys_pb'; +import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { uint8ArrayToString } from '@penumbra-zone/types/src/string'; const PublicKeyComponent = ({ publicKey }: { publicKey: PublicKey | undefined }) => { if (!publicKey) return null; diff --git a/docs/README.md b/docs/README.md index 9812564803..98f7b5d91b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -27,3 +27,4 @@ - [Protobufs](protobufs.md) - [Extension services](extension-services.md) - [Writing performant React components](writing-performant-react-components.md) +- [Deployment](deployment.md) diff --git a/docs/deployment.md b/docs/deployment.md new file mode 100644 index 0000000000..5a4f477507 --- /dev/null +++ b/docs/deployment.md @@ -0,0 +1,40 @@ +# Deployment Workflows + +### Prax Chrome Extension + +Create a [github issue deployment template]() to track deployment progress and steps. + +Upon a new [git tag](https://github.com/penumbra-zone/web/releases/tag/v4.2.0) being pushed to the repo, +a [workflow](../.github/workflows/extension-publish.yml) is kicked off. It then requests permission to +continue from [github group](https://github.com/orgs/penumbra-zone/teams/penumbra-labs) and, after approval, +bundles the extension into a .zip which gets put in the Chrome Webstore review queue. It typically takes +1-3 days to go live. The publication status can be monitored in the [Chrome Developer Dashboard](https://chrome.google.com/webstore/devconsole/aabc0949-93db-4e77-ad9f-e6ca1d132501?hl=en). + +### Web app + +Manually run [Deploy Firebase Dapp](https://github.com/penumbra-zone/web/actions/workflows/deploy-firebase-dapp.yml) github action on main branch. + +### NPM Packages + +The packages in this repo are published using [changesets](https://github.com/changesets/changesets). + +As changes are made in the repo, devs are encouraged to generate a changeset via `pnpm changeset`. These markdown files are committed along with their PR. They look like this: + +```markdown +--- +'@penumbra-zone/query': major +'@penumbra-zone/client': minor +--- + +A very helpful description of the changes +``` + +When we are ready to push these changes to NPM, run the [Packages Release](../.github/workflows/packages-release.yml) workflow. +If there are changesets, it will create a PR versioning the packages appropriately and adding changelogs. +If there are no changesets, it will attempt to publish all packages with newer versions (not marked as private). + +### Node status page + +Build the latest node status page in this repo via `pnpm build`. Take the resulting `dist` output, +zip the folder, and create a PR in [penumbra core](https://github.com/penumbra-zone/penumbra/tree/main/assets) updating `node-status.zip`. +When a new chain version is pushed, this will be deployed with it. diff --git a/package.json b/package.json index ca1277b709..f20216fddc 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,8 @@ "format-check": "prettier --check .", "format-check:rust": "turbo run format-check:rust", "playwright-install": "playwright install", + "changeset": "changeset", + "changeset:publish": "changeset publish", "all-check": "pnpm install && pnpm compile && pnpm format-check && pnpm lint && pnpm test && pnpm download-keys && pnpm build && pnpm format-check:rust && pnpm lint:rust && pnpm test:rust" }, "dependencies": { @@ -31,7 +33,7 @@ "@penumbra-zone/tailwind-config": "workspace:*" }, "devDependencies": { - "@penumbra-zone/types": "workspace:*", + "@changesets/cli": "^2.27.1", "@penumbra-zone/wasm": "workspace:*", "@storybook/react-vite": "8.0.0-beta.4", "@turbo/gen": "^1.12.5", @@ -61,6 +63,8 @@ "turbo": "^1.12.5", "typescript": "^5.4.2", "vite": "^5.1.6", + "vite-plugin-dts": "^3.7.3", + "vite-plugin-node-polyfills": "0.21.0", "vite-plugin-top-level-await": "^1.4.1", "vite-plugin-wasm": "^3.3.0", "vitest": "^1.3.1" diff --git a/packages/client/.eslintrc.cjs b/packages/client/.eslintrc.cjs new file mode 100644 index 0000000000..c1872fb900 --- /dev/null +++ b/packages/client/.eslintrc.cjs @@ -0,0 +1,8 @@ +module.exports = { + root: true, + extends: ['custom'], + parserOptions: { + project: true, + tsconfigRootDir: __dirname, + }, +}; diff --git a/packages/client/index.ts b/packages/client/index.ts deleted file mode 100644 index b148ea28fa..0000000000 --- a/packages/client/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { PenumbraSymbol } from './global'; -export { PenumbraSymbol } from './global'; -export type { PenumbraProvider } from './global'; -export default window[PenumbraSymbol]; diff --git a/packages/client/package.json b/packages/client/package.json index 4b642c3922..5412c2b4bf 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,9 +1,24 @@ { "name": "@penumbra-zone/client", - "version": "1.0.0", - "description": "", + "version": "1.0.17", + "description": "Package for connecting to Prax extension", + "type": "module", + "files": [ + "dist" + ], + "exports": { + ".": "./dist/prax.js", + "./global": "./dist/global.js", + "./src/global": "./dist/global.js", + "./get-port": "./dist/get-port.js" + }, + "scripts": { + "build": "tsc && vite build", + "clean": "rm -rfv dist", + "lint": "eslint \"**/*.ts*\"" + }, "dependencies": { - "@connectrpc/connect": "^1.4.0", - "@penumbra-zone/transport-dom": "workspace:*" + "@penumbra-zone/transport-dom": "workspace:*", + "@penumbra-zone/types": "workspace:*" } } diff --git a/packages/client/get-port.ts b/packages/client/src/get-port.ts similarity index 70% rename from packages/client/get-port.ts rename to packages/client/src/get-port.ts index 3ef4256189..2a397a4059 100644 --- a/packages/client/get-port.ts +++ b/packages/client/src/get-port.ts @@ -1,9 +1,13 @@ -import penumbra from '.'; +import { PenumbraSymbol } from './global'; +// Used to connect to other Penumbra wallets export const getAnyPenumbraPort = async (request?: boolean) => { + const penumbra = window[PenumbraSymbol]; if (!penumbra) throw Error('No Penumbra global (no provider installed)'); + const provider = Object.values(penumbra)[0]; if (!provider) throw Error('No Penumbra provider available'); + if (request) void provider.request(); return provider.connect(); }; diff --git a/packages/client/global.ts b/packages/client/src/global.ts similarity index 100% rename from packages/client/global.ts rename to packages/client/src/global.ts diff --git a/packages/client/prax.ts b/packages/client/src/prax.ts similarity index 84% rename from packages/client/prax.ts rename to packages/client/src/prax.ts index ce987f2182..301076872e 100644 --- a/packages/client/prax.ts +++ b/packages/client/src/prax.ts @@ -4,21 +4,25 @@ * additional conveniences. */ -const prax_id = 'lkpmkhpnhknhmibgnmmhdhgdilepfghe' as const; -const prax_origin = `chrome-extension://${prax_id}`; - import type { JsonValue, ServiceType } from '@bufbuild/protobuf'; import type { Transport } from '@connectrpc/connect'; import { createPromiseClient } from '@connectrpc/connect'; -import { createChannelTransport } from '@penumbra-zone/transport-dom/create'; -import { jsonOptions } from '@penumbra-zone/types/registry'; +import { createChannelTransport } from '@penumbra-zone/transport-dom/src/create'; import { PenumbraSymbol } from './global'; +import { jsonOptions } from '@penumbra-zone/types/src/registry'; + +const prax_id = 'lkpmkhpnhknhmibgnmmhdhgdilepfghe' as const; +const prax_origin = `chrome-extension://${prax_id}`; export class PraxNotAvailableError extends Error {} export class PraxNotConnectedError extends Error {} export class PraxManifestError extends Error {} -export const getPraxPort = async () => window[PenumbraSymbol]?.[prax_origin]?.connect()!; +export const getPraxPort = async () => { + const provider = window[PenumbraSymbol]?.[prax_origin]; + if (!provider) throw new Error('Prax not installed'); + return provider.connect(); +}; export const requestPraxConnection = async () => window[PenumbraSymbol]?.[prax_origin]?.request(); @@ -41,7 +45,7 @@ export const isPraxConnectedTimeout = (timeout: number) => }, timeout); }); -export const throwIfPraxNotConnectedTimeout = async (timeout: number = 500) => { +export const throwIfPraxNotConnectedTimeout = async (timeout = 500) => { const isConnected = await isPraxConnectedTimeout(timeout); if (!isConnected) throw new PraxNotConnectedError('Prax not connected'); }; @@ -60,8 +64,9 @@ export const getPraxManifest = async () => { const manifestHref = window[PenumbraSymbol]?.[prax_origin]?.manifest; if (manifestHref !== `${prax_origin}/manifest.json`) throw new PraxManifestError('Incorrect Prax manifest href'); - const manifest = await (await fetch(manifestHref)).json(); - return manifest as JsonValue; + + const response = await fetch(manifestHref); + return (await response.json()) as JsonValue; }; let praxTransport: Transport | undefined; diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json new file mode 100644 index 0000000000..459b3e4971 --- /dev/null +++ b/packages/client/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "tsconfig/base.json", + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist", + "noEmit": true + } +} diff --git a/packages/client/vite.config.ts b/packages/client/vite.config.ts new file mode 100644 index 0000000000..afd6b12320 --- /dev/null +++ b/packages/client/vite.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; + +export default defineConfig({ + build: { + lib: { + entry: { + prax: './src/prax.ts', + global: './src/global.ts', + 'get-port': './src/get-port.ts', + }, + formats: ['es'], + }, + }, + plugins: [dts({ rollupTypes: true })], +}); diff --git a/packages/constants/index.ts b/packages/constants/index.ts deleted file mode 100644 index 2315c8cdc0..0000000000 --- a/packages/constants/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './assets'; -export * from './chains'; diff --git a/packages/constants/package.json b/packages/constants/package.json index 5026e9d218..28dca60fe3 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -1,10 +1,18 @@ { "name": "@penumbra-zone/constants", - "version": "1.0.0", + "version": "1.0.3", "license": "MIT", "type": "module", + "files": [ + "dist" + ], + "exports": { + "./src/assets": "./dist/assets.js", + "./src/chains": "./dist/chains.js" + }, "scripts": { - "lint": "eslint \"**/*.ts*\"", - "test": "vitest run" + "build": "tsc && vite build", + "clean": "rm -rfv dist", + "lint": "eslint \"**/*.ts*\"" } } diff --git a/packages/constants/assets/index.test.ts b/packages/constants/src/assets.test.ts similarity index 98% rename from packages/constants/assets/index.test.ts rename to packages/constants/src/assets.test.ts index ab64f2f684..5439f04e60 100644 --- a/packages/constants/assets/index.test.ts +++ b/packages/constants/src/assets.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import { assetPatterns } from '.'; +import { assetPatterns } from './assets'; describe('assetPatterns', () => { describe('lpNftPattern', () => { diff --git a/packages/constants/assets/index.ts b/packages/constants/src/assets.ts similarity index 96% rename from packages/constants/assets/index.ts rename to packages/constants/src/assets.ts index e3cd4f9b59..12cdafb02f 100644 --- a/packages/constants/assets/index.ts +++ b/packages/constants/src/assets.ts @@ -11,7 +11,7 @@ export const STAKING_TOKEN_METADATA = localAssets.find( metadata => metadata.display === STAKING_TOKEN, )!; -export interface AssetPattens { +export interface AssetPatterns { lpNft: RegExp; delegationToken: RegExp; proposalNft: RegExp; @@ -46,7 +46,7 @@ export interface UnbondingCaptureGroups { * Source of truth for regex patterns: * https://github.com/penumbra-zone/penumbra/blob/main/crates/core/asset/src/asset/registry.rs */ -export const assetPatterns: AssetPattens = { +export const assetPatterns: AssetPatterns = { lpNft: new RegExp(/^lpnft_/), delegationToken: new RegExp( /^delegation_(?penumbravalid1(?[a-zA-HJ-NP-Z0-9]+))$/, diff --git a/packages/constants/chains.ts b/packages/constants/src/chains.ts similarity index 76% rename from packages/constants/chains.ts rename to packages/constants/src/chains.ts index 78b2fc740a..c417df6412 100644 --- a/packages/constants/chains.ts +++ b/packages/constants/src/chains.ts @@ -1,5 +1,10 @@ // Canonical data source: https://github.com/cosmos/chain-registry/tree/master -import { Chain } from '@penumbra-zone/types'; +export interface Chain { + displayName: string; + chainId: string; + ibcChannel: string; + iconUrl: string; +} export const testnetIbcChains: Chain[] = [ { diff --git a/packages/constants/assets/local-asset-registry.json b/packages/constants/src/local-asset-registry.json similarity index 100% rename from packages/constants/assets/local-asset-registry.json rename to packages/constants/src/local-asset-registry.json diff --git a/packages/constants/tsconfig.json b/packages/constants/tsconfig.json index 61a00fa282..459b3e4971 100644 --- a/packages/constants/tsconfig.json +++ b/packages/constants/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "tsconfig/base.json", - "include": ["."], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist", + "noEmit": true + } } diff --git a/packages/constants/vite.config.ts b/packages/constants/vite.config.ts new file mode 100644 index 0000000000..4521967e0c --- /dev/null +++ b/packages/constants/vite.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; + +export default defineConfig({ + build: { + lib: { + entry: { + assets: './src/assets.ts', + chains: './src/chains.ts', + }, + formats: ['es'], + }, + }, + plugins: [dts({ rollupTypes: true })], +}); diff --git a/packages/crypto/package.json b/packages/crypto/package.json index e281cdf041..f716d20c7a 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/crypto-web", "version": "1.0.0", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -9,7 +10,8 @@ }, "dependencies": { "bip39": "^3.1.0", - "crypto-js": "^4.2.0" + "crypto-js": "^4.2.0", + "@penumbra-zone/types": "workspace:*" }, "devDependencies": { "@types/crypto-js": "^4.2.2" diff --git a/packages/crypto/src/encryption.test.ts b/packages/crypto/src/encryption.test.ts index 7f378fa0b8..57e2840767 100644 --- a/packages/crypto/src/encryption.test.ts +++ b/packages/crypto/src/encryption.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; import { Key, KeyPrint, uintArraysEqual } from './encryption'; -import { Box } from '@penumbra-zone/types'; +import { Box } from '@penumbra-zone/types/src/box'; // NOTE: To have the most accurate representation, these the web crypto API tests run in a browser environment diff --git a/packages/crypto/src/encryption.ts b/packages/crypto/src/encryption.ts index 0e3f68c7b2..c5083707b7 100644 --- a/packages/crypto/src/encryption.ts +++ b/packages/crypto/src/encryption.ts @@ -1,4 +1,5 @@ -import { Base64Str, base64ToUint8Array, Box, uint8ArrayToBase64 } from '@penumbra-zone/types'; +import { Base64Str, base64ToUint8Array, uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; +import { Box } from '@penumbra-zone/types/src/box'; /** * ==== Internal ==== diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index 9a18399b11..e8dc547f1a 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -1,6 +1,7 @@ { "name": "eslint-config-custom", "version": "1.0.0", + "private": true, "main": "index.js", "license": "MIT", "publishConfig": { diff --git a/packages/getters/index.ts b/packages/getters/index.ts deleted file mode 100644 index 8420b1093f..0000000000 --- a/packages/getters/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src'; diff --git a/packages/getters/package.json b/packages/getters/package.json index 3189fc26a1..5545c29115 100644 --- a/packages/getters/package.json +++ b/packages/getters/package.json @@ -1,9 +1,37 @@ { "name": "@penumbra-zone/getters", - "version": "1.0.0", + "version": "1.0.3", "description": "Convenience getters for the deeply nested optionals of Penumbra's protobuf types", "type": "module", + "files": [ + "dist" + ], + "exports": { + "./src/asset": "./dist/asset.js", + "./src/address-view": "./dist/address-view.js", + "./src/delegations-by-address-index-response": "./dist/delegations-by-address-index-response.js", + "./src/funding-stream": "./dist/funding-stream.js", + "./src/metadata": "./dist/metadata.js", + "./src/rate-data": "./dist/rate-data.js", + "./src/string": "./dist/string.js", + "./src/swap": "./dist/swap.js", + "./src/swap-record": "./dist/swap-record.js", + "./src/spendable-note-record": "./dist/spendable-note-record.js", + "./src/trading-pair": "./dist/trading-pair.js", + "./src/transaction": "./dist/transaction.js", + "./src/unclaimed-swaps-response": "./dist/unclaimed-swaps-response.js", + "./src/undelegate-claim": "./dist/undelegate-claim.js", + "./src/undelegate-claim-body": "./dist/undelegate-claim-body.js", + "./src/validator": "./dist/validator.js", + "./src/validator-info": "./dist/validator-info.js", + "./src/validator-info-response": "./dist/validator-info-response.js", + "./src/validator-state": "./dist/validator-state.js", + "./src/validator-status": "./dist/validator-status.js", + "./src/value-view": "./dist/value-view.js" + }, "scripts": { + "build": "tsc && vite build", + "clean": "rm -rfv dist", "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, diff --git a/packages/getters/src/index.ts b/packages/getters/src/index.ts deleted file mode 100644 index e2a4e1ce0f..0000000000 --- a/packages/getters/src/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -export * from './asset'; -export * from './address-view'; -export * from './delegations-by-address-index-response'; -export * from './funding-stream'; -export * from './metadata'; -export * from './rate-data'; -export * from './string'; -export * from './swap'; -export * from './swap-record'; -export * from './spendable-note-record'; -export * from './trading-pair'; -export * from './transaction'; -export * from './unclaimed-swaps-response'; -export * from './undelegate-claim'; -export * from './undelegate-claim-body'; -export * from './validator'; -export * from './validator-info'; -export * from './validator-info-response'; -export * from './validator-state'; -export * from './validator-status'; -export * from './value-view'; diff --git a/packages/getters/src/metadata.ts b/packages/getters/src/metadata.ts index 90235115b8..4a626e9c24 100644 --- a/packages/getters/src/metadata.ts +++ b/packages/getters/src/metadata.ts @@ -1,10 +1,10 @@ import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { createGetter } from './utils/create-getter'; import { + assetPatterns, DelegationCaptureGroups, UnbondingCaptureGroups, - assetPatterns, -} from '@penumbra-zone/constants'; +} from '@penumbra-zone/constants/src/assets'; export const getAssetId = createGetter((metadata?: Metadata) => metadata?.penumbraAssetId); diff --git a/packages/getters/tsconfig.json b/packages/getters/tsconfig.json index 61a00fa282..459b3e4971 100644 --- a/packages/getters/tsconfig.json +++ b/packages/getters/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "tsconfig/base.json", - "include": ["."], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist", + "noEmit": true + } } diff --git a/packages/getters/vite.config.ts b/packages/getters/vite.config.ts new file mode 100644 index 0000000000..541bef0116 --- /dev/null +++ b/packages/getters/vite.config.ts @@ -0,0 +1,34 @@ +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; + +export default defineConfig({ + build: { + lib: { + entry: { + asset: './src/asset.ts', + 'address-view': './src/address-view.ts', + 'delegations-by-address-index-response': './src/delegations-by-address-index-response.ts', + 'funding-stream': './src/funding-stream.ts', + metadata: './src/metadata.ts', + 'rate-data': './src/rate-data.ts', + string: './src/string.ts', + swap: './src/swap.ts', + 'swap-record': './src/swap-record.ts', + 'spendable-note-record': './src/spendable-note-record.ts', + 'trading-pair': './src/trading-pair.ts', + transaction: './src/transaction.ts', + 'unclaimed-swaps-response': './src/unclaimed-swaps-response.ts', + 'undelegate-claim': './src/undelegate-claim.ts', + 'undelegate-claim-body': './src/undelegate-claim-body.ts', + validator: './src/validator.ts', + 'validator-info': './src/validator-info.ts', + 'validator-info-response': './src/validator-info-response.ts', + 'validator-state': './src/validator-state.ts', + 'validator-status': './src/validator-status.ts', + 'value-view': './src/value-view.ts', + }, + formats: ['es'], + }, + }, + plugins: [dts({ rollupTypes: true })], +}); diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 4e948a8168..c83f4e645b 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -1,12 +1,24 @@ { "name": "@penumbra-zone/polyfills", - "version": "1.0.0", + "version": "1.0.4", "type": "module", + "files": [ + "dist" + ], + "exports": { + "./src/Array.fromAsync": "./dist/Array.fromAsync.js", + "./src/Map.groupBy": "./dist/Map.groupBy.js", + "./src/Promise.withResolvers": "./dist/Promise.withResolvers.js", + "./src/ReadableStream.from": "./dist/ReadableStream.from.js", + "./src/ReadableStream[Symbol.asyncIterator]": { + "import": "./dist/ReadableStream_Symbol.asyncIterator_.js", + "types": "./dist/ReadableStream[Symbol.asyncIterator].d.ts" + } + }, "scripts": { + "build": "tsc && vite build", + "clean": "rm -rfv dist", "lint": "eslint \"**/*.ts*\"", "test": "vitest run" - }, - "devDependencies": { - "tsconfig": "workspace:*" } } diff --git a/packages/polyfills/Array.fromAsync.test.ts b/packages/polyfills/src/Array.fromAsync.test.ts similarity index 100% rename from packages/polyfills/Array.fromAsync.test.ts rename to packages/polyfills/src/Array.fromAsync.test.ts diff --git a/packages/polyfills/Array.fromAsync.ts b/packages/polyfills/src/Array.fromAsync.ts similarity index 100% rename from packages/polyfills/Array.fromAsync.ts rename to packages/polyfills/src/Array.fromAsync.ts diff --git a/packages/polyfills/Map.groupBy.ts b/packages/polyfills/src/Map.groupBy.ts similarity index 100% rename from packages/polyfills/Map.groupBy.ts rename to packages/polyfills/src/Map.groupBy.ts diff --git a/packages/polyfills/Promise.withResolvers.test.ts b/packages/polyfills/src/Promise.withResolvers.test.ts similarity index 100% rename from packages/polyfills/Promise.withResolvers.test.ts rename to packages/polyfills/src/Promise.withResolvers.test.ts diff --git a/packages/polyfills/Promise.withResolvers.ts b/packages/polyfills/src/Promise.withResolvers.ts similarity index 100% rename from packages/polyfills/Promise.withResolvers.ts rename to packages/polyfills/src/Promise.withResolvers.ts diff --git a/packages/polyfills/ReadableStream.from.test.ts b/packages/polyfills/src/ReadableStream.from.test.ts similarity index 100% rename from packages/polyfills/ReadableStream.from.test.ts rename to packages/polyfills/src/ReadableStream.from.test.ts diff --git a/packages/polyfills/ReadableStream.from.ts b/packages/polyfills/src/ReadableStream.from.ts similarity index 100% rename from packages/polyfills/ReadableStream.from.ts rename to packages/polyfills/src/ReadableStream.from.ts diff --git a/packages/polyfills/ReadableStream[Symbol.asyncIterator].test.ts b/packages/polyfills/src/ReadableStream[Symbol.asyncIterator].test.ts similarity index 100% rename from packages/polyfills/ReadableStream[Symbol.asyncIterator].test.ts rename to packages/polyfills/src/ReadableStream[Symbol.asyncIterator].test.ts diff --git a/packages/polyfills/ReadableStream[Symbol.asyncIterator].ts b/packages/polyfills/src/ReadableStream[Symbol.asyncIterator].ts similarity index 100% rename from packages/polyfills/ReadableStream[Symbol.asyncIterator].ts rename to packages/polyfills/src/ReadableStream[Symbol.asyncIterator].ts diff --git a/packages/polyfills/streamToPromise.test.ts b/packages/polyfills/src/streamToPromise.test.ts similarity index 100% rename from packages/polyfills/streamToPromise.test.ts rename to packages/polyfills/src/streamToPromise.test.ts diff --git a/packages/polyfills/tsconfig.json b/packages/polyfills/tsconfig.json index 61a00fa282..459b3e4971 100644 --- a/packages/polyfills/tsconfig.json +++ b/packages/polyfills/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "tsconfig/base.json", - "include": ["."], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist", + "noEmit": true + } } diff --git a/packages/polyfills/vite.config.ts b/packages/polyfills/vite.config.ts new file mode 100644 index 0000000000..ac3b004a48 --- /dev/null +++ b/packages/polyfills/vite.config.ts @@ -0,0 +1,27 @@ +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; + +export default defineConfig({ + build: { + lib: { + entry: { + 'Array.fromAsync': './src/Array.fromAsync.ts', + 'Map.groupBy': './src/Map.groupBy.ts', + 'Promise.withResolvers': './src/Promise.withResolvers.ts', + 'ReadableStream.from': './src/ReadableStream.from.ts', + 'ReadableStream[Symbol.asyncIterator]': './src/ReadableStream[Symbol.asyncIterator].ts', + }, + formats: ['es'], + }, + }, + plugins: [dts({ rollupTypes: true })], + test: { + include: ['./src/*.test.ts'], + browser: { + name: 'chromium', + provider: 'playwright', + enabled: true, + headless: true, + }, + }, +}); diff --git a/packages/polyfills/vitest.config.ts b/packages/polyfills/vitest.config.ts deleted file mode 100644 index 94a2bd5f66..0000000000 --- a/packages/polyfills/vitest.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - test: { - include: ['./*.test.ts'], - browser: { - name: 'chromium', - provider: 'playwright', - enabled: true, - headless: true, - }, - }, -}); diff --git a/packages/query/package.json b/packages/query/package.json index 319e5d8993..00649d475d 100644 --- a/packages/query/package.json +++ b/packages/query/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/query", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -10,6 +11,7 @@ "@penumbra-zone/crypto-web": "workspace:*", "@penumbra-zone/constants": "workspace:*", "@penumbra-zone/wasm": "workspace:*", + "@penumbra-zone/types": "workspace:*", "bech32": "^2.0.0", "exponential-backoff": "^3.1.1" } diff --git a/packages/query/src/block-processor.ts b/packages/query/src/block-processor.ts index 8b5fa93220..5d4a1a0853 100644 --- a/packages/query/src/block-processor.ts +++ b/packages/query/src/block-processor.ts @@ -1,12 +1,6 @@ import { RootQuerier } from './root-querier'; import { sha256Hash } from '@penumbra-zone/crypto-web'; -import { - BlockProcessorInterface, - customizeSymbol, - IndexedDbInterface, - ViewServerInterface, -} from '@penumbra-zone/types'; import { computePositionId, decodeSctRoot } from '@penumbra-zone/wasm'; import { PositionState, @@ -24,6 +18,10 @@ import { SwapRecord, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { backOff } from 'exponential-backoff'; +import type { BlockProcessorInterface } from '@penumbra-zone/types/src/block-processor'; +import type { IndexedDbInterface } from '@penumbra-zone/types/src/indexed-db'; +import type { ViewServerInterface } from '@penumbra-zone/types/src/servers'; +import { customizeSymbol } from '@penumbra-zone/types/src/customize-symbol'; interface QueryClientProps { querier: RootQuerier; diff --git a/packages/query/src/queriers/app.ts b/packages/query/src/queriers/app.ts index 9185401a8a..385a44dd59 100644 --- a/packages/query/src/queriers/app.ts +++ b/packages/query/src/queriers/app.ts @@ -3,7 +3,7 @@ import { createClient } from './utils'; import { AppParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/app/v1/app_pb'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { QueryService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/app/v1/app_connect'; -import { AppQuerierInterface } from '@penumbra-zone/types/src/querier'; +import type { AppQuerierInterface } from '@penumbra-zone/types/src/querier'; export class AppQuerier implements AppQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/queriers/cnidarium.ts b/packages/query/src/queriers/cnidarium.ts index d1c869b7a5..8925aba7be 100644 --- a/packages/query/src/queriers/cnidarium.ts +++ b/packages/query/src/queriers/cnidarium.ts @@ -6,7 +6,7 @@ import { KeyValueRequest, KeyValueResponse_Value, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/cnidarium/v1/cnidarium_pb'; -import { CnidariumQuerierInterface } from '@penumbra-zone/types'; +import { CnidariumQuerierInterface } from '@penumbra-zone/types/src/querier'; export class CnidariumQuerier implements CnidariumQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/queriers/compact-block.ts b/packages/query/src/queriers/compact-block.ts index da26874285..405c304a28 100644 --- a/packages/query/src/queriers/compact-block.ts +++ b/packages/query/src/queriers/compact-block.ts @@ -5,7 +5,10 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/compact_block/v1/compact_block_pb'; import { QueryService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/component/compact_block/v1/compact_block_connect'; import { createClient } from './utils'; -import { CompactBlockQuerierInterface, CompactBlockRangeParams } from '@penumbra-zone/types'; +import type { + CompactBlockQuerierInterface, + CompactBlockRangeParams, +} from '@penumbra-zone/types/src/querier'; export class CompactBlockQuerier implements CompactBlockQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/queriers/ibc-client.ts b/packages/query/src/queriers/ibc-client.ts index 16186c5e47..51d7602445 100644 --- a/packages/query/src/queriers/ibc-client.ts +++ b/packages/query/src/queriers/ibc-client.ts @@ -1,11 +1,11 @@ import { PromiseClient } from '@connectrpc/connect'; import { createClient } from './utils'; import { Query as IbcClientQuery } from '@buf/cosmos_ibc.connectrpc_es/ibc/core/client/v1/query_connect'; -import { IbcClientQuerierInterface } from '@penumbra-zone/types'; import { QueryClientStatesRequest, QueryClientStatesResponse, } from '@buf/cosmos_ibc.bufbuild_es/ibc/core/client/v1/query_pb'; +import type { IbcClientQuerierInterface } from '@penumbra-zone/types/src/querier'; export class IbcClientQuerier implements IbcClientQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/queriers/shielded-pool.ts b/packages/query/src/queriers/shielded-pool.ts index 41ec6abed9..56149d128f 100644 --- a/packages/query/src/queriers/shielded-pool.ts +++ b/packages/query/src/queriers/shielded-pool.ts @@ -5,7 +5,7 @@ import { AssetId, Metadata, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { ShieldedPoolQuerierInterface } from '@penumbra-zone/types'; +import type { ShieldedPoolQuerierInterface } from '@penumbra-zone/types/src/querier'; export class ShieldedPoolQuerier implements ShieldedPoolQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/queriers/staking.ts b/packages/query/src/queriers/staking.ts index e30f089cfa..64d88aa664 100644 --- a/packages/query/src/queriers/staking.ts +++ b/packages/query/src/queriers/staking.ts @@ -1,12 +1,12 @@ import { PromiseClient } from '@connectrpc/connect'; import { createClient } from './utils'; -import { StakingQuerierInterface } from '@penumbra-zone/types'; import { QueryService as StakingService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/component/stake/v1/stake_connect'; import { ValidatorInfoResponse, ValidatorPenaltyRequest, ValidatorPenaltyResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; +import { StakingQuerierInterface } from '@penumbra-zone/types/src/querier'; export class StakingQuerier implements StakingQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/queriers/tendermint.ts b/packages/query/src/queriers/tendermint.ts index c2cc0620dd..8aa44eb0b4 100644 --- a/packages/query/src/queriers/tendermint.ts +++ b/packages/query/src/queriers/tendermint.ts @@ -1,9 +1,9 @@ import { PromiseClient } from '@connectrpc/connect'; import { createClient } from './utils'; import { TendermintProxyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/util/tendermint_proxy/v1/tendermint_proxy_connect'; -import { TendermintQuerierInterface } from '@penumbra-zone/types'; import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; +import type { TendermintQuerierInterface } from '@penumbra-zone/types/src/querier'; // Should add more errors as we discover them const knownTendermintErrors = [ diff --git a/packages/query/src/root-querier.ts b/packages/query/src/root-querier.ts index bc23b2080d..c642e03b91 100644 --- a/packages/query/src/root-querier.ts +++ b/packages/query/src/root-querier.ts @@ -2,10 +2,10 @@ import { CompactBlockQuerier } from './queriers/compact-block'; import { AppQuerier } from './queriers/app'; import { TendermintQuerier } from './queriers/tendermint'; import { ShieldedPoolQuerier } from './queriers/shielded-pool'; -import { RootQuerierInterface } from '@penumbra-zone/types'; import { IbcClientQuerier } from './queriers/ibc-client'; import { CnidariumQuerier } from './queriers/cnidarium'; import { StakingQuerier } from './queriers/staking'; +import type { RootQuerierInterface } from '@penumbra-zone/types/src/querier'; // Given the amount of query services, this root querier aggregates them all // to make it easier for consumers diff --git a/packages/router/array-from-async.d.ts b/packages/router/array-from-async.d.ts index b26053d382..0806ab368f 100644 --- a/packages/router/array-from-async.d.ts +++ b/packages/router/array-from-async.d.ts @@ -1,3 +1,3 @@ declare module 'array-from-async' { - export { default } from '@penumbra-zone/polyfills/Array.fromAsync'; + export { default } from '@penumbra-zone/polyfills/src/Array.fromAsync'; } diff --git a/packages/router/package.json b/packages/router/package.json index 0e79fd0072..d30cc07415 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/router", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -9,6 +10,7 @@ }, "dependencies": { "@penumbra-zone/constants": "workspace:*", + "@penumbra-zone/types": "workspace:*", "@penumbra-zone/crypto-web": "workspace:*", "@penumbra-zone/getters": "workspace:*", "@penumbra-zone/polyfills": "workspace:*", diff --git a/packages/router/src/ctx/prax.ts b/packages/router/src/ctx/prax.ts index 1c1e9bdc7d..54b8859eea 100644 --- a/packages/router/src/ctx/prax.ts +++ b/packages/router/src/ctx/prax.ts @@ -5,7 +5,7 @@ import { createContextKey } from '@connectrpc/connect'; import { localExtStorage, sessionExtStorage } from '@penumbra-zone/storage'; -import type { ServicesInterface } from '@penumbra-zone/types'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; export const servicesCtx = createContextKey({} as ServicesInterface); export const extLocalCtx = createContextKey(localExtStorage); diff --git a/packages/router/src/grpc/custody/authorize.test.ts b/packages/router/src/grpc/custody/authorize.test.ts index 05109d7db0..c82ff9c471 100644 --- a/packages/router/src/grpc/custody/authorize.test.ts +++ b/packages/router/src/grpc/custody/authorize.test.ts @@ -34,7 +34,9 @@ describe('Authorize request handler', () => { }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockExtLocalCtx = { diff --git a/packages/router/src/grpc/custody/authorize.ts b/packages/router/src/grpc/custody/authorize.ts index 135f1a6061..52ce4b7ed7 100644 --- a/packages/router/src/grpc/custody/authorize.ts +++ b/packages/router/src/grpc/custody/authorize.ts @@ -2,11 +2,12 @@ import type { Impl } from '.'; import { approverCtx, extLocalCtx, extSessionCtx, servicesCtx } from '../../ctx'; import { authorizePlan, generateSpendKey } from '@penumbra-zone/wasm'; import { Key } from '@penumbra-zone/crypto-web'; -import { bech32AssetId } from '@penumbra-zone/getters'; -import { Box, Jsonified } from '@penumbra-zone/types'; import { Code, ConnectError, HandlerContext } from '@connectrpc/connect'; import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { viewTransactionPlan } from './view-transaction-plan'; +import { bech32AssetId } from '@penumbra-zone/getters/src/asset'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; +import { Box } from '@penumbra-zone/types/src/box'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; /** diff --git a/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.test.ts b/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.test.ts index 376dd5d4d5..aa55d16d81 100644 --- a/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.test.ts +++ b/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.test.ts @@ -5,7 +5,7 @@ import { AddressIndex, AddressView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32ToUint8Array } from '@penumbra-zone/types'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; const mockIsControlledAddress = vi.hoisted(() => vi.fn()); diff --git a/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.ts b/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.ts index cea0098c8a..4daa05f659 100644 --- a/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.ts +++ b/packages/router/src/grpc/custody/view-transaction-plan/get-address-view.ts @@ -2,8 +2,8 @@ import { Address, AddressView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32Address } from '@penumbra-zone/types'; import { isControlledAddress } from '@penumbra-zone/wasm'; +import { bech32Address } from '@penumbra-zone/types/src/address'; export const getAddressView = (address: Address, fullViewingKey: string): AddressView => { const index = isControlledAddress(fullViewingKey, bech32Address(address)); diff --git a/packages/router/src/grpc/custody/view-transaction-plan/index.test.ts b/packages/router/src/grpc/custody/view-transaction-plan/index.test.ts index daed56a397..5581120de4 100644 --- a/packages/router/src/grpc/custody/view-transaction-plan/index.test.ts +++ b/packages/router/src/grpc/custody/view-transaction-plan/index.test.ts @@ -1,11 +1,11 @@ import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32ToUint8Array } from '@penumbra-zone/types'; import { describe, expect, test } from 'vitest'; import { viewTransactionPlan } from '.'; import { MemoView_Visible, TransactionPlan, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; describe('viewTransactionPlan()', () => { const returnAddressAsBech32 = diff --git a/packages/router/src/grpc/custody/view-transaction-plan/index.ts b/packages/router/src/grpc/custody/view-transaction-plan/index.ts index 3e4a3056fd..e25906e271 100644 --- a/packages/router/src/grpc/custody/view-transaction-plan/index.ts +++ b/packages/router/src/grpc/custody/view-transaction-plan/index.ts @@ -1,11 +1,11 @@ import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { getAddressView } from './get-address-view'; -import { Jsonified } from '@penumbra-zone/types'; import { TransactionPlan, TransactionView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { viewActionPlan } from './view-action-plan'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; /** * Given a `TransactionPlan`, returns a `TransactionView` that can be passed to diff --git a/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.test.ts b/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.test.ts index 0bc039e0c9..2a5450ed06 100644 --- a/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.test.ts +++ b/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.test.ts @@ -16,9 +16,6 @@ import { ValueView_KnownAssetId, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { Jsonified } from '@penumbra-zone/types'; -import { bech32AssetId } from '@penumbra-zone/getters/src/asset'; -import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; import { BatchSwapOutputData, SwapPlaintext, @@ -28,6 +25,9 @@ import { Delegate, Undelegate, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; +import { bech32AssetId } from '@penumbra-zone/getters/src/asset'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; describe('viewActionPlan()', () => { const addressAsBech32 = diff --git a/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.ts b/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.ts index c4fb6c7611..490e52eea8 100644 --- a/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.ts +++ b/packages/router/src/grpc/custody/view-transaction-plan/view-action-plan.ts @@ -2,7 +2,6 @@ import { ActionPlan, ActionView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; -import { bech32AssetId } from '@penumbra-zone/getters'; import { Metadata, Value, @@ -17,13 +16,14 @@ import { SpendPlan, SpendView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/shielded_pool/v1/shielded_pool_pb'; -import { Jsonified } from '@penumbra-zone/types'; import { SwapClaimPlan, SwapClaimView, SwapPlan, SwapView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; +import { bech32AssetId } from '@penumbra-zone/getters/src/asset'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; const getValueView = ( value: Value | undefined, diff --git a/packages/router/src/grpc/offscreen-client.ts b/packages/router/src/grpc/offscreen-client.ts index eaa9a69018..968f35efab 100644 --- a/packages/router/src/grpc/offscreen-client.ts +++ b/packages/router/src/grpc/offscreen-client.ts @@ -1,14 +1,14 @@ import { - WitnessData, Action, TransactionPlan, + WitnessData, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; -import { InternalRequest, InternalResponse } from '@penumbra-zone/types/src/internal-msg/shared'; import { ActionBuildMessage, ActionBuildRequest, OffscreenMessage, } from '@penumbra-zone/types/src/internal-msg/offscreen'; +import { InternalRequest, InternalResponse } from '@penumbra-zone/types/src/internal-msg/shared'; const OFFSCREEN_DOCUMENT_PATH = '/offscreen.html'; diff --git a/packages/router/src/grpc/sct/epoch-by-height.test.ts b/packages/router/src/grpc/sct/epoch-by-height.test.ts index 7bc5f4ffb3..bdf8709ff7 100644 --- a/packages/router/src/grpc/sct/epoch-by-height.test.ts +++ b/packages/router/src/grpc/sct/epoch-by-height.test.ts @@ -1,14 +1,14 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import { epochByHeight } from './epoch-by-height'; import { IndexedDbMock, MockServices } from '../test-utils'; -import { HandlerContext, createContextValues, createHandlerContext } from '@connectrpc/connect'; +import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { QueryService as SctService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/component/sct/v1/sct_connect'; -import { ServicesInterface } from '@penumbra-zone/types'; import { servicesCtx } from '../../ctx'; import { Epoch, EpochByHeightRequest, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/sct/v1/sct_pb'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('EpochByHeight request handler', () => { let mockServices: MockServices; diff --git a/packages/router/src/grpc/staking/validator-info.test.ts b/packages/router/src/grpc/staking/validator-info.test.ts index aa816fe187..82e5ed832c 100644 --- a/packages/router/src/grpc/staking/validator-info.test.ts +++ b/packages/router/src/grpc/staking/validator-info.test.ts @@ -1,9 +1,8 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import { validatorInfo } from './validator-info'; import { IndexedDbMock, MockServices } from '../test-utils'; -import { HandlerContext, createContextValues, createHandlerContext } from '@connectrpc/connect'; +import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { QueryService as StakingService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/component/stake/v1/stake_connect'; -import { ServicesInterface } from '@penumbra-zone/types'; import { servicesCtx } from '../../ctx'; import { ValidatorInfoRequest, @@ -11,6 +10,7 @@ import { ValidatorState_ValidatorStateEnum, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { PartialMessage } from '@bufbuild/protobuf'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('ValidatorInfo request handler', () => { let mockServices: MockServices; diff --git a/packages/router/src/grpc/staking/validator-info.ts b/packages/router/src/grpc/staking/validator-info.ts index 9f178c4d51..4bb90276e8 100644 --- a/packages/router/src/grpc/staking/validator-info.ts +++ b/packages/router/src/grpc/staking/validator-info.ts @@ -1,10 +1,10 @@ -import { getStateEnumFromValidatorInfo } from '@penumbra-zone/getters'; import { Impl } from '.'; import { servicesCtx } from '../../ctx'; import { ValidatorInfoResponse, ValidatorState_ValidatorStateEnum, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; +import { getStateEnumFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info'; export const validatorInfo: Impl['validatorInfo'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/staking/validator-penalty.test.ts b/packages/router/src/grpc/staking/validator-penalty.test.ts index 9623674fb7..b709395025 100644 --- a/packages/router/src/grpc/staking/validator-penalty.test.ts +++ b/packages/router/src/grpc/staking/validator-penalty.test.ts @@ -1,14 +1,14 @@ -import { Mock, beforeEach, describe, expect, it, vi } from 'vitest'; +import { beforeEach, describe, expect, it, Mock, vi } from 'vitest'; import { validatorPenalty } from './validator-penalty'; import { MockServices } from '../test-utils'; -import { HandlerContext, createContextValues, createHandlerContext } from '@connectrpc/connect'; +import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { QueryService as StakingService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/core/component/stake/v1/stake_connect'; -import { ServicesInterface } from '@penumbra-zone/types'; import { servicesCtx } from '../../ctx'; import { ValidatorPenaltyRequest, ValidatorPenaltyResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('ValidatorPenalty request handler', () => { let mockServices: MockServices; diff --git a/packages/router/src/grpc/test-utils.ts b/packages/router/src/grpc/test-utils.ts index 96fd71c23b..0cf2453de6 100644 --- a/packages/router/src/grpc/test-utils.ts +++ b/packages/router/src/grpc/test-utils.ts @@ -38,16 +38,25 @@ export interface ViewServerMock { fullViewingKey?: Mock; } +interface MockQuerier { + tendermint?: TendermintMock; + shieldedPool?: ShieldedPoolMock; + staking?: StakingMock; +} + export interface StakingMock { validatorPenalty?: Mock; } + +interface MockServicesInner { + indexedDb?: IndexedDbMock; + viewServer?: ViewServerMock; + querier?: MockQuerier; +} + export interface MockServices { - getWalletServices?: Mock<[], Promise<{ indexedDb?: IndexedDbMock; viewServer?: ViewServerMock }>>; - querier?: { - tendermint?: TendermintMock; - shieldedPool?: ShieldedPoolMock; - staking?: StakingMock; - }; + getWalletServices?: Mock<[], Promise>; + querier?: MockQuerier; } export interface MockExtLocalCtx { diff --git a/packages/router/src/grpc/view-protocol-server/address-by-index.test.ts b/packages/router/src/grpc/view-protocol-server/address-by-index.test.ts index fa6edddb4c..4c99349d84 100644 --- a/packages/router/src/grpc/view-protocol-server/address-by-index.test.ts +++ b/packages/router/src/grpc/view-protocol-server/address-by-index.test.ts @@ -3,12 +3,12 @@ import { AddressByIndexRequest, AddressByIndexResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { addressByIndex } from './address-by-index'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('AddressByIndex request handler', () => { let mockServices: ServicesInterface; diff --git a/packages/router/src/grpc/view-protocol-server/app-parameters.test.ts b/packages/router/src/grpc/view-protocol-server/app-parameters.test.ts index 8c5c2f1c06..6f356154ee 100644 --- a/packages/router/src/grpc/view-protocol-server/app-parameters.test.ts +++ b/packages/router/src/grpc/view-protocol-server/app-parameters.test.ts @@ -3,13 +3,13 @@ import { AppParametersRequest, AppParametersResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { AppParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/app/v1/app_pb'; import { appParameters } from './app-parameters'; import { IndexedDbMock, MockServices } from '../test-utils'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('AppParameters request handler', () => { let mockServices: MockServices; diff --git a/packages/router/src/grpc/view-protocol-server/asset-metadata-by-id.test.ts b/packages/router/src/grpc/view-protocol-server/asset-metadata-by-id.test.ts index f26cf9b059..e68b226095 100644 --- a/packages/router/src/grpc/view-protocol-server/asset-metadata-by-id.test.ts +++ b/packages/router/src/grpc/view-protocol-server/asset-metadata-by-id.test.ts @@ -3,7 +3,6 @@ import { AssetMetadataByIdRequest, AssetMetadataByIdResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; @@ -13,6 +12,7 @@ import { Metadata, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { assetMetadataById } from './asset-metadata-by-id'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('AssetMetadataById request handler', () => { let mockServices: MockServices; @@ -39,7 +39,7 @@ describe('AssetMetadataById request handler', () => { shieldedPool: mockShieldedPool, }, }), - ), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/assets.test.ts b/packages/router/src/grpc/view-protocol-server/assets.test.ts index 3050847013..fbe26a62e2 100644 --- a/packages/router/src/grpc/view-protocol-server/assets.test.ts +++ b/packages/router/src/grpc/view-protocol-server/assets.test.ts @@ -32,7 +32,9 @@ describe('Assets request handler', () => { }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/assets.ts b/packages/router/src/grpc/view-protocol-server/assets.ts index c9ec09e6a4..c604015b64 100644 --- a/packages/router/src/grpc/view-protocol-server/assets.ts +++ b/packages/router/src/grpc/view-protocol-server/assets.ts @@ -1,6 +1,6 @@ import type { Impl } from '.'; import { servicesCtx } from '../../ctx'; -import { assetPatterns } from '@penumbra-zone/constants'; +import { assetPatterns } from '@penumbra-zone/constants/src/assets'; export const assets: Impl['assets'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/view-protocol-server/authorize-and-build.ts b/packages/router/src/grpc/view-protocol-server/authorize-and-build.ts index 92c113f4c9..276765169f 100644 --- a/packages/router/src/grpc/view-protocol-server/authorize-and-build.ts +++ b/packages/router/src/grpc/view-protocol-server/authorize-and-build.ts @@ -3,7 +3,7 @@ import { servicesCtx } from '../../ctx'; import { optimisticBuild } from './util/build-tx'; import { custodyAuthorize } from './util/custody-authorize'; import { getWitness } from '@penumbra-zone/wasm'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; export const authorizeAndBuild: Impl['authorizeAndBuild'] = async function* ( { transactionPlan }, diff --git a/packages/router/src/grpc/view-protocol-server/balances.test.ts b/packages/router/src/grpc/view-protocol-server/balances.test.ts index c7a8256b63..718f1f4fd5 100644 --- a/packages/router/src/grpc/view-protocol-server/balances.test.ts +++ b/packages/router/src/grpc/view-protocol-server/balances.test.ts @@ -11,9 +11,6 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; -import { base64ToUint8Array } from '@penumbra-zone/types'; -import { getAddressIndex, getAssetIdFromValueView, getMetadata } from '@penumbra-zone/getters'; - import { beforeEach, describe, expect, test, vi } from 'vitest'; import { Services } from '@penumbra-zone/services'; import { IndexedDbMock, MockServices } from '../test-utils'; @@ -21,6 +18,9 @@ import { AssetId, Metadata, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; +import { getAssetIdFromValueView, getMetadata } from '@penumbra-zone/getters/src/value-view'; +import { getAddressIndex } from '@penumbra-zone/getters/src/address-view'; +import { base64ToUint8Array } from '@penumbra-zone/types/src/base64'; const assertOnlyUniqueAssetIds = (responses: BalancesResponse[], accountId: number) => { const account0Res = responses.filter( @@ -62,6 +62,7 @@ describe('Balances request handler', () => { }; mockServices = { + // @ts-expect-error TODO: Improve mocking types getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb, @@ -70,7 +71,7 @@ describe('Balances request handler', () => { shieldedPool: mockShieldedPool, }, }), - ), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/balances.ts b/packages/router/src/grpc/view-protocol-server/balances.ts index 38c5ba80af..a0fafc2b43 100644 --- a/packages/router/src/grpc/view-protocol-server/balances.ts +++ b/packages/router/src/grpc/view-protocol-server/balances.ts @@ -1,9 +1,7 @@ import type { Impl } from '.'; import { servicesCtx } from '../../ctx'; - -import { addLoHi, Base64Str, uint8ArrayToBase64 } from '@penumbra-zone/types'; -import { getAmount, getAssetIdFromRecord } from '@penumbra-zone/getters'; - +import { getAmount } from '@penumbra-zone/getters/src/value-view'; +import { getAssetIdFromRecord } from '@penumbra-zone/getters/src/spendable-note-record'; import { AssetId, ValueView, @@ -23,6 +21,8 @@ import { HandlerContext } from '@connectrpc/connect'; import { assetMetadataById } from './asset-metadata-by-id'; import { addressByIndex } from './address-by-index'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; +import { Base64Str, uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; +import { addLoHi } from '@penumbra-zone/types/src/lo-hi'; // Handles aggregating amounts and filtering by account number/asset id export const balances: Impl['balances'] = async function* (req, ctx) { diff --git a/packages/router/src/grpc/view-protocol-server/broadcast-transaction.ts b/packages/router/src/grpc/view-protocol-server/broadcast-transaction.ts index b6665fd32e..d3717a111f 100644 --- a/packages/router/src/grpc/view-protocol-server/broadcast-transaction.ts +++ b/packages/router/src/grpc/view-protocol-server/broadcast-transaction.ts @@ -3,11 +3,11 @@ import { servicesCtx } from '../../ctx'; import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; import { sha256Hash } from '@penumbra-zone/crypto-web'; -import { uint8ArrayToHex } from '@penumbra-zone/types'; import { TransactionInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; export const broadcastTransaction: Impl['broadcastTransaction'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.test.ts b/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.test.ts index 0cbfc42398..963b9f0e7f 100644 --- a/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.test.ts +++ b/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.test.ts @@ -2,9 +2,9 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import { delegationsByAddressIndex } from './delegations-by-address-index'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { - HandlerContext, - createHandlerContext, createContextValues, + createHandlerContext, + HandlerContext, PromiseClient, } from '@connectrpc/connect'; import { stakingClientCtx } from '../../ctx'; @@ -16,13 +16,14 @@ import { DelegationsByAddressIndexRequest_Filter, DelegationsByAddressIndexResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { STAKING_TOKEN_METADATA } from '@penumbra-zone/constants'; +import { STAKING_TOKEN_METADATA } from '@penumbra-zone/constants/src/assets'; import { ValidatorInfoRequest, ValidatorInfoResponse, ValidatorState_ValidatorStateEnum, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { asIdentityKey, getAmount, getValidatorInfoFromValueView } from '@penumbra-zone/getters'; +import { getAmount, getValidatorInfoFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { asIdentityKey } from '@penumbra-zone/getters/src/string'; import { PartialMessage } from '@bufbuild/protobuf'; import { Metadata, diff --git a/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.ts b/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.ts index 9ecccfb2bd..6ec09f798e 100644 --- a/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.ts +++ b/packages/router/src/grpc/view-protocol-server/delegations-by-address-index.ts @@ -1,15 +1,11 @@ -import { Impl } from '.'; - import { IdentityKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32IdentityKey, customizeSymbol } from '@penumbra-zone/types'; -import Array from '@penumbra-zone/polyfills/Array.fromAsync'; -import { - getDisplayDenomFromView, - getIdentityKeyFromValidatorInfo, - getValidatorInfo, -} from '@penumbra-zone/getters'; -import { DelegationCaptureGroups, assetPatterns } from '@penumbra-zone/constants'; +import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import { customizeSymbol } from '@penumbra-zone/types/src/customize-symbol'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; +import { assetPatterns, DelegationCaptureGroups } from '@penumbra-zone/constants/src/assets'; import { Any, PartialMessage } from '@bufbuild/protobuf'; +import { getValidatorInfo } from '@penumbra-zone/getters/src/validator-info-response'; +import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { AssetMetadataByIdRequest, @@ -25,6 +21,8 @@ import { ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { assetMetadataById } from './asset-metadata-by-id'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; +import { Impl } from '.'; const isDelegationBalance = (balance: BalancesResponse, identityKey: IdentityKey) => { const match = assetPatterns.delegationToken.exec(getDisplayDenomFromView(balance.balanceView)); diff --git a/packages/router/src/grpc/view-protocol-server/ephemeral-address.test.ts b/packages/router/src/grpc/view-protocol-server/ephemeral-address.test.ts index 4491c4f89c..65b7fc07bc 100644 --- a/packages/router/src/grpc/view-protocol-server/ephemeral-address.test.ts +++ b/packages/router/src/grpc/view-protocol-server/ephemeral-address.test.ts @@ -3,12 +3,12 @@ import { EphemeralAddressRequest, EphemeralAddressResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { ephemeralAddress } from './ephemeral-address'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('EphemeralAddress request handler', () => { let mockServices: ServicesInterface; diff --git a/packages/router/src/grpc/view-protocol-server/fmd-parameters.test.ts b/packages/router/src/grpc/view-protocol-server/fmd-parameters.test.ts index 69077456ad..8b46a67cfb 100644 --- a/packages/router/src/grpc/view-protocol-server/fmd-parameters.test.ts +++ b/packages/router/src/grpc/view-protocol-server/fmd-parameters.test.ts @@ -3,13 +3,13 @@ import { FMDParametersRequest, FMDParametersResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices } from '../test-utils'; import { FmdParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/shielded_pool/v1/shielded_pool_pb'; import { fMDParameters } from './fmd-parameters'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('FmdParameters request handler', () => { let mockServices: MockServices; @@ -23,7 +23,9 @@ describe('FmdParameters request handler', () => { getFmdParams: vi.fn(), }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/fmd-parameters.ts b/packages/router/src/grpc/view-protocol-server/fmd-parameters.ts index e476d8609f..a3fe5fc664 100644 --- a/packages/router/src/grpc/view-protocol-server/fmd-parameters.ts +++ b/packages/router/src/grpc/view-protocol-server/fmd-parameters.ts @@ -1,7 +1,7 @@ import type { Impl } from '.'; import { servicesCtx } from '../../ctx'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; export const fMDParameters: Impl['fMDParameters'] = async (_, ctx) => { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/view-protocol-server/gas-prices.test.ts b/packages/router/src/grpc/view-protocol-server/gas-prices.test.ts index 55465be65d..5d2bd31c3b 100644 --- a/packages/router/src/grpc/view-protocol-server/gas-prices.test.ts +++ b/packages/router/src/grpc/view-protocol-server/gas-prices.test.ts @@ -3,13 +3,13 @@ import { GasPricesRequest, GasPricesResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices } from '../test-utils'; import { GasPrices } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/fee/v1/fee_pb'; import { gasPrices } from './gas-prices'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('GasPrices request handler', () => { let mockServices: MockServices; @@ -23,7 +23,9 @@ describe('GasPrices request handler', () => { getGasPrices: vi.fn(), }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/helpers.ts b/packages/router/src/grpc/view-protocol-server/helpers.ts index 12cf138375..d4fd133a8b 100644 --- a/packages/router/src/grpc/view-protocol-server/helpers.ts +++ b/packages/router/src/grpc/view-protocol-server/helpers.ts @@ -1,5 +1,6 @@ import { AssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { IndexedDbInterface, RootQuerierInterface } from '@penumbra-zone/types'; +import { IndexedDbInterface } from '@penumbra-zone/types/src/indexed-db'; +import { RootQuerierInterface } from '@penumbra-zone/types/src/querier'; export const getAssetMetadata = async ( targetAsset: AssetId, diff --git a/packages/router/src/grpc/view-protocol-server/index-by-address.test.ts b/packages/router/src/grpc/view-protocol-server/index-by-address.test.ts index 86f04b8719..67571f7950 100644 --- a/packages/router/src/grpc/view-protocol-server/index-by-address.test.ts +++ b/packages/router/src/grpc/view-protocol-server/index-by-address.test.ts @@ -1,12 +1,12 @@ import { beforeEach, describe, expect, test } from 'vitest'; import { IndexByAddressRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { indexByAddress } from './index-by-address'; import { getAddressByIndex, getEphemeralByIndex } from '@penumbra-zone/wasm'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('IndexByAddress request handler', () => { let mockServices: ServicesInterface; diff --git a/packages/router/src/grpc/view-protocol-server/index-by-address.ts b/packages/router/src/grpc/view-protocol-server/index-by-address.ts index 12229132ae..9ccac2c168 100644 --- a/packages/router/src/grpc/view-protocol-server/index-by-address.ts +++ b/packages/router/src/grpc/view-protocol-server/index-by-address.ts @@ -1,10 +1,10 @@ import type { Impl } from '.'; import { servicesCtx } from '../../ctx'; -import { bech32Address } from '@penumbra-zone/types'; import { isControlledAddress } from '@penumbra-zone/wasm'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; +import { bech32Address } from '@penumbra-zone/types/src/address'; export const indexByAddress: Impl['indexByAddress'] = async (req, ctx) => { if (!req.address) throw new ConnectError('no address given in request', Code.InvalidArgument); diff --git a/packages/router/src/grpc/view-protocol-server/note-by-commitment.test.ts b/packages/router/src/grpc/view-protocol-server/note-by-commitment.test.ts index 1df9f7ced9..800eb11a2f 100644 --- a/packages/router/src/grpc/view-protocol-server/note-by-commitment.test.ts +++ b/packages/router/src/grpc/view-protocol-server/note-by-commitment.test.ts @@ -4,13 +4,13 @@ import { NoteByCommitmentResponse, SpendableNoteRecord, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices } from '../test-utils'; import { StateCommitment } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/crypto/tct/v1/tct_pb'; import { noteByCommitment } from './note-by-commitment'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('NoteByCommitment request handler', () => { let mockServices: MockServices; @@ -33,7 +33,9 @@ describe('NoteByCommitment request handler', () => { subscribe: () => mockNoteSubscription, }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/note-by-commitment.ts b/packages/router/src/grpc/view-protocol-server/note-by-commitment.ts index 13fbcbab0c..ebfa12a030 100644 --- a/packages/router/src/grpc/view-protocol-server/note-by-commitment.ts +++ b/packages/router/src/grpc/view-protocol-server/note-by-commitment.ts @@ -3,7 +3,7 @@ import { servicesCtx } from '../../ctx'; import { SpendableNoteRecord } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; export const noteByCommitment: Impl['noteByCommitment'] = async (req, ctx) => { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/view-protocol-server/notes-for-voting.test.ts b/packages/router/src/grpc/view-protocol-server/notes-for-voting.test.ts index 1cca6074fd..f8765111cf 100644 --- a/packages/router/src/grpc/view-protocol-server/notes-for-voting.test.ts +++ b/packages/router/src/grpc/view-protocol-server/notes-for-voting.test.ts @@ -3,12 +3,12 @@ import { NotesForVotingRequest, NotesForVotingResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices } from '../test-utils'; import { notesForVoting } from './notes-for-voting'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('NotesForVoting request handler', () => { let mockServices: MockServices; @@ -22,7 +22,9 @@ describe('NotesForVoting request handler', () => { getNotesForVoting: vi.fn(), }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/notes.test.ts b/packages/router/src/grpc/view-protocol-server/notes.test.ts index 7d6c396196..64d8ad6a2b 100644 --- a/packages/router/src/grpc/view-protocol-server/notes.test.ts +++ b/packages/router/src/grpc/view-protocol-server/notes.test.ts @@ -35,7 +35,9 @@ describe('Notes request handler', () => { }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/notes.ts b/packages/router/src/grpc/view-protocol-server/notes.ts index 20dfd882a6..efe7713e5f 100644 --- a/packages/router/src/grpc/view-protocol-server/notes.ts +++ b/packages/router/src/grpc/view-protocol-server/notes.ts @@ -1,9 +1,8 @@ import type { Impl } from '.'; import { servicesCtx } from '../../ctx'; -import { addAmounts, joinLoHiAmount } from '@penumbra-zone/types'; - import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; +import { addAmounts, joinLoHiAmount } from '@penumbra-zone/types/src/amount'; export const notes: Impl['notes'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/view-protocol-server/nullifier-status.test.ts b/packages/router/src/grpc/view-protocol-server/nullifier-status.test.ts index 9d9d3162a5..2474e5bac4 100644 --- a/packages/router/src/grpc/view-protocol-server/nullifier-status.test.ts +++ b/packages/router/src/grpc/view-protocol-server/nullifier-status.test.ts @@ -5,7 +5,6 @@ import { servicesCtx } from '../../ctx'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import type { Services } from '@penumbra-zone/services'; -import { stringToUint8Array } from '@penumbra-zone/types'; import { beforeEach, describe, expect, Mock, test, vi } from 'vitest'; @@ -16,6 +15,7 @@ import { SwapRecord, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { IndexedDbMock, MockServices } from '../test-utils'; +import { stringToUint8Array } from '@penumbra-zone/types/src/string'; describe('nullifierStatus', () => { let mockServices: MockServices; @@ -49,7 +49,9 @@ describe('nullifierStatus', () => { }, }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/nullifier-status.ts b/packages/router/src/grpc/view-protocol-server/nullifier-status.ts index ef56c3fa42..49af774f64 100644 --- a/packages/router/src/grpc/view-protocol-server/nullifier-status.ts +++ b/packages/router/src/grpc/view-protocol-server/nullifier-status.ts @@ -5,7 +5,7 @@ import { import type { Impl } from '.'; import { servicesCtx } from '../../ctx'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; const watchStream = async ( subscription: AsyncGenerator, diff --git a/packages/router/src/grpc/view-protocol-server/owned-position-ids.test.ts b/packages/router/src/grpc/view-protocol-server/owned-position-ids.test.ts index 4ca09272d1..6f787aa846 100644 --- a/packages/router/src/grpc/view-protocol-server/owned-position-ids.test.ts +++ b/packages/router/src/grpc/view-protocol-server/owned-position-ids.test.ts @@ -33,7 +33,9 @@ describe('OwnedPositionIds request handler', () => { }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/status-stream.test.ts b/packages/router/src/grpc/view-protocol-server/status-stream.test.ts index c22b3c585f..968ee5e94c 100644 --- a/packages/router/src/grpc/view-protocol-server/status-stream.test.ts +++ b/packages/router/src/grpc/view-protocol-server/status-stream.test.ts @@ -3,12 +3,12 @@ import { StatusStreamRequest, StatusStreamResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices, TendermintMock } from '../test-utils'; import { statusStream } from './status-stream'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('Status stream request handler', () => { let mockServices: MockServices; @@ -36,7 +36,9 @@ describe('Status stream request handler', () => { }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], querier: { tendermint: mockTendermint, }, diff --git a/packages/router/src/grpc/view-protocol-server/status.test.ts b/packages/router/src/grpc/view-protocol-server/status.test.ts index 7437e9bbfb..79c9c00a9a 100644 --- a/packages/router/src/grpc/view-protocol-server/status.test.ts +++ b/packages/router/src/grpc/view-protocol-server/status.test.ts @@ -3,12 +3,12 @@ import { StatusRequest, StatusResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices, TendermintMock } from '../test-utils'; import { status } from './status'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('Status request handler', () => { let mockServices: MockServices; diff --git a/packages/router/src/grpc/view-protocol-server/swap-by-commitment.test.ts b/packages/router/src/grpc/view-protocol-server/swap-by-commitment.test.ts index 225683f259..402e822cba 100644 --- a/packages/router/src/grpc/view-protocol-server/swap-by-commitment.test.ts +++ b/packages/router/src/grpc/view-protocol-server/swap-by-commitment.test.ts @@ -4,13 +4,13 @@ import { SwapByCommitmentResponse, SwapRecord, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; import { IndexedDbMock, MockServices } from '../test-utils'; import { StateCommitment } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/crypto/tct/v1/tct_pb'; import { swapByCommitment } from './swap-by-commitment'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('SwapByCommitment request handler', () => { let mockServices: MockServices; @@ -33,7 +33,9 @@ describe('SwapByCommitment request handler', () => { subscribe: () => mockSwapSubscription, }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/swap-by-commitment.ts b/packages/router/src/grpc/view-protocol-server/swap-by-commitment.ts index 5069d7b2cb..c973fdd2ea 100644 --- a/packages/router/src/grpc/view-protocol-server/swap-by-commitment.ts +++ b/packages/router/src/grpc/view-protocol-server/swap-by-commitment.ts @@ -3,7 +3,7 @@ import { servicesCtx } from '../../ctx'; import { SwapRecord } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; export const swapByCommitment: Impl['swapByCommitment'] = async (req, ctx) => { const services = ctx.values.get(servicesCtx); diff --git a/packages/router/src/grpc/view-protocol-server/transaction-info-by-hash.test.ts b/packages/router/src/grpc/view-protocol-server/transaction-info-by-hash.test.ts index 7f68f39e1d..8c79689e90 100644 --- a/packages/router/src/grpc/view-protocol-server/transaction-info-by-hash.test.ts +++ b/packages/router/src/grpc/view-protocol-server/transaction-info-by-hash.test.ts @@ -48,7 +48,7 @@ describe('TransactionInfoByHash request handler', () => { tendermint: mockTendermint, }, }), - ), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/transaction-planner.test.ts b/packages/router/src/grpc/view-protocol-server/transaction-planner.test.ts index 5b940d4008..33e5a376ea 100644 --- a/packages/router/src/grpc/view-protocol-server/transaction-planner.test.ts +++ b/packages/router/src/grpc/view-protocol-server/transaction-planner.test.ts @@ -40,7 +40,7 @@ describe('TransactionPlanner request handler', () => { indexedDb: mockIndexedDb, viewServer: mockViewServer, }), - ), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/unclaimed-swaps.test.ts b/packages/router/src/grpc/view-protocol-server/unclaimed-swaps.test.ts index ee7566eff5..868d1e3c62 100644 --- a/packages/router/src/grpc/view-protocol-server/unclaimed-swaps.test.ts +++ b/packages/router/src/grpc/view-protocol-server/unclaimed-swaps.test.ts @@ -33,7 +33,9 @@ describe('UnclaimedSwaps request handler', () => { }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ diff --git a/packages/router/src/grpc/view-protocol-server/util/build-tx.ts b/packages/router/src/grpc/view-protocol-server/util/build-tx.ts index 905b8ef428..ae2221a11f 100644 --- a/packages/router/src/grpc/view-protocol-server/util/build-tx.ts +++ b/packages/router/src/grpc/view-protocol-server/util/build-tx.ts @@ -1,8 +1,8 @@ import { - TransactionPlan, - WitnessData, AuthorizationData, Transaction, + TransactionPlan, + WitnessData, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { buildParallel } from '@penumbra-zone/wasm'; import { offscreenClient } from '../../offscreen-client'; @@ -13,7 +13,7 @@ import { import { PartialMessage } from '@bufbuild/protobuf'; import { ConnectError } from '@connectrpc/connect'; -import '@penumbra-zone/polyfills/Promise.withResolvers'; +import '@penumbra-zone/polyfills/src/Promise.withResolvers'; export const optimisticBuild = async function* ( transactionPlan: TransactionPlan, diff --git a/packages/router/src/grpc/view-protocol-server/wallet-id.ts b/packages/router/src/grpc/view-protocol-server/wallet-id.ts index 5d4870f7b8..8ded7f46a1 100644 --- a/packages/router/src/grpc/view-protocol-server/wallet-id.ts +++ b/packages/router/src/grpc/view-protocol-server/wallet-id.ts @@ -1,11 +1,8 @@ import type { Impl } from '.'; import { extLocalCtx } from '../../ctx'; - -import { stringToUint8Array } from '@penumbra-zone/types'; - import { WalletId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; - -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; +import { stringToUint8Array } from '@penumbra-zone/types/src/string'; // TODO: there is never data in this request. should a wallet index be available in context? export const walletId: Impl['walletId'] = async (_, ctx) => { diff --git a/packages/router/src/grpc/view-protocol-server/witness-and-build.ts b/packages/router/src/grpc/view-protocol-server/witness-and-build.ts index a1a76d56e1..90bccfa78d 100644 --- a/packages/router/src/grpc/view-protocol-server/witness-and-build.ts +++ b/packages/router/src/grpc/view-protocol-server/witness-and-build.ts @@ -5,7 +5,7 @@ import { optimisticBuild } from './util/build-tx'; import { getWitness } from '@penumbra-zone/wasm'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; import { AuthorizationData } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; export const witnessAndBuild: Impl['witnessAndBuild'] = async function* ( diff --git a/packages/router/src/grpc/view-protocol-server/witness.test.ts b/packages/router/src/grpc/view-protocol-server/witness.test.ts index 2905fbee46..282b0fae6c 100644 --- a/packages/router/src/grpc/view-protocol-server/witness.test.ts +++ b/packages/router/src/grpc/view-protocol-server/witness.test.ts @@ -3,7 +3,6 @@ import { WitnessRequest, WitnessResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { ServicesInterface } from '@penumbra-zone/types'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx'; @@ -13,6 +12,7 @@ import { TransactionPlan, WitnessData, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; +import type { ServicesInterface } from '@penumbra-zone/types/src/services'; describe('Witness request handler', () => { let mockServices: MockServices; @@ -27,7 +27,9 @@ describe('Witness request handler', () => { getStateCommitmentTree: vi.fn(), }; mockServices = { - getWalletServices: vi.fn(() => Promise.resolve({ indexedDb: mockIndexedDb })), + getWalletServices: vi.fn(() => + Promise.resolve({ indexedDb: mockIndexedDb }), + ) as MockServices['getWalletServices'], }; mockCtx = createHandlerContext({ service: ViewService, diff --git a/packages/router/src/grpc/view-protocol-server/witness.ts b/packages/router/src/grpc/view-protocol-server/witness.ts index 6491721bcd..221fbf39c6 100644 --- a/packages/router/src/grpc/view-protocol-server/witness.ts +++ b/packages/router/src/grpc/view-protocol-server/witness.ts @@ -3,7 +3,7 @@ import { servicesCtx } from '../../ctx'; import { getWitness } from '@penumbra-zone/wasm'; -import { ConnectError, Code } from '@connectrpc/connect'; +import { Code, ConnectError } from '@connectrpc/connect'; export const witness: Impl['witness'] = async (req, ctx) => { const services = ctx.values.get(servicesCtx); diff --git a/packages/services/package.json b/packages/services/package.json index 159b582716..11fbd9f868 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/services", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -10,6 +11,7 @@ "@penumbra-zone/constants": "workspace:*", "@penumbra-zone/query": "workspace:*", "@penumbra-zone/storage": "workspace:*", + "@penumbra-zone/types": "workspace:*", "@penumbra-zone/wasm": "workspace:*", "exponential-backoff": "^3.1.1" }, diff --git a/packages/services/src/index.ts b/packages/services/src/index.ts index e95af00274..150611963b 100644 --- a/packages/services/src/index.ts +++ b/packages/services/src/index.ts @@ -7,7 +7,7 @@ import { WalletServices, } from '@penumbra-zone/types/src/services'; import type { JsonValue } from '@bufbuild/protobuf'; -import '@penumbra-zone/polyfills/Promise.withResolvers'; +import '@penumbra-zone/polyfills/src/Promise.withResolvers'; export interface ServicesConfig { readonly idbVersion: number; diff --git a/packages/storage/package.json b/packages/storage/package.json index 37ab345f08..56467884a8 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/storage", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -15,6 +16,6 @@ }, "devDependencies": { "@penumbra-zone/polyfills": "workspace:*", - "playwright": "^1.42.1" + "@penumbra-zone/types": "workspace:*" } } diff --git a/packages/storage/src/chrome/base.ts b/packages/storage/src/chrome/base.ts index eae5523b6a..f4937b01d3 100644 --- a/packages/storage/src/chrome/base.ts +++ b/packages/storage/src/chrome/base.ts @@ -1,4 +1,4 @@ -import { EmptyObject, isEmptyObj } from '@penumbra-zone/types'; +import { EmptyObject, isEmptyObj } from '@penumbra-zone/types/src/utility'; export interface IStorage { get(key: string): Promise>; diff --git a/packages/storage/src/chrome/local.ts b/packages/storage/src/chrome/local.ts index 94774ead62..2644b108b2 100644 --- a/packages/storage/src/chrome/local.ts +++ b/packages/storage/src/chrome/local.ts @@ -1,7 +1,7 @@ import { ExtensionStorage } from './base'; import { KeyPrintJson } from '@penumbra-zone/crypto-web'; -import { WalletJson } from '@penumbra-zone/types'; import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import type { WalletJson } from '@penumbra-zone/types/src/wallet'; export enum LocalStorageVersion { V1 = 'V1', diff --git a/packages/storage/src/indexed-db/index.ts b/packages/storage/src/indexed-db/index.ts index d2676f67c6..578d211805 100644 --- a/packages/storage/src/indexed-db/index.ts +++ b/packages/storage/src/indexed-db/index.ts @@ -1,18 +1,4 @@ import { IDBPDatabase, openDB, StoreNames } from 'idb'; -import { - bech32IdentityKey, - bech32ToUint8Array, - IDB_TABLES, - IdbConstants, - IdbUpdate, - IndexedDbInterface, - Jsonified, - PenumbraDb, - ScanBlockResult, - StateCommitmentTree, - uint8ArrayToBase64, - uint8ArrayToHex, -} from '@penumbra-zone/types'; import { IbdUpdater, IbdUpdates } from './updater'; import { FmdParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/shielded_pool/v1/shielded_pool_pb'; import { @@ -36,7 +22,11 @@ import { AddressIndex, IdentityKey, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { assetPatterns, DelegationCaptureGroups, localAssets } from '@penumbra-zone/constants'; +import { + assetPatterns, + DelegationCaptureGroups, + localAssets, +} from '@penumbra-zone/constants/src/assets'; import { Position, PositionId, @@ -47,10 +37,27 @@ import { AppParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/ import { IdbCursorSource } from './stream'; -import '@penumbra-zone/polyfills/ReadableStream[Symbol.asyncIterator]'; +import '@penumbra-zone/polyfills/src/ReadableStream[Symbol.asyncIterator]'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { bech32AssetId, getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; +import { bech32AssetId } from '@penumbra-zone/getters/src/asset'; +import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info'; +import { + IDB_TABLES, + IdbConstants, + IdbUpdate, + IndexedDbInterface, + PenumbraDb, +} from '@penumbra-zone/types/src/indexed-db'; +import type { + ScanBlockResult, + StateCommitmentTree, +} from '@penumbra-zone/types/src/state-commitment-tree'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; +import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; +import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; interface IndexedDbProps { dbVersion: number; // Incremented during schema changes diff --git a/packages/storage/src/indexed-db/indexed-db.test-data.ts b/packages/storage/src/indexed-db/indexed-db.test-data.ts index ad15b493da..0eec94483f 100644 --- a/packages/storage/src/indexed-db/indexed-db.test-data.ts +++ b/packages/storage/src/indexed-db/indexed-db.test-data.ts @@ -1,4 +1,3 @@ -import { ScanBlockResult } from '@penumbra-zone/types'; import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { SpendableNoteRecord, @@ -12,6 +11,7 @@ import { import { Epoch } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/sct/v1/sct_pb'; import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; +import type { ScanBlockResult } from '@penumbra-zone/types/src/state-commitment-tree'; export const emptyScanResult: ScanBlockResult = { height: 1092n, diff --git a/packages/storage/src/indexed-db/indexed-db.test.ts b/packages/storage/src/indexed-db/indexed-db.test.ts index 1dd82a1aa3..94cd5e7987 100644 --- a/packages/storage/src/indexed-db/indexed-db.test.ts +++ b/packages/storage/src/indexed-db/indexed-db.test.ts @@ -4,7 +4,6 @@ import { SwapRecord, TransactionInfo, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { IdbUpdate, PenumbraDb } from '@penumbra-zone/types'; import { beforeEach, describe, expect, it } from 'vitest'; import { IndexedDb } from '.'; import { @@ -41,7 +40,8 @@ import { PositionState_PositionStateEnum, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { localAssets } from '@penumbra-zone/constants'; +import { localAssets } from '@penumbra-zone/constants/src/assets'; +import type { IdbUpdate, PenumbraDb } from '@penumbra-zone/types/src/indexed-db'; describe('IndexedDb', () => { // uses different wallet ids so no collisions take place diff --git a/packages/storage/src/indexed-db/stream.ts b/packages/storage/src/indexed-db/stream.ts index 71437398d0..f3b137abbf 100644 --- a/packages/storage/src/indexed-db/stream.ts +++ b/packages/storage/src/indexed-db/stream.ts @@ -1,6 +1,6 @@ import { AnyMessage, JsonValue, Message, MessageType } from '@bufbuild/protobuf'; -import { PenumbraDb, PenumbraStoreNames } from '@penumbra-zone/types'; import { IDBPCursorWithValue } from 'idb'; +import type { PenumbraDb, PenumbraStoreNames } from '@penumbra-zone/types/src/indexed-db'; export class IdbCursorSource = AnyMessage> implements UnderlyingDefaultSource diff --git a/packages/storage/src/indexed-db/updater.ts b/packages/storage/src/indexed-db/updater.ts index 41e191602e..efdd235b18 100644 --- a/packages/storage/src/indexed-db/updater.ts +++ b/packages/storage/src/indexed-db/updater.ts @@ -1,5 +1,5 @@ -import { IdbUpdate, PenumbraDb } from '@penumbra-zone/types'; import { IDBPDatabase, StoreNames } from 'idb'; +import type { IdbUpdate, PenumbraDb } from '@penumbra-zone/types/src/indexed-db'; export class IbdUpdates { constructor(readonly all: IdbUpdate>[] = []) {} diff --git a/packages/tailwind-config/package.json b/packages/tailwind-config/package.json index 0992f615fc..07f8b6ebea 100644 --- a/packages/tailwind-config/package.json +++ b/packages/tailwind-config/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/tailwind-config", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "main": "index.js", "license": "MIT", "publishConfig": { diff --git a/packages/transport-chrome/message.ts b/packages/transport-chrome/message.ts index df1eb51197..37b6e31130 100644 --- a/packages/transport-chrome/message.ts +++ b/packages/transport-chrome/message.ts @@ -1,4 +1,4 @@ -import { TransportEvent, isTransportEvent } from '@penumbra-zone/transport-dom/messages'; +import { isTransportEvent, TransportEvent } from '@penumbra-zone/transport-dom/src/messages'; export const isTransportInitChannel = (c: unknown): c is TransportInitChannel => isTransportEvent(c) && 'channel' in c && typeof c.channel === 'string'; // sub-channel stream diff --git a/packages/transport-chrome/package.json b/packages/transport-chrome/package.json index 3ffc019829..200b48ed56 100644 --- a/packages/transport-chrome/package.json +++ b/packages/transport-chrome/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/transport-chrome", "version": "1.0.0", + "private": true, "description": "Tools for adapting `@penumbra-zone/transport` to Chrome's extension runtime messaging API", "scripts": { "lint": "eslint \"**/*.ts*\"" diff --git a/packages/transport-chrome/session-client.ts b/packages/transport-chrome/session-client.ts index 5fd0ef240f..9cd04d4ca5 100644 --- a/packages/transport-chrome/session-client.ts +++ b/packages/transport-chrome/session-client.ts @@ -15,32 +15,20 @@ */ import { - TransportStream, isTransportError, isTransportEvent, isTransportMessage, isTransportStream, -} from '@penumbra-zone/transport-dom/messages'; + TransportStream, +} from '@penumbra-zone/transport-dom/src/messages'; import { ChannelLabel, nameConnection } from './channel-names'; -import { TransportInitChannel, isTransportInitChannel } from './message'; +import { isTransportInitChannel, TransportInitChannel } from './message'; import { PortStreamSink, PortStreamSource } from './stream'; export class CRSessionClient { private static singleton?: CRSessionClient; - - /** - * Establishes a new connection from this document to the extension. - * - * @param prefix a string containing no spaces - * @returns a `MessagePort` that can be provided to DOM channel transports - */ - public static init(prefix: string): MessagePort { - const { port1, port2 } = new MessageChannel(); - CRSessionClient.singleton ??= new CRSessionClient(prefix, port1); - return port2; - } - private servicePort: chrome.runtime.Port; + private constructor( private prefix: string, private clientPort: MessagePort, @@ -58,6 +46,18 @@ export class CRSessionClient { this.clientPort.start(); } + /** + * Establishes a new connection from this document to the extension. + * + * @param prefix a string containing no spaces + * @returns a `MessagePort` that can be provided to DOM channel transports + */ + public static init(prefix: string): MessagePort { + const { port1, port2 } = new MessageChannel(); + CRSessionClient.singleton ??= new CRSessionClient(prefix, port1); + return port2; + } + private disconnect = () => { this.clientPort.removeEventListener('message', this.clientListener); this.clientPort.addEventListener('message', (ev: MessageEvent) => { diff --git a/packages/transport-chrome/session-manager.ts b/packages/transport-chrome/session-manager.ts index 28a342e955..9876ed2523 100644 --- a/packages/transport-chrome/session-manager.ts +++ b/packages/transport-chrome/session-manager.ts @@ -1,15 +1,15 @@ import { ConnectError } from '@connectrpc/connect'; import { errorToJson } from '@connectrpc/connect/protocol-connect'; -import { ChannelHandlerFn } from '@penumbra-zone/transport-dom/adapter'; +import { ChannelLabel, nameConnection, parseConnectionName } from './channel-names'; +import { isTransportInitChannel, TransportInitChannel } from './message'; +import { PortStreamSink, PortStreamSource } from './stream'; +import { ChannelHandlerFn } from '@penumbra-zone/transport-dom/src/adapter'; import { + isTransportMessage, TransportEvent, TransportMessage, TransportStream, - isTransportMessage, -} from '@penumbra-zone/transport-dom/messages'; -import { ChannelLabel, nameConnection, parseConnectionName } from './channel-names'; -import { TransportInitChannel, isTransportInitChannel } from './message'; -import { PortStreamSink, PortStreamSource } from './stream'; +} from '@penumbra-zone/transport-dom/src/messages'; interface CRSession { clientId: string; @@ -44,6 +44,14 @@ export class CRSessionManager { private static singleton?: CRSessionManager; private sessions = new Map(); + private constructor( + private prefix: string, + private handler: ChannelHandlerFn, + ) { + if (CRSessionManager.singleton) throw new Error('Already constructed'); + chrome.runtime.onConnect.addListener(this.transportConnection); + } + /** * * @param prefix a string containing no spaces, matching the prefix used in your content script @@ -53,14 +61,6 @@ export class CRSessionManager { CRSessionManager.singleton ??= new CRSessionManager(prefix, handler); }; - private constructor( - private prefix: string, - private handler: ChannelHandlerFn, - ) { - if (CRSessionManager.singleton) throw new Error('Already constructed'); - chrome.runtime.onConnect.addListener(this.transportConnection); - } - /** * This handler is called when a new connection is opened from any document * with access to the chrome runtime. diff --git a/packages/transport-dom/package.json b/packages/transport-dom/package.json index 7c307406ba..a51d26d087 100644 --- a/packages/transport-dom/package.json +++ b/packages/transport-dom/package.json @@ -1,9 +1,23 @@ { "name": "@penumbra-zone/transport-dom", - "version": "1.0.0", + "version": "1.0.3", "license": "MIT", "type": "module", + "files": [ + "dist" + ], + "exports": { + "./src/adapter": "./dist/adapter.js", + "./src/impl": "./dist/any-impl.js", + "./src/create": "./dist/create.js", + "./src/direct": "./dist/direct.js", + "./src/messages": "./dist/messages.js", + "./src/proxy": "./dist/proxy.js", + "./src/stream": "./dist/stream.js" + }, "scripts": { + "build": "tsc && vite build", + "clean": "rm -rfv dist", "lint": "eslint \"**/*.ts*\"" }, "devDependencies": { diff --git a/packages/transport-dom/adapter.ts b/packages/transport-dom/src/adapter.ts similarity index 99% rename from packages/transport-dom/adapter.ts rename to packages/transport-dom/src/adapter.ts index e0c483c6b7..a7e0582865 100644 --- a/packages/transport-dom/adapter.ts +++ b/packages/transport-dom/src/adapter.ts @@ -27,7 +27,7 @@ import { } from '@connectrpc/connect/protocol'; import { createTransport } from '@connectrpc/connect/protocol-connect'; import { MessageToJson } from './stream'; -import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; +import ReadableStream from '@penumbra-zone/polyfills/src/ReadableStream.from'; // see https://github.com/connectrpc/connect-es/pull/925 // hopefully also simplifies transport call soon diff --git a/packages/transport-dom/any-impl.ts b/packages/transport-dom/src/any-impl.ts similarity index 100% rename from packages/transport-dom/any-impl.ts rename to packages/transport-dom/src/any-impl.ts diff --git a/packages/transport-dom/create.test.ts b/packages/transport-dom/src/create.test.ts similarity index 96% rename from packages/transport-dom/create.test.ts rename to packages/transport-dom/src/create.test.ts index bc62df86af..e9383a508d 100644 --- a/packages/transport-dom/create.test.ts +++ b/packages/transport-dom/src/create.test.ts @@ -1,4 +1,4 @@ -import { expect, describe, it } from 'vitest'; +import { describe, expect, it } from 'vitest'; import { createChannelTransport } from './create'; import { ElizaService } from '@buf/connectrpc_eliza.connectrpc_es/connectrpc/eliza/v1/eliza_connect'; @@ -10,8 +10,8 @@ import { import { createRegistry } from '@bufbuild/protobuf'; import { TransportMessage } from './messages'; -import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; -import Array from '@penumbra-zone/polyfills/Array.fromAsync'; +import ReadableStream from '@penumbra-zone/polyfills/src/ReadableStream.from'; +import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; const typeRegistry = createRegistry(ElizaService); diff --git a/packages/transport-dom/create.ts b/packages/transport-dom/src/create.ts similarity index 96% rename from packages/transport-dom/create.ts rename to packages/transport-dom/src/create.ts index 2f9649bcde..f44fdd8114 100644 --- a/packages/transport-dom/create.ts +++ b/packages/transport-dom/src/create.ts @@ -10,26 +10,26 @@ import { ServiceType, } from '@bufbuild/protobuf'; import { - ConnectError, Code as ConnectErrorCode, + ConnectError, StreamResponse, UnaryResponse, } from '@connectrpc/connect'; import { CommonTransportOptions } from '@connectrpc/connect/protocol'; import { errorFromJson } from '@connectrpc/connect/protocol-connect'; import { - TransportEvent, - TransportMessage, - TransportStream, isTransportError, isTransportEvent, isTransportMessage, isTransportStream, + TransportEvent, + TransportMessage, + TransportStream, } from './messages'; -import '@penumbra-zone/polyfills/ReadableStream[Symbol.asyncIterator]'; -import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; -import '@penumbra-zone/polyfills/Promise.withResolvers'; +import '@penumbra-zone/polyfills/src/ReadableStream[Symbol.asyncIterator]'; +import ReadableStream from '@penumbra-zone/polyfills/src/ReadableStream.from'; +import '@penumbra-zone/polyfills/src/Promise.withResolvers'; const forceTransportOptions = { httpClient: null as never, diff --git a/packages/transport-dom/direct.ts b/packages/transport-dom/src/direct.ts similarity index 100% rename from packages/transport-dom/direct.ts rename to packages/transport-dom/src/direct.ts diff --git a/packages/transport-dom/messages.ts b/packages/transport-dom/src/messages.ts similarity index 100% rename from packages/transport-dom/messages.ts rename to packages/transport-dom/src/messages.ts diff --git a/packages/transport-dom/proxy.ts b/packages/transport-dom/src/proxy.ts similarity index 100% rename from packages/transport-dom/proxy.ts rename to packages/transport-dom/src/proxy.ts diff --git a/packages/transport-dom/stream.test.ts b/packages/transport-dom/src/stream.test.ts similarity index 98% rename from packages/transport-dom/stream.test.ts rename to packages/transport-dom/src/stream.test.ts index d5fce03433..8d53e8410c 100644 --- a/packages/transport-dom/stream.test.ts +++ b/packages/transport-dom/src/stream.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'vitest'; import { JsonToMessage, MessageToJson } from './stream'; import { createRegistry, Message, proto3 } from '@bufbuild/protobuf'; -import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; +import ReadableStream from '@penumbra-zone/polyfills/src/ReadableStream.from'; import { ElizaService } from '@buf/connectrpc_eliza.connectrpc_es/connectrpc/eliza/v1/eliza_connect'; import { SayRequest } from '@buf/connectrpc_eliza.bufbuild_es/connectrpc/eliza/v1/eliza_pb'; diff --git a/packages/transport-dom/stream.ts b/packages/transport-dom/src/stream.ts similarity index 100% rename from packages/transport-dom/stream.ts rename to packages/transport-dom/src/stream.ts diff --git a/packages/transport-dom/tsconfig.json b/packages/transport-dom/tsconfig.json index 61a00fa282..459b3e4971 100644 --- a/packages/transport-dom/tsconfig.json +++ b/packages/transport-dom/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "tsconfig/base.json", - "include": ["."], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist", + "noEmit": true + } } diff --git a/packages/transport-dom/vite.config.ts b/packages/transport-dom/vite.config.ts new file mode 100644 index 0000000000..3b9552b92e --- /dev/null +++ b/packages/transport-dom/vite.config.ts @@ -0,0 +1,29 @@ +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; + +export default defineConfig({ + build: { + lib: { + entry: { + adapter: './src/adapter.ts', + impl: './src/any-impl.ts', + create: './src/create.ts', + direct: './src/direct.ts', + messages: './src/messages.ts', + proxy: './src/proxy.ts', + stream: './src/stream.ts', + }, + formats: ['es'], + }, + }, + plugins: [dts({ rollupTypes: true })], + test: { + include: ['**/*.test.ts'], + browser: { + name: 'chromium', + provider: 'playwright', + enabled: true, + headless: true, + }, + }, +}); diff --git a/packages/transport-dom/vitest.config.ts b/packages/transport-dom/vitest.config.ts deleted file mode 100644 index 57f298f4c7..0000000000 --- a/packages/transport-dom/vitest.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - test: { - include: ['**/*.test.ts'], - browser: { - name: 'chromium', - provider: 'playwright', - enabled: true, - headless: true, - }, - }, -}); diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json index 04eb9012d3..ed7bcb94d4 100644 --- a/packages/tsconfig/base.json +++ b/packages/tsconfig/base.json @@ -24,7 +24,8 @@ "noUnusedLocals": true, "noUnusedParameters": true, "resolveJsonModule": true, - "target": "ES2020" + "target": "ES2020", + "module": "ES2022" }, "exclude": ["node_modules"] } diff --git a/packages/tsconfig/react-library.json b/packages/tsconfig/react-library.json index d61f505333..7697bd1270 100644 --- a/packages/tsconfig/react-library.json +++ b/packages/tsconfig/react-library.json @@ -4,7 +4,6 @@ "extends": "./base.json", "compilerOptions": { "jsx": "react-jsx", - "lib": ["ES2015", "DOM"], - "module": "ESNext" + "lib": ["ES2022", "DOM", "DOM.Iterable"] } } diff --git a/packages/tsconfig/vite.json b/packages/tsconfig/vite.json index bbff6444ee..3c227544be 100644 --- a/packages/tsconfig/vite.json +++ b/packages/tsconfig/vite.json @@ -4,7 +4,7 @@ "extends": "./base.json", "compilerOptions": { "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, "moduleResolution": "bundler", diff --git a/packages/types/index.ts b/packages/types/index.ts deleted file mode 100644 index 8420b1093f..0000000000 --- a/packages/types/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './src'; diff --git a/packages/types/package.json b/packages/types/package.json index 9a29bceafb..bd9dd8e498 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,9 +1,43 @@ { "name": "@penumbra-zone/types", - "version": "1.0.0", + "version": "1.0.2", "license": "MIT", "type": "module", + "files": [ + "dist" + ], + "exports": { + "./src/registry": "./dist/registry.js", + "./src/base64": "./dist/base64.js", + "./src/state-commitment-tree": "./dist/state-commitment-tree.js", + "./src/servers": "./dist/servers.js", + "./src/indexed-db": "./dist/indexed-db.js", + "./src/validation": "./dist/validation.js", + "./src/lo-hi": "./dist/lo-hi.js", + "./src/environment": "./dist/environment.js", + "./src/box": "./dist/box.js", + "./src/wallet": "./dist/wallet.js", + "./src/utility": "./dist/utility.js", + "./src/transaction": "./dist/transaction.js", + "./src/translators": "./dist/translators.js", + "./src/hex": "./dist/hex.js", + "./src/string": "./dist/string.js", + "./src/address": "./dist/address.js", + "./src/services": "./dist/services.js", + "./src/block-processor": "./dist/block-processor.js", + "./src/querier": "./dist/querier.js", + "./src/amount": "./dist/amount.js", + "./src/jsonified": "./dist/jsonified.js", + "./src/staking": "./dist/staking.js", + "./src/identity-key": "./dist/identity-key.js", + "./src/customize-symbol": "./dist/customize-symbol.js", + "./src/user-choice": "./dist/user-choice.js", + "./src/internal-msg/offscreen": "./dist/internal-msg-offscreen.js", + "./src/internal-msg/shared": "./dist/internal-msg-shared.js" + }, "scripts": { + "build": "tsc && vite build", + "clean": "rm -rfv dist", "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, diff --git a/packages/types/src/amount.ts b/packages/types/src/amount.ts index 8774f68f4b..728d91d802 100644 --- a/packages/types/src/amount.ts +++ b/packages/types/src/amount.ts @@ -2,7 +2,7 @@ import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/nu import { fromBaseUnit, joinLoHi, splitLoHi } from './lo-hi'; import { BigNumber } from 'bignumber.js'; import { ValueView_KnownAssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { getDisplayDenomExponent } from '@penumbra-zone/getters'; +import { getDisplayDenomExponent } from '@penumbra-zone/getters/src/metadata'; export const joinLoHiAmount = (amount: Amount): bigint => { return joinLoHi(amount.lo, amount.hi); diff --git a/packages/types/src/chain.ts b/packages/types/src/chain.ts deleted file mode 100644 index 5e521fe84a..0000000000 --- a/packages/types/src/chain.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Chain { - displayName: string; - chainId: string; - ibcChannel: string; - iconUrl: string; -} diff --git a/packages/types/src/customize-symbol.ts b/packages/types/src/customize-symbol.ts index 4c4a77aa47..d985165597 100644 --- a/packages/types/src/customize-symbol.ts +++ b/packages/types/src/customize-symbol.ts @@ -3,7 +3,7 @@ import { assetPatterns, DelegationCaptureGroups, UnbondingCaptureGroups, -} from '@penumbra-zone/constants'; +} from '@penumbra-zone/constants/src/assets'; const SHORTENED_ID_LENGTH = 8; diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts deleted file mode 100644 index 5e0f7c3865..0000000000 --- a/packages/types/src/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -export * from './base64'; -export * from './state-commitment-tree'; -export * from './servers'; -export * from './indexed-db'; -export * from './validation'; -export * from './lo-hi'; -export * from './environment'; -export * from './box'; -export * from './wallet'; -export * from './utility'; -export * from './transaction'; -export * from './translators'; -export * from './hex'; -export * from './string'; -export * from './address'; -export * from './services'; -export * from './block-processor'; -export * from './querier'; -export * from './amount'; -export * from './chain'; -export * from './jsonified'; -export * from './staking'; -export * from './identity-key'; -export * from './customize-symbol'; diff --git a/packages/types/src/indexed-db.ts b/packages/types/src/indexed-db.ts index 57c6c57b5b..0389cb07bb 100644 --- a/packages/types/src/indexed-db.ts +++ b/packages/types/src/indexed-db.ts @@ -36,7 +36,7 @@ import { PositionState, TradingPair, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; -import { Jsonified } from './jsonified'; +import type { Jsonified } from './jsonified'; import { AppParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/app/v1/app_pb'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; diff --git a/packages/types/registry.ts b/packages/types/src/registry.ts similarity index 94% rename from packages/types/registry.ts rename to packages/types/src/registry.ts index 249db131e0..0611a89da5 100644 --- a/packages/types/registry.ts +++ b/packages/types/src/registry.ts @@ -12,7 +12,7 @@ import { QueryService as StakeService } from '@buf/penumbra-zone_penumbra.connec import { CustodyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/custody/v1/custody_connect'; import { TendermintProxyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/util/tendermint_proxy/v1/tendermint_proxy_connect'; import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; -import { createRegistry } from '@bufbuild/protobuf'; +import { createRegistry, IMessageTypeRegistry } from '@bufbuild/protobuf'; /** * This type registry is for JSON serialization of protobuf messages. @@ -26,7 +26,7 @@ import { createRegistry } from '@bufbuild/protobuf'; * extension, and should be able to resolve any message type encountered. */ -export const typeRegistry = createRegistry( +export const typeRegistry: IMessageTypeRegistry = createRegistry( CustodyService, ViewService, diff --git a/packages/types/src/staking.test.ts b/packages/types/src/staking.test.ts index 000e144898..8f2b400b77 100644 --- a/packages/types/src/staking.test.ts +++ b/packages/types/src/staking.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest'; import { calculateCommissionAsPercentage, getVotingPowerByValidatorInfo } from './staking'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { bech32IdentityKey } from './identity-key'; -import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters'; +import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info'; describe('calculateCommission()', () => { const validatorInfo = new ValidatorInfo({ diff --git a/packages/types/src/staking.ts b/packages/types/src/staking.ts index d798b4153a..06478f2f5e 100644 --- a/packages/types/src/staking.ts +++ b/packages/types/src/staking.ts @@ -5,17 +5,17 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { getBondingStateEnumFromValidatorInfo, - getDisplayDenomFromView, getFundingStreamsFromValidatorInfo, getIdentityKeyFromValidatorInfo, - getRateBpsFromFundingStream, getStateEnumFromValidatorInfo, getVotingPowerFromValidatorInfo, -} from '@penumbra-zone/getters'; +} from '@penumbra-zone/getters/src/validator-info'; +import { getRateBpsFromFundingStream } from '@penumbra-zone/getters/src/funding-stream'; import { joinLoHiAmount } from './amount'; import { bech32IdentityKey } from './identity-key'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { DelegationCaptureGroups, assetPatterns } from '@penumbra-zone/constants'; +import { assetPatterns, DelegationCaptureGroups } from '@penumbra-zone/constants/src/assets'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; export const getStateLabel = (validatorInfo: ValidatorInfo): string => ValidatorState_ValidatorStateEnum[getStateEnumFromValidatorInfo(validatorInfo)]; diff --git a/packages/types/src/translators/address-view.test.ts b/packages/types/src/translators/address-view.test.ts index 0f2ab34e7b..63e1774047 100644 --- a/packages/types/src/translators/address-view.test.ts +++ b/packages/types/src/translators/address-view.test.ts @@ -9,7 +9,7 @@ describe('asOpaqueAddressView()', () => { describe('when the address view is visible', () => { const addressView = new AddressView({ addressView: { - case: 'visible', + case: 'decoded', value: { address: { inner: Uint8Array.from([0, 1, 2, 3]), diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 61a00fa282..459b3e4971 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "tsconfig/base.json", - "include": ["."], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist", + "noEmit": true + } } diff --git a/packages/types/vite.config.ts b/packages/types/vite.config.ts new file mode 100644 index 0000000000..32dfe73571 --- /dev/null +++ b/packages/types/vite.config.ts @@ -0,0 +1,40 @@ +import { defineConfig } from 'vite'; +import dts from 'vite-plugin-dts'; + +export default defineConfig({ + build: { + lib: { + entry: { + registry: './src/registry.ts', + base64: './src/base64.ts', + 'state-commitment-tree': './src/state-commitment-tree.ts', + servers: './src/servers.ts', + 'indexed-db': './src/indexed-db.ts', + validation: './src/validation.ts', + 'lo-hi': './src/lo-hi.ts', + environment: './src/environment.ts', + box: './src/box.ts', + wallet: './src/wallet.ts', + utility: './src/utility.ts', + transaction: './src/transaction', + translators: './src/translators', + hex: './src/hex.ts', + string: './src/string.ts', + address: './src/address.ts', + services: './src/services.ts', + 'block-processor': './src/block-processor.ts', + querier: './src/querier.ts', + amount: './src/amount.ts', + jsonified: './src/jsonified.ts', + staking: './src/staking.ts', + 'identity-key': './src/identity-key.ts', + 'customize-symbol': './src/customize-symbol.ts', + 'user-choice': './src/user-choice.ts', + 'internal-msg-offscreen': './src/internal-msg/offscreen.ts', + 'internal-msg-shared': './src/internal-msg/shared.ts', + }, + formats: ['es'], + }, + }, + plugins: [dts({ rollupTypes: true })], +}); diff --git a/packages/ui/components/ui/address-component.test.tsx b/packages/ui/components/ui/address-component.test.tsx index dab6d6e305..6130fd8102 100644 --- a/packages/ui/components/ui/address-component.test.tsx +++ b/packages/ui/components/ui/address-component.test.tsx @@ -1,8 +1,9 @@ import { AddressComponent } from './address-component'; import { describe, expect, test } from 'vitest'; import { render } from '@testing-library/react'; -import { bech32ToUint8Array, shortenAddress } from '@penumbra-zone/types'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; +import { bech32ToUint8Array } from '@penumbra-zone/types/src/address'; +import { shortenAddress } from '@penumbra-zone/types/src/string'; describe('', () => { const address = diff --git a/packages/ui/components/ui/address-component.tsx b/packages/ui/components/ui/address-component.tsx index e0ef34b9d2..bd3c928bdf 100644 --- a/packages/ui/components/ui/address-component.tsx +++ b/packages/ui/components/ui/address-component.tsx @@ -1,5 +1,6 @@ -import { bech32Address, shortenAddress } from '@penumbra-zone/types'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; +import { bech32Address } from '@penumbra-zone/types/src/address'; +import { shortenAddress } from '@penumbra-zone/types/src/string'; interface AddressComponentProps { address: Address; diff --git a/packages/ui/components/ui/address-icon.tsx b/packages/ui/components/ui/address-icon.tsx index d9d12f89dd..28b7bcec20 100644 --- a/packages/ui/components/ui/address-icon.tsx +++ b/packages/ui/components/ui/address-icon.tsx @@ -1,6 +1,6 @@ import { Identicon } from './identicon'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32Address } from '@penumbra-zone/types'; +import { bech32Address } from '@penumbra-zone/types/src/address'; interface AddressIconProps { address: Address; diff --git a/packages/ui/components/ui/identity-key-component.tsx b/packages/ui/components/ui/identity-key-component.tsx index eec13f3ba6..ea84e4872e 100644 --- a/packages/ui/components/ui/identity-key-component.tsx +++ b/packages/ui/components/ui/identity-key-component.tsx @@ -1,6 +1,6 @@ import { IdentityKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { CopyToClipboardIconButton } from './copy-to-clipboard-icon-button'; -import { bech32IdentityKey } from '@penumbra-zone/types'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; /** * Renders a validator's `IdentityKey` as a bech32-encoded string, along with a diff --git a/packages/ui/components/ui/select-account.tsx b/packages/ui/components/ui/select-account.tsx index a1e664546e..92e8ab511c 100644 --- a/packages/ui/components/ui/select-account.tsx +++ b/packages/ui/components/ui/select-account.tsx @@ -7,8 +7,8 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tool import { useEffect, useState } from 'react'; import { AddressComponent } from './address-component'; import { Address } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32Address } from '@penumbra-zone/types'; import { AccountSwitcher } from './account-switcher'; +import { bech32Address } from '@penumbra-zone/types/src/address'; interface SelectAccountProps { getAddrByIndex: (index: number, ephemeral: boolean) => Promise
| Address; diff --git a/packages/ui/components/ui/tx/view/address-view.tsx b/packages/ui/components/ui/tx/view/address-view.tsx index 99a1ee659a..b57c914348 100644 --- a/packages/ui/components/ui/tx/view/address-view.tsx +++ b/packages/ui/components/ui/tx/view/address-view.tsx @@ -1,8 +1,8 @@ import { AddressIcon } from '../../address-icon'; import { AddressView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { bech32Address } from '@penumbra-zone/types'; import { CopyToClipboardIconButton } from '../../copy-to-clipboard-icon-button'; import { AddressComponent } from '../../address-component'; +import { bech32Address } from '@penumbra-zone/types/src/address'; interface AddressViewProps { view: AddressView | undefined; diff --git a/packages/ui/components/ui/tx/view/delegate.tsx b/packages/ui/components/ui/tx/view/delegate.tsx index 6ef5e65295..24b0cf68a8 100644 --- a/packages/ui/components/ui/tx/view/delegate.tsx +++ b/packages/ui/components/ui/tx/view/delegate.tsx @@ -1,6 +1,7 @@ import { Delegate } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ViewBox } from './viewbox'; -import { bech32IdentityKey, joinLoHiAmount } from '@penumbra-zone/types'; +import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; /** * Render a `Delegate` action. diff --git a/packages/ui/components/ui/tx/view/swap.tsx b/packages/ui/components/ui/tx/view/swap.tsx index 0b2c8571da..f7c9838f29 100644 --- a/packages/ui/components/ui/tx/view/swap.tsx +++ b/packages/ui/components/ui/tx/view/swap.tsx @@ -1,11 +1,8 @@ import { ViewBox } from './viewbox'; import { SwapView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; -import { - bech32Address, - fromBaseUnitAmount, - joinLoHiAmount, - uint8ArrayToBase64, -} from '@penumbra-zone/types'; +import { bech32Address } from '@penumbra-zone/types/src/address'; +import { fromBaseUnitAmount, joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; export const SwapViewComponent = ({ value }: { value: SwapView }) => { if (value.swapView.case === 'visible') { diff --git a/packages/ui/components/ui/tx/view/transaction.tsx b/packages/ui/components/ui/tx/view/transaction.tsx index 9e70f9c122..5bbee4d3ea 100644 --- a/packages/ui/components/ui/tx/view/transaction.tsx +++ b/packages/ui/components/ui/tx/view/transaction.tsx @@ -2,7 +2,7 @@ import { TransactionView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbr import { MemoViewComponent } from './memo-view'; import { ActionViewComponent } from './action-view'; import { ViewBox, ViewSection } from './viewbox'; -import { joinLoHiAmount } from '@penumbra-zone/types'; +import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; export const TransactionViewComponent = ({ txv }: { txv: TransactionView }) => { if (!txv.bodyView) throw new Error('transaction view missing body view'); diff --git a/packages/ui/components/ui/tx/view/undelegate-claim.tsx b/packages/ui/components/ui/tx/view/undelegate-claim.tsx index e51fe9a6fc..091accc2f9 100644 --- a/packages/ui/components/ui/tx/view/undelegate-claim.tsx +++ b/packages/ui/components/ui/tx/view/undelegate-claim.tsx @@ -1,11 +1,11 @@ import { UndelegateClaim } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ViewBox } from './viewbox'; import { IdentityKeyComponent } from '../../identity-key-component'; +import { ActionDetails } from './action-details'; import { getStartEpochIndexFromUndelegateClaim, getValidatorIdentityFromUndelegateClaim, -} from '@penumbra-zone/getters'; -import { ActionDetails } from './action-details'; +} from '@penumbra-zone/getters/src/undelegate-claim'; /** Render an `UndelegateClaim` action. */ export const UndelegateClaimComponent = ({ value }: { value: UndelegateClaim }) => { diff --git a/packages/ui/components/ui/tx/view/undelegate.tsx b/packages/ui/components/ui/tx/view/undelegate.tsx index 03e48e206e..b5d4fc799d 100644 --- a/packages/ui/components/ui/tx/view/undelegate.tsx +++ b/packages/ui/components/ui/tx/view/undelegate.tsx @@ -1,6 +1,7 @@ import { Undelegate } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ViewBox } from './viewbox'; -import { bech32IdentityKey, joinLoHiAmount } from '@penumbra-zone/types'; +import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { bech32IdentityKey } from '@penumbra-zone/types/src/identity-key'; /** * Render an `Undelegate` action. diff --git a/packages/ui/components/ui/tx/view/value.test.tsx b/packages/ui/components/ui/tx/view/value.test.tsx index cb5a0a2d85..7afa1a515d 100644 --- a/packages/ui/components/ui/tx/view/value.test.tsx +++ b/packages/ui/components/ui/tx/view/value.test.tsx @@ -5,8 +5,8 @@ import { Metadata, ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { bech32AssetId } from '@penumbra-zone/getters'; -import { base64ToUint8Array } from '@penumbra-zone/types'; +import { bech32AssetId } from '@penumbra-zone/getters/src/asset'; +import { base64ToUint8Array } from '@penumbra-zone/types/src/base64'; describe('', () => { const penumbraMetadata = new Metadata({ diff --git a/packages/ui/components/ui/tx/view/value.tsx b/packages/ui/components/ui/tx/view/value.tsx index c644945f3a..a8adf658ef 100644 --- a/packages/ui/components/ui/tx/view/value.tsx +++ b/packages/ui/components/ui/tx/view/value.tsx @@ -1,11 +1,12 @@ import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { fromBaseUnitAmount } from '@penumbra-zone/types'; -import { getDisplayDenomExponent, getDisplayDenomFromView } from '@penumbra-zone/getters'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; +import { getDisplayDenomExponent } from '@penumbra-zone/getters/src/metadata'; import { CopyToClipboard } from '../../copy-to-clipboard'; import { AssetIcon } from './asset-icon'; import { CopyIcon } from '@radix-ui/react-icons'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; import { cn } from '../../../../lib/utils'; +import { fromBaseUnitAmount } from '@penumbra-zone/types/src/amount'; interface ValueViewProps { view: ValueView | undefined; diff --git a/packages/ui/lib/toast/transaction-toast.tsx b/packages/ui/lib/toast/transaction-toast.tsx index 722a2a3838..01ed523ed2 100644 --- a/packages/ui/lib/toast/transaction-toast.tsx +++ b/packages/ui/lib/toast/transaction-toast.tsx @@ -1,8 +1,3 @@ -import { - shorten, - TRANSACTION_LABEL_BY_CLASSIFICATION, - TransactionClassification, -} from '@penumbra-zone/types'; import { Toast } from './toast'; import { AuthorizeAndBuildResponse, @@ -12,6 +7,11 @@ import { import { Link } from 'react-router-dom'; import { Progress } from '../../components/ui/progress'; import { ReactNode } from 'react'; +import { + TRANSACTION_LABEL_BY_CLASSIFICATION, + TransactionClassification, +} from '@penumbra-zone/types/src/transaction'; +import { shorten } from '@penumbra-zone/types/src/string'; type BroadcastStatus = BroadcastTransactionResponse['status']; type BuildStatus = (AuthorizeAndBuildResponse | WitnessAndBuildResponse)['status']; diff --git a/packages/ui/package.json b/packages/ui/package.json index 4cb0907db0..d309aba669 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/ui", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -12,6 +13,7 @@ }, "dependencies": { "@penumbra-zone/getters": "workspace:*", + "@penumbra-zone/types": "workspace:*", "@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-dialog": "1.0.5", "@radix-ui/react-icons": "^1.3.0", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 009c323a6f..c043523977 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,6 +1,7 @@ { "name": "@penumbra-zone/wasm", - "version": "1.0.0", + "version": "1.0.1", + "private": true, "license": "MIT", "type": "module", "scripts": { @@ -16,7 +17,8 @@ }, "dependencies": { "bech32": "^2.0.0", - "zod": "^3.22.4" + "zod": "^3.22.4", + "@penumbra-zone/types": "workspace:*" }, "devDependencies": { "fake-indexeddb": "^5.0.2", diff --git a/packages/wasm/src/address.test.ts b/packages/wasm/src/address.test.ts index dcbb5419b8..2933af911f 100644 --- a/packages/wasm/src/address.test.ts +++ b/packages/wasm/src/address.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; import { generateSpendKey, getAddressByIndex, getFullViewingKey } from './keys'; import { isControlledAddress } from './address'; -import { bech32Address } from '@penumbra-zone/types'; +import { bech32Address } from '@penumbra-zone/types/src/address'; describe('address', () => { const seedPhrase = diff --git a/packages/wasm/src/build.ts b/packages/wasm/src/build.ts index af06d54ad4..6875549603 100644 --- a/packages/wasm/src/build.ts +++ b/packages/wasm/src/build.ts @@ -5,7 +5,7 @@ import { TransactionPlan, WitnessData, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; -import { StateCommitmentTree } from '@penumbra-zone/types'; +import type { StateCommitmentTree } from '@penumbra-zone/types/src/state-commitment-tree'; import { JsonValue } from '@bufbuild/protobuf'; import { authorize, build_action, build_parallel, load_proving_key, witness } from '../wasm'; import { ActionType, provingKeys } from './proving-keys'; diff --git a/packages/wasm/src/planner.ts b/packages/wasm/src/planner.ts index 16e4bca80f..e41d929247 100644 --- a/packages/wasm/src/planner.ts +++ b/packages/wasm/src/planner.ts @@ -1,9 +1,8 @@ import { TransactionPlan } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { TransactionPlannerRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { JsonValue } from '@bufbuild/protobuf'; -import { IdbConstants } from '@penumbra-zone/types'; - import { plan_transaction } from '../wasm'; +import type { IdbConstants } from '@penumbra-zone/types/src/indexed-db'; export const planTransaction = async ( idbConstants: IdbConstants, diff --git a/packages/wasm/src/sct.ts b/packages/wasm/src/sct.ts index d5b7d65da2..2371038fed 100644 --- a/packages/wasm/src/sct.ts +++ b/packages/wasm/src/sct.ts @@ -1,7 +1,7 @@ import { decode_sct_root } from '../wasm'; -import { uint8ArrayToHex } from '@penumbra-zone/types'; import { MerkleRoot } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/crypto/tct/v1/tct_pb'; import { JsonValue } from '@bufbuild/protobuf'; +import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; export const decodeSctRoot = (hash: Uint8Array): MerkleRoot => { const hexString = uint8ArrayToHex(hash); diff --git a/packages/wasm/src/transaction.ts b/packages/wasm/src/transaction.ts index e066eb546b..70b46dc0d9 100644 --- a/packages/wasm/src/transaction.ts +++ b/packages/wasm/src/transaction.ts @@ -1,10 +1,10 @@ -import { IdbConstants } from '@penumbra-zone/types'; import { transaction_info } from '../wasm'; import { Transaction, TransactionPerspective, TransactionView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; +import type { IdbConstants } from '@penumbra-zone/types/src/indexed-db'; export const generateTransactionInfo = async ( fullViewingKey: string, diff --git a/packages/wasm/src/view-server.test.ts b/packages/wasm/src/view-server.test.ts index d89a324941..50c9b29eb0 100644 --- a/packages/wasm/src/view-server.test.ts +++ b/packages/wasm/src/view-server.test.ts @@ -2,7 +2,7 @@ import 'fake-indexeddb/auto'; // Instanitating ViewServer requires opening up In import { describe, expect, it } from 'vitest'; import { generateSpendKey, getFullViewingKey } from './keys'; import { ViewServer } from '../wasm'; -import { IDB_TABLES, IdbConstants } from '@penumbra-zone/types'; +import { IDB_TABLES, IdbConstants } from '@penumbra-zone/types/src/indexed-db'; describe('wasmViewServer', () => { it('does not raise zod validation error', async () => { diff --git a/packages/wasm/src/view-server.ts b/packages/wasm/src/view-server.ts index a20b7304bd..42a19f1a5e 100644 --- a/packages/wasm/src/view-server.ts +++ b/packages/wasm/src/view-server.ts @@ -1,12 +1,4 @@ import { ViewServer as WasmViewServer } from '../wasm'; -import { - IdbConstants, - ScanBlockResult, - SctUpdatesSchema, - StateCommitmentTree, - validateSchema, - ViewServerInterface, -} from '@penumbra-zone/types'; import { CompactBlock } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/compact_block/v1/compact_block_pb'; import { MerkleRoot } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/crypto/tct/v1/tct_pb'; import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; @@ -19,6 +11,14 @@ import { SpendableNoteRecord, SwapRecord, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; +import { + ScanBlockResult, + SctUpdatesSchema, + StateCommitmentTree, +} from '@penumbra-zone/types/src/state-commitment-tree'; +import type { IdbConstants } from '@penumbra-zone/types/src/indexed-db'; +import type { ViewServerInterface } from '@penumbra-zone/types/src/servers'; +import { validateSchema } from '@penumbra-zone/types/src/validation'; interface ViewServerProps { fullViewingKey: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 976b332374..c83b3c5154 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,9 +36,9 @@ importers: specifier: workspace:* version: link:packages/tailwind-config devDependencies: - '@penumbra-zone/types': - specifier: workspace:* - version: link:packages/types + '@changesets/cli': + specifier: ^2.27.1 + version: 2.27.1 '@penumbra-zone/wasm': specifier: workspace:* version: link:packages/wasm @@ -126,6 +126,12 @@ importers: vite: specifier: ^5.1.6 version: 5.1.6(@types/node@20.11.26) + vite-plugin-dts: + specifier: ^3.7.3 + version: 3.7.3(@types/node@20.11.26)(typescript@5.4.2)(vite@5.1.6) + vite-plugin-node-polyfills: + specifier: 0.21.0 + version: 0.21.0(vite@5.1.6) vite-plugin-top-level-await: specifier: ^1.4.1 version: 1.4.1(vite@5.1.6) @@ -165,6 +171,9 @@ importers: '@penumbra-zone/transport-dom': specifier: workspace:* version: link:../../packages/transport-dom + '@penumbra-zone/types': + specifier: workspace:* + version: link:../../packages/types '@penumbra-zone/ui': specifier: workspace:* version: link:../../packages/ui @@ -289,6 +298,9 @@ importers: '@penumbra-zone/transport-dom': specifier: workspace:* version: link:../../packages/transport-dom + '@penumbra-zone/types': + specifier: workspace:* + version: link:../../packages/types '@penumbra-zone/ui': specifier: workspace:* version: link:../../packages/ui @@ -296,14 +308,14 @@ importers: specifier: ^1.3.0 version: 1.3.0(react@18.2.0) '@tanstack/react-query': - specifier: ^5.25.0 - version: 5.25.0(react@18.2.0) + specifier: ^5.26.3 + version: 5.28.0(react@18.2.0) bignumber.js: specifier: ^9.1.2 version: 9.1.2 date-fns: - specifier: ^3.3.1 - version: 3.3.1 + specifier: ^3.4.0 + version: 3.4.0 immer: specifier: ^10.0.4 version: 10.0.4 @@ -374,6 +386,9 @@ importers: '@penumbra-zone/crypto-web': specifier: workspace:* version: link:../../packages/crypto + '@penumbra-zone/types': + specifier: workspace:* + version: link:../../packages/types '@penumbra-zone/ui': specifier: workspace:* version: link:../../packages/ui @@ -405,17 +420,20 @@ importers: packages/client: dependencies: - '@connectrpc/connect': - specifier: ^1.4.0 - version: 1.4.0(@bufbuild/protobuf@1.7.2) '@penumbra-zone/transport-dom': specifier: workspace:* version: link:../transport-dom + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types packages/constants: {} packages/crypto: dependencies: + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types bip39: specifier: ^3.1.0 version: 3.1.0 @@ -438,11 +456,7 @@ importers: specifier: ^2.0.0 version: 2.0.0 - packages/polyfills: - devDependencies: - tsconfig: - specifier: workspace:* - version: link:../tsconfig + packages/polyfills: {} packages/query: dependencies: @@ -452,6 +466,9 @@ importers: '@penumbra-zone/crypto-web': specifier: workspace:* version: link:../crypto + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types '@penumbra-zone/wasm': specifier: workspace:* version: link:../wasm @@ -488,6 +505,9 @@ importers: '@penumbra-zone/transport-dom': specifier: workspace:* version: link:../transport-dom + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types '@penumbra-zone/wasm': specifier: workspace:* version: link:../wasm @@ -507,6 +527,9 @@ importers: '@penumbra-zone/storage': specifier: workspace:* version: link:../storage + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types '@penumbra-zone/wasm': specifier: workspace:* version: link:../wasm @@ -536,9 +559,9 @@ importers: '@penumbra-zone/polyfills': specifier: workspace:* version: link:../polyfills - playwright: - specifier: ^1.42.1 - version: 1.42.1 + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types packages/tailwind-config: dependencies: @@ -607,6 +630,9 @@ importers: '@penumbra-zone/getters': specifier: workspace:* version: link:../getters + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types '@radix-ui/react-checkbox': specifier: ^1.0.4 version: 1.0.4(@types/react-dom@18.2.21)(@types/react@18.2.64)(react-dom@18.2.0)(react@18.2.0) @@ -752,6 +778,9 @@ importers: packages/wasm: dependencies: + '@penumbra-zone/types': + specifier: workspace:* + version: link:../types bech32: specifier: ^2.0.0 version: 2.0.0 @@ -2412,6 +2441,189 @@ packages: /@bufbuild/protobuf@1.7.2: resolution: {integrity: sha512-i5GE2Dk5ekdlK1TR7SugY4LWRrKSfb5T1Qn4unpIMbfxoeGKERKQ59HG3iYewacGD10SR7UzevfPnh6my4tNmQ==} + /@changesets/apply-release-plan@7.0.0: + resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/config': 3.0.0 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.6.0 + dev: true + + /@changesets/assemble-release-plan@6.0.0: + resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.6.0 + dev: true + + /@changesets/changelog-git@0.2.0: + resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} + dependencies: + '@changesets/types': 6.0.0 + dev: true + + /@changesets/cli@2.27.1: + resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} + hasBin: true + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/apply-release-plan': 7.0.0 + '@changesets/assemble-release-plan': 6.0.0 + '@changesets/changelog-git': 0.2.0 + '@changesets/config': 3.0.0 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/get-release-plan': 4.0.0 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 + '@changesets/pre': 2.0.0 + '@changesets/read': 0.6.0 + '@changesets/types': 6.0.0 + '@changesets/write': 0.3.0 + '@manypkg/get-packages': 1.1.3 + '@types/semver': 7.5.8 + ansi-colors: 4.1.3 + chalk: 2.4.2 + ci-info: 3.9.0 + enquirer: 2.4.1 + external-editor: 3.1.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + meow: 6.1.1 + outdent: 0.5.0 + p-limit: 2.3.0 + preferred-pm: 3.1.3 + resolve-from: 5.0.0 + semver: 7.6.0 + spawndamnit: 2.0.0 + term-size: 2.2.1 + tty-table: 4.2.3 + dev: true + + /@changesets/config@3.0.0: + resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/logger': 0.1.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.5 + dev: true + + /@changesets/errors@0.2.0: + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + dependencies: + extendable-error: 0.1.7 + dev: true + + /@changesets/get-dependents-graph@2.0.0: + resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + chalk: 2.4.2 + fs-extra: 7.0.1 + semver: 7.6.0 + dev: true + + /@changesets/get-release-plan@4.0.0: + resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/assemble-release-plan': 6.0.0 + '@changesets/config': 3.0.0 + '@changesets/pre': 2.0.0 + '@changesets/read': 0.6.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + dev: true + + /@changesets/get-version-range-type@0.4.0: + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} + dev: true + + /@changesets/git@3.0.0: + resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.5 + spawndamnit: 2.0.0 + dev: true + + /@changesets/logger@0.1.0: + resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} + dependencies: + chalk: 2.4.2 + dev: true + + /@changesets/parse@0.4.0: + resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} + dependencies: + '@changesets/types': 6.0.0 + js-yaml: 3.14.1 + dev: true + + /@changesets/pre@2.0.0: + resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + dev: true + + /@changesets/read@0.6.0: + resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 + '@changesets/parse': 0.4.0 + '@changesets/types': 6.0.0 + chalk: 2.4.2 + fs-extra: 7.0.1 + p-filter: 2.1.0 + dev: true + + /@changesets/types@4.1.0: + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + dev: true + + /@changesets/types@6.0.0: + resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} + dev: true + + /@changesets/write@0.3.0: + resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/types': 6.0.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + prettier: 2.8.8 + dev: true + /@colors/colors@1.5.0: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -3181,6 +3393,26 @@ packages: resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} dev: true + /@manypkg/find-root@1.1.0: + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + dependencies: + '@babel/runtime': 7.24.0 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 + dev: true + + /@manypkg/get-packages@1.1.3: + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + dependencies: + '@babel/runtime': 7.24.0 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 + dev: true + /@mdx-js/react@2.3.0(react@18.2.0): resolution: {integrity: sha512-zQH//gdOmuu7nt2oJR29vFhDv88oGPmVw6BggmrHeMI+xgEkp1B2dX9/bMBSYtK0dyLX/aOmesKS09g222K1/g==} peerDependencies: @@ -3191,6 +3423,49 @@ packages: react: 18.2.0 dev: true + /@microsoft/api-extractor-model@7.28.3(@types/node@20.11.26): + resolution: {integrity: sha512-wT/kB2oDbdZXITyDh2SQLzaWwTOFbV326fP0pUwNW00WeliARs0qjmXBWmGWardEzp2U3/axkO3Lboqun6vrig==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.62.0(@types/node@20.11.26) + transitivePeerDependencies: + - '@types/node' + dev: true + + /@microsoft/api-extractor@7.39.0(@types/node@20.11.26): + resolution: {integrity: sha512-PuXxzadgnvp+wdeZFPonssRAj/EW4Gm4s75TXzPk09h3wJ8RS3x7typf95B4vwZRrPTQBGopdUl+/vHvlPdAcg==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.28.3(@types/node@20.11.26) + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.62.0(@types/node@20.11.26) + '@rushstack/rig-package': 0.5.1 + '@rushstack/ts-command-line': 4.17.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.8 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.3.3 + transitivePeerDependencies: + - '@types/node' + dev: true + + /@microsoft/tsdoc-config@0.16.2: + resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + ajv: 6.12.6 + jju: 1.4.0 + resolve: 1.19.0 + dev: true + + /@microsoft/tsdoc@0.14.2: + resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} + dev: true + /@ndelangen/get-tarball@3.0.9: resolution: {integrity: sha512-9JKTEik4vq+yGosHYhZ1tiH/3WpUS0Nh0kej4Agndhox8pAdWhEx5knFVRcb/ya9knCRCs1rPxNrSXTDdfVqpA==} dependencies: @@ -4313,6 +4588,20 @@ packages: engines: {node: '>=14.0.0'} dev: false + /@rollup/plugin-inject@5.0.5: + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0 + estree-walker: 2.0.2 + magic-string: 0.30.8 + dev: true + /@rollup/plugin-virtual@3.0.2: resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} @@ -4428,6 +4717,40 @@ packages: requiresBuild: true optional: true + /@rushstack/node-core-library@3.62.0(@types/node@20.11.26): + resolution: {integrity: sha512-88aJn2h8UpSvdwuDXBv1/v1heM6GnBf3RjEy6ZPP7UnzHNCqOHA2Ut+ScYUbXcqIdfew9JlTAe3g+cnX9xQ/Aw==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 20.11.26 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.8 + semver: 7.5.4 + z-schema: 5.0.5 + dev: true + + /@rushstack/rig-package@0.5.1: + resolution: {integrity: sha512-pXRYSe29TjRw7rqxD4WS3HN/sRSbfr+tJs4a9uuaSIBAITbUggygdhuG0VrO0EO+QqH91GhYMN4S6KRtOEmGVA==} + dependencies: + resolve: 1.22.8 + strip-json-comments: 3.1.1 + dev: true + + /@rushstack/ts-command-line@4.17.1: + resolution: {integrity: sha512-2jweO1O57BYP5qdBGl6apJLB+aRIn5ccIRTPDyULh0KMwVzFqWtw6IZWt1qtUoZD/pD2RNkIOosH6Cq45rIYeg==} + dependencies: + '@types/argparse': 1.0.38 + argparse: 1.0.10 + colors: 1.2.5 + string-argv: 0.3.2 + dev: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -5468,6 +5791,10 @@ packages: resolution: {integrity: sha512-vlobHP64HTuSE68lWF1mEhwSRC5Q7gaT+a/m9S+ItuN+ruSOxe1rFnR9j0ACWQ314BPhBEVKfBQ6mHL0OWfdbQ==} dev: false + /@tanstack/query-core@5.28.0: + resolution: {integrity: sha512-BfltXqnoIAXTCFrQCu40M3Ch7odQ6IJraTy0t8n12jAwXMYKIgDwOBWTqkSUYD+vxMi8Ag0+9F8lw9wZKhi2Yg==} + dev: false + /@tanstack/react-query@5.25.0(react@18.2.0): resolution: {integrity: sha512-u+n5R7mLO7RmeiIonpaCRVXNRWtZEef/aVZ/XGWRPa7trBIvGtzlfo0Ah7ZtnTYfrKEVwnZ/tzRCBcoiqJ/tFw==} peerDependencies: @@ -5477,6 +5804,15 @@ packages: react: 18.2.0 dev: false + /@tanstack/react-query@5.28.0(react@18.2.0): + resolution: {integrity: sha512-nF4E4rFMQdh30gECGkTfyzgjgfSr4MLVgYoIsf7KqVkjUjEQHPpi9jyx10kO3Yq/OQMKOLMHAzD31st/lxDPbQ==} + peerDependencies: + react: ^18.0.0 + dependencies: + '@tanstack/query-core': 5.28.0 + react: 18.2.0 + dev: false + /@testing-library/dom@9.3.4: resolution: {integrity: sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==} engines: {node: '>=14'} @@ -5597,6 +5933,10 @@ packages: update-check: 1.5.4 dev: true + /@types/argparse@1.0.38: + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + dev: true + /@types/aria-query@5.0.4: resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} dev: true @@ -5865,6 +6205,10 @@ packages: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true + /@types/minimist@1.2.5: + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + dev: true + /@types/node-fetch@2.6.11: resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} dependencies: @@ -5872,6 +6216,10 @@ packages: form-data: 4.0.0 dev: true + /@types/node@12.20.55: + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + dev: true + /@types/node@18.19.23: resolution: {integrity: sha512-wtE3d0OUfNKtZYAqZb8HAWGxxXsImJcPUAgZNw+dWFxO6s5tIwIjyKnY76tsTatsNCLJPkVYwUpq15D38ng9Aw==} dependencies: @@ -6294,6 +6642,66 @@ packages: loupe: 2.3.7 pretty-format: 29.7.0 + /@volar/language-core@1.11.1: + resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + dependencies: + '@volar/source-map': 1.11.1 + dev: true + + /@volar/source-map@1.11.1: + resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + dependencies: + muggle-string: 0.3.1 + dev: true + + /@volar/typescript@1.11.1: + resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==} + dependencies: + '@volar/language-core': 1.11.1 + path-browserify: 1.0.1 + dev: true + + /@vue/compiler-core@3.4.21: + resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} + dependencies: + '@babel/parser': 7.24.0 + '@vue/shared': 3.4.21 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-dom@3.4.21: + resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==} + dependencies: + '@vue/compiler-core': 3.4.21 + '@vue/shared': 3.4.21 + dev: true + + /@vue/language-core@1.8.27(typescript@5.4.2): + resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@volar/language-core': 1.11.1 + '@volar/source-map': 1.11.1 + '@vue/compiler-dom': 3.4.21 + '@vue/shared': 3.4.21 + computeds: 0.0.1 + minimatch: 9.0.3 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + typescript: 5.4.2 + vue-template-compiler: 2.7.16 + dev: true + + /@vue/shared@3.4.21: + resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} + dev: true + /@webassemblyjs/ast@1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -6625,6 +7033,11 @@ packages: string-width: 4.2.3 dev: true + /ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: true + /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -6899,6 +7312,11 @@ packages: is-shared-array-buffer: 1.0.3 dev: true + /arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + dev: true + /arrify@2.0.1: resolution: {integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==} engines: {node: '>=8'} @@ -6908,6 +7326,14 @@ packages: resolution: {integrity: sha512-1Sd1LrodN0XYxYeZcN1J4xYZvmvTwD5tDWaPUGPIzH1mFsmzsPnVtd2exWhecMjtZk/wYWjNZJiD3b1SLCeJqg==} dev: true + /asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + dependencies: + bn.js: 4.12.0 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + /assert@2.1.0: resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} dependencies: @@ -7075,6 +7501,13 @@ packages: open: 8.4.2 dev: true + /better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + dependencies: + is-windows: 1.0.2 + dev: true + /big-integer@1.6.52: resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} engines: {node: '>=0.6'} @@ -7109,6 +7542,14 @@ packages: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: true + /bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: true + + /bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: true + /body-parser@1.20.2: resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -7172,23 +7613,96 @@ packages: dependencies: fill-range: 7.0.1 + /breakword@1.0.6: + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + dependencies: + wcwidth: 1.0.1 + dev: true + + /brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: true + /browser-assert@1.2.1: resolution: {integrity: sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==} dev: true - /browserify-zlib@0.1.4: - resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} + /browser-resolve@2.0.0: + resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==} dependencies: - pako: 0.2.9 + resolve: 1.22.8 dev: true - /browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true + /browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} dependencies: - caniuse-lite: 1.0.30001597 - electron-to-chromium: 1.4.699 + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + 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==} + dependencies: + 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==} + dependencies: + cipher-base: 1.0.4 + 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.3: + resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} + engines: {node: '>= 0.12'} + dependencies: + bn.js: 5.2.1 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.5 + hash-base: 3.0.4 + inherits: 2.0.4 + parse-asn1: 5.1.7 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + dev: true + + /browserify-zlib@0.1.4: + resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} + dependencies: + pako: 0.2.9 + dev: true + + /browserify-zlib@0.2.0: + resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} + dependencies: + pako: 1.0.11 + dev: true + + /browserslist@4.23.0: + resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001597 + electron-to-chromium: 1.4.699 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true @@ -7211,6 +7725,10 @@ packages: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true + /buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + dev: true + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -7225,6 +7743,10 @@ packages: ieee754: 1.2.1 dev: false + /builtin-status-codes@3.0.0: + resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} + dev: true + /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: @@ -7303,6 +7825,15 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} + /camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + dev: true + /camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -7446,6 +7977,13 @@ packages: engines: {node: '>=8'} dev: true + /cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + /citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} dependencies: @@ -7516,6 +8054,14 @@ packages: engines: {node: '>= 10'} dev: true + /cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: true + /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -7596,6 +8142,11 @@ packages: engines: {node: '>=0.1.90'} dev: true + /colors@1.2.5: + resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} + engines: {node: '>=0.1.90'} + dev: true + /colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} dependencies: @@ -7632,6 +8183,13 @@ packages: engines: {node: '>= 12'} dev: true + /commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + requiresBuild: true + dev: true + optional: true + /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true @@ -7668,6 +8226,10 @@ packages: - supports-color dev: true + /computeds@0.0.1: + resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -7718,6 +8280,10 @@ packages: engines: {node: ^14.18.0 || >=16.10.0} dev: true + /console-browserify@1.2.0: + resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} + dev: true + /console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true @@ -7729,6 +8295,10 @@ packages: upper-case: 1.1.3 dev: true + /constants-browserify@1.0.0: + resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} + dev: true + /content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -7838,6 +8408,34 @@ packages: readable-stream: 3.6.2 dev: true + /create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + dependencies: + bn.js: 4.12.0 + elliptic: 6.5.5 + dev: true + + /create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + dev: true + + /create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true @@ -7850,6 +8448,14 @@ packages: cross-spawn: 6.0.5 dev: true + /cross-spawn@5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + dependencies: + lru-cache: 4.1.5 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + /cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} @@ -7869,6 +8475,22 @@ packages: shebang-command: 2.0.0 which: 2.0.2 + /crypto-browserify@3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.3 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + dev: true + /crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} dev: false @@ -7972,10 +8594,32 @@ packages: /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + /csv-generate@3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + dev: true + + /csv-parse@4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + dev: true + /csv-parse@5.5.5: resolution: {integrity: sha512-erCk7tyU3yLWAhk6wvKxnyPtftuy/6Ak622gOO7BCJ05+TYffnPCJF905wmOQm+BpkX54OdAl8pveJwUdpnCXQ==} dev: true + /csv-stringify@5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + dev: true + + /csv@5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + dependencies: + csv-generate: 3.4.3 + csv-parse: 4.16.3 + csv-stringify: 5.6.5 + stream-transform: 2.1.3 + dev: true + /data-uri-to-buffer@4.0.1: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} @@ -7997,6 +8641,14 @@ packages: resolution: {integrity: sha512-y8e109LYGgoQDveiEBD3DYXKba1jWf5BA8YU1FL5Tvm0BTdEfy54WLCwnuYWZNnzzvALy/QQ4Hov+Q9RVRv+Zw==} dev: false + /date-fns@3.4.0: + resolution: {integrity: sha512-Akz4R8J9MXBsOgF1QeWeCsbv6pntT5KCPjU0Q9prBxVmWJYPLhwAIsNg3b0QAdr0ttiozYLD3L/af7Ra0jqYXw==} + dev: false + + /de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + dev: true + /debounce@1.2.1: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} dev: false @@ -8046,6 +8698,19 @@ packages: dependencies: ms: 2.1.2 + /decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + dev: true + + /decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + dev: true + /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} @@ -8194,6 +8859,13 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + /des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -8236,6 +8908,14 @@ packages: engines: {node: '>=0.3.1'} dev: true + /diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dependencies: + bn.js: 4.12.0 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -8286,6 +8966,11 @@ packages: entities: 2.2.0 dev: true + /domain-browser@4.23.0: + resolution: {integrity: sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==} + engines: {node: '>=10'} + dev: true + /domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: true @@ -8383,6 +9068,18 @@ packages: resolution: {integrity: sha512-I7q3BbQi6e4tJJN5CRcyvxhK0iJb34TV8eJQcgh+fR2fQ8miMgZcEInckCo1U9exDHbfz7DLDnFn8oqH/VcRKw==} dev: true + /elliptic@6.5.5: + resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: true + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -8425,6 +9122,14 @@ packages: tapable: 2.2.1 dev: true + /enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + dev: true + /entities@2.1.0: resolution: {integrity: sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==} dev: true @@ -9078,6 +9783,13 @@ packages: engines: {node: '>=0.8.x'} dev: true + /evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + dev: true + /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -9188,6 +9900,10 @@ packages: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} dev: true + /extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + dev: true + /external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -9393,6 +10109,13 @@ packages: path-exists: 4.0.0 dev: true + /find-yarn-workspace-root2@1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + dependencies: + micromatch: 4.0.5 + pkg-dir: 4.2.0 + dev: true + /firebase-tools@13.4.1: resolution: {integrity: sha512-2p/PWAy9BjSN/9VtSPIaBBdrKKx7tmnTvjsI8Wagvgwwk3Qunys24kNYBL4XR+VweIDuFCzY1ZfbULOpURJYBg==} engines: {node: '>=18.0.0 || >=20.0.0'} @@ -9585,6 +10308,24 @@ packages: universalify: 2.0.1 dev: true + /fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + + /fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: true + /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -10036,6 +10777,10 @@ packages: tinygradient: 1.1.5 dev: true + /grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -10089,6 +10834,11 @@ packages: uglify-js: 3.17.4 dev: true + /hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + dev: true + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true @@ -10134,6 +10884,30 @@ packages: engines: {node: '>=8'} dev: true + /hash-base@3.0.4: + resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + dev: true + + /hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + /hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -10157,6 +10931,14 @@ packages: engines: {node: '>=10.0.0'} dev: true + /hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: true + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -10241,6 +11023,10 @@ packages: transitivePeerDependencies: - supports-color + /https-browserify@1.0.0: + resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} + dev: true + /https-proxy-agent@4.0.0: resolution: {integrity: sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==} engines: {node: '>= 6.0.0'} @@ -10270,6 +11056,10 @@ packages: transitivePeerDependencies: - supports-color + /human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + dev: true + /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -10342,6 +11132,11 @@ packages: engines: {node: '>=4'} dev: true + /import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + dev: true + /import-local@3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} @@ -10678,6 +11473,11 @@ packages: engines: {node: '>=8'} dev: true + /is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + dev: true + /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} @@ -10733,6 +11533,13 @@ packages: has-tostringtag: 1.0.2 dev: true + /is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + dependencies: + better-path-resolve: 1.0.0 + dev: true + /is-symbol@1.0.4: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} @@ -10785,6 +11592,11 @@ packages: get-intrinsic: 1.2.4 dev: true + /is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + dev: true + /is-wsl@1.1.0: resolution: {integrity: sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==} engines: {node: '>=4'} @@ -10851,6 +11663,11 @@ packages: - encoding dev: true + /isomorphic-timers-promises@1.0.1: + resolution: {integrity: sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==} + engines: {node: '>=10'} + dev: true + /istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -11162,6 +11979,12 @@ packages: /jsonc-parser@3.2.1: resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} + /jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: @@ -11248,11 +12071,20 @@ packages: engines: {node: '>=6'} dev: true + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + dev: true + /klona@2.0.6: resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} engines: {node: '>= 8'} dev: true + /kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + dev: true + /kuler@2.0.0: resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} dev: true @@ -11321,6 +12153,16 @@ packages: uc.micro: 1.0.6 dev: true + /load-yaml-file@0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + /loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} @@ -11408,6 +12250,10 @@ packages: resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} dev: true + /lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + dev: true + /lodash.isinteger@4.0.4: resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} dev: true @@ -11446,6 +12292,10 @@ packages: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} dev: true + /lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + dev: true + /lodash.union@4.6.0: resolution: {integrity: sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==} dev: true @@ -11515,6 +12365,13 @@ packages: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} + /lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -11605,6 +12462,16 @@ packages: tmpl: 1.0.5 dev: true + /map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + dev: true + + /map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + dev: true + /map-or-similar@1.5.0: resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==} dev: true @@ -11660,6 +12527,14 @@ packages: hasBin: true dev: true + /md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + /mdast-util-definitions@4.0.0: resolution: {integrity: sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==} dependencies: @@ -11685,6 +12560,23 @@ packages: map-or-similar: 1.5.0 dev: true + /meow@6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + dependencies: + '@types/minimist': 1.2.5 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 2.5.0 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.13.1 + yargs-parser: 18.1.3 + dev: true + /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: true @@ -11708,6 +12600,14 @@ packages: braces: 3.0.2 picomatch: 2.3.1 + /miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + dev: true + /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -11743,6 +12643,14 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} + /minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: true + + /minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -11769,6 +12677,15 @@ packages: dependencies: brace-expansion: 2.0.1 + /minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + dev: true + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true @@ -11846,6 +12763,11 @@ packages: yallist: 4.0.0 dev: true + /mixme@0.5.10: + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} + dev: true + /mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} dev: true @@ -11899,6 +12821,10 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true + /muggle-string@0.3.1: + resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} + dev: true + /mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true @@ -12050,6 +12976,39 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true + /node-stdlib-browser@1.2.0: + resolution: {integrity: sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg==} + engines: {node: '>=10'} + dependencies: + assert: 2.1.0 + browser-resolve: 2.0.0 + browserify-zlib: 0.2.0 + buffer: 5.7.1 + console-browserify: 1.2.0 + constants-browserify: 1.0.0 + create-require: 1.1.1 + crypto-browserify: 3.12.0 + domain-browser: 4.23.0 + events: 3.3.0 + https-browserify: 1.0.0 + isomorphic-timers-promises: 1.0.1 + os-browserify: 0.3.0 + path-browserify: 1.0.1 + pkg-dir: 5.0.0 + process: 0.11.10 + punycode: 1.4.1 + querystring-es3: 0.2.1 + readable-stream: 3.6.2 + stream-browserify: 3.0.0 + stream-http: 3.2.0 + string_decoder: 1.3.0 + timers-browserify: 2.0.12 + tty-browserify: 0.0.1 + url: 0.11.3 + util: 0.12.5 + vm-browserify: 1.1.2 + dev: true + /nopt@7.2.0: resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -12323,16 +13282,31 @@ packages: wcwidth: 1.0.1 dev: true + /os-browserify@0.3.0: + resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} + dev: true + /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} dev: true + /outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + dev: true + /p-defer@3.0.0: resolution: {integrity: sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==} engines: {node: '>=8'} dev: true + /p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + dependencies: + p-map: 2.1.0 + dev: true + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -12374,6 +13348,11 @@ packages: p-limit: 3.1.0 dev: true + /p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + dev: true + /p-map@3.0.0: resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} engines: {node: '>=8'} @@ -12422,6 +13401,10 @@ packages: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} dev: true + /pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + dev: true + /param-case@2.1.1: resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} dependencies: @@ -12442,6 +13425,18 @@ packages: callsites: 3.1.0 dev: true + /parse-asn1@5.1.7: + resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} + engines: {node: '>= 0.10'} + dependencies: + asn1.js: 4.10.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + hash-base: 3.0.4 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + dev: true + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -12476,6 +13471,10 @@ packages: tslib: 2.6.2 dev: true + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true + /path-case@2.1.1: resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} dependencies: @@ -12546,6 +13545,17 @@ packages: /pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + /pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + /peek-stream@1.1.3: resolution: {integrity: sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==} dependencies: @@ -12838,6 +13848,16 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /preferred-pm@3.1.3: + resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + engines: {node: '>=10'} + dependencies: + find-up: 5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: 4.0.0 + which-pm: 2.0.0 + dev: true + /prelude-ls@1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} @@ -13017,9 +14037,24 @@ packages: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: true + /pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + dev: true + /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + /public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + dependencies: + bn.js: 4.12.0 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + parse-asn1: 5.1.7 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true + /pump@2.0.1: resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==} dependencies: @@ -13091,12 +14126,22 @@ packages: side-channel: 1.0.6 dev: true + /querystring-es3@0.2.1: + resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} + engines: {node: '>=0.4.x'} + dev: true + /querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + /quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + dev: true + /ramda@0.29.0: resolution: {integrity: sha512-BBea6L67bYLtdbOqfp8f58fPMqEwx0doL+pAi8TZyp2YWz8R9G8z9x75CZI8W+ftqhFHCpEX2cRnUUXK130iKA==} dev: true @@ -13107,6 +14152,13 @@ packages: safe-buffer: 5.2.1 dev: true + /randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true + /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -13380,6 +14432,16 @@ packages: type-fest: 0.6.0 dev: true + /read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + dev: true + /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: @@ -13577,6 +14639,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + dev: true + /requireindex@1.2.0: resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} engines: {node: '>=0.10.5'} @@ -13612,6 +14678,13 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true + /resolve@1.19.0: + resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + dev: true + /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -13684,6 +14757,13 @@ packages: glob: 7.2.3 dev: true + /ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + dev: true + /rollup@4.13.0: resolution: {integrity: sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -13838,6 +14918,14 @@ packages: hasBin: true dev: true + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /semver@7.6.0: resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} @@ -13918,10 +15006,22 @@ packages: has-property-descriptors: 1.0.2 dev: true + /setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: true + /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} dev: true + /sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + /shallow-clone@3.0.1: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} engines: {node: '>=8'} @@ -14009,6 +15109,19 @@ packages: engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} dev: true + /smartwrap@2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + dependencies: + array.prototype.flat: 1.3.2 + breakword: 1.0.6 + grapheme-splitter: 1.0.4 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 15.4.1 + dev: true + /snake-case@2.1.0: resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} dependencies: @@ -14076,6 +15189,13 @@ packages: resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==} dev: true + /spawndamnit@2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + dependencies: + cross-spawn: 5.1.0 + signal-exit: 3.0.7 + dev: true + /spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: @@ -14158,10 +15278,26 @@ packages: - utf-8-validate dev: true + /stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + /stream-chain@2.2.5: resolution: {integrity: sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==} dev: true + /stream-http@3.2.0: + resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + xtend: 4.0.2 + dev: true + /stream-json@1.8.0: resolution: {integrity: sha512-HZfXngYHUAr1exT4fxlbc1IOce1RYxp2ldeaf97LYCOPSoOqY/1Psp7iGvpb+6JIOgkra9zDYnPX01hGAHzEPw==} dependencies: @@ -14172,6 +15308,17 @@ packages: resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} dev: true + /stream-transform@2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + dependencies: + mixme: 0.5.10 + dev: true + + /string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + dev: true + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -14545,6 +15692,11 @@ packages: unique-string: 2.0.0 dev: true + /term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + dev: true + /terser-webpack-plugin@5.3.10(esbuild@0.18.20)(webpack@5.90.3): resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} @@ -14620,6 +15772,13 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /timers-browserify@2.0.12: + resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} + engines: {node: '>=0.6.0'} + dependencies: + setimmediate: 1.0.5 + dev: true + /tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} dev: true @@ -14717,6 +15876,11 @@ packages: dependencies: punycode: 2.3.1 + /trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + dev: true + /triple-beam@1.4.1: resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} engines: {node: '>= 14.0.0'} @@ -14827,6 +15991,24 @@ packages: fsevents: 2.3.3 dev: true + /tty-browserify@0.0.1: + resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + dev: true + + /tty-table@4.2.3: + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + chalk: 4.1.2 + csv: 5.5.3 + kleur: 4.1.5 + smartwrap: 2.0.2 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 17.7.2 + dev: true + /turbo-darwin-64@1.12.5: resolution: {integrity: sha512-0GZ8reftwNQgIQLHkHjHEXTc/Z1NJm+YjsrBP+qhM/7yIZ3TEy9gJhuogDt2U0xIWwFgisTyzbtU7xNaQydtoA==} cpu: [x64] @@ -14905,6 +16087,11 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + /type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + dev: true + /type-fest@0.16.0: resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==} engines: {node: '>=10'} @@ -15002,6 +16189,12 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /typescript@5.4.2: resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} engines: {node: '>=14.17'} @@ -15119,6 +16312,11 @@ packages: - supports-color dev: true + /universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + dev: true + /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -15216,6 +16414,13 @@ packages: querystringify: 2.2.0 requires-port: 1.0.0 + /url@0.11.3: + resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==} + dependencies: + punycode: 1.4.1 + qs: 6.12.0 + dev: true + /use-callback-ref@1.3.1(@types/react@18.2.64)(react@18.2.0): resolution: {integrity: sha512-Lg4Vx1XZQauB42Hw3kK7JM6yjVjgFmFC5/Ab797s79aARomD2nEErc4mCgM8EZrARLmmbWpi5DGCadmK50DcAQ==} engines: {node: '>=10'} @@ -15328,6 +16533,11 @@ packages: builtins: 5.0.1 dev: true + /validator@13.11.0: + resolution: {integrity: sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==} + engines: {node: '>= 0.10'} + dev: true + /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -15353,6 +16563,42 @@ packages: - supports-color - terser + /vite-plugin-dts@3.7.3(@types/node@20.11.26)(typescript@5.4.2)(vite@5.1.6): + resolution: {integrity: sha512-26eTlBYdpjRLWCsTJebM8vkCieE+p9gP3raf+ecDnzzK5E3FG6VE1wcy55OkRpfWWVlVvKkYFe6uvRHYWx7Nog==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + typescript: '*' + vite: '*' + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@microsoft/api-extractor': 7.39.0(@types/node@20.11.26) + '@rollup/pluginutils': 5.1.0 + '@vue/language-core': 1.8.27(typescript@5.4.2) + debug: 4.3.4 + kolorist: 1.8.0 + typescript: 5.4.2 + vite: 5.1.6(@types/node@20.11.26) + vue-tsc: 1.8.27(typescript@5.4.2) + transitivePeerDependencies: + - '@types/node' + - rollup + - supports-color + dev: true + + /vite-plugin-node-polyfills@0.21.0(vite@5.1.6): + resolution: {integrity: sha512-Sk4DiKnmxN8E0vhgEhzLudfJQfaT8k4/gJ25xvUPG54KjLJ6HAmDKbr4rzDD/QWEY+Lwg80KE85fGYBQihEPQA==} + peerDependencies: + vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + dependencies: + '@rollup/plugin-inject': 5.0.5 + node-stdlib-browser: 1.2.0 + vite: 5.1.6(@types/node@20.11.26) + transitivePeerDependencies: + - rollup + dev: true + /vite-plugin-top-level-await@1.4.1(vite@5.1.6): resolution: {integrity: sha512-hogbZ6yT7+AqBaV6lK9JRNvJDn4/IJvHLu6ET06arNfo0t2IsyCaon7el9Xa8OumH+ESuq//SDf8xscZFE0rWw==} peerDependencies: @@ -15467,6 +16713,29 @@ packages: - supports-color - terser + /vm-browserify@1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + dev: true + + /vue-template-compiler@2.7.16: + resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + dev: true + + /vue-tsc@1.8.27(typescript@5.4.2): + resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} + hasBin: true + peerDependencies: + typescript: '*' + dependencies: + '@volar/typescript': 1.11.1 + '@vue/language-core': 1.8.27(typescript@5.4.2) + semver: 7.6.0 + typescript: 5.4.2 + dev: true + /w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} @@ -15664,6 +16933,18 @@ packages: is-weakset: 2.0.3 dev: true + /which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + dev: true + + /which-pm@2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + dependencies: + load-yaml-file: 0.2.0 + path-exists: 4.0.0 + dev: true + /which-typed-array@1.1.15: resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} @@ -15873,11 +17154,19 @@ packages: engines: {node: '>=0.4'} dev: true + /y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + dev: true + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} dev: true + /yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + dev: true + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true @@ -15896,11 +17185,36 @@ packages: engines: {node: '>= 14'} hasBin: true + /yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: true + /yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + dev: true + /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -15935,6 +17249,18 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} + /z-schema@5.0.5: + resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + lodash.get: 4.4.2 + lodash.isequal: 4.5.0 + validator: 13.11.0 + optionalDependencies: + commander: 9.5.0 + dev: true + /zip-stream@4.1.1: resolution: {integrity: sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==} engines: {node: '>= 10'} diff --git a/turbo.json b/turbo.json index 732ed3b1bd..e54692f9fb 100644 --- a/turbo.json +++ b/turbo.json @@ -22,20 +22,20 @@ "cache": false, "persistent": true }, - "lint": { "dependsOn": ["compile"] }, + "lint": { "dependsOn": ["compile", "^build"] }, "dev": { "dotEnv": [".env"], "env": ["PRAX", "IDB_VERSION", "USDC_ASSET_ID", "MINIFRONT_URL", "PENUMBRA_NODE_PD_URL"], - "dependsOn": ["download-keys", "compile"], + "dependsOn": ["download-keys", "^build"], "outputs": ["dist/**"], "persistent": true, "cache": false }, - "test": { "dependsOn": ["compile", "//#playwright-install"] }, - "//#playwright-install": { "cache": false }, + "test": { "dependsOn": ["compile", "//#playwright-install", "^build"] }, "test:rust": { "dependsOn": ["download-keys", "compile"] }, "lint:rust": { "dependsOn": ["download-keys", "compile"] }, "format-check:rust": { "dependsOn": ["download-keys", "compile"] }, + "//#playwright-install": { "cache": false }, "clean": { "cache": false }