@xyo-network/react-chain-client 2.0.11 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/react-chain-client
2
4
 
3
5
  **DEPRECATED.** This package has been replaced by [`@xyo-network/xl1-react-client-sdk`](https://github.com/xylabs/xl1-protocol/tree/main/packages/react/packages/react-client-sdk) (or `@xyo-network/xl1-react-client-sdk/client` for the same surface as before). New code should depend on the replacement; existing dependents should migrate at their next opportunity.
@@ -20,9 +22,12 @@
20
22
 
21
23
  See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
22
24
 
25
+ ## Credits
23
26
 
27
+ [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
24
28
 
25
29
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/react-chain-client.svg
26
30
  [npm-link]: https://www.npmjs.com/package/@xyo-network/react-chain-client
27
31
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/react-chain-client.svg
28
32
  [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
33
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
@@ -8,11 +8,11 @@ export declare const useConnectAccount: (gatewayName?: GatewayName, timeout?: nu
8
8
  } & {
9
9
  readonly __address: true;
10
10
  }) | undefined;
11
- connectSigner: () => Promise<(Lowercase<string> & {
11
+ connectSigner: () => Promise<import("@xyo-network/address").XyoQuantAddress | (Lowercase<string> & {
12
12
  readonly __hex: true;
13
13
  } & {
14
14
  readonly __address: true;
15
- }) | import("@xyo-network/address").XyoQuant1Address | undefined>;
15
+ }) | undefined>;
16
16
  error: Error | undefined;
17
17
  gateway: import("@xyo-network/xl1-sdk").XyoGatewayRunner | null | undefined;
18
18
  timedout: boolean;
@@ -4,11 +4,11 @@ import {
4
4
  Tooltip,
5
5
  Typography
6
6
  } from "@mui/material";
7
- import { EthAddressWrapper } from "@xylabs/sdk-js";
7
+ import { shortenAddress } from "@xyo-network/react-chain-shared";
8
8
  import { BlockiesAvatarAddress } from "@xyo-network/xl1-blockies";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  var ConnectedAccount = ({ address }) => {
11
- const shortenedAddress = `${EthAddressWrapper.fromString(address)?.toShortString(4)}`;
11
+ const shortenedAddress = shortenAddress(address, 4);
12
12
  return /* @__PURE__ */ jsxs(
13
13
  Stack,
14
14
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/connected/account/Connected.tsx", "../../src/components/connected/ConnectAccountsStack.tsx", "../../src/components/connected/hooks/useConnectAccount.ts", "../../src/hooks/client/helpers/findCaveat.ts", "../../src/hooks/client/useClientFromWallet.ts", "../../src/hooks/helpers/getXyoClient.ts", "../../src/hooks/client/permissions/usePermissions.ts", "../../src/hooks/client/permissions/usePermissionsAccounts.ts", "../../src/hooks/client/useGatewayFromWallet.ts", "../../src/context/GatewayContext.ts", "../../src/context/in-page/InPageGatewaysContext.ts", "../../src/context/in-page/Provider.tsx", "../../src/context/in-page/lib/buildGateway.ts", "../../src/context/in-page/useProvidedInPageGateways.ts", "../../src/context/providers/GatewayProvider.tsx", "../../src/context/providers/WalletGatewayProvider.tsx", "../../src/context/useProvidedGateway.ts"],
4
- "sourcesContent": ["import {\n Stack, Tooltip, Typography,\n} from '@mui/material'\nimport { EthAddressWrapper } from '@xylabs/sdk-js'\nimport { BlockiesAvatarAddress } from '@xyo-network/xl1-blockies'\nimport React from 'react'\n\n/**\n * @deprecated Use {@link ConnectedAccount} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const ConnectedAccount: React.FC<{ address: string }> = ({ address }) => {\n const shortenedAddress = `${EthAddressWrapper.fromString(address)?.toShortString(4)}`\n\n return (\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center' }}\n >\n <BlockiesAvatarAddress address={address} size={21} />\n <Tooltip title={address}>\n <Typography\n variant=\"caption\"\n sx={{\n color: 'text.secondary',\n fontFamily: 'monospace',\n }}\n >\n {shortenedAddress}\n </Typography>\n </Tooltip>\n </Stack>\n )\n}\n", "import type { StackProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Button, Stack,\n Typography,\n} from '@mui/material'\nimport type { ButtonExProps } from '@xylabs/react-button'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { Address } from '@xylabs/sdk-js'\nimport { isDefined, isUndefined } from '@xylabs/sdk-js'\nimport type { ComponentType, MouseEventHandler } from 'react'\nimport React, { useEffect } from 'react'\n\nimport { ConnectedAccount } from './account/index.ts'\nimport { useConnectAccount } from './hooks/index.ts'\n\nconst DefaultConnectComponent: React.FC<ButtonExProps> = props => (\n <ButtonEx variant=\"contained\" size=\"small\" {...props} />\n)\n\nconst DefaultNoWalletInstalledComponent: React.FC = () => (\n <Alert severity=\"warning\">\n <AlertTitle>XL1 Wallet Not Found</AlertTitle>\n <Typography gutterBottom>\n Please ensure that your XL1 Wallet is installed to connect your account.\n </Typography>\n <Button\n sx={{ display: 'flex', justifySelf: 'end' }}\n size=\"small\"\n variant=\"outlined\"\n href=\"https://chromewebstore.google.com/detail/xl1-wallet/fblbagcjeigmhakkfgjpdlcapcgmcfbm\"\n target=\"_blank\"\n rel=\"noopener\"\n >\n Get XL1 Wallet\n </Button>\n </Alert>\n)\n\n/**\n * @deprecated Use {@link ConnectClientAccountsStackProps} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport interface ConnectClientAccountsStackProps extends StackProps {\n AccountComponent?: ComponentType<{ account?: string }>\n ConnectComponent?: ComponentType<{ onClick?: MouseEventHandler<HTMLElement> }>\n NoWalletInstalledComponent?: ComponentType\n onAccountConnected?: (account: Address) => void\n onCancel?: () => void\n timeout?: number\n}\n\n/**\n * Renders a horizontal stack that surfaces the current state of the user's\n * connection to an XL1 wallet (e.g. the XL1 Chrome extension) and lets them\n * kick off a connection.\n *\n * Connection state is derived from `useConnectAccount`, which wraps\n * `useGatewayFromWallet` (wallet/gateway discovery with a configurable\n * `timeout`) and `useAccountPermissions` (already-authorized addresses).\n * The hook returns: `address` (resolved once the wallet exposes one),\n * `connectSigner` (prompts the wallet for an address), `timedout` (the\n * gateway never appeared within `timeout`), and `error` (the first of\n * gateway, permissions, or signer-connect failures).\n *\n * The component renders exactly one of the following wallet states, plus\n * an always-present error slot:\n *\n * - **Connected** \u2014 `address` is defined: renders `AccountComponent` for\n * that address. Also fires `onAccountConnected(address)` once via effect.\n * - **Disconnected, wallet available** \u2014 no `address` and not `timedout`:\n * renders `ConnectComponent` as a \"Connect\" button that invokes\n * `connectSigner()`. This covers both \"wallet installed but no account\n * authorized yet\" and \"gateway still resolving\".\n * - **Wallet missing / unreachable** \u2014 no `address` and `timedout` is true:\n * renders `NoWalletInstalledComponent` (defaults to an Alert linking to\n * the XL1 Wallet Chrome Web Store listing).\n * - **Error** \u2014 any error from the hook is rendered via `ErrorRender`\n * alongside the state above, and `onCancel()` is fired once via effect\n * so the host UI can close/abort its connect flow.\n *\n * All three slot components (`AccountComponent`, `ConnectComponent`,\n * `NoWalletInstalledComponent`) are injectable so consumers can restyle\n * any state without forking this component.\n *\n * @deprecated Use {@link ConnectAccountsStack} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const ConnectAccountsStack: React.FC<ConnectClientAccountsStackProps> = ({\n AccountComponent = ConnectedAccount,\n ConnectComponent = DefaultConnectComponent,\n NoWalletInstalledComponent = DefaultNoWalletInstalledComponent,\n onAccountConnected,\n onCancel,\n timeout,\n ...props\n}) => {\n const {\n address, connectSigner, error, timedout,\n } = useConnectAccount(undefined, timeout)\n\n useEffect(() => {\n if (isDefined(error) && isDefined(onCancel)) {\n onCancel()\n }\n }, [error, onCancel])\n\n useEffect(() => {\n if (isDefined(address) && isDefined(onAccountConnected)) {\n onAccountConnected(address)\n }\n }, [address, onAccountConnected])\n\n return (\n <Stack\n direction=\"row\"\n spacing={2}\n {...props}\n sx={[{ alignItems: 'start' }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n {isDefined(address)\n ? <AccountComponent address={address} />\n : null}\n {isUndefined(address) && !timedout\n ? (\n <ConnectComponent onClick={() => void connectSigner()}>Connect</ConnectComponent>\n )\n : null}\n {isUndefined(address) && timedout\n ? (\n <NoWalletInstalledComponent />\n )\n : null}\n <ErrorRender error={error} scope=\"ConnectSigner:error\" />\n </Stack>\n )\n}\n", "import { asAddress, assertEx } from '@xylabs/sdk-js'\nimport type { XyoAddress } from '@xyo-network/address'\nimport type { GatewayName } from '@xyo-network/xl1-sdk'\nimport { MainNetwork } from '@xyo-network/xl1-sdk'\nimport { useCallback, useState } from 'react'\n\nimport { useAccountPermissions, useGatewayFromWallet } from '../../../hooks/index.ts'\n\n/**\n * @deprecated Use {@link useConnectAccount} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useConnectAccount = (gatewayName: GatewayName = MainNetwork.id, timeout?: number) => {\n const [connectError, setConnectError] = useState<Error>()\n\n const {\n gateway, error, timedout,\n } = useGatewayFromWallet(gatewayName, timeout)\n\n const [accountPermissions, accountPermissionsError] = useAccountPermissions()\n\n const [address, setAddress] = useState<XyoAddress>()\n\n const connectSigner = useCallback(async () => {\n try {\n setConnectError(undefined)\n const assertedGateway = assertEx(gateway, () => `Gateway ${gatewayName} is not available`)\n const signer = assertedGateway.signer\n const address = await signer.address()\n setAddress(address)\n return address\n } catch (e) {\n setConnectError(e as Error)\n }\n }, [gateway, gatewayName])\n\n return {\n address: asAddress(accountPermissions?.[0] ?? address), connectSigner, error: error ?? accountPermissionsError ?? connectError, gateway, timedout,\n }\n}\n", "import { isDefined } from '@xylabs/sdk-js'\nimport type {\n CaveatTypes, ParentCapability, XyoPermissions,\n} from '@xyo-network/xl1-sdk'\n\n/**\n * @deprecated Use {@link findCaveat} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const findCaveat = async (\n permissions: XyoPermissions,\n targetCapability: ParentCapability,\n targetCaveatType: CaveatTypes,\n) => {\n const existingPermissions = await permissions.getPermissions()\n if (isDefined(existingPermissions) && existingPermissions.length > 0) {\n const foundPermissions = existingPermissions\n .find(p => p.parentCapability === targetCapability)\n if (isDefined(foundPermissions)) {\n return foundPermissions.caveats?.find(caveat => caveat.type === targetCaveatType)?.value ?? []\n }\n }\n return existingPermissions\n}\n", "import { isUndefined } from '@xylabs/sdk-js'\nimport type { XyoClient } from '@xyo-network/xl1-sdk'\nimport { useEffect, useState } from 'react'\n\nimport { getXyoClient } from '../helpers/index.ts'\n\ninterface ClientState {\n client?: XyoClient | null\n error: Error | null\n isLoading: boolean\n timedout: boolean\n}\n\nconst initialState: ClientState = {\n client: undefined,\n error: null,\n isLoading: false,\n timedout: false,\n}\n\n/**\n * @deprecated Use {@link useClientFromWallet} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useClientFromWallet = (timeout?: number): ClientState => {\n const [state, setState] = useState<ClientState>(initialState)\n\n useEffect(() => {\n let cancelled = false\n\n const initialize = async () => {\n setState((prev) => {\n if (prev.isLoading) return prev\n return {\n ...prev, isLoading: true, error: null,\n }\n })\n\n try {\n const client = await getXyoClient(timeout)\n if (cancelled) return\n if (client === null) {\n setState({\n client: null, timedout: true, isLoading: false, error: null,\n })\n } else {\n setState({\n client, isLoading: false, error: null, timedout: false,\n })\n }\n } catch (error) {\n if (cancelled) return\n setState({\n client: undefined, isLoading: false, error: error as Error, timedout: false,\n })\n }\n }\n\n void initialize()\n\n // Late recovery: if wallet loads after timeout, update state\n const onPluginReady = () => {\n if (cancelled) return\n const client = isUndefined(globalThis.xyo) ? null : globalThis.xyo?.client ?? null\n setState({\n client, isLoading: false, timedout: false, error: null,\n })\n }\n globalThis.addEventListener('xyo:plugin-ready', onPluginReady)\n\n return () => {\n cancelled = true\n globalThis.removeEventListener('xyo:plugin-ready', onPluginReady)\n }\n }, [timeout])\n\n return state\n}\n\n/** @deprecated - use useClientFromWallet instead */\nexport const useClient = useClientFromWallet\n", "import { isUndefined } from '@xylabs/sdk-js'\nimport type { XyoClient } from '@xyo-network/xl1-sdk'\n\nconst CLIENT_LISTENER_TIMEOUT = 2000\n\nconst hasXyoClient = () => {\n return 'client' in globalThis.xyo\n}\n\n/**\n * @deprecated Use {@link listenForClientInjection} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const listenForClientInjection = (onClientReady: () => void, timeout: number, onTimeout: () => void) => {\n let resolved = false\n const listener: EventListener = () => {\n onClientReady()\n resolved = true\n }\n globalThis.addEventListener('xyo:plugin-ready', listener)\n setTimeout(() => {\n if (!resolved) {\n globalThis.removeEventListener('xyo:plugin-ready', listener)\n onTimeout()\n }\n }, timeout)\n}\n\ntype ReturnType = XyoClient | undefined | null\n\n/**\n * @deprecated Use {@link getXyoClient} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport async function getXyoClient(timeout = CLIENT_LISTENER_TIMEOUT): Promise<ReturnType> {\n // if no xyo object, we can bail early\n if (isUndefined(globalThis.xyo)) {\n return null\n }\n return hasXyoClient()\n ? globalThis.xyo.client\n // listen for the XyoWallet to be injected\n : await new Promise<ReturnType>((resolve) => {\n listenForClientInjection(\n () => {\n resolve(globalThis.xyo.client)\n },\n timeout,\n () => {\n resolve(null)\n },\n )\n })\n}\n", "import { useClientFromWallet } from '../useClientFromWallet.ts'\n\n/**\n * @deprecated Use {@link usePermissions} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const usePermissions = () => {\n const {\n client, isLoading, error, timedout,\n } = useClientFromWallet()\n const permissions = client?.permissions\n return {\n permissions,\n isLoading,\n error,\n timedout,\n }\n}\n", "import { usePromise } from '@xylabs/react-promise'\nimport type { JsonValue } from '@xylabs/sdk-js'\nimport {\n isArray, isDefined, isDefinedNotNull, isString,\n} from '@xylabs/sdk-js'\n\nimport { findCaveat } from '../helpers/index.ts'\nimport { usePermissions } from './usePermissions.ts'\n\nconst validateRestrictedAccounts = (restrictedAccounts: JsonValue): readonly string [] => {\n if (isDefined(restrictedAccounts)) {\n if (isArray(restrictedAccounts) && restrictedAccounts.every(isString)) {\n return restrictedAccounts\n }\n throw new Error(\n `Unrecognized format for restrictReturnedAccounts caveat found on permissions. \\n\n Should be an array of strings: ${JSON.stringify(restrictedAccounts)}`,\n )\n }\n return []\n}\n\n/**\n * @deprecated Use {@link useAccountPermissions} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useAccountPermissions = () => {\n const { permissions, error } = usePermissions()\n\n return usePromise(async () => {\n if (isDefinedNotNull(error)) throw error\n if (isDefined(permissions)) {\n const restrictedAccounts = await findCaveat(\n permissions,\n // TODO - extract to constant in protocol package\n 'xyoWallet_getAccounts',\n 'restrictReturnedAccounts',\n )\n return validateRestrictedAccounts(restrictedAccounts)\n }\n }, [permissions])\n}\n", "import { isNull } from '@xylabs/sdk-js'\nimport type { GatewayName } from '@xyo-network/xl1-sdk'\n\nimport type { GatewayFromWallet } from '../../types/index.ts'\nimport { useClientFromWallet } from './useClientFromWallet.ts'\n\n/**\n * Resolves a gateway from the injected XL1 Wallet extension.\n *\n * The returned `gateway` uses a three-state contract:\n * - `undefined` \u2014 wallet detection is still in progress (isLoading=true),\n * or no gatewayName was provided. Consumers should treat this as \"not yet known\"\n * and avoid committing to either a present or absent UI state.\n * - `null` \u2014 wallet is definitively absent. Either globalThis.xyo was never set,\n * or detection timed out. Safe to show fallback UI (e.g. \"Get XL1 Wallet\").\n * A late-recovery listener may still transition this to a real gateway if\n * the extension loads after the timeout.\n * - `XyoGatewayRunner` \u2014 wallet is present and exposes this gateway for the\n * requested network. Ready to use for transactions and queries.\n *\n * @deprecated Use {@link useGatewayFromWallet} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useGatewayFromWallet = (gatewayName?: GatewayName, timeout?: number): GatewayFromWallet => {\n const {\n client, isLoading, error, timedout,\n } = useClientFromWallet(timeout)\n\n const resolveGateway = () => {\n // null client = wallet confirmed absent (no globalThis.xyo or timed out)\n if (isNull(client)) return null\n // client is undefined (still loading) or defined (wallet present) \u2014\n // optional chain returns undefined while loading, or the gateway if available\n return client?.gateways?.[gatewayName!]\n }\n\n return {\n // no gatewayName requested = undefined (opt-out, not \"absent\")\n gateway: gatewayName ? resolveGateway() : undefined,\n isLoading,\n error,\n timedout,\n }\n}\n\n/** @deprecated - useGatewayFromWallet */\nexport const useGateway = useGatewayFromWallet\n", "import { createContextEx } from '@xylabs/react-shared'\n\nimport type { GatewayContextState } from './GatewayProviderState.ts'\n\n/**\n * Shared React context that decouples gateway *sources* from gateway\n * *consumers*. Any provider that can resolve an `XyoGateway` publishes to\n * this context; any hook or component that needs a gateway reads from it\n * via `useProvidedGateway`. Consumers never import a specific provider \u2014\n * they just require that *some* provider is mounted above them in the\n * tree.\n *\n * Current publishers:\n * - `WalletGatewayProvider` (this package) \u2014 sources gateways from the\n * injected XL1 wallet extension.\n * - `GatewayProvider` in `@xyo-network/react-chain-provider` \u2014 sources\n * gateways built in-page against RPC endpoints, falling back to the\n * wallet when available.\n *\n * To add a new source (e.g. a mock provider for tests, an iframe-bridged\n * provider, a server-rendered provider), publish a `GatewayContextState`\n * to this same context \u2014 do not create a parallel context, or consumers\n * will silently stop receiving updates.\n *\n * @deprecated Use {@link GatewayContext} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const GatewayContext = createContextEx<GatewayContextState>()\n", "import { createContextEx } from '@xylabs/react-shared'\n\nimport type { InPageGatewaysState } from './InPageGatewaysState.ts'\n\n/**\n * Narrow, provider-internal context that `InPageGatewaysProvider` writes\n * to and `GatewayProvider` reads from. Do not consume this in application\n * code \u2014 use `useProvidedGateway` (which reads the shared\n * `GatewayContext`) instead. This context only exists to decouple the\n * single in-page *builder* from the many single-gateway *adapters* that\n * sit between it and the shared gateway surface.\n *\n * @deprecated Use {@link InPageGatewaysContext} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const InPageGatewaysContext = createContextEx<InPageGatewaysState>()\n", "import type {\n GatewayName, RpcTransport, XyoSignerRpcSchemas,\n} from '@xyo-network/xl1-sdk'\nimport { DefaultNetworks } from '@xyo-network/xl1-sdk'\nimport type { PropsWithChildren } from 'react'\nimport React, {\n startTransition,\n useCallback, useEffect, useMemo, useState,\n} from 'react'\n\nimport type { ContextGatewayType } from '../../types/index.ts'\nimport { InPageGatewaysContext } from './InPageGatewaysContext.ts'\nimport type { InPageGatewaysState } from './InPageGatewaysState.ts'\nimport { buildGateway } from './lib/index.ts'\n\n/**\n * @deprecated Use {@link InPageGatewaysProviderProps} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport interface InPageGatewaysProviderProps extends PropsWithChildren {\n signerTransport?: RpcTransport<XyoSignerRpcSchemas>\n}\n\n/**\n * Publishes a keyed map of in-page gateways \u2014 one per network in\n * `DefaultNetworks` \u2014 under the narrow `InPageGatewaysContext`.\n *\n * This provider is deliberately *not* a direct publisher of the shared\n * `GatewayContext` that `useProvidedGateway` reads. Its consumer is the\n * wrapping `GatewayProvider` in this same package, which picks the\n * `gatewayName` the consumer asked for out of this map, adapts it into\n * the single-gateway `GatewayContextState` shape, and then publishes *that*\n * to the shared context. Splitting the work this way lets one\n * `InPageGatewaysProvider` near the root build every network's gateway\n * once, while many `GatewayProvider` instances deeper in the tree each\n * expose whichever gateway their subtree cares about.\n *\n * Unlike `WalletGatewayProvider`, gateways here are constructed directly\n * in the page (via `buildGateway`) against each network's RPC endpoint\n * \u2014 no browser wallet extension is required. `signerTransport` switches\n * between viewer (read-only) and runner (can sign/send) locators; supply\n * it only when the app needs to sign.\n *\n * Behavior:\n * - On mount, and whenever `signerTransport` changes, `buildGateway` is\n * called in parallel for every network in `DefaultNetworks` via\n * `Promise.allSettled`. Networks that resolve populate `gateways[id]`;\n * networks that reject populate `errors[id]`. One failed network does\n * not block the others.\n * - If `signerTransport` is provided, gateways are built with a remote\n * *runner* locator, otherwise with a remote *viewer* locator.\n * - When `signerTransport` changes identity mid-life, the provider clears\n * all cached gateways and errors synchronously during render (via\n * `previousSignerTransport` state) so consumers never see gateways\n * bound to the previous transport, then rebuilds in the effect.\n * - State updates from the rebuild are wrapped in `startTransition` so a\n * slow network doesn't stall higher-priority UI updates.\n * - A `cancelled` flag in the effect's cleanup discards results from a\n * prior `signerTransport` once a new one is in flight.\n *\n * Published `InPageGatewaysState` (narrower than `GatewayContextState` \u2014\n * this is an internal handoff shape, not the cross-publisher surface):\n * - `gateways` \u2014 `Partial<Record<GatewayName, ContextGatewayType>>`. Keys\n * are only present for networks that built successfully.\n * - `errors` \u2014 `Partial<Record<GatewayName, Error>>`. Per-network build\n * failures, keyed by `GatewayName`.\n * - `clearAll()` \u2014 manually empties both maps. Also invoked internally on\n * transport changes. Forwarded by `GatewayProvider` to consumers as\n * `resetGatewaysFromConfig`.\n * - `provided: true` \u2014 lets descendants detect a real provider.\n *\n * Note: the commented-out `SimpleXyoClient` at the top is intentionally\n * disabled pending a type unification between `XyoGateway` and\n * `XyoGatewayRunner`.\n *\n * @deprecated Use {@link InPageGatewaysProvider} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const InPageGatewaysProvider: React.FC<InPageGatewaysProviderProps> = ({ signerTransport, children }) => {\n const [gateways, setGateways] = useState<Partial<Record<GatewayName, ContextGatewayType>>>({})\n const [errors, setErrors] = useState<Partial<Record<GatewayName, Error>>>({})\n const [previousSignerTransport, setPreviousSignerTransport] = useState<RpcTransport<XyoSignerRpcSchemas> | undefined>(signerTransport)\n\n // This can come back once we homogenize the type for XyoGateway.\n // Right now, SimpleXyoClient takes XyoGatewayRunners but ideally it would take XyoGateway.\n // const clientInPage = useMemo(() => new SimpleXyoClient(gateways, {}), [gateways])\n\n const clearAll = useCallback(() => {\n setGateways({})\n setErrors({})\n }, [])\n\n if (previousSignerTransport !== signerTransport) {\n clearAll()\n setPreviousSignerTransport(signerTransport)\n }\n\n useEffect(() => {\n let cancelled = false\n\n const buildAll = async () => {\n const results = await Promise.allSettled(\n DefaultNetworks.map(async (network) => {\n const gateway = await buildGateway(network.id as GatewayName, signerTransport)\n return { id: network.id as GatewayName, gateway }\n }),\n )\n\n if (cancelled) return\n\n const nextGateways: Partial<Record<GatewayName, ContextGatewayType>> = {}\n const nextErrors: Partial<Record<GatewayName, Error>> = {}\n\n for (const [index, result] of results.entries()) {\n const networkId = DefaultNetworks[index].id as GatewayName\n if (result.status === 'fulfilled') {\n nextGateways[networkId] = result.value.gateway\n } else {\n nextErrors[networkId] = result.reason instanceof Error ? result.reason : new Error(String(result.reason))\n }\n }\n\n startTransition(() => {\n setGateways(nextGateways)\n setErrors(nextErrors)\n })\n }\n\n void buildAll()\n return () => {\n cancelled = true\n }\n }, [signerTransport])\n\n const value = useMemo(() => {\n const value: InPageGatewaysState = {\n clearAll,\n errors,\n gateways,\n provided: true,\n }\n return value\n }, [clearAll, errors, gateways])\n\n return <InPageGatewaysContext value={value}>{children}</InPageGatewaysContext>\n}\n", "import { assertEx, isDefined } from '@xylabs/sdk-js'\nimport type {\n GatewayName,\n RemoteConfig, RpcTransport, SimpleXyoGateway,\n XyoSignerRpcSchemas,\n} from '@xyo-network/xl1-sdk'\nimport {\n basicRemoteRunnerLocator,\n basicRemoteViewerLocator,\n DefaultNetworks, NetworkDataLakeUrls, XyoGatewayMoniker,\n} from '@xyo-network/xl1-sdk'\n\n/**\n * @deprecated Use {@link buildGateway} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const buildGateway = async (gatewayName: GatewayName, signerTransport?: RpcTransport<XyoSignerRpcSchemas>) => {\n const network = DefaultNetworks.find(network => network.id === gatewayName)\n const resolvedNetwork = assertEx(network, () => `No network found for id ${gatewayName}`)\n\n const remoteConfig: RemoteConfig = {\n rpc: {\n protocol: 'http',\n url: `${resolvedNetwork.url}/rpc`,\n },\n }\n\n const dataLakeEndpoint = NetworkDataLakeUrls[gatewayName]\n\n const locator = isDefined(signerTransport)\n ? await basicRemoteRunnerLocator(gatewayName, remoteConfig, signerTransport, dataLakeEndpoint)\n : await basicRemoteViewerLocator(gatewayName, remoteConfig, dataLakeEndpoint)\n\n return await locator.getInstance<SimpleXyoGateway>(XyoGatewayMoniker)\n}\n", "import { useContextEx } from '@xylabs/react-shared'\n\nimport { InPageGatewaysContext } from './InPageGatewaysContext.ts'\nimport type { InPageGatewaysState } from './InPageGatewaysState.ts'\n\n/**\n * Reads the `InPageGatewaysContext` map of per-network in-page gateways.\n * Intended for internal use by `GatewayProvider` \u2014 application code\n * should prefer `useProvidedGateway`, which returns a single resolved\n * gateway regardless of source.\n *\n * @param required - When `true` (default), throws if no\n * `InPageGatewaysProvider` is mounted above.\n *\n * @deprecated Use {@link useProvidedInPageGateways} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useProvidedInPageGateways = (required = true) => useContextEx<InPageGatewaysState>(InPageGatewaysContext, 'InPageGateways', required)\n", "import { ErrorRender } from '@xylabs/react-error'\nimport { isDefinedNotNull, isNull } from '@xylabs/sdk-js'\nimport React, { useMemo } from 'react'\n\nimport { useGatewayFromWallet } from '../../hooks/index.ts'\nimport { GatewayContext } from '../GatewayContext.ts'\nimport type { GatewayProviderProps } from '../GatewayProviderProps.ts'\nimport type { GatewayContextState } from '../GatewayProviderState.ts'\nimport { useProvidedInPageGateways } from '../in-page/index.ts'\n\n/**\n * Publishes the shared `GatewayContext` backed by two sources: the\n * injected XL1 Wallet extension *and* the in-page gateways built by\n * `InPageGatewaysProvider`. Use this provider when the host app can\n * function without a wallet (falling back to the in-page client) but\n * should still prefer the wallet when it is present.\n *\n * Required ancestry: an `InPageGatewaysProvider` must be mounted above\n * this provider \u2014 `useProvidedInPageGateways(true)` throws if missing.\n * If you only need a wallet-backed gateway, use `WalletGatewayProvider`\n * instead.\n *\n * Source precedence for `defaultGateway`:\n * - Wallet present and resolved (`XyoGatewayRunner`) \u2192 wallet wins; the\n * in-page gateway is still exposed via `gateways.inPageGateway` for\n * the rare consumer that needs to target it specifically.\n * - Wallet definitively absent (`null`) \u2192 fall back to the in-page\n * gateway matching `gatewayName`.\n * - Wallet still resolving (`undefined`) \u2192 leave `defaultGateway`\n * `undefined` so consumers render a loading state rather than\n * committing to the in-page fallback prematurely.\n *\n * The published `GatewayContextState` shape:\n * - `defaultGateway` \u2014 resolved per the precedence above. Three-state:\n * `undefined` = loading, `null` is not produced by this provider\n * (wallet-null collapses to `gatewayFromConfig`), `XyoGateway` = ready.\n * - `gateways.walletGateway` \u2014 raw wallet result (tri-state).\n * - `gateways.inPageGateway` \u2014 raw in-page result for the requested\n * `gatewayName`, or `undefined` if no `gatewayName` was passed.\n * - `error` \u2014 first non-null of wallet error, then in-page build error\n * for this `gatewayName`. Also rendered inline via `ErrorRender` above\n * `children` so mount-time failures surface even when no consumer\n * reads `error`.\n * - `resetGatewaysFromConfig` \u2014 forwards `clearAll` from\n * `InPageGatewaysProvider`, letting consumers force a rebuild of the\n * in-page gateways (e.g. after a network or endpoint change).\n * - `provided: true` \u2014 lets descendants detect a real provider in the\n * tree.\n *\n * `defaultGateway`, `gateways`, and the context `value` are memoized so\n * consumers only re-render when wallet or in-page sources actually\n * change identity.\n *\n * @deprecated Use {@link GatewayProvider} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const GatewayProvider: React.FC<GatewayProviderProps> = ({ gatewayName, children }) => {\n const {\n gateway: gatewayFromWallet,\n error: gatewayFromWalletError,\n } = useGatewayFromWallet(gatewayName)\n\n const {\n gateways: allGateways,\n errors: allGatewayErrors,\n clearAll,\n } = useProvidedInPageGateways(true)\n\n const gatewayFromConfig = gatewayName ? allGateways[gatewayName] : undefined\n const gatewayFromConfigError = gatewayName ? allGatewayErrors[gatewayName] : undefined\n\n const { defaultGateway, gateways } = useMemo(() => {\n if (isNull(gatewayFromWallet)) {\n return {\n defaultGateway: gatewayFromConfig,\n gateways: {\n inPageGateway: gatewayFromConfig,\n walletGateway: null,\n },\n }\n } else if (isDefinedNotNull(gatewayFromWallet)) {\n return {\n defaultGateway: gatewayFromWallet,\n gateways: {\n inPageGateway: gatewayFromConfig,\n walletGateway: gatewayFromWallet,\n },\n }\n }\n return {\n defaultGateway: undefined,\n gateways: {\n inPageGateway: undefined,\n walletGateway: undefined,\n },\n }\n }, [gatewayFromConfig, gatewayFromWallet])\n\n const value = useMemo(() => {\n const value: GatewayContextState = {\n defaultGateway,\n error: gatewayFromWalletError || gatewayFromConfigError,\n gateways,\n provided: true,\n resetGatewaysFromConfig: clearAll,\n }\n return value\n }, [\n defaultGateway,\n gatewayFromWalletError,\n gatewayFromConfigError,\n gateways,\n clearAll,\n ])\n\n return (\n <GatewayContext value={value}>\n <ErrorRender error={gatewayFromConfigError} />\n {children}\n </GatewayContext>\n )\n}\n", "import { ErrorRender } from '@xylabs/react-error'\nimport React, { useMemo } from 'react'\n\nimport { useGatewayFromWallet } from '../../hooks/index.ts'\nimport { GatewayContext } from '../GatewayContext.ts'\nimport type { GatewayProviderProps } from '../GatewayProviderProps.ts'\nimport type { GatewayContextState } from '../GatewayProviderState.ts'\n\n/**\n * Publishes a `GatewayContext` backed exclusively by the injected XL1 Wallet\n * extension (i.e. `globalThis.xyo`). This is the provider to use when the\n * host app is a browser UI that expects the user to bring their own wallet,\n * rather than running an in-page gateway.\n *\n * The requested `gatewayName` is forwarded to `useGatewayFromWallet`, whose\n * returned gateway uses a three-state contract (`undefined` = still\n * resolving, `null` = wallet confirmed absent / timed out,\n * `XyoGatewayRunner` = ready). That tri-state is passed through to\n * consumers unchanged as `defaultGateway` / `gateways.walletGateway`, so\n * downstream hooks can distinguish \"loading\" from \"missing\".\n *\n * The published `GatewayContextState` shape:\n * - `defaultGateway` \u2014 the wallet gateway, used when consumers don't\n * specify which gateway they want.\n * - `gateways.walletGateway` \u2014 same instance as `defaultGateway`.\n * - `gateways.inPageGateway` \u2014 always `null` here; this provider does not\n * stand up an in-page client. Pair with a different provider if you need\n * both.\n * - `error` \u2014 surfaced from `useGatewayFromWallet` (detection / timeout /\n * wallet errors). Also rendered inline via `ErrorRender` above `children`\n * so mount-time failures are visible even if no consumer reads `error`.\n * - `provided: true` \u2014 lets descendants detect that a real provider (not\n * the default empty context) is in the tree.\n *\n * The `defaultGateway`, `gateways`, and context `value` are memoized so\n * consumers only re-render when the underlying wallet gateway reference or\n * error actually changes.\n *\n * @deprecated Use {@link WalletGatewayProvider} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const WalletGatewayProvider: React.FC<GatewayProviderProps> = ({ gatewayName, children }) => {\n const {\n gateway: gatewayFromWallet,\n error: gatewayFromWalletError,\n } = useGatewayFromWallet(gatewayName)\n\n const { defaultGateway, gateways } = useMemo(() => {\n return {\n defaultGateway: gatewayFromWallet,\n gateways: {\n inPageGateway: null,\n walletGateway: gatewayFromWallet,\n },\n }\n }, [gatewayFromWallet])\n\n const value = useMemo(() => {\n const value: GatewayContextState = {\n defaultGateway,\n error: gatewayFromWalletError,\n gateways,\n provided: true,\n }\n return value\n }, [\n defaultGateway,\n gatewayFromWalletError,\n gateways,\n ])\n\n return (\n <GatewayContext value={value}>\n <ErrorRender error={gatewayFromWalletError} />\n {children}\n </GatewayContext>\n )\n}\n", "import { useContextEx } from '@xylabs/react-shared'\n\nimport { GatewayContext } from './GatewayContext.ts'\nimport type { GatewayContextState } from './GatewayProviderState.ts'\n\n/**\n * The sole consumer entry point for gateway state. Reads the nearest\n * `GatewayContext` in the tree, regardless of which provider published\n * it \u2014 this is the decoupling that lets a component work unchanged when\n * the surrounding app swaps `WalletGatewayProvider` for\n * `GatewayProvider` (or a test double).\n *\n * @param required - When `true` (default), throws if no gateway provider\n * is mounted above \u2014 use this when the component is meaningless\n * without a gateway. When `false`, returns default state (all fields\n * undefined) so the component can render a graceful fallback.\n *\n * @deprecated Use {@link useProvidedGateway} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useProvidedGateway = (required = true) => useContextEx<GatewayContextState>(GatewayContext, 'Gateway', required)\n"],
5
- "mappings": ";AAAA;AAAA,EACE;AAAA,EAAO;AAAA,EAAS;AAAA,OACX;AACP,SAAS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G,CAAC,iBAAiB,CAAC;AAEtB,QAAM,QAAQA,SAAQ,MAAM;AAC1B,UAAMC,SAA6B;AAAA,MACjC;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA,UAAU;AAAA,IACZ;AACA,WAAOA;AAAA,EACT,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,gBAAAF,MAAC,kBAAe,OACd;AAAA,oBAAAD,KAACI,cAAA,EAAY,OAAO,wBAAwB;AAAA,IAC3C;AAAA,KACH;AAEJ;;;AC5EA,SAAS,gBAAAC,qBAAoB;AAmBtB,IAAM,qBAAqB,CAAC,WAAW,SAASC,cAAkC,gBAAgB,WAAW,QAAQ;",
4
+ "sourcesContent": ["import {\n Stack, Tooltip, Typography,\n} from '@mui/material'\nimport { shortenAddress } from '@xyo-network/react-chain-shared'\nimport { BlockiesAvatarAddress } from '@xyo-network/xl1-blockies'\nimport React from 'react'\n\n/**\n * @deprecated Use {@link ConnectedAccount} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const ConnectedAccount: React.FC<{ address: string }> = ({ address }) => {\n const shortenedAddress = shortenAddress(address, 4)\n\n return (\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center' }}\n >\n <BlockiesAvatarAddress address={address} size={21} />\n <Tooltip title={address}>\n <Typography\n variant=\"caption\"\n sx={{\n color: 'text.secondary',\n fontFamily: 'monospace',\n }}\n >\n {shortenedAddress}\n </Typography>\n </Tooltip>\n </Stack>\n )\n}\n", "import type { StackProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Button, Stack,\n Typography,\n} from '@mui/material'\nimport type { ButtonExProps } from '@xylabs/react-button'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { Address } from '@xylabs/sdk-js'\nimport { isDefined, isUndefined } from '@xylabs/sdk-js'\nimport type { ComponentType, MouseEventHandler } from 'react'\nimport React, { useEffect } from 'react'\n\nimport { ConnectedAccount } from './account/index.ts'\nimport { useConnectAccount } from './hooks/index.ts'\n\nconst DefaultConnectComponent: React.FC<ButtonExProps> = props => (\n <ButtonEx variant=\"contained\" size=\"small\" {...props} />\n)\n\nconst DefaultNoWalletInstalledComponent: React.FC = () => (\n <Alert severity=\"warning\">\n <AlertTitle>XL1 Wallet Not Found</AlertTitle>\n <Typography gutterBottom>\n Please ensure that your XL1 Wallet is installed to connect your account.\n </Typography>\n <Button\n sx={{ display: 'flex', justifySelf: 'end' }}\n size=\"small\"\n variant=\"outlined\"\n href=\"https://chromewebstore.google.com/detail/xl1-wallet/fblbagcjeigmhakkfgjpdlcapcgmcfbm\"\n target=\"_blank\"\n rel=\"noopener\"\n >\n Get XL1 Wallet\n </Button>\n </Alert>\n)\n\n/**\n * @deprecated Use {@link ConnectClientAccountsStackProps} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport interface ConnectClientAccountsStackProps extends StackProps {\n AccountComponent?: ComponentType<{ account?: string }>\n ConnectComponent?: ComponentType<{ onClick?: MouseEventHandler<HTMLElement> }>\n NoWalletInstalledComponent?: ComponentType\n onAccountConnected?: (account: Address) => void\n onCancel?: () => void\n timeout?: number\n}\n\n/**\n * Renders a horizontal stack that surfaces the current state of the user's\n * connection to an XL1 wallet (e.g. the XL1 Chrome extension) and lets them\n * kick off a connection.\n *\n * Connection state is derived from `useConnectAccount`, which wraps\n * `useGatewayFromWallet` (wallet/gateway discovery with a configurable\n * `timeout`) and `useAccountPermissions` (already-authorized addresses).\n * The hook returns: `address` (resolved once the wallet exposes one),\n * `connectSigner` (prompts the wallet for an address), `timedout` (the\n * gateway never appeared within `timeout`), and `error` (the first of\n * gateway, permissions, or signer-connect failures).\n *\n * The component renders exactly one of the following wallet states, plus\n * an always-present error slot:\n *\n * - **Connected** \u2014 `address` is defined: renders `AccountComponent` for\n * that address. Also fires `onAccountConnected(address)` once via effect.\n * - **Disconnected, wallet available** \u2014 no `address` and not `timedout`:\n * renders `ConnectComponent` as a \"Connect\" button that invokes\n * `connectSigner()`. This covers both \"wallet installed but no account\n * authorized yet\" and \"gateway still resolving\".\n * - **Wallet missing / unreachable** \u2014 no `address` and `timedout` is true:\n * renders `NoWalletInstalledComponent` (defaults to an Alert linking to\n * the XL1 Wallet Chrome Web Store listing).\n * - **Error** \u2014 any error from the hook is rendered via `ErrorRender`\n * alongside the state above, and `onCancel()` is fired once via effect\n * so the host UI can close/abort its connect flow.\n *\n * All three slot components (`AccountComponent`, `ConnectComponent`,\n * `NoWalletInstalledComponent`) are injectable so consumers can restyle\n * any state without forking this component.\n *\n * @deprecated Use {@link ConnectAccountsStack} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const ConnectAccountsStack: React.FC<ConnectClientAccountsStackProps> = ({\n AccountComponent = ConnectedAccount,\n ConnectComponent = DefaultConnectComponent,\n NoWalletInstalledComponent = DefaultNoWalletInstalledComponent,\n onAccountConnected,\n onCancel,\n timeout,\n ...props\n}) => {\n const {\n address, connectSigner, error, timedout,\n } = useConnectAccount(undefined, timeout)\n\n useEffect(() => {\n if (isDefined(error) && isDefined(onCancel)) {\n onCancel()\n }\n }, [error, onCancel])\n\n useEffect(() => {\n if (isDefined(address) && isDefined(onAccountConnected)) {\n onAccountConnected(address)\n }\n }, [address, onAccountConnected])\n\n return (\n <Stack\n direction=\"row\"\n spacing={2}\n {...props}\n sx={[{ alignItems: 'start' }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n {isDefined(address)\n ? <AccountComponent address={address} />\n : null}\n {isUndefined(address) && !timedout\n ? (\n <ConnectComponent onClick={() => void connectSigner()}>Connect</ConnectComponent>\n )\n : null}\n {isUndefined(address) && timedout\n ? (\n <NoWalletInstalledComponent />\n )\n : null}\n <ErrorRender error={error} scope=\"ConnectSigner:error\" />\n </Stack>\n )\n}\n", "import { asAddress, assertEx } from '@xylabs/sdk-js'\nimport type { XyoAddress } from '@xyo-network/address'\nimport type { GatewayName } from '@xyo-network/xl1-sdk'\nimport { MainNetwork } from '@xyo-network/xl1-sdk'\nimport { useCallback, useState } from 'react'\n\nimport { useAccountPermissions, useGatewayFromWallet } from '../../../hooks/index.ts'\n\n/**\n * @deprecated Use {@link useConnectAccount} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useConnectAccount = (gatewayName: GatewayName = MainNetwork.id, timeout?: number) => {\n const [connectError, setConnectError] = useState<Error>()\n\n const {\n gateway, error, timedout,\n } = useGatewayFromWallet(gatewayName, timeout)\n\n const [accountPermissions, accountPermissionsError] = useAccountPermissions()\n\n const [address, setAddress] = useState<XyoAddress>()\n\n const connectSigner = useCallback(async () => {\n try {\n setConnectError(undefined)\n const assertedGateway = assertEx(gateway, () => `Gateway ${gatewayName} is not available`)\n const signer = assertedGateway.signer\n const address = await signer.address()\n setAddress(address)\n return address\n } catch (e) {\n setConnectError(e as Error)\n }\n }, [gateway, gatewayName])\n\n return {\n address: asAddress(accountPermissions?.[0] ?? address), connectSigner, error: error ?? accountPermissionsError ?? connectError, gateway, timedout,\n }\n}\n", "import { isDefined } from '@xylabs/sdk-js'\nimport type {\n CaveatTypes, ParentCapability, XyoPermissions,\n} from '@xyo-network/xl1-sdk'\n\n/**\n * @deprecated Use {@link findCaveat} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const findCaveat = async (\n permissions: XyoPermissions,\n targetCapability: ParentCapability,\n targetCaveatType: CaveatTypes,\n) => {\n const existingPermissions = await permissions.getPermissions()\n if (isDefined(existingPermissions) && existingPermissions.length > 0) {\n const foundPermissions = existingPermissions\n .find(p => p.parentCapability === targetCapability)\n if (isDefined(foundPermissions)) {\n return foundPermissions.caveats?.find(caveat => caveat.type === targetCaveatType)?.value ?? []\n }\n }\n return existingPermissions\n}\n", "import { isUndefined } from '@xylabs/sdk-js'\nimport type { XyoClient } from '@xyo-network/xl1-sdk'\nimport { useEffect, useState } from 'react'\n\nimport { getXyoClient } from '../helpers/index.ts'\n\ninterface ClientState {\n client?: XyoClient | null\n error: Error | null\n isLoading: boolean\n timedout: boolean\n}\n\nconst initialState: ClientState = {\n client: undefined,\n error: null,\n isLoading: false,\n timedout: false,\n}\n\n/**\n * @deprecated Use {@link useClientFromWallet} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useClientFromWallet = (timeout?: number): ClientState => {\n const [state, setState] = useState<ClientState>(initialState)\n\n useEffect(() => {\n let cancelled = false\n\n const initialize = async () => {\n setState((prev) => {\n if (prev.isLoading) return prev\n return {\n ...prev, isLoading: true, error: null,\n }\n })\n\n try {\n const client = await getXyoClient(timeout)\n if (cancelled) return\n if (client === null) {\n setState({\n client: null, timedout: true, isLoading: false, error: null,\n })\n } else {\n setState({\n client, isLoading: false, error: null, timedout: false,\n })\n }\n } catch (error) {\n if (cancelled) return\n setState({\n client: undefined, isLoading: false, error: error as Error, timedout: false,\n })\n }\n }\n\n void initialize()\n\n // Late recovery: if wallet loads after timeout, update state\n const onPluginReady = () => {\n if (cancelled) return\n const client = isUndefined(globalThis.xyo) ? null : globalThis.xyo?.client ?? null\n setState({\n client, isLoading: false, timedout: false, error: null,\n })\n }\n globalThis.addEventListener('xyo:plugin-ready', onPluginReady)\n\n return () => {\n cancelled = true\n globalThis.removeEventListener('xyo:plugin-ready', onPluginReady)\n }\n }, [timeout])\n\n return state\n}\n\n/** @deprecated - use useClientFromWallet instead */\nexport const useClient = useClientFromWallet\n", "import { isUndefined } from '@xylabs/sdk-js'\nimport type { XyoClient } from '@xyo-network/xl1-sdk'\n\nconst CLIENT_LISTENER_TIMEOUT = 2000\n\nconst hasXyoClient = () => {\n return 'client' in globalThis.xyo\n}\n\n/**\n * @deprecated Use {@link listenForClientInjection} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const listenForClientInjection = (onClientReady: () => void, timeout: number, onTimeout: () => void) => {\n let resolved = false\n const listener: EventListener = () => {\n onClientReady()\n resolved = true\n }\n globalThis.addEventListener('xyo:plugin-ready', listener)\n setTimeout(() => {\n if (!resolved) {\n globalThis.removeEventListener('xyo:plugin-ready', listener)\n onTimeout()\n }\n }, timeout)\n}\n\ntype ReturnType = XyoClient | undefined | null\n\n/**\n * @deprecated Use {@link getXyoClient} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport async function getXyoClient(timeout = CLIENT_LISTENER_TIMEOUT): Promise<ReturnType> {\n // if no xyo object, we can bail early\n if (isUndefined(globalThis.xyo)) {\n return null\n }\n return hasXyoClient()\n ? globalThis.xyo.client\n // listen for the XyoWallet to be injected\n : await new Promise<ReturnType>((resolve) => {\n listenForClientInjection(\n () => {\n resolve(globalThis.xyo.client)\n },\n timeout,\n () => {\n resolve(null)\n },\n )\n })\n}\n", "import { useClientFromWallet } from '../useClientFromWallet.ts'\n\n/**\n * @deprecated Use {@link usePermissions} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const usePermissions = () => {\n const {\n client, isLoading, error, timedout,\n } = useClientFromWallet()\n const permissions = client?.permissions\n return {\n permissions,\n isLoading,\n error,\n timedout,\n }\n}\n", "import { usePromise } from '@xylabs/react-promise'\nimport type { JsonValue } from '@xylabs/sdk-js'\nimport {\n isArray, isDefined, isDefinedNotNull, isString,\n} from '@xylabs/sdk-js'\n\nimport { findCaveat } from '../helpers/index.ts'\nimport { usePermissions } from './usePermissions.ts'\n\nconst validateRestrictedAccounts = (restrictedAccounts: JsonValue): readonly string [] => {\n if (isDefined(restrictedAccounts)) {\n if (isArray(restrictedAccounts) && restrictedAccounts.every(isString)) {\n return restrictedAccounts\n }\n throw new Error(\n `Unrecognized format for restrictReturnedAccounts caveat found on permissions. \\n\n Should be an array of strings: ${JSON.stringify(restrictedAccounts)}`,\n )\n }\n return []\n}\n\n/**\n * @deprecated Use {@link useAccountPermissions} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useAccountPermissions = () => {\n const { permissions, error } = usePermissions()\n\n return usePromise(async () => {\n if (isDefinedNotNull(error)) throw error\n if (isDefined(permissions)) {\n const restrictedAccounts = await findCaveat(\n permissions,\n // TODO - extract to constant in protocol package\n 'xyoWallet_getAccounts',\n 'restrictReturnedAccounts',\n )\n return validateRestrictedAccounts(restrictedAccounts)\n }\n }, [permissions])\n}\n", "import { isNull } from '@xylabs/sdk-js'\nimport type { GatewayName } from '@xyo-network/xl1-sdk'\n\nimport type { GatewayFromWallet } from '../../types/index.ts'\nimport { useClientFromWallet } from './useClientFromWallet.ts'\n\n/**\n * Resolves a gateway from the injected XL1 Wallet extension.\n *\n * The returned `gateway` uses a three-state contract:\n * - `undefined` \u2014 wallet detection is still in progress (isLoading=true),\n * or no gatewayName was provided. Consumers should treat this as \"not yet known\"\n * and avoid committing to either a present or absent UI state.\n * - `null` \u2014 wallet is definitively absent. Either globalThis.xyo was never set,\n * or detection timed out. Safe to show fallback UI (e.g. \"Get XL1 Wallet\").\n * A late-recovery listener may still transition this to a real gateway if\n * the extension loads after the timeout.\n * - `XyoGatewayRunner` \u2014 wallet is present and exposes this gateway for the\n * requested network. Ready to use for transactions and queries.\n *\n * @deprecated Use {@link useGatewayFromWallet} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useGatewayFromWallet = (gatewayName?: GatewayName, timeout?: number): GatewayFromWallet => {\n const {\n client, isLoading, error, timedout,\n } = useClientFromWallet(timeout)\n\n const resolveGateway = () => {\n // null client = wallet confirmed absent (no globalThis.xyo or timed out)\n if (isNull(client)) return null\n // client is undefined (still loading) or defined (wallet present) \u2014\n // optional chain returns undefined while loading, or the gateway if available\n return client?.gateways?.[gatewayName!]\n }\n\n return {\n // no gatewayName requested = undefined (opt-out, not \"absent\")\n gateway: gatewayName ? resolveGateway() : undefined,\n isLoading,\n error,\n timedout,\n }\n}\n\n/** @deprecated - useGatewayFromWallet */\nexport const useGateway = useGatewayFromWallet\n", "import { createContextEx } from '@xylabs/react-shared'\n\nimport type { GatewayContextState } from './GatewayProviderState.ts'\n\n/**\n * Shared React context that decouples gateway *sources* from gateway\n * *consumers*. Any provider that can resolve an `XyoGateway` publishes to\n * this context; any hook or component that needs a gateway reads from it\n * via `useProvidedGateway`. Consumers never import a specific provider \u2014\n * they just require that *some* provider is mounted above them in the\n * tree.\n *\n * Current publishers:\n * - `WalletGatewayProvider` (this package) \u2014 sources gateways from the\n * injected XL1 wallet extension.\n * - `GatewayProvider` in `@xyo-network/react-chain-provider` \u2014 sources\n * gateways built in-page against RPC endpoints, falling back to the\n * wallet when available.\n *\n * To add a new source (e.g. a mock provider for tests, an iframe-bridged\n * provider, a server-rendered provider), publish a `GatewayContextState`\n * to this same context \u2014 do not create a parallel context, or consumers\n * will silently stop receiving updates.\n *\n * @deprecated Use {@link GatewayContext} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const GatewayContext = createContextEx<GatewayContextState>()\n", "import { createContextEx } from '@xylabs/react-shared'\n\nimport type { InPageGatewaysState } from './InPageGatewaysState.ts'\n\n/**\n * Narrow, provider-internal context that `InPageGatewaysProvider` writes\n * to and `GatewayProvider` reads from. Do not consume this in application\n * code \u2014 use `useProvidedGateway` (which reads the shared\n * `GatewayContext`) instead. This context only exists to decouple the\n * single in-page *builder* from the many single-gateway *adapters* that\n * sit between it and the shared gateway surface.\n *\n * @deprecated Use {@link InPageGatewaysContext} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const InPageGatewaysContext = createContextEx<InPageGatewaysState>()\n", "import type {\n GatewayName, RpcTransport, XyoSignerRpcSchemas,\n} from '@xyo-network/xl1-sdk'\nimport { DefaultNetworks } from '@xyo-network/xl1-sdk'\nimport type { PropsWithChildren } from 'react'\nimport React, {\n startTransition,\n useCallback, useEffect, useMemo, useState,\n} from 'react'\n\nimport type { ContextGatewayType } from '../../types/index.ts'\nimport { InPageGatewaysContext } from './InPageGatewaysContext.ts'\nimport type { InPageGatewaysState } from './InPageGatewaysState.ts'\nimport { buildGateway } from './lib/index.ts'\n\n/**\n * @deprecated Use {@link InPageGatewaysProviderProps} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport interface InPageGatewaysProviderProps extends PropsWithChildren {\n signerTransport?: RpcTransport<XyoSignerRpcSchemas>\n}\n\n/**\n * Publishes a keyed map of in-page gateways \u2014 one per network in\n * `DefaultNetworks` \u2014 under the narrow `InPageGatewaysContext`.\n *\n * This provider is deliberately *not* a direct publisher of the shared\n * `GatewayContext` that `useProvidedGateway` reads. Its consumer is the\n * wrapping `GatewayProvider` in this same package, which picks the\n * `gatewayName` the consumer asked for out of this map, adapts it into\n * the single-gateway `GatewayContextState` shape, and then publishes *that*\n * to the shared context. Splitting the work this way lets one\n * `InPageGatewaysProvider` near the root build every network's gateway\n * once, while many `GatewayProvider` instances deeper in the tree each\n * expose whichever gateway their subtree cares about.\n *\n * Unlike `WalletGatewayProvider`, gateways here are constructed directly\n * in the page (via `buildGateway`) against each network's RPC endpoint\n * \u2014 no browser wallet extension is required. `signerTransport` switches\n * between viewer (read-only) and runner (can sign/send) locators; supply\n * it only when the app needs to sign.\n *\n * Behavior:\n * - On mount, and whenever `signerTransport` changes, `buildGateway` is\n * called in parallel for every network in `DefaultNetworks` via\n * `Promise.allSettled`. Networks that resolve populate `gateways[id]`;\n * networks that reject populate `errors[id]`. One failed network does\n * not block the others.\n * - If `signerTransport` is provided, gateways are built with a remote\n * *runner* locator, otherwise with a remote *viewer* locator.\n * - When `signerTransport` changes identity mid-life, the provider clears\n * all cached gateways and errors synchronously during render (via\n * `previousSignerTransport` state) so consumers never see gateways\n * bound to the previous transport, then rebuilds in the effect.\n * - State updates from the rebuild are wrapped in `startTransition` so a\n * slow network doesn't stall higher-priority UI updates.\n * - A `cancelled` flag in the effect's cleanup discards results from a\n * prior `signerTransport` once a new one is in flight.\n *\n * Published `InPageGatewaysState` (narrower than `GatewayContextState` \u2014\n * this is an internal handoff shape, not the cross-publisher surface):\n * - `gateways` \u2014 `Partial<Record<GatewayName, ContextGatewayType>>`. Keys\n * are only present for networks that built successfully.\n * - `errors` \u2014 `Partial<Record<GatewayName, Error>>`. Per-network build\n * failures, keyed by `GatewayName`.\n * - `clearAll()` \u2014 manually empties both maps. Also invoked internally on\n * transport changes. Forwarded by `GatewayProvider` to consumers as\n * `resetGatewaysFromConfig`.\n * - `provided: true` \u2014 lets descendants detect a real provider.\n *\n * Note: the commented-out `SimpleXyoClient` at the top is intentionally\n * disabled pending a type unification between `XyoGateway` and\n * `XyoGatewayRunner`.\n *\n * @deprecated Use {@link InPageGatewaysProvider} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const InPageGatewaysProvider: React.FC<InPageGatewaysProviderProps> = ({ signerTransport, children }) => {\n const [gateways, setGateways] = useState<Partial<Record<GatewayName, ContextGatewayType>>>({})\n const [errors, setErrors] = useState<Partial<Record<GatewayName, Error>>>({})\n const [previousSignerTransport, setPreviousSignerTransport] = useState<RpcTransport<XyoSignerRpcSchemas> | undefined>(signerTransport)\n\n // This can come back once we homogenize the type for XyoGateway.\n // Right now, SimpleXyoClient takes XyoGatewayRunners but ideally it would take XyoGateway.\n // const clientInPage = useMemo(() => new SimpleXyoClient(gateways, {}), [gateways])\n\n const clearAll = useCallback(() => {\n setGateways({})\n setErrors({})\n }, [])\n\n if (previousSignerTransport !== signerTransport) {\n clearAll()\n setPreviousSignerTransport(signerTransport)\n }\n\n useEffect(() => {\n let cancelled = false\n\n const buildAll = async () => {\n const results = await Promise.allSettled(\n DefaultNetworks.map(async (network) => {\n const gateway = await buildGateway(network.id as GatewayName, signerTransport)\n return { id: network.id as GatewayName, gateway }\n }),\n )\n\n if (cancelled) return\n\n const nextGateways: Partial<Record<GatewayName, ContextGatewayType>> = {}\n const nextErrors: Partial<Record<GatewayName, Error>> = {}\n\n for (const [index, result] of results.entries()) {\n const networkId = DefaultNetworks[index].id as GatewayName\n if (result.status === 'fulfilled') {\n nextGateways[networkId] = result.value.gateway\n } else {\n nextErrors[networkId] = result.reason instanceof Error ? result.reason : new Error(String(result.reason))\n }\n }\n\n startTransition(() => {\n setGateways(nextGateways)\n setErrors(nextErrors)\n })\n }\n\n void buildAll()\n return () => {\n cancelled = true\n }\n }, [signerTransport])\n\n const value = useMemo(() => {\n const value: InPageGatewaysState = {\n clearAll,\n errors,\n gateways,\n provided: true,\n }\n return value\n }, [clearAll, errors, gateways])\n\n return <InPageGatewaysContext value={value}>{children}</InPageGatewaysContext>\n}\n", "import { assertEx, isDefined } from '@xylabs/sdk-js'\nimport type {\n GatewayName,\n RemoteConfig, RpcTransport, SimpleXyoGateway,\n XyoSignerRpcSchemas,\n} from '@xyo-network/xl1-sdk'\nimport {\n basicRemoteRunnerLocator,\n basicRemoteViewerLocator,\n DefaultNetworks, NetworkDataLakeUrls, XyoGatewayMoniker,\n} from '@xyo-network/xl1-sdk'\n\n/**\n * @deprecated Use {@link buildGateway} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const buildGateway = async (gatewayName: GatewayName, signerTransport?: RpcTransport<XyoSignerRpcSchemas>) => {\n const network = DefaultNetworks.find(network => network.id === gatewayName)\n const resolvedNetwork = assertEx(network, () => `No network found for id ${gatewayName}`)\n\n const remoteConfig: RemoteConfig = {\n rpc: {\n protocol: 'http',\n url: `${resolvedNetwork.url}/rpc`,\n },\n }\n\n const dataLakeEndpoint = NetworkDataLakeUrls[gatewayName]\n\n const locator = isDefined(signerTransport)\n ? await basicRemoteRunnerLocator(gatewayName, remoteConfig, signerTransport, dataLakeEndpoint)\n : await basicRemoteViewerLocator(gatewayName, remoteConfig, dataLakeEndpoint)\n\n return await locator.getInstance<SimpleXyoGateway>(XyoGatewayMoniker)\n}\n", "import { useContextEx } from '@xylabs/react-shared'\n\nimport { InPageGatewaysContext } from './InPageGatewaysContext.ts'\nimport type { InPageGatewaysState } from './InPageGatewaysState.ts'\n\n/**\n * Reads the `InPageGatewaysContext` map of per-network in-page gateways.\n * Intended for internal use by `GatewayProvider` \u2014 application code\n * should prefer `useProvidedGateway`, which returns a single resolved\n * gateway regardless of source.\n *\n * @param required - When `true` (default), throws if no\n * `InPageGatewaysProvider` is mounted above.\n *\n * @deprecated Use {@link useProvidedInPageGateways} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useProvidedInPageGateways = (required = true) => useContextEx<InPageGatewaysState>(InPageGatewaysContext, 'InPageGateways', required)\n", "import { ErrorRender } from '@xylabs/react-error'\nimport { isDefinedNotNull, isNull } from '@xylabs/sdk-js'\nimport React, { useMemo } from 'react'\n\nimport { useGatewayFromWallet } from '../../hooks/index.ts'\nimport { GatewayContext } from '../GatewayContext.ts'\nimport type { GatewayProviderProps } from '../GatewayProviderProps.ts'\nimport type { GatewayContextState } from '../GatewayProviderState.ts'\nimport { useProvidedInPageGateways } from '../in-page/index.ts'\n\n/**\n * Publishes the shared `GatewayContext` backed by two sources: the\n * injected XL1 Wallet extension *and* the in-page gateways built by\n * `InPageGatewaysProvider`. Use this provider when the host app can\n * function without a wallet (falling back to the in-page client) but\n * should still prefer the wallet when it is present.\n *\n * Required ancestry: an `InPageGatewaysProvider` must be mounted above\n * this provider \u2014 `useProvidedInPageGateways(true)` throws if missing.\n * If you only need a wallet-backed gateway, use `WalletGatewayProvider`\n * instead.\n *\n * Source precedence for `defaultGateway`:\n * - Wallet present and resolved (`XyoGatewayRunner`) \u2192 wallet wins; the\n * in-page gateway is still exposed via `gateways.inPageGateway` for\n * the rare consumer that needs to target it specifically.\n * - Wallet definitively absent (`null`) \u2192 fall back to the in-page\n * gateway matching `gatewayName`.\n * - Wallet still resolving (`undefined`) \u2192 leave `defaultGateway`\n * `undefined` so consumers render a loading state rather than\n * committing to the in-page fallback prematurely.\n *\n * The published `GatewayContextState` shape:\n * - `defaultGateway` \u2014 resolved per the precedence above. Three-state:\n * `undefined` = loading, `null` is not produced by this provider\n * (wallet-null collapses to `gatewayFromConfig`), `XyoGateway` = ready.\n * - `gateways.walletGateway` \u2014 raw wallet result (tri-state).\n * - `gateways.inPageGateway` \u2014 raw in-page result for the requested\n * `gatewayName`, or `undefined` if no `gatewayName` was passed.\n * - `error` \u2014 first non-null of wallet error, then in-page build error\n * for this `gatewayName`. Also rendered inline via `ErrorRender` above\n * `children` so mount-time failures surface even when no consumer\n * reads `error`.\n * - `resetGatewaysFromConfig` \u2014 forwards `clearAll` from\n * `InPageGatewaysProvider`, letting consumers force a rebuild of the\n * in-page gateways (e.g. after a network or endpoint change).\n * - `provided: true` \u2014 lets descendants detect a real provider in the\n * tree.\n *\n * `defaultGateway`, `gateways`, and the context `value` are memoized so\n * consumers only re-render when wallet or in-page sources actually\n * change identity.\n *\n * @deprecated Use {@link GatewayProvider} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const GatewayProvider: React.FC<GatewayProviderProps> = ({ gatewayName, children }) => {\n const {\n gateway: gatewayFromWallet,\n error: gatewayFromWalletError,\n } = useGatewayFromWallet(gatewayName)\n\n const {\n gateways: allGateways,\n errors: allGatewayErrors,\n clearAll,\n } = useProvidedInPageGateways(true)\n\n const gatewayFromConfig = gatewayName ? allGateways[gatewayName] : undefined\n const gatewayFromConfigError = gatewayName ? allGatewayErrors[gatewayName] : undefined\n\n const { defaultGateway, gateways } = useMemo(() => {\n if (isNull(gatewayFromWallet)) {\n return {\n defaultGateway: gatewayFromConfig,\n gateways: {\n inPageGateway: gatewayFromConfig,\n walletGateway: null,\n },\n }\n } else if (isDefinedNotNull(gatewayFromWallet)) {\n return {\n defaultGateway: gatewayFromWallet,\n gateways: {\n inPageGateway: gatewayFromConfig,\n walletGateway: gatewayFromWallet,\n },\n }\n }\n return {\n defaultGateway: undefined,\n gateways: {\n inPageGateway: undefined,\n walletGateway: undefined,\n },\n }\n }, [gatewayFromConfig, gatewayFromWallet])\n\n const value = useMemo(() => {\n const value: GatewayContextState = {\n defaultGateway,\n error: gatewayFromWalletError || gatewayFromConfigError,\n gateways,\n provided: true,\n resetGatewaysFromConfig: clearAll,\n }\n return value\n }, [\n defaultGateway,\n gatewayFromWalletError,\n gatewayFromConfigError,\n gateways,\n clearAll,\n ])\n\n return (\n <GatewayContext value={value}>\n <ErrorRender error={gatewayFromConfigError} />\n {children}\n </GatewayContext>\n )\n}\n", "import { ErrorRender } from '@xylabs/react-error'\nimport React, { useMemo } from 'react'\n\nimport { useGatewayFromWallet } from '../../hooks/index.ts'\nimport { GatewayContext } from '../GatewayContext.ts'\nimport type { GatewayProviderProps } from '../GatewayProviderProps.ts'\nimport type { GatewayContextState } from '../GatewayProviderState.ts'\n\n/**\n * Publishes a `GatewayContext` backed exclusively by the injected XL1 Wallet\n * extension (i.e. `globalThis.xyo`). This is the provider to use when the\n * host app is a browser UI that expects the user to bring their own wallet,\n * rather than running an in-page gateway.\n *\n * The requested `gatewayName` is forwarded to `useGatewayFromWallet`, whose\n * returned gateway uses a three-state contract (`undefined` = still\n * resolving, `null` = wallet confirmed absent / timed out,\n * `XyoGatewayRunner` = ready). That tri-state is passed through to\n * consumers unchanged as `defaultGateway` / `gateways.walletGateway`, so\n * downstream hooks can distinguish \"loading\" from \"missing\".\n *\n * The published `GatewayContextState` shape:\n * - `defaultGateway` \u2014 the wallet gateway, used when consumers don't\n * specify which gateway they want.\n * - `gateways.walletGateway` \u2014 same instance as `defaultGateway`.\n * - `gateways.inPageGateway` \u2014 always `null` here; this provider does not\n * stand up an in-page client. Pair with a different provider if you need\n * both.\n * - `error` \u2014 surfaced from `useGatewayFromWallet` (detection / timeout /\n * wallet errors). Also rendered inline via `ErrorRender` above `children`\n * so mount-time failures are visible even if no consumer reads `error`.\n * - `provided: true` \u2014 lets descendants detect that a real provider (not\n * the default empty context) is in the tree.\n *\n * The `defaultGateway`, `gateways`, and context `value` are memoized so\n * consumers only re-render when the underlying wallet gateway reference or\n * error actually changes.\n *\n * @deprecated Use {@link WalletGatewayProvider} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const WalletGatewayProvider: React.FC<GatewayProviderProps> = ({ gatewayName, children }) => {\n const {\n gateway: gatewayFromWallet,\n error: gatewayFromWalletError,\n } = useGatewayFromWallet(gatewayName)\n\n const { defaultGateway, gateways } = useMemo(() => {\n return {\n defaultGateway: gatewayFromWallet,\n gateways: {\n inPageGateway: null,\n walletGateway: gatewayFromWallet,\n },\n }\n }, [gatewayFromWallet])\n\n const value = useMemo(() => {\n const value: GatewayContextState = {\n defaultGateway,\n error: gatewayFromWalletError,\n gateways,\n provided: true,\n }\n return value\n }, [\n defaultGateway,\n gatewayFromWalletError,\n gateways,\n ])\n\n return (\n <GatewayContext value={value}>\n <ErrorRender error={gatewayFromWalletError} />\n {children}\n </GatewayContext>\n )\n}\n", "import { useContextEx } from '@xylabs/react-shared'\n\nimport { GatewayContext } from './GatewayContext.ts'\nimport type { GatewayContextState } from './GatewayProviderState.ts'\n\n/**\n * The sole consumer entry point for gateway state. Reads the nearest\n * `GatewayContext` in the tree, regardless of which provider published\n * it \u2014 this is the decoupling that lets a component work unchanged when\n * the surrounding app swaps `WalletGatewayProvider` for\n * `GatewayProvider` (or a test double).\n *\n * @param required - When `true` (default), throws if no gateway provider\n * is mounted above \u2014 use this when the component is meaningless\n * without a gateway. When `false`, returns default state (all fields\n * undefined) so the component can render a graceful fallback.\n *\n * @deprecated Use {@link useProvidedGateway} from `@xyo-network/xl1-react-client-sdk/client` instead.\n */\nexport const useProvidedGateway = (required = true) => useContextEx<GatewayContextState>(GatewayContext, 'Gateway', required)\n"],
5
+ "mappings": ";AAAA;AAAA,EACE;AAAA,EAAO;AAAA,EAAS;AAAA,OACX;AACP,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AAUlC,SAKE,KALF;AAJG,IAAM,mBAAkD,CAAC,EAAE,QAAQ,MAAM;AAC9E,QAAM,mBAAmB,eAAe,SAAS,CAAC;AAElD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,SAAS;AAAA,MACT,IAAI,EAAE,YAAY,SAAS;AAAA,MAE3B;AAAA,4BAAC,yBAAsB,SAAkB,MAAM,IAAI;AAAA,QACnD,oBAAC,WAAQ,OAAO,SACd;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,IAAI;AAAA,cACF,OAAO;AAAA,cACP,YAAY;AAAA,YAC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names": ["Stack", "Typography", "isDefined", "isUndefined", "useEffect", "useState", "isUndefined", "isUndefined", "isDefined", "isDefined", "useState", "address", "jsx", "jsxs", "Typography", "useEffect", "isDefined", "Stack", "isUndefined", "createContextEx", "DefaultNetworks", "useCallback", "useEffect", "useState", "assertEx", "isDefined", "network", "jsx", "useState", "useCallback", "useEffect", "DefaultNetworks", "value", "ErrorRender", "isDefinedNotNull", "isNull", "useMemo", "jsx", "jsxs", "useMemo", "isNull", "isDefinedNotNull", "value", "ErrorRender", "ErrorRender", "useMemo", "jsx", "jsxs", "useMemo", "value", "ErrorRender", "useContextEx", "useContextEx"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-chain-client",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "description": "XYO Layer One React SDK - Client/Wallet Hooks",
5
5
  "homepage": "https://xylabs.com",
6
6
  "bugs": {
@@ -37,115 +37,110 @@
37
37
  "!**/*.test.*",
38
38
  "README.md"
39
39
  ],
40
+ "dependencies": {
41
+ "@xyo-network/react-chain-shared": "~2.0.13"
42
+ },
40
43
  "devDependencies": {
41
44
  "@bitauth/libauth": "~3.0.0",
42
45
  "@metamask/json-rpc-engine": "^10.5.0",
43
46
  "@metamask/providers": "^22.1.1",
44
47
  "@metamask/utils": "^11.11.0",
45
- "@mui/icons-material": "~9.0.1",
46
- "@mui/material": "~9.0.1",
48
+ "@mui/icons-material": "^9.1.0",
49
+ "@mui/material": "^9.1.0",
47
50
  "@noble/post-quantum": "~0.6.1",
48
51
  "@opentelemetry/api": "^1.9.1",
49
52
  "@opentelemetry/sdk-trace-base": "^2.7.1",
50
- "@react-spring/web": "~10.0.4",
53
+ "@react-spring/web": "~10.1.1",
51
54
  "@scure/base": "~2.2.0",
52
55
  "@scure/bip39": "~2.2.0",
53
- "@storybook/react-vite": "^10.4.2",
54
- "@types/react": "^19.2.16",
55
- "@xylabs/geo": "^6.0.7",
56
- "@xylabs/pixel": "~6.0.7",
57
- "@xylabs/react-button": "~9.0.2",
58
- "@xylabs/react-error": "~9.0.2",
59
- "@xylabs/react-promise": "~9.0.2",
60
- "@xylabs/react-shared": "~9.0.2",
61
- "@xylabs/react-theme": "~9.0.2",
62
- "@xylabs/sdk-js": "^6.0.7",
63
- "@xylabs/threads": "~6.0.7",
64
- "@xylabs/toolchain": "~8.1.13",
65
- "@xylabs/tsconfig": "~8.1.13",
66
- "@xylabs/tsconfig-dom": "~8.1.13",
67
- "@xylabs/tsconfig-react": "~8.1.13",
68
- "@xyo-network/address": "^6.0.7",
69
- "@xyo-network/sdk-js": "^6.0.2",
70
- "@xyo-network/sdk-protocol-js": "~6.0.7",
71
- "@xyo-network/xl1-blockies": "~2.0.9",
72
- "@xyo-network/xl1-react-client-sdk": "^2.0.9",
73
- "@xyo-network/xl1-sdk": "^2.0.9",
56
+ "@storybook/react-vite": "^10.4.3",
57
+ "@types/react": "^19.2.17",
58
+ "@xylabs/eth-address": "^6.1.1",
59
+ "@xylabs/geo": "^6.1.1",
60
+ "@xylabs/pixel": "~6.1.1",
61
+ "@xylabs/react-button": "~9.1",
62
+ "@xylabs/react-error": "~9.1",
63
+ "@xylabs/react-promise": "~9.1",
64
+ "@xylabs/react-shared": "~9.1",
65
+ "@xylabs/react-theme": "^9.1.0",
66
+ "@xylabs/sdk-js": "^6.1.1",
67
+ "@xylabs/threads": "^6.1.1",
68
+ "@xylabs/toolchain": "~8.1.20",
69
+ "@xylabs/tsconfig": "~8.1.20",
70
+ "@xylabs/tsconfig-dom": "~8.1.20",
71
+ "@xylabs/tsconfig-react": "~8.1.20",
72
+ "@xyo-network/address": "^6.1.0",
73
+ "@xyo-network/sdk-js": "^6.1.0",
74
+ "@xyo-network/sdk-protocol-js": "~6.1.0",
75
+ "@xyo-network/xl1-blockies": "~2.1.4",
76
+ "@xyo-network/xl1-react-client-sdk": "^2.1.4",
77
+ "@xyo-network/xl1-sdk": "^2.1.4",
74
78
  "ajv": "^8.20.0",
75
79
  "async-mutex": "^0.5.0",
76
- "bn.js": "^5.2.3",
77
- "bowser": "^2.14.1",
78
- "buffer": "^6.0.3",
79
- "cosmiconfig": "^9.0.1",
80
+ "cosmiconfig": "^9.0.2",
80
81
  "debug": "~4.4.3",
81
82
  "eslint": "^10.4.1",
82
83
  "ethers": "^6.16.0",
83
84
  "hash-wasm": "~4.12.0",
84
85
  "idb": "^8.0.3",
85
86
  "lru-cache": "^11.5.1",
86
- "mixpanel-browser": "~2.79",
87
87
  "observable-fns": "~0.6.1",
88
- "pako": "^2.1.0",
89
88
  "query-string": "~9.3.1",
90
89
  "react": "^19.2.7",
91
90
  "react-dom": "^19.2.7",
92
- "react-router-dom": "^7.16.0",
93
- "spark-md5": "~3.0.2",
94
- "storybook": "^10.4.2",
91
+ "react-router-dom": "^7.17.0",
92
+ "storybook": "^10.4.3",
95
93
  "typescript": "~6.0.3",
96
94
  "uuid": "~14.0.0",
97
95
  "vite": "^8.0.16",
98
96
  "webextension-polyfill": "^0.12.0",
99
97
  "zod": "~4.4.3",
100
- "@xyo-network/react-chain-model": "~2.0.11"
98
+ "@xyo-network/react-chain-model": "~2.0.13"
101
99
  },
102
100
  "peerDependencies": {
103
101
  "@bitauth/libauth": "~3.0",
104
102
  "@metamask/json-rpc-engine": "^10.3",
105
103
  "@metamask/providers": "^22.1",
106
104
  "@metamask/utils": "^11.11",
107
- "@mui/icons-material": "~9.0",
108
- "@mui/material": "~9.0",
105
+ "@mui/icons-material": "^9.1",
106
+ "@mui/material": "^9.1",
109
107
  "@noble/post-quantum": "~0.6.1",
110
108
  "@opentelemetry/api": "^1.9",
111
109
  "@opentelemetry/sdk-trace-base": "^2.7",
112
- "@react-spring/web": "~10.0",
110
+ "@react-spring/web": "~10.1",
113
111
  "@scure/base": "~2.2",
114
112
  "@scure/bip39": "~2.2",
113
+ "@storybook/react-vite": "^10.3",
115
114
  "@xylabs/geo": "^6.0",
116
- "@xylabs/pixel": "~6.0",
117
- "@xylabs/react-button": "~9.0",
118
- "@xylabs/react-error": "~9.0",
119
- "@xylabs/react-promise": "~9.0",
120
- "@xylabs/react-shared": "~9.0",
121
- "@xylabs/react-theme": "~9.0",
115
+ "@xylabs/pixel": "^6.1",
116
+ "@xylabs/react-button": "^9.1",
117
+ "@xylabs/react-error": "^9.1",
118
+ "@xylabs/react-promise": "^9.1",
119
+ "@xylabs/react-shared": "^9.1",
120
+ "@xylabs/react-theme": "^9.1",
122
121
  "@xylabs/sdk-js": "^6.0",
123
- "@xylabs/threads": "~6.0",
122
+ "@xylabs/threads": "^6.1",
124
123
  "@xyo-network/address": "^6.0",
125
124
  "@xyo-network/sdk-js": "^6.0",
126
- "@xyo-network/sdk-protocol-js": "~6.0",
125
+ "@xyo-network/sdk-protocol-js": "~6.1",
127
126
  "@xyo-network/xl1-blockies": "^2.0",
128
- "@xyo-network/xl1-sdk": "^2.0",
127
+ "@xyo-network/xl1-sdk": "^2.1",
129
128
  "ajv": "^8.20",
130
129
  "async-mutex": "^0.5",
131
- "bn.js": "^5.2",
132
- "bowser": "^2.14",
133
- "buffer": "^6.0",
134
130
  "cosmiconfig": "^9.0",
135
131
  "debug": "~4.4",
136
132
  "ethers": "^6.16",
137
133
  "hash-wasm": "~4.12",
138
134
  "idb": "^8.0",
139
135
  "lru-cache": "^11.3",
140
- "mixpanel-browser": "~2.79",
141
136
  "observable-fns": "~0.6",
142
- "pako": "^2.1",
143
137
  "query-string": "~9.3",
144
138
  "react": "^19.2",
145
139
  "react-dom": "^19.2",
146
140
  "react-router-dom": "^7.15",
147
- "spark-md5": "~3.0",
141
+ "storybook": "^10.3",
148
142
  "uuid": "~14.0",
143
+ "vite": "^8.0",
149
144
  "webextension-polyfill": "^0.12",
150
145
  "zod": "~4.4"
151
146
  },