diff --git a/.changeset/brave-tips-fix.md b/.changeset/brave-tips-fix.md new file mode 100644 index 0000000000..fe42ffb92a --- /dev/null +++ b/.changeset/brave-tips-fix.md @@ -0,0 +1,11 @@ +--- +'@penumbra-zone/transport-dom': major +'@penumbra-zone/constants': major +'@penumbra-zone/polyfills': major +'@penumbra-zone/getters': major +'@penumbra-zone/client': major +'@penumbra-zone/query': major +'@penumbra-zone/types': major +--- + +remove `/src/` path segment from exports diff --git a/apps/extension/src/approve-origin.ts b/apps/extension/src/approve-origin.ts index 884f740156..0396f38bf4 100644 --- a/apps/extension/src/approve-origin.ts +++ b/apps/extension/src/approve-origin.ts @@ -1,8 +1,8 @@ import { localExtStorage } from '@penumbra-zone/storage/chrome/local'; import { OriginApproval, PopupType } from './message/popup'; import { popup } from './popup'; -import Map from '@penumbra-zone/polyfills/src/Map.groupBy'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import Map from '@penumbra-zone/polyfills/Map.groupBy'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; export const originAlreadyApproved = async (url: string): Promise => { // parses the origin and returns a consistent format diff --git a/apps/extension/src/approve-transaction.ts b/apps/extension/src/approve-transaction.ts index 909fdebceb..a6a495b503 100644 --- a/apps/extension/src/approve-transaction.ts +++ b/apps/extension/src/approve-transaction.ts @@ -1,6 +1,6 @@ import { AuthorizeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/custody/v1/custody_pb'; import { PartialMessage } from '@bufbuild/protobuf'; -import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; +import type { Jsonified } from '@penumbra-zone/types/jsonified'; import { PopupType, TxApproval } from './message/popup'; import { popup } from './popup'; diff --git a/apps/extension/src/clients.ts b/apps/extension/src/clients.ts index 0d914296e6..2df66be5c5 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 { createChannelTransport } from '@penumbra-zone/transport-dom/src/create'; +import { createChannelTransport } from '@penumbra-zone/transport-dom/create'; import { CRSessionClient } from '@penumbra-zone/transport-chrome/session-client'; -import { transportOptions } from '@penumbra-zone/types/src/registry'; +import { transportOptions } from '@penumbra-zone/types/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 df6f62efea..ca498daa1e 100644 --- a/apps/extension/src/content-scripts/injected-penumbra-global.ts +++ b/apps/extension/src/content-scripts/injected-penumbra-global.ts @@ -21,10 +21,10 @@ import { PenumbraProvider, PenumbraRequestFailure, PenumbraSymbol, -} from '@penumbra-zone/client/src/global'; +} from '@penumbra-zone/client/global'; import { isPraxFailureMessageEvent, isPraxPortMessageEvent, PraxMessage } from './message-event'; -import '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import '@penumbra-zone/polyfills/Promise.withResolvers'; import { PraxConnection } from '../message/prax'; const request = Promise.withResolvers(); diff --git a/apps/extension/src/entry/offscreen-handler.ts b/apps/extension/src/entry/offscreen-handler.ts index 14b9f1c122..6f6eac5d0b 100644 --- a/apps/extension/src/entry/offscreen-handler.ts +++ b/apps/extension/src/entry/offscreen-handler.ts @@ -5,7 +5,7 @@ import { ActionBuildResponse, isActionBuildRequest, isOffscreenRequest, -} from '@penumbra-zone/types/src/internal-msg/offscreen'; +} from '@penumbra-zone/types/internal-msg/offscreen'; chrome.runtime.onMessage.addListener((req, _sender, respond) => { if (!isOffscreenRequest(req)) return false; diff --git a/apps/extension/src/get-rpc-impls.ts b/apps/extension/src/get-rpc-impls.ts index 722b765303..10d7462888 100644 --- a/apps/extension/src/get-rpc-impls.ts +++ b/apps/extension/src/get-rpc-impls.ts @@ -1,6 +1,6 @@ import { createPromiseClient, ServiceImpl } from '@connectrpc/connect'; import { createGrpcWebTransport } from '@connectrpc/connect-web'; -import { createProxyImpl, noContextHandler } from '@penumbra-zone/transport-dom/src/proxy'; +import { createProxyImpl, noContextHandler } from '@penumbra-zone/transport-dom/proxy'; import { rethrowImplErrors } from './utils/rethrow-impl-errors'; import { Query as IbcClientService } from '@buf/cosmos_ibc.connectrpc_es/ibc/core/client/v1/query_connect'; import { Query as IbcChannelService } from '@buf/cosmos_ibc.connectrpc_es/ibc/core/channel/v1/query_connect'; diff --git a/apps/extension/src/hooks/chain-id.ts b/apps/extension/src/hooks/chain-id.ts index 172772b5a9..47f7f870a7 100644 --- a/apps/extension/src/hooks/chain-id.ts +++ b/apps/extension/src/hooks/chain-id.ts @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query'; import { viewClient } from '../clients'; import { localExtStorage } from '@penumbra-zone/storage/chrome/local'; -import { AppQuerier } from '@penumbra-zone/query/src/queriers/app'; +import { AppQuerier } from '@penumbra-zone/query/queriers/app'; export const getChainIdWithFallback = async (): Promise => { // Check storage first to see if available diff --git a/apps/extension/src/hooks/full-sync-height.ts b/apps/extension/src/hooks/full-sync-height.ts index 9aa79ddcb5..6d5fab47b6 100644 --- a/apps/extension/src/hooks/full-sync-height.ts +++ b/apps/extension/src/hooks/full-sync-height.ts @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { TendermintQuerier } from '@penumbra-zone/query/src/queriers/tendermint'; +import { TendermintQuerier } from '@penumbra-zone/query/queriers/tendermint'; import { PopupLoaderData } from '../routes/popup/home'; import { useStore } from '../state'; import { networkSelector } from '../state/network'; diff --git a/apps/extension/src/listeners.ts b/apps/extension/src/listeners.ts index 01a09e8c3b..8180a87c81 100644 --- a/apps/extension/src/listeners.ts +++ b/apps/extension/src/listeners.ts @@ -2,7 +2,7 @@ import { Code, ConnectError } from '@connectrpc/connect'; import { approveOrigin, originAlreadyApproved } from './approve-origin'; import { PraxConnection } from './message/prax'; import { JsonValue } from '@bufbuild/protobuf'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; // trigger injected-connection-port to init when a known page is loaded. chrome.tabs.onUpdated.addListener( diff --git a/apps/extension/src/message/popup.ts b/apps/extension/src/message/popup.ts index 7116019b03..701087333d 100644 --- a/apps/extension/src/message/popup.ts +++ b/apps/extension/src/message/popup.ts @@ -3,9 +3,9 @@ import type { InternalMessage, 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'; +} from '@penumbra-zone/types/internal-msg/shared'; +import type { UserChoice } from '@penumbra-zone/types/user-choice'; +import type { Jsonified } from '@penumbra-zone/types/jsonified'; import { OriginRecord } from '@penumbra-zone/storage/chrome/types'; export enum PopupType { diff --git a/apps/extension/src/popup.ts b/apps/extension/src/popup.ts index 7c2832ebb3..14559e707e 100644 --- a/apps/extension/src/popup.ts +++ b/apps/extension/src/popup.ts @@ -1,11 +1,8 @@ import { sessionExtStorage } from '@penumbra-zone/storage/chrome/session'; import { PopupMessage, PopupRequest, PopupType } from './message/popup'; import { PopupPath } from './routes/popup/paths'; -import type { - InternalRequest, - InternalResponse, -} from '@penumbra-zone/types/src/internal-msg/shared'; -import { isChromeResponderDroppedError } from '@penumbra-zone/types/src/internal-msg/chrome-error'; +import type { InternalRequest, InternalResponse } from '@penumbra-zone/types/internal-msg/shared'; +import { isChromeResponderDroppedError } from '@penumbra-zone/types/internal-msg/chrome-error'; import { Code, ConnectError } from '@connectrpc/connect'; import { errorFromJson } from '@connectrpc/connect/protocol-connect'; diff --git a/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx b/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx index 71d78daa2a..3686462a7f 100644 --- a/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx +++ b/apps/extension/src/routes/page/onboarding/set-grpc-endpoint.tsx @@ -2,7 +2,7 @@ import { Card, CardDescription, CardHeader, CardTitle } from '@penumbra-zone/ui/ import { FadeTransition } from '@penumbra-zone/ui/components/ui/fade-transition'; import { usePageNav } from '../../../utils/navigate'; import { PagePath } from '../paths'; -import { ServicesMessage } from '@penumbra-zone/types/src/services'; +import { ServicesMessage } from '@penumbra-zone/types/services'; import { GrpcEndpointForm } from '../../../shared/components/grpc-endpoint-form'; export const SetGrpcEndpoint = () => { diff --git a/apps/extension/src/routes/popup/approval/origin.tsx b/apps/extension/src/routes/popup/approval/origin.tsx index b28ba92724..23dc55de16 100644 --- a/apps/extension/src/routes/popup/approval/origin.tsx +++ b/apps/extension/src/routes/popup/approval/origin.tsx @@ -5,7 +5,7 @@ import { ApproveDeny } from './approve-deny'; import { LinkGradientIcon } from '../../../icons/link-gradient'; 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'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; export const OriginApproval = () => { diff --git a/apps/extension/src/routes/popup/approval/transaction/index.tsx b/apps/extension/src/routes/popup/approval/transaction/index.tsx index fcad937299..021b20b677 100644 --- a/apps/extension/src/routes/popup/approval/transaction/index.tsx +++ b/apps/extension/src/routes/popup/approval/transaction/index.tsx @@ -6,8 +6,8 @@ import { AuthorizeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumb 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'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; +import type { Jsonified } from '@penumbra-zone/types/jsonified'; export const TransactionApproval = () => { const { authorizeRequest: authReqString, setChoice, sendResponse } = useStore(txApprovalSelector); diff --git a/apps/extension/src/routes/popup/settings/settings-clear-cache.tsx b/apps/extension/src/routes/popup/settings/settings-clear-cache.tsx index 15a239385c..0df3adce3f 100644 --- a/apps/extension/src/routes/popup/settings/settings-clear-cache.tsx +++ b/apps/extension/src/routes/popup/settings/settings-clear-cache.tsx @@ -1,7 +1,7 @@ import { ExclamationTriangleIcon } from '@radix-ui/react-icons'; import { Button } from '@penumbra-zone/ui/components/ui/button'; import { TrashGradientIcon } from '../../../icons/trash-gradient'; -import { ServicesMessage } from '@penumbra-zone/types/src/services'; +import { ServicesMessage } from '@penumbra-zone/types/services'; import { usePopupNav } from '../../../utils/navigate'; import { PopupPath } from '../paths'; import { useStore } from '../../../state'; diff --git a/apps/extension/src/routes/popup/settings/settings-connected-sites/index.tsx b/apps/extension/src/routes/popup/settings/settings-connected-sites/index.tsx index afd2625435..31e08c29a0 100644 --- a/apps/extension/src/routes/popup/settings/settings-connected-sites/index.tsx +++ b/apps/extension/src/routes/popup/settings/settings-connected-sites/index.tsx @@ -3,11 +3,11 @@ import { Input } from '@penumbra-zone/ui/components/ui/input'; import { LinkGradientIcon } from '../../../../icons/link-gradient'; import { OriginRecord } from '@penumbra-zone/storage/chrome/types'; import { AllSlices, useStore } from '../../../../state'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { SettingsScreen } from '../settings-screen'; import { useStoreShallow } from '../../../../utils/use-store-shallow'; import { allSitesFilteredOutSelector } from '../../../../state/connected-sites'; -import Map from '@penumbra-zone/polyfills/src/Map.groupBy'; +import Map from '@penumbra-zone/polyfills/Map.groupBy'; import { KnownSitesGroup } from './known-sites-group'; const settingsConnectedSitesSelector = (state: AllSlices) => ({ diff --git a/apps/extension/src/routes/popup/settings/settings-connected-sites/known-site.tsx b/apps/extension/src/routes/popup/settings/settings-connected-sites/known-site.tsx index 0c2ac17941..e9ca64c52e 100644 --- a/apps/extension/src/routes/popup/settings/settings-connected-sites/known-site.tsx +++ b/apps/extension/src/routes/popup/settings/settings-connected-sites/known-site.tsx @@ -1,5 +1,5 @@ import { OriginRecord } from '@penumbra-zone/storage/chrome/types'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { Button } from '@penumbra-zone/ui/components/ui/button'; import { TrashIcon } from 'lucide-react'; import { DisplayOriginURL } from '../../../../shared/components/display-origin-url'; diff --git a/apps/extension/src/routes/popup/settings/settings-rpc.tsx b/apps/extension/src/routes/popup/settings/settings-rpc.tsx index c059352d86..124c1aec01 100644 --- a/apps/extension/src/routes/popup/settings/settings-rpc.tsx +++ b/apps/extension/src/routes/popup/settings/settings-rpc.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { ShareGradientIcon } from '../../../icons/share-gradient'; import { GrpcEndpointForm } from '../../../shared/components/grpc-endpoint-form'; import { SettingsScreen } from './settings-screen'; -import '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import '@penumbra-zone/polyfills/Promise.withResolvers'; export const SettingsRPC = () => { const [countdownTime, setCountdownTime] = useState(); diff --git a/apps/extension/src/service-worker.ts b/apps/extension/src/service-worker.ts index 6020bc9e40..aa77bc4770 100644 --- a/apps/extension/src/service-worker.ts +++ b/apps/extension/src/service-worker.ts @@ -18,9 +18,9 @@ import { localExtStorage } from '@penumbra-zone/storage/chrome/local'; // adapter import { ConnectRouter, createContextValues, PromiseClient } from '@connectrpc/connect'; import { CRSessionManager } from '@penumbra-zone/transport-chrome/session-manager'; -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'; +import { createDirectClient } from '@penumbra-zone/transport-dom/direct'; +import { connectChannelAdapter } from '@penumbra-zone/transport-dom/adapter'; +import { transportOptions } from '@penumbra-zone/types/registry'; // context import { CustodyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/custody/v1/custody_connect'; @@ -39,7 +39,7 @@ import { WalletId, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { fvkCtx } from '@penumbra-zone/services/ctx/full-viewing-key'; -import { WalletJson } from '@penumbra-zone/types/src/wallet'; +import { WalletJson } from '@penumbra-zone/types/wallet'; /** This fixes an issue where some users do not have 'grpcEndpoint' set after they have finished onboarding diff --git a/apps/extension/src/shared/components/grpc-endpoint-form/confirm-changed-chain-id-dialog.tsx b/apps/extension/src/shared/components/grpc-endpoint-form/confirm-changed-chain-id-dialog.tsx index 3d3e7a9c20..ddf74b2fc8 100644 --- a/apps/extension/src/shared/components/grpc-endpoint-form/confirm-changed-chain-id-dialog.tsx +++ b/apps/extension/src/shared/components/grpc-endpoint-form/confirm-changed-chain-id-dialog.tsx @@ -1,4 +1,4 @@ -import { PromiseWithResolvers } from '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import { PromiseWithResolvers } from '@penumbra-zone/polyfills/Promise.withResolvers'; import { Button } from '@penumbra-zone/ui/components/ui/button'; import { Dialog, diff --git a/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts b/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts index f8bd10529b..5b348c9c9e 100644 --- a/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts +++ b/apps/extension/src/shared/components/grpc-endpoint-form/use-grpc-endpoint-form.ts @@ -4,9 +4,9 @@ import { createGrpcWebTransport } from '@connectrpc/connect-web'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { AllSlices } from '../../../state'; import { useStoreShallow } from '../../../utils/use-store-shallow'; -import { ServicesMessage } from '@penumbra-zone/types/src/services'; +import { ServicesMessage } from '@penumbra-zone/types/services'; import debounce from 'lodash/debounce'; -import { PromiseWithResolvers } from '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import { PromiseWithResolvers } from '@penumbra-zone/polyfills/Promise.withResolvers'; import { useRpcEndpoints } from '../../../hooks/registry'; const randomSort = () => (Math.random() >= 0.5 ? 1 : -1); diff --git a/apps/extension/src/state/connected-sites.test.ts b/apps/extension/src/state/connected-sites.test.ts index 285e158de9..202c0c06ab 100644 --- a/apps/extension/src/state/connected-sites.test.ts +++ b/apps/extension/src/state/connected-sites.test.ts @@ -8,7 +8,7 @@ import { mockLocalExtStorage, mockSessionExtStorage, } from '@penumbra-zone/storage/chrome/test-utils/mock'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { allSitesFilteredOutSelector } from './connected-sites'; describe('Connected Sites Slice', () => { diff --git a/apps/extension/src/state/origin-approval.ts b/apps/extension/src/state/origin-approval.ts index 63e9ff69eb..c521ec2808 100644 --- a/apps/extension/src/state/origin-approval.ts +++ b/apps/extension/src/state/origin-approval.ts @@ -2,11 +2,8 @@ import { ConnectError } from '@connectrpc/connect'; import { OriginApproval, PopupType } from '../message/popup'; import { AllSlices, SliceCreator } from '.'; 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'; +import type { InternalRequest, InternalResponse } from '@penumbra-zone/types/internal-msg/shared'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; export interface OriginApprovalSlice { responder?: (m: InternalResponse) => void; diff --git a/apps/extension/src/state/persist.ts b/apps/extension/src/state/persist.ts index 3a5cafaec8..b4018f30f8 100644 --- a/apps/extension/src/state/persist.ts +++ b/apps/extension/src/state/persist.ts @@ -6,7 +6,7 @@ import { localExtStorage } from '@penumbra-zone/storage/chrome/local'; import { LocalStorageState } from '@penumbra-zone/storage/chrome/types'; import { sessionExtStorage, SessionStorageState } from '@penumbra-zone/storage/chrome/session'; import { StorageItem } from '@penumbra-zone/storage/chrome/base'; -import { walletsFromJson } from '@penumbra-zone/types/src/wallet'; +import { walletsFromJson } from '@penumbra-zone/types/wallet'; export type Middleware = < T, diff --git a/apps/extension/src/state/tx-approval.ts b/apps/extension/src/state/tx-approval.ts index 59429073b5..db48bdb5f1 100644 --- a/apps/extension/src/state/tx-approval.ts +++ b/apps/extension/src/state/tx-approval.ts @@ -8,12 +8,9 @@ import { import { viewClient } from '../clients'; 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 type { InternalRequest, InternalResponse } from '@penumbra-zone/types/internal-msg/shared'; +import type { Jsonified, Stringified } from '@penumbra-zone/types/jsonified'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { classifyTransaction } from '@penumbra-zone/perspective/transaction/classify'; import { TransactionClassification } from '@penumbra-zone/perspective/transaction/classification'; import { diff --git a/apps/extension/src/state/wallets.test.ts b/apps/extension/src/state/wallets.test.ts index 9f5fb9aafc..dbd7d9f5a7 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/chrome/test-utils/mock'; -import type { WalletCreate } from '@penumbra-zone/types/src/wallet'; +import type { WalletCreate } from '@penumbra-zone/types/wallet'; vi.stubGlobal('crypto', webcrypto); diff --git a/apps/extension/src/state/wallets.ts b/apps/extension/src/state/wallets.ts index 67daf76cd5..db44f8d138 100644 --- a/apps/extension/src/state/wallets.ts +++ b/apps/extension/src/state/wallets.ts @@ -14,7 +14,7 @@ import { FullViewingKey, SpendKey, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { Wallet, WalletCreate } from '@penumbra-zone/types/src/wallet'; +import { Wallet, WalletCreate } from '@penumbra-zone/types/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 02bea05e6b..d66c0175fe 100644 --- a/apps/extension/src/wasm-build-action.ts +++ b/apps/extension/src/wasm-build-action.ts @@ -4,7 +4,7 @@ import { WitnessData, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import type { JsonValue } from '@bufbuild/protobuf'; -import type { ActionBuildRequest } from '@penumbra-zone/types/src/internal-msg/offscreen'; +import type { ActionBuildRequest } from '@penumbra-zone/types/internal-msg/offscreen'; import { FullViewingKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import actionKeys from '@penumbra-zone/keys'; diff --git a/apps/minifront/src/components/dashboard/assets-table/equivalent-values.tsx b/apps/minifront/src/components/dashboard/assets-table/equivalent-values.tsx index d2263c9f20..0a3bd48673 100644 --- a/apps/minifront/src/components/dashboard/assets-table/equivalent-values.tsx +++ b/apps/minifront/src/components/dashboard/assets-table/equivalent-values.tsx @@ -1,9 +1,6 @@ import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { asValueView } from '@penumbra-zone/getters/src/equivalent-value'; -import { - getDisplayDenomFromView, - getEquivalentValues, -} from '@penumbra-zone/getters/src/value-view'; +import { asValueView } from '@penumbra-zone/getters/equivalent-value'; +import { getDisplayDenomFromView, getEquivalentValues } from '@penumbra-zone/getters/value-view'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; export const EquivalentValues = ({ valueView }: { valueView?: ValueView }) => { diff --git a/apps/minifront/src/components/dashboard/transaction-table.tsx b/apps/minifront/src/components/dashboard/transaction-table.tsx index b55159609f..14f720f992 100644 --- a/apps/minifront/src/components/dashboard/transaction-table.tsx +++ b/apps/minifront/src/components/dashboard/transaction-table.tsx @@ -7,7 +7,7 @@ import { TableRow, } from '@penumbra-zone/ui/components/ui/table'; import { Link } from 'react-router-dom'; -import { shorten } from '@penumbra-zone/types/src/string'; +import { shorten } from '@penumbra-zone/types/string'; import { useStore } from '../../state'; import { memo, useEffect } from 'react'; import { TransactionSummary } from '../../state/transactions'; diff --git a/apps/minifront/src/components/extension-not-connected.tsx b/apps/minifront/src/components/extension-not-connected.tsx index 0e3067783c..35870c7dad 100644 --- a/apps/minifront/src/components/extension-not-connected.tsx +++ b/apps/minifront/src/components/extension-not-connected.tsx @@ -10,7 +10,7 @@ import { throwIfPraxNotInstalled, } from '@penumbra-zone/client'; import { useState } from 'react'; -import { PenumbraRequestFailure } from '@penumbra-zone/client/src/global'; +import { PenumbraRequestFailure } from '@penumbra-zone/client/global'; const handleErr = (e: unknown) => { if (e instanceof Error && e.cause) { diff --git a/apps/minifront/src/components/shared/balance-selector.tsx b/apps/minifront/src/components/shared/balance-selector.tsx index a41060570b..56f8cedb3c 100644 --- a/apps/minifront/src/components/shared/balance-selector.tsx +++ b/apps/minifront/src/components/shared/balance-selector.tsx @@ -11,11 +11,8 @@ import { import { cn } from '@penumbra-zone/ui/lib/utils'; import { ValueViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/value'; import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { getAddressIndex } from '@penumbra-zone/getters/src/address-view'; -import { - getDisplayDenomFromView, - getSymbolFromValueView, -} from '@penumbra-zone/getters/src/value-view'; +import { getAddressIndex } from '@penumbra-zone/getters/address-view'; +import { getDisplayDenomFromView, getSymbolFromValueView } from '@penumbra-zone/getters/value-view'; const bySearch = (search: string) => (balancesResponse: BalancesResponse) => getDisplayDenomFromView(balancesResponse.balanceView) 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 ad4591caec..05373aaf04 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 @@ -11,8 +11,8 @@ import { getEquivalentValues, getMetadata, getValidatorInfoFromValueView, -} from '@penumbra-zone/getters/src/value-view'; -import { asValueView } from '@penumbra-zone/getters/src/equivalent-value'; +} from '@penumbra-zone/getters/value-view'; +import { asValueView } from '@penumbra-zone/getters/equivalent-value'; /** * 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 eef1ab709c..3bb336ed2b 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 @@ -7,7 +7,7 @@ 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'; +import { getIdentityKey } from '@penumbra-zone/getters/validator'; import { WalletIcon } from '@penumbra-zone/ui/components/ui/icons/wallet'; const getCapitalizedAction = (action: 'delegate' | 'undelegate') => 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 840d26f464..b83fe82eda 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 @@ -5,9 +5,9 @@ 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'; +import { getValidator } from '@penumbra-zone/getters/validator-info'; +import { getAmount } from '@penumbra-zone/getters/value-view'; +import { joinLoHiAmount } from '@penumbra-zone/types/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 6097326d00..e803c8e626 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 @@ -10,8 +10,8 @@ import { useStore } from '../../../../state'; import { getIdentityKeyFromValidatorInfo, getValidator, -} from '@penumbra-zone/getters/src/validator-info'; -import { calculateCommissionAsPercentage } from '@penumbra-zone/types/src/staking'; +} from '@penumbra-zone/getters/validator-info'; +import { calculateCommissionAsPercentage } from '@penumbra-zone/types/staking'; import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { AssetIcon } from '@penumbra-zone/ui/components/ui/tx/view/asset-icon'; diff --git a/apps/minifront/src/components/staking/account/delegations.tsx b/apps/minifront/src/components/staking/account/delegations.tsx index d0318c3f64..8fbff661ab 100644 --- a/apps/minifront/src/components/staking/account/delegations.tsx +++ b/apps/minifront/src/components/staking/account/delegations.tsx @@ -6,9 +6,9 @@ import { ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { useStoreShallow } from '../../../utils/use-store-shallow'; -import { getValidatorIdentityKeyFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { getValidatorIdentityKeyFromValueView } from '@penumbra-zone/getters/value-view'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; -import { VotingPowerAsIntegerPercentage } from '@penumbra-zone/types/src/staking'; +import { VotingPowerAsIntegerPercentage } from '@penumbra-zone/types/staking'; const getVotingPowerAsIntegerPercentage = ( votingPowerByValidatorInfo: Record, diff --git a/apps/minifront/src/components/staking/account/header/unbonding-tokens.tsx b/apps/minifront/src/components/staking/account/header/unbonding-tokens.tsx index ecddc6af14..eed53b9b6e 100644 --- a/apps/minifront/src/components/staking/account/header/unbonding-tokens.tsx +++ b/apps/minifront/src/components/staking/account/header/unbonding-tokens.tsx @@ -2,7 +2,7 @@ import { Metadata, ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/value-view'; import { TooltipProvider, Tooltip, diff --git a/apps/minifront/src/components/staking/validator-info-row.tsx b/apps/minifront/src/components/staking/validator-info-row.tsx index 0cc4c29a33..c53271b87d 100644 --- a/apps/minifront/src/components/staking/validator-info-row.tsx +++ b/apps/minifront/src/components/staking/validator-info-row.tsx @@ -2,8 +2,8 @@ import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/ import { TableCell, TableRow } from '@penumbra-zone/ui/components/ui/table'; 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'; +import { getValidator } from '@penumbra-zone/getters/validator-info'; +import { calculateCommissionAsPercentage } from '@penumbra-zone/types/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 a5a4395762..2c7f731eb3 100644 --- a/apps/minifront/src/components/staking/validators-table.tsx +++ b/apps/minifront/src/components/staking/validators-table.tsx @@ -10,8 +10,8 @@ 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'; +import { getValidator } from '@penumbra-zone/getters/validator-info'; +import { VotingPowerAsIntegerPercentage } from '@penumbra-zone/types/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 1249d7caf1..7562970ac2 100644 --- a/apps/minifront/src/components/swap/asset-out-box.tsx +++ b/apps/minifront/src/components/swap/asset-out-box.tsx @@ -18,10 +18,10 @@ 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 { formatNumber, isZero } from '@penumbra-zone/types/src/amount'; -import { getAmount } from '@penumbra-zone/getters/src/value-view'; +import { formatNumber, isZero } from '@penumbra-zone/types/amount'; +import { getAmount } from '@penumbra-zone/getters/value-view'; import { WalletIcon } from '@penumbra-zone/ui/components/ui/icons/wallet'; -import { getAssetIdFromBalancesResponseOptional } from '@penumbra-zone/getters/src/balances-response'; +import { getAssetIdFromBalancesResponseOptional } from '@penumbra-zone/getters/balances-response'; const findMatchingBalance = ( metadata: Metadata | undefined, diff --git a/apps/minifront/src/components/swap/swap-loader.tsx b/apps/minifront/src/components/swap/swap-loader.tsx index b3432128a7..dd8afdede9 100644 --- a/apps/minifront/src/components/swap/swap-loader.tsx +++ b/apps/minifront/src/components/swap/swap-loader.tsx @@ -9,15 +9,15 @@ 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 { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; import { getAmount, getDisplayDenomExponentFromValueView, 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'; -import { fromBaseUnitAmount } from '@penumbra-zone/types/src/amount'; +} from '@penumbra-zone/getters/value-view'; +import { getSwapAsset1, getSwapAsset2 } from '@penumbra-zone/getters/swap-record'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/base64'; +import { fromBaseUnitAmount } from '@penumbra-zone/types/amount'; import { getAllAssets } from '../../fetchers/assets'; export interface UnclaimedSwapsWithMetadata { diff --git a/apps/minifront/src/components/swap/unclaimed-swaps.tsx b/apps/minifront/src/components/swap/unclaimed-swaps.tsx index 421c8c18a7..b63b627839 100644 --- a/apps/minifront/src/components/swap/unclaimed-swaps.tsx +++ b/apps/minifront/src/components/swap/unclaimed-swaps.tsx @@ -5,8 +5,8 @@ import { SwapLoaderResponse, UnclaimedSwapsWithMetadata } from './swap-loader'; import { AssetIcon } from '@penumbra-zone/ui/components/ui/tx/view/asset-icon'; 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'; +import { getSwapRecordCommitment } from '@penumbra-zone/getters/swap-record'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/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 6984a97754..cabf42b4b1 100644 --- a/apps/minifront/src/components/tx-details/hash-parser.tsx +++ b/apps/minifront/src/components/tx-details/hash-parser.tsx @@ -3,7 +3,7 @@ import { JsonViewer } from '@penumbra-zone/ui/components/ui/json-viewer'; import { TransactionViewComponent } from '@penumbra-zone/ui/components/ui/tx/view/transaction'; 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 type { Jsonified } from '@penumbra-zone/types/jsonified'; import { viewFromEmptyPerspective } from '@penumbra-zone/perspective/transaction/perspective'; export enum TxDetailsTab { diff --git a/apps/minifront/src/fetchers/assets.ts b/apps/minifront/src/fetchers/assets.ts index 23613eb423..7d52814f57 100644 --- a/apps/minifront/src/fetchers/assets.ts +++ b/apps/minifront/src/fetchers/assets.ts @@ -1,11 +1,11 @@ -import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; import { AssetMetadataByIdRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { viewClient } from '../clients'; import { AssetId, Metadata, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { getDenomMetadata } from '@penumbra-zone/getters/src/assets-response'; +import { getDenomMetadata } from '@penumbra-zone/getters/assets-response'; export const getAllAssets = async (): Promise => { const responses = await Array.fromAsync(viewClient.assets({})); diff --git a/apps/minifront/src/fetchers/balances/by-account.ts b/apps/minifront/src/fetchers/balances/by-account.ts index 306880f1eb..3e2b8bb8b7 100644 --- a/apps/minifront/src/fetchers/balances/by-account.ts +++ b/apps/minifront/src/fetchers/balances/by-account.ts @@ -1,7 +1,7 @@ import { Address } 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/src/address-view'; +import { getAddress, getAddressIndex } from '@penumbra-zone/getters/address-view'; export interface BalancesByAccount { account: number; diff --git a/apps/minifront/src/fetchers/balances/by-asset.ts b/apps/minifront/src/fetchers/balances/by-asset.ts index 5e1f1ea287..e7e7ddc0ef 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 { 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'; +import { getAssetIdFromValueView } from '@penumbra-zone/getters/value-view'; +import { addAmounts } from '@penumbra-zone/types/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 53eaf1656e..d4e9d56ed3 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/src/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; interface BalancesProps { accountFilter?: AddressIndex; diff --git a/apps/minifront/src/fetchers/transactions.ts b/apps/minifront/src/fetchers/transactions.ts index 3e1a0a5687..a5d6cde066 100644 --- a/apps/minifront/src/fetchers/transactions.ts +++ b/apps/minifront/src/fetchers/transactions.ts @@ -1,7 +1,7 @@ import { viewClient } from '../clients'; -import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; import { getTransactionClassificationLabel } from '@penumbra-zone/perspective/transaction/classify'; -import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { uint8ArrayToHex } from '@penumbra-zone/types/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 8cf9e119d9..b5d0bdfdbc 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 { 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'; +import { hexToUint8Array } from '@penumbra-zone/types/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 849ca486ab..d58fc28516 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/src/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/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'; +import { getUnclaimedSwaps } from '@penumbra-zone/getters/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 4ae4b28c56..c3928c16f0 100644 --- a/apps/minifront/src/state/helpers.ts +++ b/apps/minifront/src/state/helpers.ts @@ -17,7 +17,7 @@ import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/ import { PartialMessage } from '@bufbuild/protobuf'; import { TransactionToast } from '@penumbra-zone/ui/lib/toast/transaction-toast'; import { TransactionClassification } from '@penumbra-zone/perspective/transaction/classification'; -import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; /** * Handles the common use case of planning, building, and broadcasting a diff --git a/apps/minifront/src/state/ibc.ts b/apps/minifront/src/state/ibc.ts index c1f6b16957..fa003f351f 100644 --- a/apps/minifront/src/state/ibc.ts +++ b/apps/minifront/src/state/ibc.ts @@ -10,13 +10,13 @@ import { ibcChannelClient, ibcClient, ibcConnectionClient, viewClient } from '.. import { getDisplayDenomExponentFromValueView, getMetadata, -} from '@penumbra-zone/getters/src/value-view'; -import { getAddressIndex } from '@penumbra-zone/getters/src/address-view'; -import { toBaseUnit } from '@penumbra-zone/types/src/lo-hi'; +} from '@penumbra-zone/getters/value-view'; +import { getAddressIndex } from '@penumbra-zone/getters/address-view'; +import { toBaseUnit } from '@penumbra-zone/types/lo-hi'; import { planBuildBroadcast } from './helpers'; import { amountMoreThanBalance } from './send'; -import { getAssetId } from '@penumbra-zone/getters/src/metadata'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { getAssetId } from '@penumbra-zone/getters/metadata'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; import { bech32, bech32m } from 'bech32'; import { errorToast } from '@penumbra-zone/ui/lib/toast/presets'; import { Chain } from '@penumbra-labs/registry'; diff --git a/apps/minifront/src/state/send.ts b/apps/minifront/src/state/send.ts index 59110c31fb..8622fec28c 100644 --- a/apps/minifront/src/state/send.ts +++ b/apps/minifront/src/state/send.ts @@ -15,10 +15,10 @@ import { 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'; +} from '@penumbra-zone/getters/value-view'; +import { getAddress, getAddressIndex } from '@penumbra-zone/getters/address-view'; +import { toBaseUnit } from '@penumbra-zone/types/lo-hi'; +import { fromValueView } from '@penumbra-zone/types/amount'; import { isAddress } from '@penumbra-zone/bech32m/penumbra'; export interface SendSlice { 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 c092d197c3..b9cd0739f6 100644 --- a/apps/minifront/src/state/staking/assemble-undelegate-claim-request.ts +++ b/apps/minifront/src/state/staking/assemble-undelegate-claim-request.ts @@ -9,7 +9,7 @@ import { getAmount, getValidatorIdentityKeyFromValueView, getUnbondingStartHeightFromValueView, -} from '@penumbra-zone/getters/src/value-view'; +} from '@penumbra-zone/getters/value-view'; 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 4178df7221..e73f9bd77e 100644 --- a/apps/minifront/src/state/staking/index.test.ts +++ b/apps/minifront/src/state/staking/index.test.ts @@ -7,7 +7,7 @@ import { ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; -import { getValidatorInfoFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { getValidatorInfoFromValueView } from '@penumbra-zone/getters/value-view'; import { AddressView, IdentityKey, diff --git a/apps/minifront/src/state/staking/index.ts b/apps/minifront/src/state/staking/index.ts index d366df5c68..3d380feed1 100644 --- a/apps/minifront/src/state/staking/index.ts +++ b/apps/minifront/src/state/staking/index.ts @@ -1,12 +1,12 @@ import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { SliceCreator } from '..'; -import { getDisplayDenomExponent } from '@penumbra-zone/getters/src/metadata'; +import { getDisplayDenomExponent } from '@penumbra-zone/getters/metadata'; import { Metadata, ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { BalancesByAccount, getBalancesByAccount } from '../../fetchers/balances/by-account'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; import { AddressIndex } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { planBuildBroadcast } from '../helpers'; import { @@ -22,22 +22,22 @@ import { getDisplayDenomExponentFromValueView, getDisplayDenomFromView, getValidatorInfoFromValueView, -} from '@penumbra-zone/getters/src/value-view'; +} from '@penumbra-zone/getters/value-view'; import { getRateData, getVotingPowerFromValidatorInfo, -} from '@penumbra-zone/getters/src/validator-info'; +} from '@penumbra-zone/getters/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'; +} from '@penumbra-zone/types/staking'; +import { joinLoHiAmount } from '@penumbra-zone/types/amount'; +import { splitLoHi, toBaseUnit } from '@penumbra-zone/types/lo-hi'; import { viewClient } from '../../clients'; -import { getValueView as getValueViewFromDelegationsByAddressIndexResponse } from '@penumbra-zone/getters/src/delegations-by-address-index-response'; -import { getValueView as getValueViewFromUnbondingTokensByAddressIndexResponse } from '@penumbra-zone/getters/src/unbonding-tokens-by-address-index-response'; -import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import { getValueView as getValueViewFromDelegationsByAddressIndexResponse } from '@penumbra-zone/getters/delegations-by-address-index-response'; +import { getValueView as getValueViewFromUnbondingTokensByAddressIndexResponse } from '@penumbra-zone/getters/unbonding-tokens-by-address-index-response'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; import { getStakingTokenMetadata } from '../../fetchers/registry'; import { zeroValueView } from '../../utils/zero-value-view'; diff --git a/apps/minifront/src/state/swap.ts b/apps/minifront/src/state/swap.ts index 3f3a5d15a0..127e86449a 100644 --- a/apps/minifront/src/state/swap.ts +++ b/apps/minifront/src/state/swap.ts @@ -23,14 +23,14 @@ 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'; -import { getAmountFromValue, getAssetIdFromValue } from '@penumbra-zone/getters/src/value'; +} from '@penumbra-zone/getters/value-view'; +import { getAssetId } from '@penumbra-zone/getters/metadata'; +import { getSwapCommitmentFromTx } from '@penumbra-zone/getters/transaction'; +import { getAddressIndex } from '@penumbra-zone/getters/address-view'; +import { toBaseUnit } from '@penumbra-zone/types/lo-hi'; +import { getAmountFromValue, getAssetIdFromValue } from '@penumbra-zone/getters/value'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; -import { divideAmounts } from '@penumbra-zone/types/src/amount'; +import { divideAmounts } from '@penumbra-zone/types/amount'; import { amountMoreThanBalance } from './send'; export interface SimulateSwapResult { diff --git a/apps/minifront/src/state/transactions.ts b/apps/minifront/src/state/transactions.ts index f5568ba131..83da8a92cc 100644 --- a/apps/minifront/src/state/transactions.ts +++ b/apps/minifront/src/state/transactions.ts @@ -1,4 +1,4 @@ -import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; import { SliceCreator } from '.'; import { viewClient } from '../clients'; import { getTransactionClassificationLabel } from '@penumbra-zone/perspective/transaction/classify'; diff --git a/apps/minifront/src/state/unclaimed-swaps.ts b/apps/minifront/src/state/unclaimed-swaps.ts index b50ccb7132..ae7e51b004 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 { issueSwapClaim } from './swap'; -import { getSwapRecordCommitment } from '@penumbra-zone/getters/src/swap-record'; +import { getSwapRecordCommitment } from '@penumbra-zone/getters/swap-record'; type SwapCommitmentId = string; diff --git a/apps/node-status/src/components/node-info.tsx b/apps/node-status/src/components/node-info.tsx index 6fe8baa42e..c6b7c31c4e 100644 --- a/apps/node-status/src/components/node-info.tsx +++ b/apps/node-status/src/components/node-info.tsx @@ -2,7 +2,7 @@ import { useLoaderData } from 'react-router-dom'; import { Card } from '@penumbra-zone/ui/components/ui/card'; import { Identicon } from '@penumbra-zone/ui/components/ui/identicon'; import { IndexLoaderResponse } from '../fetching/loader'; -import { uint8ArrayToString } from '@penumbra-zone/types/src/string'; +import { uint8ArrayToString } from '@penumbra-zone/types/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 09837790d9..7baaf8b33d 100644 --- a/apps/node-status/src/components/validator-info.tsx +++ b/apps/node-status/src/components/validator-info.tsx @@ -2,8 +2,8 @@ import { useLoaderData } from 'react-router-dom'; import { Card } from '@penumbra-zone/ui/components/ui/card'; 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'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; +import { uint8ArrayToString } from '@penumbra-zone/types/string'; const PublicKeyComponent = ({ publicKey }: { publicKey: PublicKey | undefined }) => { if (!publicKey) return null; diff --git a/packages/bech32m/tsconfig.json b/packages/bech32m/tsconfig.json index cb59c9aed4..eaf384a107 100644 --- a/packages/bech32m/tsconfig.json +++ b/packages/bech32m/tsconfig.json @@ -1,5 +1,6 @@ { "extends": "tsconfig/base.json", + "exclude": ["node_modules", "dist"], "compilerOptions": { "outDir": "dist", "noEmit": false, diff --git a/packages/client/package.json b/packages/client/package.json index 842dbca3b4..aaee3fab3f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -11,8 +11,8 @@ }, "exports": { ".": "./src/prax.ts", - "./src/global": "./src/global.ts", - "./src/get-port": "./src/get-port.ts" + "./global": "./src/global.ts", + "./get-port": "./src/get-port.ts" }, "publishConfig": { "files": [ diff --git a/packages/client/src/prax.ts b/packages/client/src/prax.ts index fcc04bbe7b..013d90759c 100644 --- a/packages/client/src/prax.ts +++ b/packages/client/src/prax.ts @@ -7,9 +7,9 @@ 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/src/create'; +import { createChannelTransport } from '@penumbra-zone/transport-dom/create'; import { PenumbraSymbol } from './global'; -import { jsonOptions } from '@penumbra-zone/types/src/registry'; +import { jsonOptions } from '@penumbra-zone/types/registry'; const prax_id = 'lkpmkhpnhknhmibgnmmhdhgdilepfghe'; const prax_origin = `chrome-extension://${prax_id}`; diff --git a/packages/constants/package.json b/packages/constants/package.json index d52e0d9e0c..205bbb246e 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -9,12 +9,18 @@ "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, + "exports": { + "./assets": "./src/assets.ts" + }, "publishConfig": { "files": [ "dist" ], "exports": { - "./src/*": "./dist/*.js" + "./assets": { + "import": "./dist/assets.js", + "types": "./dist/index.d.ts" + } } }, "devDependencies": { diff --git a/packages/crypto/src/encryption.test.ts b/packages/crypto/src/encryption.test.ts index 57e2840767..f7d6553ef9 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/src/box'; +import { Box } from '@penumbra-zone/types/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 c806d284c2..d76b909f38 100644 --- a/packages/crypto/src/encryption.ts +++ b/packages/crypto/src/encryption.ts @@ -1,5 +1,5 @@ -import { Base64Str, base64ToUint8Array, uint8ArrayToBase64 } from '@penumbra-zone/types/src/base64'; -import { Box } from '@penumbra-zone/types/src/box'; +import { Base64Str, base64ToUint8Array, uint8ArrayToBase64 } from '@penumbra-zone/types/base64'; +import { Box } from '@penumbra-zone/types/box'; /** * ==== Internal ==== diff --git a/packages/getters/package.json b/packages/getters/package.json index 711e2a8d06..25c3891e9b 100644 --- a/packages/getters/package.json +++ b/packages/getters/package.json @@ -10,6 +10,9 @@ "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, + "exports": { + "./*": "./src/*.ts" + }, "publishConfig": { "files": [ "dist" diff --git a/packages/getters/src/metadata.ts b/packages/getters/src/metadata.ts index dfc74f50b7..d5f5d39ffb 100644 --- a/packages/getters/src/metadata.ts +++ b/packages/getters/src/metadata.ts @@ -1,6 +1,6 @@ import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { createGetter } from './utils/create-getter'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; export const getAssetId = createGetter((metadata?: Metadata) => metadata?.penumbraAssetId); diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index dba831fb27..20d0b73602 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -9,15 +9,22 @@ "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, + "exports": { + "./ReadableStream[Symbol.asyncIterator]": "./src/ReadableStream_Symbol.asyncIterator_.ts", + "./*": "./src/*.ts" + }, "publishConfig": { "files": [ "dist" ], "exports": { - "./src/*": "./dist/*.js", - "./src/ReadableStream[Symbol.asyncIterator]": { + "./ReadableStream[Symbol.asyncIterator]": { "import": "./dist/ReadableStream_Symbol.asyncIterator_.js", - "types": "./dist/ReadableStream[Symbol.asyncIterator].d.ts" + "types": "./src/ReadableStream_Symbol.asyncIterator_.d.ts" + }, + "./*": { + "import": "./dist/*.js", + "types": "./dist/*.d.ts" } } }, diff --git a/packages/polyfills/src/Array.fromAsync.test.ts b/packages/polyfills/src/Array.fromAsync.test.ts index 7e4af48c28..f96abc05c3 100644 --- a/packages/polyfills/src/Array.fromAsync.test.ts +++ b/packages/polyfills/src/Array.fromAsync.test.ts @@ -1,7 +1,7 @@ import { expect, describe, it } from 'vitest'; import Array from './Array.fromAsync'; -import './ReadableStream[Symbol.asyncIterator]'; +import './ReadableStream_Symbol.asyncIterator_'; describe('Array.fromAsync', () => { it('should convert an async iterable to an array', async () => { diff --git a/packages/polyfills/src/ReadableStream[Symbol.asyncIterator].test.ts b/packages/polyfills/src/ReadableStream_Symbol.asyncIterator_.test.ts similarity index 97% rename from packages/polyfills/src/ReadableStream[Symbol.asyncIterator].test.ts rename to packages/polyfills/src/ReadableStream_Symbol.asyncIterator_.test.ts index d00ec9d657..a51ce1f6de 100644 --- a/packages/polyfills/src/ReadableStream[Symbol.asyncIterator].test.ts +++ b/packages/polyfills/src/ReadableStream_Symbol.asyncIterator_.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import './ReadableStream[Symbol.asyncIterator]'; +import './ReadableStream_Symbol.asyncIterator_'; describe('ReadableStream[Symbol.asyncIterator]', () => { test('ReadableStream contains Symbol.asyncIterator', () => { diff --git a/packages/polyfills/src/ReadableStream[Symbol.asyncIterator].ts b/packages/polyfills/src/ReadableStream_Symbol.asyncIterator_.ts similarity index 100% rename from packages/polyfills/src/ReadableStream[Symbol.asyncIterator].ts rename to packages/polyfills/src/ReadableStream_Symbol.asyncIterator_.ts diff --git a/packages/polyfills/vite.config.ts b/packages/polyfills/vite.config.ts index ac3b004a48..0fce603ab5 100644 --- a/packages/polyfills/vite.config.ts +++ b/packages/polyfills/vite.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ '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', + 'ReadableStream[Symbol.asyncIterator]': './src/ReadableStream_Symbol.asyncIterator_.ts', }, formats: ['es'], }, diff --git a/packages/query/package.json b/packages/query/package.json index ff378078bd..e5f73cd69b 100644 --- a/packages/query/package.json +++ b/packages/query/package.json @@ -8,6 +8,9 @@ "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, + "exports": { + "./*": "./src/*.ts" + }, "dependencies": { "@penumbra-zone/bech32m": "workspace:*", "@penumbra-zone/constants": "workspace:*", diff --git a/packages/query/src/block-processor.ts b/packages/query/src/block-processor.ts index e85ae4b11f..c90f66d92f 100644 --- a/packages/query/src/block-processor.ts +++ b/packages/query/src/block-processor.ts @@ -5,7 +5,7 @@ import { computePositionId, getLpNftMetadata } from '@penumbra-zone/wasm/dex'; import { getExchangeRateFromValidatorInfoResponse, getIdentityKeyFromValidatorInfoResponse, -} from '@penumbra-zone/getters/src/validator-info-response'; +} from '@penumbra-zone/getters/validator-info-response'; import { PositionState, PositionState_PositionStateEnum, @@ -22,9 +22,9 @@ 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 type { BlockProcessorInterface } from '@penumbra-zone/types/block-processor'; +import type { IndexedDbInterface } from '@penumbra-zone/types/indexed-db'; +import type { ViewServerInterface } from '@penumbra-zone/types/servers'; import { customizeSymbol } from '@penumbra-zone/wasm/metadata'; import { updatePricesFromSwaps } from './price-indexer'; import { @@ -32,11 +32,11 @@ import { Metadata, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; -import { getAssetId } from '@penumbra-zone/getters/src/metadata'; -import { PRICE_RELEVANCE_THRESHOLDS } from '@penumbra-zone/constants/src/assets'; -import { toDecimalExchangeRate } from '@penumbra-zone/types/src/amount'; +import { getAssetId } from '@penumbra-zone/getters/metadata'; +import { PRICE_RELEVANCE_THRESHOLDS } from '@penumbra-zone/constants/assets'; +import { toDecimalExchangeRate } from '@penumbra-zone/types/amount'; import { ValidatorInfoResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; declare global { // `var` required for global declaration (as let/const are block scoped) diff --git a/packages/query/src/price-indexer.test.ts b/packages/query/src/price-indexer.test.ts index 18d1333d1a..afd77cf919 100644 --- a/packages/query/src/price-indexer.test.ts +++ b/packages/query/src/price-indexer.test.ts @@ -1,9 +1,9 @@ import { deriveAndSavePriceFromBSOD } from './price-indexer'; import { BatchSwapOutputData } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; import { beforeEach, describe, expect, it, Mock, vi } from 'vitest'; -import { IndexedDbInterface } from '@penumbra-zone/types/src/indexed-db'; +import { IndexedDbInterface } from '@penumbra-zone/types/indexed-db'; import { AssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { base64ToUint8Array } from '@penumbra-zone/types/src/base64'; +import { base64ToUint8Array } from '@penumbra-zone/types/base64'; describe('updatePricesFromSwaps()', () => { let indexedDbMock: IndexedDbInterface; diff --git a/packages/query/src/price-indexer.ts b/packages/query/src/price-indexer.ts index a1cec5b227..ad15dc5869 100644 --- a/packages/query/src/price-indexer.ts +++ b/packages/query/src/price-indexer.ts @@ -1,6 +1,6 @@ import { BatchSwapOutputData } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; -import { IndexedDbInterface } from '@penumbra-zone/types/src/indexed-db'; -import { divideAmounts, isZero, subtractAmounts } from '@penumbra-zone/types/src/amount'; +import { IndexedDbInterface } from '@penumbra-zone/types/indexed-db'; +import { divideAmounts, isZero, subtractAmounts } from '@penumbra-zone/types/amount'; import { AssetId, Metadata, @@ -15,8 +15,8 @@ import { getSwapAsset2, getUnfilled1Amount, getUnfilled2Amount, -} from '@penumbra-zone/getters/src/batch-swap-output-data'; -import { getAssetId } from '@penumbra-zone/getters/src/metadata'; +} from '@penumbra-zone/getters/batch-swap-output-data'; +import { getAssetId } from '@penumbra-zone/getters/metadata'; /** * diff --git a/packages/query/src/queriers/app.ts b/packages/query/src/queriers/app.ts index 385a44dd59..7592740d64 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 type { AppQuerierInterface } from '@penumbra-zone/types/src/querier'; +import type { AppQuerierInterface } from '@penumbra-zone/types/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 f8a9dc33a9..53e86404b7 100644 --- a/packages/query/src/queriers/cnidarium.ts +++ b/packages/query/src/queriers/cnidarium.ts @@ -2,7 +2,7 @@ import { PromiseClient } from '@connectrpc/connect'; import { createClient } from './utils'; import { QueryService as CnidariumQueryService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/cnidarium/v1/cnidarium_connect'; import { KeyValueRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/cnidarium/v1/cnidarium_pb'; -import { CnidariumQuerierInterface } from '@penumbra-zone/types/src/querier'; +import { CnidariumQuerierInterface } from '@penumbra-zone/types/querier'; import { MerkleRoot } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/crypto/tct/v1/tct_pb'; export class CnidariumQuerier implements CnidariumQuerierInterface { diff --git a/packages/query/src/queriers/compact-block.ts b/packages/query/src/queriers/compact-block.ts index 405c304a28..6bed4e431c 100644 --- a/packages/query/src/queriers/compact-block.ts +++ b/packages/query/src/queriers/compact-block.ts @@ -8,7 +8,7 @@ import { createClient } from './utils'; import type { CompactBlockQuerierInterface, CompactBlockRangeParams, -} from '@penumbra-zone/types/src/querier'; +} from '@penumbra-zone/types/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 51d7602445..61bae5eeb8 100644 --- a/packages/query/src/queriers/ibc-client.ts +++ b/packages/query/src/queriers/ibc-client.ts @@ -5,7 +5,7 @@ import { QueryClientStatesRequest, QueryClientStatesResponse, } from '@buf/cosmos_ibc.bufbuild_es/ibc/core/client/v1/query_pb'; -import type { IbcClientQuerierInterface } from '@penumbra-zone/types/src/querier'; +import type { IbcClientQuerierInterface } from '@penumbra-zone/types/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 277e39f475..c95a831eee 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 type { ShieldedPoolQuerierInterface } from '@penumbra-zone/types/src/querier'; +import type { ShieldedPoolQuerierInterface } from '@penumbra-zone/types/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 64d88aa664..372e8d7109 100644 --- a/packages/query/src/queriers/staking.ts +++ b/packages/query/src/queriers/staking.ts @@ -6,7 +6,7 @@ import { ValidatorPenaltyRequest, ValidatorPenaltyResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { StakingQuerierInterface } from '@penumbra-zone/types/src/querier'; +import { StakingQuerierInterface } from '@penumbra-zone/types/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 c7f7a414f2..aa6828b36f 100644 --- a/packages/query/src/queriers/tendermint.ts +++ b/packages/query/src/queriers/tendermint.ts @@ -3,7 +3,7 @@ import { createClient } from './utils'; import { TendermintProxyService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/util/tendermint_proxy/v1/tendermint_proxy_connect'; 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'; +import type { TendermintQuerierInterface } from '@penumbra-zone/types/querier'; export class TendermintQuerier implements TendermintQuerierInterface { private readonly client: PromiseClient; diff --git a/packages/query/src/root-querier.ts b/packages/query/src/root-querier.ts index c642e03b91..8e44027782 100644 --- a/packages/query/src/root-querier.ts +++ b/packages/query/src/root-querier.ts @@ -5,7 +5,7 @@ import { ShieldedPoolQuerier } from './queriers/shielded-pool'; 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'; +import type { RootQuerierInterface } from '@penumbra-zone/types/querier'; // Given the amount of query services, this root querier aggregates them all // to make it easier for consumers diff --git a/packages/services-context/src/index.ts b/packages/services-context/src/index.ts index fd3d8149c4..0bb715b5eb 100644 --- a/packages/services-context/src/index.ts +++ b/packages/services-context/src/index.ts @@ -1,21 +1,17 @@ -import { BlockProcessor } from '@penumbra-zone/query/src/block-processor'; -import { RootQuerier } from '@penumbra-zone/query/src/root-querier'; +import { BlockProcessor } from '@penumbra-zone/query/block-processor'; +import { RootQuerier } from '@penumbra-zone/query/root-querier'; import { IndexedDb } from '@penumbra-zone/storage/indexed-db'; import { localExtStorage } from '@penumbra-zone/storage/chrome/local'; import { syncLastBlockWithLocal } from '@penumbra-zone/storage/chrome/syncer'; import { ViewServer } from '@penumbra-zone/wasm/view-server'; -import { - ServicesInterface, - ServicesMessage, - WalletServices, -} from '@penumbra-zone/types/src/services'; +import { ServicesInterface, ServicesMessage, WalletServices } from '@penumbra-zone/types/services'; import type { JsonValue } from '@bufbuild/protobuf'; -import '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import '@penumbra-zone/polyfills/Promise.withResolvers'; import { FullViewingKey, WalletId, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { Wallet } from '@penumbra-zone/types/src/wallet'; +import { Wallet } from '@penumbra-zone/types/wallet'; import { ChainRegistryClient } from '@penumbra-labs/registry'; export interface ServicesConfig { diff --git a/packages/services/src/ctx/approver.ts b/packages/services/src/ctx/approver.ts index c30ced0d20..5245050556 100644 --- a/packages/services/src/ctx/approver.ts +++ b/packages/services/src/ctx/approver.ts @@ -1,7 +1,7 @@ import { AuthorizeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/custody/v1/custody_pb'; import { createContextKey } from '@connectrpc/connect'; import { PartialMessage } from '@bufbuild/protobuf'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; export type TxApprovalFn = ( authorizeRequest: PartialMessage, diff --git a/packages/services/src/ctx/prax.ts b/packages/services/src/ctx/prax.ts index 65235f1769..46b8729e35 100644 --- a/packages/services/src/ctx/prax.ts +++ b/packages/services/src/ctx/prax.ts @@ -6,7 +6,7 @@ import { createContextKey } from '@connectrpc/connect'; import { localExtStorage } from '@penumbra-zone/storage/chrome/local'; import { sessionExtStorage } from '@penumbra-zone/storage/chrome/session'; -import type { ServicesInterface } from '@penumbra-zone/types/src/services'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; export const servicesCtx = createContextKey({} as ServicesInterface); export const extLocalCtx = createContextKey(localExtStorage); diff --git a/packages/services/src/custody-service/authorize/index.test.ts b/packages/services/src/custody-service/authorize/index.test.ts index 4cca582dfe..ac0b9f8744 100644 --- a/packages/services/src/custody-service/authorize/index.test.ts +++ b/packages/services/src/custody-service/authorize/index.test.ts @@ -16,9 +16,9 @@ import { AuthorizationData, TransactionPlan, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; -import { Services } from '@penumbra-zone/services-context'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { fvkCtx } from '../../ctx/full-viewing-key'; describe('Authorize request handler', () => { @@ -99,7 +99,7 @@ describe('Authorize request handler', () => { .set(extLocalCtx, mockExtLocalCtx as unknown) .set(approverCtx, mockApproverCtx as unknown) .set(extSessionCtx, mockExtSessionCtx as unknown) - .set(servicesCtx, mockServices as unknown as Services) + .set(servicesCtx, mockServices as unknown as ServicesInterface) .set(fvkCtx, testFullViewingKey), }); diff --git a/packages/services/src/custody-service/authorize/index.ts b/packages/services/src/custody-service/authorize/index.ts index 96707d386b..f4b5b10f8a 100644 --- a/packages/services/src/custody-service/authorize/index.ts +++ b/packages/services/src/custody-service/authorize/index.ts @@ -5,8 +5,8 @@ import { generateSpendKey } from '@penumbra-zone/wasm/keys'; import { authorizePlan } from '@penumbra-zone/wasm/build'; import { Key } from '@penumbra-zone/crypto-web/encryption'; import { Code, ConnectError, HandlerContext } from '@connectrpc/connect'; -import { Box } from '@penumbra-zone/types/src/box'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { Box } from '@penumbra-zone/types/box'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { assertSwapClaimAddressesBelongToCurrentUser } from './assert-swap-claim-addresses-belong-to-current-user'; import { isControlledAddress } from '@penumbra-zone/wasm/address'; import { AuthorizeRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/custody/v1/custody_pb'; diff --git a/packages/services/src/offscreen-client.ts b/packages/services/src/offscreen-client.ts index 6eda2ff680..307ecdb249 100644 --- a/packages/services/src/offscreen-client.ts +++ b/packages/services/src/offscreen-client.ts @@ -6,12 +6,9 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { ConnectError } from '@connectrpc/connect'; import { errorFromJson } from '@connectrpc/connect/protocol-connect'; -import { - ActionBuildMessage, - OffscreenMessage, -} from '@penumbra-zone/types/src/internal-msg/offscreen'; -import { InternalRequest, InternalResponse } from '@penumbra-zone/types/src/internal-msg/shared'; -import type { Jsonified } from '@penumbra-zone/types/src/jsonified'; +import { ActionBuildMessage, OffscreenMessage } from '@penumbra-zone/types/internal-msg/offscreen'; +import { InternalRequest, InternalResponse } from '@penumbra-zone/types/internal-msg/shared'; +import type { Jsonified } from '@penumbra-zone/types/jsonified'; const OFFSCREEN_DOCUMENT_PATH = '/offscreen.html'; diff --git a/packages/services/src/sct-service/epoch-by-height.test.ts b/packages/services/src/sct-service/epoch-by-height.test.ts index c737004326..114e266418 100644 --- a/packages/services/src/sct-service/epoch-by-height.test.ts +++ b/packages/services/src/sct-service/epoch-by-height.test.ts @@ -8,7 +8,7 @@ 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('EpochByHeight request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/staking-service/validator-info.test.ts b/packages/services/src/staking-service/validator-info.test.ts index eabb66274c..e4c7b4b6c0 100644 --- a/packages/services/src/staking-service/validator-info.test.ts +++ b/packages/services/src/staking-service/validator-info.test.ts @@ -10,7 +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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('ValidatorInfo request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/staking-service/validator-info.ts b/packages/services/src/staking-service/validator-info.ts index fd9dd6d083..f4facecbba 100644 --- a/packages/services/src/staking-service/validator-info.ts +++ b/packages/services/src/staking-service/validator-info.ts @@ -4,7 +4,7 @@ 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'; +import { getStateEnumFromValidatorInfo } from '@penumbra-zone/getters/validator-info'; export const validatorInfo: Impl['validatorInfo'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/services/src/staking-service/validator-penalty.test.ts b/packages/services/src/staking-service/validator-penalty.test.ts index bba5fbacf8..2c26bbd0b8 100644 --- a/packages/services/src/staking-service/validator-penalty.test.ts +++ b/packages/services/src/staking-service/validator-penalty.test.ts @@ -8,7 +8,7 @@ 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('ValidatorPenalty request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/app-parameters.test.ts b/packages/services/src/view-service/app-parameters.test.ts index 317e61eee1..be4e5e5677 100644 --- a/packages/services/src/view-service/app-parameters.test.ts +++ b/packages/services/src/view-service/app-parameters.test.ts @@ -9,7 +9,7 @@ import { servicesCtx } from '../ctx/prax'; 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('AppParameters request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/asset-metadata-by-id.test.ts b/packages/services/src/view-service/asset-metadata-by-id.test.ts index 5a5bc1ef2f..56ba0b09c2 100644 --- a/packages/services/src/view-service/asset-metadata-by-id.test.ts +++ b/packages/services/src/view-service/asset-metadata-by-id.test.ts @@ -12,7 +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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('AssetMetadataById request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/assets.test.ts b/packages/services/src/view-service/assets.test.ts index 3ad2574b5c..652065bf86 100644 --- a/packages/services/src/view-service/assets.test.ts +++ b/packages/services/src/view-service/assets.test.ts @@ -12,7 +12,7 @@ import { beforeEach, describe, expect, test, vi } from 'vitest'; import { servicesCtx } from '../ctx/prax'; import { assets } from './assets'; import { IndexedDbMock, MockServices } from '../test-utils'; -import { Services } from '@penumbra-zone/services-context/src/index'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('Assets request handler', () => { let req: AssetsRequest; @@ -43,7 +43,10 @@ describe('Assets request handler', () => { protocolName: 'mock', requestMethod: 'MOCK', url: '/mock', - contextValues: createContextValues().set(servicesCtx, mockServices as unknown as Services), + contextValues: createContextValues().set( + servicesCtx, + mockServices as unknown as ServicesInterface, + ), }); for (const record of testData) { diff --git a/packages/services/src/view-service/assets.ts b/packages/services/src/view-service/assets.ts index 3be9caff6f..02cc436354 100644 --- a/packages/services/src/view-service/assets.ts +++ b/packages/services/src/view-service/assets.ts @@ -1,6 +1,6 @@ import type { Impl } from '.'; import { servicesCtx } from '../ctx/prax'; -import { assetPatterns, RegexMatcher } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns, RegexMatcher } from '@penumbra-zone/constants/assets'; export const assets: Impl['assets'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/services/src/view-service/balances.test.ts b/packages/services/src/view-service/balances.test.ts index f57ca0566f..6b72d433dd 100644 --- a/packages/services/src/view-service/balances.test.ts +++ b/packages/services/src/view-service/balances.test.ts @@ -12,7 +12,7 @@ import { import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; import { beforeEach, describe, expect, test, vi } from 'vitest'; -import { Services } from '@penumbra-zone/services-context'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { IndexedDbMock, MockServices, TendermintMock, testFullViewingKey } from '../test-utils'; import { AssetId, @@ -25,10 +25,10 @@ import { getAssetIdFromValueView, getEquivalentValues, 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'; -import { multiplyAmountByNumber } from '@penumbra-zone/types/src/amount'; +} from '@penumbra-zone/getters/value-view'; +import { getAddressIndex } from '@penumbra-zone/getters/address-view'; +import { base64ToUint8Array } from '@penumbra-zone/types/base64'; +import { multiplyAmountByNumber } from '@penumbra-zone/types/amount'; import { fvkCtx } from '../ctx/full-viewing-key'; const assertOnlyUniqueAssetIds = (responses: BalancesResponse[], accountId: number) => { @@ -92,7 +92,7 @@ describe('Balances request handler', () => { requestMethod: 'MOCK', url: '/mock', contextValues: createContextValues() - .set(servicesCtx, mockServices as unknown as Services) + .set(servicesCtx, mockServices as unknown as ServicesInterface) .set(fvkCtx, testFullViewingKey), }); diff --git a/packages/services/src/view-service/balances.ts b/packages/services/src/view-service/balances.ts index 5f38ffbd92..edbcd44084 100644 --- a/packages/services/src/view-service/balances.ts +++ b/packages/services/src/view-service/balances.ts @@ -1,7 +1,7 @@ import type { Impl } from '.'; import { servicesCtx } from '../ctx/prax'; -import { getAmount } from '@penumbra-zone/getters/src/value-view'; -import { getAssetIdFromRecord } from '@penumbra-zone/getters/src/spendable-note-record'; +import { getAmount } from '@penumbra-zone/getters/value-view'; +import { getAssetIdFromRecord } from '@penumbra-zone/getters/spendable-note-record'; import { AssetId, EquivalentValue, @@ -25,11 +25,11 @@ 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'; -import { IndexedDbInterface } from '@penumbra-zone/types/src/indexed-db'; -import { multiplyAmountByNumber } from '@penumbra-zone/types/src/amount'; -import { Stringified } from '@penumbra-zone/types/src/jsonified'; +import { Base64Str, uint8ArrayToBase64 } from '@penumbra-zone/types/base64'; +import { addLoHi } from '@penumbra-zone/types/lo-hi'; +import { IndexedDbInterface } from '@penumbra-zone/types/indexed-db'; +import { multiplyAmountByNumber } from '@penumbra-zone/types/amount'; +import { Stringified } from '@penumbra-zone/types/jsonified'; // Handles aggregating amounts and filtering by account number/asset id export const balances: Impl['balances'] = async function* (req, ctx) { diff --git a/packages/services/src/view-service/broadcast-transaction.test.ts b/packages/services/src/view-service/broadcast-transaction.test.ts index f2be80e17a..5514f17fb2 100644 --- a/packages/services/src/view-service/broadcast-transaction.test.ts +++ b/packages/services/src/view-service/broadcast-transaction.test.ts @@ -9,7 +9,7 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/ import { servicesCtx } from '../ctx/prax'; import { Transaction } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/transaction/v1/transaction_pb'; import { broadcastTransaction } from './broadcast-transaction'; -import type { Services } from '@penumbra-zone/services-context/src/index'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; import { IndexedDbMock, MockServices, TendermintMock } from '../test-utils'; @@ -62,7 +62,10 @@ describe('BroadcastTransaction request handler', () => { protocolName: 'mock', requestMethod: 'MOCK', url: '/mock', - contextValues: createContextValues().set(servicesCtx, mockServices as unknown as Services), + contextValues: createContextValues().set( + servicesCtx, + mockServices as unknown as ServicesInterface, + ), }); broadcastTransactionRequest = new BroadcastTransactionRequest({ diff --git a/packages/services/src/view-service/broadcast-transaction.ts b/packages/services/src/view-service/broadcast-transaction.ts index 2efa14ce88..2bc17ae6dc 100644 --- a/packages/services/src/view-service/broadcast-transaction.ts +++ b/packages/services/src/view-service/broadcast-transaction.ts @@ -4,7 +4,7 @@ import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/ import { Code, ConnectError } from '@connectrpc/connect'; import { sha256Hash } from '@penumbra-zone/crypto-web/sha256'; import { TransactionInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; -import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; export const broadcastTransaction: Impl['broadcastTransaction'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/services/src/view-service/delegations-by-address-index.test.ts b/packages/services/src/view-service/delegations-by-address-index.test.ts index 6f15685aa8..01ba3fdee2 100644 --- a/packages/services/src/view-service/delegations-by-address-index.test.ts +++ b/packages/services/src/view-service/delegations-by-address-index.test.ts @@ -21,7 +21,7 @@ import { ValidatorInfoResponse, ValidatorState_ValidatorStateEnum, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; -import { getAmount, getValidatorInfoFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { getAmount, getValidatorInfoFromValueView } from '@penumbra-zone/getters/value-view'; import { identityKeyFromBech32m } from '@penumbra-zone/bech32m/penumbravalid'; import { PartialMessage } from '@bufbuild/protobuf'; import { diff --git a/packages/services/src/view-service/delegations-by-address-index.ts b/packages/services/src/view-service/delegations-by-address-index.ts index bd3e7d8313..cb9e42b0b6 100644 --- a/packages/services/src/view-service/delegations-by-address-index.ts +++ b/packages/services/src/view-service/delegations-by-address-index.ts @@ -1,11 +1,11 @@ import { IdentityKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; import { customizeSymbol } from '@penumbra-zone/wasm/metadata'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; 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 { getValidatorInfo } from '@penumbra-zone/getters/validator-info-response'; +import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/validator-info'; import { ValidatorInfo } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { AssetMetadataByIdRequest, @@ -21,7 +21,7 @@ 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 { getDisplayDenomFromView } from '@penumbra-zone/getters/value-view'; import { Impl } from '.'; const isDelegationBalance = (balance: BalancesResponse, identityKey: IdentityKey) => { diff --git a/packages/services/src/view-service/fmd-parameters.test.ts b/packages/services/src/view-service/fmd-parameters.test.ts index ad5ffd0678..ebed9777c9 100644 --- a/packages/services/src/view-service/fmd-parameters.test.ts +++ b/packages/services/src/view-service/fmd-parameters.test.ts @@ -9,7 +9,7 @@ import { servicesCtx } from '../ctx/prax'; 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('FmdParameters request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/gas-prices.test.ts b/packages/services/src/view-service/gas-prices.test.ts index b00151a51d..c606508e66 100644 --- a/packages/services/src/view-service/gas-prices.test.ts +++ b/packages/services/src/view-service/gas-prices.test.ts @@ -9,7 +9,7 @@ import { servicesCtx } from '../ctx/prax'; 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('GasPrices request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/helpers.ts b/packages/services/src/view-service/helpers.ts index ad9b3d1d5f..492721ecbf 100644 --- a/packages/services/src/view-service/helpers.ts +++ b/packages/services/src/view-service/helpers.ts @@ -1,6 +1,6 @@ import { AssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { IndexedDbInterface } from '@penumbra-zone/types/src/indexed-db'; -import { RootQuerierInterface } from '@penumbra-zone/types/src/querier'; +import { IndexedDbInterface } from '@penumbra-zone/types/indexed-db'; +import { RootQuerierInterface } from '@penumbra-zone/types/querier'; export const getAssetMetadata = async ( targetAsset: AssetId, diff --git a/packages/services/src/view-service/note-by-commitment.test.ts b/packages/services/src/view-service/note-by-commitment.test.ts index fd8609fd73..9c32b02731 100644 --- a/packages/services/src/view-service/note-by-commitment.test.ts +++ b/packages/services/src/view-service/note-by-commitment.test.ts @@ -10,7 +10,7 @@ import { servicesCtx } from '../ctx/prax'; 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('NoteByCommitment request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/notes-for-voting.test.ts b/packages/services/src/view-service/notes-for-voting.test.ts index 3412af5388..72b5957482 100644 --- a/packages/services/src/view-service/notes-for-voting.test.ts +++ b/packages/services/src/view-service/notes-for-voting.test.ts @@ -8,7 +8,7 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/ import { servicesCtx } from '../ctx/prax'; import { IndexedDbMock, MockServices } from '../test-utils'; import { notesForVoting } from './notes-for-voting'; -import type { ServicesInterface } from '@penumbra-zone/types/src/services'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('NotesForVoting request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/notes.test.ts b/packages/services/src/view-service/notes.test.ts index a1e6119216..9a014c2149 100644 --- a/packages/services/src/view-service/notes.test.ts +++ b/packages/services/src/view-service/notes.test.ts @@ -15,7 +15,7 @@ import { SpendableNoteRecord, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { IndexedDbMock, MockServices } from '../test-utils'; -import { Services } from '@penumbra-zone/services-context/src/index'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('Notes request handler', () => { let mockServices: MockServices; @@ -46,7 +46,10 @@ describe('Notes request handler', () => { protocolName: 'mock', requestMethod: 'MOCK', url: '/mock', - contextValues: createContextValues().set(servicesCtx, mockServices as unknown as Services), + contextValues: createContextValues().set( + servicesCtx, + mockServices as unknown as ServicesInterface, + ), }); for (const record of testData) { diff --git a/packages/services/src/view-service/notes.ts b/packages/services/src/view-service/notes.ts index 08e20fdd0c..f948531f0c 100644 --- a/packages/services/src/view-service/notes.ts +++ b/packages/services/src/view-service/notes.ts @@ -2,7 +2,7 @@ import type { Impl } from '.'; import { servicesCtx } from '../ctx/prax'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; -import { addAmounts, joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { addAmounts, joinLoHiAmount } from '@penumbra-zone/types/amount'; export const notes: Impl['notes'] = async function* (req, ctx) { const services = ctx.values.get(servicesCtx); diff --git a/packages/services/src/view-service/nullifier-status.test.ts b/packages/services/src/view-service/nullifier-status.test.ts index f9053c7483..51de897258 100644 --- a/packages/services/src/view-service/nullifier-status.test.ts +++ b/packages/services/src/view-service/nullifier-status.test.ts @@ -4,7 +4,7 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/ import { servicesCtx } from '../ctx/prax'; import { createContextValues, createHandlerContext, HandlerContext } from '@connectrpc/connect'; -import type { Services } from '@penumbra-zone/services-context/src/index'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { beforeEach, describe, expect, Mock, test, vi } from 'vitest'; @@ -15,7 +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'; +import { stringToUint8Array } from '@penumbra-zone/types/string'; describe('nullifierStatus', () => { let mockServices: MockServices; @@ -60,7 +60,10 @@ describe('nullifierStatus', () => { protocolName: 'mock', requestMethod: 'MOCK', url: '/mock', - contextValues: createContextValues().set(servicesCtx, mockServices as unknown as Services), + contextValues: createContextValues().set( + servicesCtx, + mockServices as unknown as ServicesInterface, + ), }); }); diff --git a/packages/services/src/view-service/owned-position-ids.test.ts b/packages/services/src/view-service/owned-position-ids.test.ts index c1d3bb997f..970c0e590e 100644 --- a/packages/services/src/view-service/owned-position-ids.test.ts +++ b/packages/services/src/view-service/owned-position-ids.test.ts @@ -10,7 +10,7 @@ import { OwnedPositionIdsResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { IndexedDbMock, MockServices } from '../test-utils'; -import { Services } from '@penumbra-zone/services-context/src/index'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { PositionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; import { ownedPositionIds } from './owned-position-ids'; @@ -44,7 +44,10 @@ describe('OwnedPositionIds request handler', () => { protocolName: 'mock', requestMethod: 'MOCK', url: '/mock', - contextValues: createContextValues().set(servicesCtx, mockServices as unknown as Services), + contextValues: createContextValues().set( + servicesCtx, + mockServices as unknown as ServicesInterface, + ), }); for (const record of testData) { diff --git a/packages/services/src/view-service/status-stream.test.ts b/packages/services/src/view-service/status-stream.test.ts index 54f9780344..22893929d8 100644 --- a/packages/services/src/view-service/status-stream.test.ts +++ b/packages/services/src/view-service/status-stream.test.ts @@ -8,7 +8,7 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/ import { servicesCtx } from '../ctx/prax'; import { IndexedDbMock, MockServices, TendermintMock } from '../test-utils'; import { statusStream } from './status-stream'; -import type { ServicesInterface } from '@penumbra-zone/types/src/services'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('Status stream request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/status.test.ts b/packages/services/src/view-service/status.test.ts index a609df8146..665faefd9d 100644 --- a/packages/services/src/view-service/status.test.ts +++ b/packages/services/src/view-service/status.test.ts @@ -8,7 +8,7 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/ import { servicesCtx } from '../ctx/prax'; import { IndexedDbMock, MockServices, TendermintMock } from '../test-utils'; import { status } from './status'; -import type { ServicesInterface } from '@penumbra-zone/types/src/services'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('Status request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/swap-by-commitment.test.ts b/packages/services/src/view-service/swap-by-commitment.test.ts index ab7bb7cb4c..52d2a5e9cd 100644 --- a/packages/services/src/view-service/swap-by-commitment.test.ts +++ b/packages/services/src/view-service/swap-by-commitment.test.ts @@ -10,7 +10,7 @@ import { servicesCtx } from '../ctx/prax'; 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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('SwapByCommitment request handler', () => { let mockServices: MockServices; diff --git a/packages/services/src/view-service/transaction-info-by-hash.test.ts b/packages/services/src/view-service/transaction-info-by-hash.test.ts index d8282d64ed..9976811f5a 100644 --- a/packages/services/src/view-service/transaction-info-by-hash.test.ts +++ b/packages/services/src/view-service/transaction-info-by-hash.test.ts @@ -9,7 +9,7 @@ import { servicesCtx } from '../ctx/prax'; import { IndexedDbMock, MockServices, TendermintMock, testFullViewingKey } from '../test-utils'; import { transactionInfoByHash } from './transaction-info-by-hash'; import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; -import type { Services } from '@penumbra-zone/services-context'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { Transaction, TransactionPerspective, @@ -54,7 +54,7 @@ describe('TransactionInfoByHash request handler', () => { requestMethod: 'MOCK', url: '/mock', contextValues: createContextValues() - .set(servicesCtx, mockServices as unknown as Services) + .set(servicesCtx, mockServices as unknown as ServicesInterface) .set(fvkCtx, testFullViewingKey), }); mockTransactionInfo.mockReturnValueOnce({ diff --git a/packages/services/src/view-service/transaction-info.test.ts b/packages/services/src/view-service/transaction-info.test.ts index 406fb61a86..7f944f3193 100644 --- a/packages/services/src/view-service/transaction-info.test.ts +++ b/packages/services/src/view-service/transaction-info.test.ts @@ -11,7 +11,7 @@ import { TransactionInfoResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { IndexedDbMock, MockServices, testFullViewingKey } from '../test-utils'; -import { Services } from '@penumbra-zone/services-context'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { transactionInfo } from './transaction-info'; import { fvkCtx } from '../ctx/full-viewing-key'; @@ -52,7 +52,7 @@ describe('TransactionInfo request handler', () => { requestMethod: 'MOCK', url: '/mock', contextValues: createContextValues() - .set(servicesCtx, mockServices as unknown as Services) + .set(servicesCtx, mockServices as unknown as ServicesInterface) .set(fvkCtx, testFullViewingKey), }); diff --git a/packages/services/src/view-service/transaction-planner/assert-swap-assets-are-not-the-same.ts b/packages/services/src/view-service/transaction-planner/assert-swap-assets-are-not-the-same.ts index a7ac33e2a8..0a09ad84ca 100644 --- a/packages/services/src/view-service/transaction-planner/assert-swap-assets-are-not-the-same.ts +++ b/packages/services/src/view-service/transaction-planner/assert-swap-assets-are-not-the-same.ts @@ -1,6 +1,6 @@ import { TransactionPlannerRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { Code, ConnectError } from '@connectrpc/connect'; -import { getAssetIdFromValue } from '@penumbra-zone/getters/src/value'; +import { getAssetIdFromValue } from '@penumbra-zone/getters/value'; export const assertSwapAssetsAreNotTheSame = ( transactionPlannerRequest: TransactionPlannerRequest, diff --git a/packages/services/src/view-service/transaction-planner/index.test.ts b/packages/services/src/view-service/transaction-planner/index.test.ts index 6747b9581c..5e15eba04d 100644 --- a/packages/services/src/view-service/transaction-planner/index.test.ts +++ b/packages/services/src/view-service/transaction-planner/index.test.ts @@ -4,7 +4,7 @@ import { createContextValues, createHandlerContext, HandlerContext } from '@conn import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/view/v1/view_connect'; import { servicesCtx } from '../../ctx/prax'; import { IndexedDbMock, MockServices, testFullViewingKey } from '../../test-utils'; -import type { Services } from '@penumbra-zone/services-context'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { FmdParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/shielded_pool/v1/shielded_pool_pb'; import { AppParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/app/v1/app_pb'; import { SctParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/sct/v1/sct_pb'; @@ -47,7 +47,7 @@ describe('TransactionPlanner request handler', () => { requestMethod: 'MOCK', url: '/mock', contextValues: createContextValues() - .set(servicesCtx, mockServices as unknown as Services) + .set(servicesCtx, mockServices as unknown as ServicesInterface) .set(fvkCtx, testFullViewingKey), }); diff --git a/packages/services/src/view-service/unbonding-tokens-by-address-index/helpers.ts b/packages/services/src/view-service/unbonding-tokens-by-address-index/helpers.ts index bce52f8938..11a4de3566 100644 --- a/packages/services/src/view-service/unbonding-tokens-by-address-index/helpers.ts +++ b/packages/services/src/view-service/unbonding-tokens-by-address-index/helpers.ts @@ -5,8 +5,8 @@ import { } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { PartialMessage } from '@bufbuild/protobuf'; import { HandlerContext } from '@connectrpc/connect'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; -import { getDisplayFromBalancesResponse } from '@penumbra-zone/getters/src/balances-response'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; +import { getDisplayFromBalancesResponse } from '@penumbra-zone/getters/balances-response'; import { status } from '../status'; import { appParameters } from '../app-parameters'; diff --git a/packages/services/src/view-service/unbonding-tokens-by-address-index/index.test.ts b/packages/services/src/view-service/unbonding-tokens-by-address-index/index.test.ts index ec79a0d42a..ab1d703a6b 100644 --- a/packages/services/src/view-service/unbonding-tokens-by-address-index/index.test.ts +++ b/packages/services/src/view-service/unbonding-tokens-by-address-index/index.test.ts @@ -10,8 +10,8 @@ import { ViewService } from '@buf/penumbra-zone_penumbra.connectrpc_es/penumbra/ import { createHandlerContext } from '@connectrpc/connect'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { unbondingTokensByAddressIndex } from '.'; -import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; -import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/value-view'; const mockBalances = vi.hoisted(() => vi.fn()); vi.mock('../balances', () => ({ diff --git a/packages/services/src/view-service/unclaimed-swaps.test.ts b/packages/services/src/view-service/unclaimed-swaps.test.ts index 9f93e9f8ef..8bfb65452c 100644 --- a/packages/services/src/view-service/unclaimed-swaps.test.ts +++ b/packages/services/src/view-service/unclaimed-swaps.test.ts @@ -11,7 +11,7 @@ import { UnclaimedSwapsResponse, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { IndexedDbMock, MockServices } from '../test-utils'; -import { Services } from '@penumbra-zone/services-context/src/index'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; import { unclaimedSwaps } from './unclaimed-swaps'; describe('UnclaimedSwaps request handler', () => { @@ -44,7 +44,10 @@ describe('UnclaimedSwaps request handler', () => { protocolName: 'mock', requestMethod: 'MOCK', url: '/mock', - contextValues: createContextValues().set(servicesCtx, mockServices as unknown as Services), + contextValues: createContextValues().set( + servicesCtx, + mockServices as unknown as ServicesInterface, + ), }); for (const record of testData) { diff --git a/packages/services/src/view-service/util/build-tx.ts b/packages/services/src/view-service/util/build-tx.ts index 041e9db3d8..689d67f71e 100644 --- a/packages/services/src/view-service/util/build-tx.ts +++ b/packages/services/src/view-service/util/build-tx.ts @@ -13,7 +13,7 @@ import { import { PartialMessage } from '@bufbuild/protobuf'; import { ConnectError } from '@connectrpc/connect'; -import '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import '@penumbra-zone/polyfills/Promise.withResolvers'; import { FullViewingKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; export const optimisticBuild = async function* ( diff --git a/packages/services/src/view-service/wallet-id.ts b/packages/services/src/view-service/wallet-id.ts index 49f3a37300..4e86f6fb0a 100644 --- a/packages/services/src/view-service/wallet-id.ts +++ b/packages/services/src/view-service/wallet-id.ts @@ -2,7 +2,7 @@ import type { Impl } from '.'; import { extLocalCtx } from '../ctx/prax'; import { WalletId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; import { Code, ConnectError } from '@connectrpc/connect'; -import { stringToUint8Array } from '@penumbra-zone/types/src/string'; +import { stringToUint8Array } from '@penumbra-zone/types/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/services/src/view-service/witness.test.ts b/packages/services/src/view-service/witness.test.ts index 3c5f3fec03..ab01fbbf82 100644 --- a/packages/services/src/view-service/witness.test.ts +++ b/packages/services/src/view-service/witness.test.ts @@ -12,7 +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'; +import type { ServicesInterface } from '@penumbra-zone/types/services'; describe('Witness request handler', () => { let mockServices: MockServices; diff --git a/packages/storage/src/chrome/base.ts b/packages/storage/src/chrome/base.ts index c51c50cbc8..fe2f237bb7 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/src/utility'; +import { EmptyObject, isEmptyObj } from '@penumbra-zone/types/utility'; type Listener = (changes: Record) => void; diff --git a/packages/storage/src/chrome/local.ts b/packages/storage/src/chrome/local.ts index 3349545f70..1f809d6738 100644 --- a/packages/storage/src/chrome/local.ts +++ b/packages/storage/src/chrome/local.ts @@ -1,5 +1,5 @@ import { ExtensionStorage } from './base'; -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; import { v1Migrations } from './v1-migration'; import { LocalStorageState, LocalStorageVersion } from './types'; diff --git a/packages/storage/src/chrome/types.ts b/packages/storage/src/chrome/types.ts index 0aa9a82cfa..9416871482 100644 --- a/packages/storage/src/chrome/types.ts +++ b/packages/storage/src/chrome/types.ts @@ -1,5 +1,5 @@ -import { UserChoice } from '@penumbra-zone/types/src/user-choice'; -import { WalletJson } from '@penumbra-zone/types/src/wallet'; +import { UserChoice } from '@penumbra-zone/types/user-choice'; +import { WalletJson } from '@penumbra-zone/types/wallet'; import { KeyPrintJson } from '@penumbra-zone/crypto-web/encryption'; export enum LocalStorageVersion { diff --git a/packages/storage/src/indexed-db/index.ts b/packages/storage/src/indexed-db/index.ts index 16854b0fb4..de1ccaaf4f 100644 --- a/packages/storage/src/indexed-db/index.ts +++ b/packages/storage/src/indexed-db/index.ts @@ -23,7 +23,7 @@ import { AddressIndex, WalletId, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; -import { assetPatterns, PRICE_RELEVANCE_THRESHOLDS } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns, PRICE_RELEVANCE_THRESHOLDS } from '@penumbra-zone/constants/assets'; import { Position, PositionId, @@ -34,28 +34,28 @@ import { AppParameters } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/ import { IdbCursorSource } from './stream'; -import '@penumbra-zone/polyfills/src/ReadableStream[Symbol.asyncIterator]'; +import '@penumbra-zone/polyfills/ReadableStream[Symbol.asyncIterator]'; 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'; import { bech32mAssetId } from '@penumbra-zone/bech32m/passet'; import { bech32mIdentityKey, identityKeyFromBech32m } from '@penumbra-zone/bech32m/penumbravalid'; -import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info'; +import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/validator-info'; import { IDB_TABLES, IdbConstants, IdbUpdate, IndexedDbInterface, PenumbraDb, -} from '@penumbra-zone/types/src/indexed-db'; +} from '@penumbra-zone/types/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'; +} from '@penumbra-zone/types/state-commitment-tree'; +import { uint8ArrayToBase64 } from '@penumbra-zone/types/base64'; +import type { Jsonified } from '@penumbra-zone/types/jsonified'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; import { bech32mWalletId } from '@penumbra-zone/bech32m/penumbrawalletid'; -import { getAssetId } from '@penumbra-zone/getters/src/metadata'; +import { getAssetId } from '@penumbra-zone/getters/metadata'; 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 e0b1ba0558..3fe4893514 100644 --- a/packages/storage/src/indexed-db/indexed-db.test-data.ts +++ b/packages/storage/src/indexed-db/indexed-db.test-data.ts @@ -11,7 +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'; +import type { ScanBlockResult } from '@penumbra-zone/types/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 72eb431cb7..1acaa1628a 100644 --- a/packages/storage/src/indexed-db/indexed-db.test.ts +++ b/packages/storage/src/indexed-db/indexed-db.test.ts @@ -47,7 +47,7 @@ import { EstimatedPrice, Metadata, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import type { IdbUpdate, PenumbraDb } from '@penumbra-zone/types/src/indexed-db'; +import type { IdbUpdate, PenumbraDb } from '@penumbra-zone/types/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 f3b137abbf..eb760f708b 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 { IDBPCursorWithValue } from 'idb'; -import type { PenumbraDb, PenumbraStoreNames } from '@penumbra-zone/types/src/indexed-db'; +import type { PenumbraDb, PenumbraStoreNames } from '@penumbra-zone/types/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 efdd235b18..c9655f3ff7 100644 --- a/packages/storage/src/indexed-db/updater.ts +++ b/packages/storage/src/indexed-db/updater.ts @@ -1,5 +1,5 @@ import { IDBPDatabase, StoreNames } from 'idb'; -import type { IdbUpdate, PenumbraDb } from '@penumbra-zone/types/src/indexed-db'; +import type { IdbUpdate, PenumbraDb } from '@penumbra-zone/types/indexed-db'; export class IbdUpdates { constructor(readonly all: IdbUpdate>[] = []) {} diff --git a/packages/transport-chrome/src/message.ts b/packages/transport-chrome/src/message.ts index 37b6e31130..ce5e7ed74b 100644 --- a/packages/transport-chrome/src/message.ts +++ b/packages/transport-chrome/src/message.ts @@ -1,4 +1,4 @@ -import { isTransportEvent, TransportEvent } from '@penumbra-zone/transport-dom/src/messages'; +import { isTransportEvent, TransportEvent } from '@penumbra-zone/transport-dom/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/src/session-client.ts b/packages/transport-chrome/src/session-client.ts index d482ac6a1c..15e71aa8c9 100644 --- a/packages/transport-chrome/src/session-client.ts +++ b/packages/transport-chrome/src/session-client.ts @@ -19,7 +19,7 @@ import { isTransportMessage, isTransportStream, TransportStream, -} from '@penumbra-zone/transport-dom/src/messages'; +} from '@penumbra-zone/transport-dom/messages'; import { ChannelLabel, nameConnection } from './channel-names'; import { isTransportInitChannel, TransportInitChannel } from './message'; import { PortStreamSink, PortStreamSource } from './stream'; diff --git a/packages/transport-chrome/src/session-manager.ts b/packages/transport-chrome/src/session-manager.ts index 3050fc050e..100ab5e036 100644 --- a/packages/transport-chrome/src/session-manager.ts +++ b/packages/transport-chrome/src/session-manager.ts @@ -3,13 +3,13 @@ import { errorToJson } from '@connectrpc/connect/protocol-connect'; 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 { ChannelHandlerFn } from '@penumbra-zone/transport-dom/adapter'; import { isTransportMessage, TransportEvent, TransportMessage, TransportStream, -} from '@penumbra-zone/transport-dom/src/messages'; +} from '@penumbra-zone/transport-dom/messages'; interface CRSession { clientId: string; @@ -131,8 +131,11 @@ export class CRSessionManager { return this.handler(message) .then(response => response instanceof ReadableStream - ? this.responseChannelStream(signal, { requestId, stream: response }) - : { requestId, message: response }, + ? this.responseChannelStream(signal, { + requestId, + stream: response as unknown, + } as TransportStream) + : ({ requestId, message: response as unknown } as TransportEvent), ) .catch((error: unknown) => ({ requestId, diff --git a/packages/transport-dom/package.json b/packages/transport-dom/package.json index b9cf0ade80..543c1aa3ea 100644 --- a/packages/transport-dom/package.json +++ b/packages/transport-dom/package.json @@ -9,6 +9,9 @@ "lint": "eslint \"**/*.ts*\"", "test": "vitest run" }, + "exports": { + "./*": "./src/*.ts" + }, "publishConfig": { "files": [ "dist" diff --git a/packages/transport-dom/src/adapter.ts b/packages/transport-dom/src/adapter.ts index a7e0582865..e0c483c6b7 100644 --- a/packages/transport-dom/src/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/src/ReadableStream.from'; +import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; // see https://github.com/connectrpc/connect-es/pull/925 // hopefully also simplifies transport call soon diff --git a/packages/transport-dom/src/create.test.ts b/packages/transport-dom/src/create.test.ts index e512801c6f..095b8662a4 100644 --- a/packages/transport-dom/src/create.test.ts +++ b/packages/transport-dom/src/create.test.ts @@ -10,8 +10,8 @@ import { import { createRegistry } from '@bufbuild/protobuf'; import { TransportMessage } from './messages'; -import ReadableStream from '@penumbra-zone/polyfills/src/ReadableStream.from'; -import Array from '@penumbra-zone/polyfills/src/Array.fromAsync'; +import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; +import Array from '@penumbra-zone/polyfills/Array.fromAsync'; const typeRegistry = createRegistry(ElizaService); diff --git a/packages/transport-dom/src/create.ts b/packages/transport-dom/src/create.ts index 4028eb2206..2c8c2d4336 100644 --- a/packages/transport-dom/src/create.ts +++ b/packages/transport-dom/src/create.ts @@ -22,9 +22,9 @@ import { TransportStream, } from './messages'; -import '@penumbra-zone/polyfills/src/ReadableStream[Symbol.asyncIterator]'; -import ReadableStream from '@penumbra-zone/polyfills/src/ReadableStream.from'; -import '@penumbra-zone/polyfills/src/Promise.withResolvers'; +import '@penumbra-zone/polyfills/ReadableStream[Symbol.asyncIterator]'; +import ReadableStream from '@penumbra-zone/polyfills/ReadableStream.from'; +import '@penumbra-zone/polyfills/Promise.withResolvers'; const forceTransportOptions = { httpClient: null as never, diff --git a/packages/transport-dom/src/stream.test.ts b/packages/transport-dom/src/stream.test.ts index 8d53e8410c..d5fce03433 100644 --- a/packages/transport-dom/src/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/src/ReadableStream.from'; +import ReadableStream from '@penumbra-zone/polyfills/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/types/package.json b/packages/types/package.json index 61a34b03f1..e3aab6f656 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -10,16 +10,16 @@ "test": "vitest run" }, "exports": { - "./src/*": "./src/*.ts", - "./src/internal-msg/*": "./src/internal-msg/*.ts" + "./*": "./src/*.ts", + "./internal-msg/*": "./src/internal-msg/*.ts" }, "publishConfig": { "files": [ "dist" ], "exports": { - "./src/*": "./dist/*.js", - "./src/internal-msg/*": "./dist/internal-msg/*.js" + "./*": "./dist/*.js", + "./internal-msg/*": "./dist/internal-msg/*.js" } }, "dependencies": { diff --git a/packages/types/src/amount.ts b/packages/types/src/amount.ts index 1e5a4dbd4d..1e116b243b 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/src/metadata'; +import { getDisplayDenomExponent } from '@penumbra-zone/getters/metadata'; export const joinLoHiAmount = (amount: Amount): bigint => { return joinLoHi(amount.lo, amount.hi); diff --git a/packages/types/src/staking.test.ts b/packages/types/src/staking.test.ts index 615a6ab193..a67a5dc445 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 { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; -import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/src/validator-info'; +import { getIdentityKeyFromValidatorInfo } from '@penumbra-zone/getters/validator-info'; describe('calculateCommission()', () => { const validatorInfo = new ValidatorInfo({ diff --git a/packages/types/src/staking.ts b/packages/types/src/staking.ts index c1ee7649b1..46e782b92c 100644 --- a/packages/types/src/staking.ts +++ b/packages/types/src/staking.ts @@ -9,13 +9,13 @@ import { getIdentityKeyFromValidatorInfo, getStateEnumFromValidatorInfo, getVotingPowerFromValidatorInfo, -} from '@penumbra-zone/getters/src/validator-info'; -import { getRateBpsFromFundingStream } from '@penumbra-zone/getters/src/funding-stream'; +} from '@penumbra-zone/getters/validator-info'; +import { getRateBpsFromFundingStream } from '@penumbra-zone/getters/funding-stream'; import { joinLoHiAmount } from './amount'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; -import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/value-view'; export const getStateLabel = (validatorInfo: ValidatorInfo): string => ValidatorState_ValidatorStateEnum[getStateEnumFromValidatorInfo(validatorInfo)]; diff --git a/packages/types/src/swap.ts b/packages/types/src/swap.ts index be268b4544..619c5b8436 100644 --- a/packages/types/src/swap.ts +++ b/packages/types/src/swap.ts @@ -5,11 +5,11 @@ import { getDelta2IFromSwapView, getOutput1ValueOptional, getOutput2ValueOptional, -} from '@penumbra-zone/getters/src/swap-view'; +} from '@penumbra-zone/getters/swap-view'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { SwapView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; import { isZero } from './amount'; -import { getAmount } from '@penumbra-zone/getters/src/value-view'; +import { getAmount } from '@penumbra-zone/getters/value-view'; /** * Swaps can go in either direction in Penumbra, and can even go in both diff --git a/packages/ui/components/ui/tx/view/asset-icon/delegation-token-icon.tsx b/packages/ui/components/ui/tx/view/asset-icon/delegation-token-icon.tsx index 69b03e83f2..867eac28a9 100644 --- a/packages/ui/components/ui/tx/view/asset-icon/delegation-token-icon.tsx +++ b/packages/ui/components/ui/tx/view/asset-icon/delegation-token-icon.tsx @@ -1,4 +1,4 @@ -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; const getFirstEightCharactersOfValidatorId = (displayDenom = ''): [string, string] => { const id = (assetPatterns.delegationToken.capture(displayDenom)?.id ?? '').substring(0, 8); diff --git a/packages/ui/components/ui/tx/view/asset-icon/index.tsx b/packages/ui/components/ui/tx/view/asset-icon/index.tsx index 8e831a0ff4..1369b53d9b 100644 --- a/packages/ui/components/ui/tx/view/asset-icon/index.tsx +++ b/packages/ui/components/ui/tx/view/asset-icon/index.tsx @@ -2,8 +2,8 @@ import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/ import { Identicon } from '../../../identicon'; import { cn } from '../../../../../lib/utils'; import { DelegationTokenIcon } from './delegation-token-icon'; -import { getDisplay } from '@penumbra-zone/getters/src/metadata'; -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { getDisplay } from '@penumbra-zone/getters/metadata'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; import { UnbondingTokenIcon } from './unbonding-token-icon'; export const AssetIcon = ({ diff --git a/packages/ui/components/ui/tx/view/asset-icon/unbonding-token-icon.tsx b/packages/ui/components/ui/tx/view/asset-icon/unbonding-token-icon.tsx index e6e411316a..15395995ec 100644 --- a/packages/ui/components/ui/tx/view/asset-icon/unbonding-token-icon.tsx +++ b/packages/ui/components/ui/tx/view/asset-icon/unbonding-token-icon.tsx @@ -1,4 +1,4 @@ -import { assetPatterns } from '@penumbra-zone/constants/src/assets'; +import { assetPatterns } from '@penumbra-zone/constants/assets'; const getFirstEightCharactersOfValidatorId = (displayDenom = ''): [string, string] => { const id = (assetPatterns.unbondingToken.capture(displayDenom)?.id ?? '').substring(0, 8); diff --git a/packages/ui/components/ui/tx/view/delegate.tsx b/packages/ui/components/ui/tx/view/delegate.tsx index 7d9ba55fcf..d88f24509f 100644 --- a/packages/ui/components/ui/tx/view/delegate.tsx +++ b/packages/ui/components/ui/tx/view/delegate.tsx @@ -1,6 +1,6 @@ import { Delegate } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ViewBox } from './viewbox'; -import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { joinLoHiAmount } from '@penumbra-zone/types/amount'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; import { ActionDetails } from './action-details'; diff --git a/packages/ui/components/ui/tx/view/isc20-withdrawal.tsx b/packages/ui/components/ui/tx/view/isc20-withdrawal.tsx index d5e9cc38d6..cd9d5a043a 100644 --- a/packages/ui/components/ui/tx/view/isc20-withdrawal.tsx +++ b/packages/ui/components/ui/tx/view/isc20-withdrawal.tsx @@ -1,7 +1,7 @@ import { Ics20Withdrawal } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/ibc/v1/ibc_pb'; import { ViewBox } from './viewbox'; import { ActionDetails } from './action-details'; -import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { joinLoHiAmount } from '@penumbra-zone/types/amount'; import { bech32mAddress } from '@penumbra-zone/bech32m/penumbra'; export const Ics20WithdrawalComponent = ({ value }: { value: Ics20Withdrawal }) => { diff --git a/packages/ui/components/ui/tx/view/output.tsx b/packages/ui/components/ui/tx/view/output.tsx index 5eb3f9d7e0..62ba2bf5d4 100644 --- a/packages/ui/components/ui/tx/view/output.tsx +++ b/packages/ui/components/ui/tx/view/output.tsx @@ -2,8 +2,8 @@ import { OutputView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/cor import { ViewBox } from './viewbox'; import { ValueViewComponent } from './value'; import { ValueWithAddress } from './value-with-address'; -import { getNote } from '@penumbra-zone/getters/src/output-view'; -import { getAddress } from '@penumbra-zone/getters/src/note-view'; +import { getNote } from '@penumbra-zone/getters/output-view'; +import { getAddress } from '@penumbra-zone/getters/note-view'; export const OutputViewComponent = ({ value }: { value: OutputView }) => { if (value.outputView.case === 'visible') { diff --git a/packages/ui/components/ui/tx/view/spend.tsx b/packages/ui/components/ui/tx/view/spend.tsx index 8bf6619cd0..b6c20cf2d1 100644 --- a/packages/ui/components/ui/tx/view/spend.tsx +++ b/packages/ui/components/ui/tx/view/spend.tsx @@ -2,8 +2,8 @@ import { SpendView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core import { ViewBox } from './viewbox'; import { ValueViewComponent } from './value'; import { ValueWithAddress } from './value-with-address'; -import { getNote } from '@penumbra-zone/getters/src/spend-view'; -import { getAddress } from '@penumbra-zone/getters/src/note-view'; +import { getNote } from '@penumbra-zone/getters/spend-view'; +import { getAddress } from '@penumbra-zone/getters/note-view'; export const SpendViewComponent = ({ value }: { value: SpendView }) => { if (value.spendView.case === 'visible') { diff --git a/packages/ui/components/ui/tx/view/swap-claim.tsx b/packages/ui/components/ui/tx/view/swap-claim.tsx index 0c3eb703c7..5ddaa8803e 100644 --- a/packages/ui/components/ui/tx/view/swap-claim.tsx +++ b/packages/ui/components/ui/tx/view/swap-claim.tsx @@ -5,9 +5,9 @@ import { ActionDetails } from './action-details'; import { getOutput1ValueOptional, getOutput2ValueOptional, -} from '@penumbra-zone/getters/src/swap-claim-view'; -import { getAmount } from '@penumbra-zone/getters/src/value-view'; -import { isZero } from '@penumbra-zone/types/src/amount'; +} from '@penumbra-zone/getters/swap-claim-view'; +import { getAmount } from '@penumbra-zone/getters/value-view'; +import { isZero } from '@penumbra-zone/types/amount'; import { ValueViewComponent } from './value'; import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; import { UnimplementedView } from './unimplemented-view'; diff --git a/packages/ui/components/ui/tx/view/swap/index.tsx b/packages/ui/components/ui/tx/view/swap/index.tsx index 73bbac3d00..4a0390b7ff 100644 --- a/packages/ui/components/ui/tx/view/swap/index.tsx +++ b/packages/ui/components/ui/tx/view/swap/index.tsx @@ -1,19 +1,19 @@ import { ViewBox } from '../viewbox'; import { SwapView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb'; import { TransactionIdComponent } from '../transaction-id'; -import { getOneWaySwapValues, isOneWaySwap } from '@penumbra-zone/types/src/swap'; +import { getOneWaySwapValues, isOneWaySwap } from '@penumbra-zone/types/swap'; import { OneWaySwap } from './one-way-swap'; import { ValueWithAddress } from '../value-with-address'; import { getAddressView, getClaimFeeFromSwapView, getClaimTx, -} from '@penumbra-zone/getters/src/swap-view'; +} from '@penumbra-zone/getters/swap-view'; import { ValueViewComponent } from '../value'; import { ActionDetails } from '../action-details'; import { UnimplementedView } from '../unimplemented-view'; -import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; -import { getAmount } from '@penumbra-zone/getters/src/fee'; +import { joinLoHiAmount } from '@penumbra-zone/types/amount'; +import { getAmount } from '@penumbra-zone/getters/fee'; export const SwapViewComponent = ({ value }: { value: SwapView }) => { if (value.swapView.case === 'visible') { diff --git a/packages/ui/components/ui/tx/view/swap/one-way-swap.tsx b/packages/ui/components/ui/tx/view/swap/one-way-swap.tsx index d5c3af8ca5..6a9c1d78bb 100644 --- a/packages/ui/components/ui/tx/view/swap/one-way-swap.tsx +++ b/packages/ui/components/ui/tx/view/swap/one-way-swap.tsx @@ -1,7 +1,7 @@ import { ValueViewComponent } from '../value'; import { ArrowRight } from 'lucide-react'; import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { getAmount, getSymbolFromValueView } from '@penumbra-zone/getters/src/value-view'; +import { getAmount, getSymbolFromValueView } from '@penumbra-zone/getters/value-view'; /** * Renders a one-way swap (which should be the only kind of swap that ever diff --git a/packages/ui/components/ui/tx/view/transaction-id.tsx b/packages/ui/components/ui/tx/view/transaction-id.tsx index 0a02d44aa2..ffffc82d32 100644 --- a/packages/ui/components/ui/tx/view/transaction-id.tsx +++ b/packages/ui/components/ui/tx/view/transaction-id.tsx @@ -1,7 +1,7 @@ import { TransactionId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/txhash/v1/txhash_pb'; import { Pill } from '../../pill'; -import { uint8ArrayToHex } from '@penumbra-zone/types/src/hex'; -import { shorten } from '@penumbra-zone/types/src/string'; +import { uint8ArrayToHex } from '@penumbra-zone/types/hex'; +import { shorten } from '@penumbra-zone/types/string'; /** * Renders a SHA-256 hash of a transaction ID in a pill. diff --git a/packages/ui/components/ui/tx/view/transaction.tsx b/packages/ui/components/ui/tx/view/transaction.tsx index 5bbee4d3ea..84bfc32895 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/src/amount'; +import { joinLoHiAmount } from '@penumbra-zone/types/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 f6b8367967..841ed7ff6f 100644 --- a/packages/ui/components/ui/tx/view/undelegate-claim.tsx +++ b/packages/ui/components/ui/tx/view/undelegate-claim.tsx @@ -5,7 +5,7 @@ import { ActionDetails } from './action-details'; import { getUnbondingStartHeightFromUndelegateClaim, getValidatorIdentityFromUndelegateClaim, -} from '@penumbra-zone/getters/src/undelegate-claim'; +} from '@penumbra-zone/getters/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 764e08419a..629c58b900 100644 --- a/packages/ui/components/ui/tx/view/undelegate.tsx +++ b/packages/ui/components/ui/tx/view/undelegate.tsx @@ -1,6 +1,6 @@ import { Undelegate } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/stake/v1/stake_pb'; import { ViewBox } from './viewbox'; -import { joinLoHiAmount } from '@penumbra-zone/types/src/amount'; +import { joinLoHiAmount } from '@penumbra-zone/types/amount'; import { bech32mIdentityKey } from '@penumbra-zone/bech32m/penumbravalid'; import { ActionDetails } from './action-details'; diff --git a/packages/ui/components/ui/tx/view/value/index.test.tsx b/packages/ui/components/ui/tx/view/value/index.test.tsx index ca73eec788..061aa8ccc2 100644 --- a/packages/ui/components/ui/tx/view/value/index.test.tsx +++ b/packages/ui/components/ui/tx/view/value/index.test.tsx @@ -6,7 +6,7 @@ import { ValueView, } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; import { bech32mAssetId } from '@penumbra-zone/bech32m/passet'; -import { base64ToUint8Array } from '@penumbra-zone/types/src/base64'; +import { base64ToUint8Array } from '@penumbra-zone/types/base64'; describe('', () => { const penumbraMetadata = new Metadata({ diff --git a/packages/ui/components/ui/tx/view/value/index.tsx b/packages/ui/components/ui/tx/view/value/index.tsx index 6de9de87eb..ee5f22707f 100644 --- a/packages/ui/components/ui/tx/view/value/index.tsx +++ b/packages/ui/components/ui/tx/view/value/index.tsx @@ -1,11 +1,11 @@ import { ValueView } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; -import { getDisplayDenomFromView } from '@penumbra-zone/getters/src/value-view'; -import { getDisplayDenomExponent } from '@penumbra-zone/getters/src/metadata'; +import { getDisplayDenomFromView } from '@penumbra-zone/getters/value-view'; +import { getDisplayDenomExponent } from '@penumbra-zone/getters/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 { fromBaseUnitAmount } from '@penumbra-zone/types/src/amount'; +import { fromBaseUnitAmount } from '@penumbra-zone/types/amount'; import { Pill } from '../../../pill'; interface ValueViewProps { diff --git a/packages/ui/lib/toast/transaction-toast.tsx b/packages/ui/lib/toast/transaction-toast.tsx index b247152077..f23b6afbe1 100644 --- a/packages/ui/lib/toast/transaction-toast.tsx +++ b/packages/ui/lib/toast/transaction-toast.tsx @@ -9,7 +9,7 @@ import { Progress } from '../../components/ui/progress'; import { ReactNode } from 'react'; import { TransactionClassification } from '@penumbra-zone/perspective/transaction/classification'; import { TRANSACTION_LABEL_BY_CLASSIFICATION } from '@penumbra-zone/perspective/transaction/classify'; -import { shorten } from '@penumbra-zone/types/src/string'; +import { shorten } from '@penumbra-zone/types/string'; type BroadcastStatus = BroadcastTransactionResponse['status']; type BuildStatus = (AuthorizeAndBuildResponse | WitnessAndBuildResponse)['status']; diff --git a/packages/wasm/src/build.ts b/packages/wasm/src/build.ts index 386ee37a1d..8ce4b3aa2a 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 type { StateCommitmentTree } from '@penumbra-zone/types/src/state-commitment-tree'; +import type { StateCommitmentTree } from '@penumbra-zone/types/state-commitment-tree'; import { authorize, build_action, build_parallel, load_proving_key, witness } from '../wasm'; import { FullViewingKey, diff --git a/packages/wasm/src/planner.ts b/packages/wasm/src/planner.ts index c384998170..e5b96e4523 100644 --- a/packages/wasm/src/planner.ts +++ b/packages/wasm/src/planner.ts @@ -2,7 +2,7 @@ import { TransactionPlan } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbr import { TransactionPlannerRequest } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; import { JsonValue } from '@bufbuild/protobuf'; import { plan_transaction } from '../wasm'; -import type { IdbConstants } from '@penumbra-zone/types/src/indexed-db'; +import type { IdbConstants } from '@penumbra-zone/types/indexed-db'; import { FullViewingKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; export const planTransaction = async ( diff --git a/packages/wasm/src/transaction.ts b/packages/wasm/src/transaction.ts index f3530bff4a..858a0c4006 100644 --- a/packages/wasm/src/transaction.ts +++ b/packages/wasm/src/transaction.ts @@ -4,7 +4,7 @@ import { 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'; +import type { IdbConstants } from '@penumbra-zone/types/indexed-db'; import { JsonValue } from '@bufbuild/protobuf'; import { FullViewingKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; diff --git a/packages/wasm/src/view-server.test.ts b/packages/wasm/src/view-server.test.ts index 828650a3c7..8624946492 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/src/indexed-db'; +import { IDB_TABLES, IdbConstants } from '@penumbra-zone/types/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 e1a3fdcf72..d8257eed10 100644 --- a/packages/wasm/src/view-server.ts +++ b/packages/wasm/src/view-server.ts @@ -10,10 +10,10 @@ 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'; +} from '@penumbra-zone/types/state-commitment-tree'; +import type { IdbConstants } from '@penumbra-zone/types/indexed-db'; +import type { ViewServerInterface } from '@penumbra-zone/types/servers'; +import { validateSchema } from '@penumbra-zone/types/validation'; import { FullViewingKey } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; interface ViewServerProps {