
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
@xyo-network/react-chain-network
Advanced tools
XYO Layer One React SDK
@xyo-network/react-chain-network
@xyo-network/react-chain-network
function useActiveNetworkCurrentBlock(refresh, viewer?): [HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined];
number = 1
XyoViewer
[HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined]
@xyo-network/react-chain-network
function useActiveNetworkCurrentBlockInPage(refresh): [HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined];
number = 1
[HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined]
@xyo-network/react-chain-network
function useActiveNetworkCurrentBlockInWallet(refresh): [HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined];
number = 1
[HydratedBlock<BlockBoundWitness, Payload> | undefined, Error | undefined, UsePromiseState | undefined]
@xyo-network/react-chain-network
function useActiveNetworkNetwork(): SimpleXyoNetwork | undefined;
SimpleXyoNetwork | undefined
@xyo-network/react-chain-network
function useActiveNetworkRunner(): JsonRpcXyoRunner | undefined;
JsonRpcXyoRunner | undefined
@xyo-network/react-chain-network
function useChainNetwork(required):
| Omit<{
activeNetwork?: NetworkBootstrap;
chainNetworkError?: Error;
networks?: NetworkBootstrap[];
updateActiveNetwork?: (networkId) => void;
}, "provided">
| Omit<NotProvidedContextExState<ChainNetworkState>, "provided">;
boolean = true
| Omit<{
activeNetwork?: NetworkBootstrap;
chainNetworkError?: Error;
networks?: NetworkBootstrap[];
updateActiveNetwork?: (networkId) => void;
}, "provided">
| Omit<NotProvidedContextExState<ChainNetworkState>, "provided">
@xyo-network/react-chain-network
function usePollNetworkStatus(): readonly [NetworkStatus | undefined, Error | undefined];
readonly [NetworkStatus | undefined, Error | undefined]
@xyo-network/react-chain-network
function useViewerInPage(networkOverride?): XyoViewer | JsonRpcXyoViewer | undefined;
Get the viewer for the active network, first from the wallet or fallback to HTTP RPC
NetworkBootstrap
XyoViewer | JsonRpcXyoViewer | undefined
@xyo-network/react-chain-network
function useViewerInWallet(): JsonRpcXyoViewer | undefined;
Get the viewer directly from the active network
JsonRpcXyoViewer | undefined
@xyo-network/react-chain-network
PropsWithChildrenoptional getActiveNetwork: () => Promise<NetworkBootstrap | undefined>;
Promise<NetworkBootstrap | undefined>
optional networks: NetworkBootstrap[];
optional setActiveNetwork: (networkId) => Promise<NetworkBootstrap>;
DefaultNetworkIds
Promise<NetworkBootstrap>
@xyo-network/react-chain-network
AvatarPropsoptional icon: string;
optional iconStyles: CSSProperties;
optional name: string;
@xyo-network/react-chain-network
DetailedHTMLProps<HtmlHTMLAttributes<HTMLSpanElement>, HTMLSpanElement>optional icon: string;
@xyo-network/react-chain-network
MenuItemPropsoptional active: boolean;
optional network: NetworkBootstrap;
optional updateActiveNetwork: (networkId) => void;
DefaultNetworkIds
void
@xyo-network/react-chain-network
AlertPropsoptional status: NetworkStatus;
@xyo-network/react-chain-network
PropsWithChildren<AlertProps>@xyo-network/react-chain-network
type ChainNetworkState = ContextExState<{
activeNetwork?: NetworkBootstrap;
chainNetworkError?: Error;
networks?: NetworkBootstrap[];
updateActiveNetwork?: (networkId) => void;
}>;
@xyo-network/react-chain-network
const ActiveNetworkAvatar: React.FC<AvatarProps>;
@xyo-network/react-chain-network
const ChainNetworkContext: Context<
| object & object
| never
| FixedValues<ProvidedContextExState<{
activeNetwork?: NetworkBootstrap;
chainNetworkError?: Error;
networks?: NetworkBootstrap[];
updateActiveNetwork?: (networkId) => void;
}>, never> & object
| FixedValues<NotProvidedContextExState<{
activeNetwork?: NetworkBootstrap;
chainNetworkError?: Error;
networks?: NetworkBootstrap[];
updateActiveNetwork?: (networkId) => void;
}>, never> & object>;
@xyo-network/react-chain-network
const ChainNetworkProvider: React.FC<ChainNetworkProviderProps>;
@xyo-network/react-chain-network
const NetworkAvatar: React.FC<NetworkAvatarProps>;
@xyo-network/react-chain-network
const NetworkIcon: React.FC<NetworkIconProps>;
@xyo-network/react-chain-network
const NetworkMenuItem: React.FC<NetworkMenuItemProps>;
@xyo-network/react-chain-network
const NetworkStatus: React.FC<NetworkStatusProps>;
@xyo-network/react-chain-network
const NetworkStatusAlert: React.FC<NetworkStatusAlertProps>;
See the LICENSE file for license details
FAQs
XYO Layer One React SDK
The npm package @xyo-network/react-chain-network receives a total of 981 weekly downloads. As such, @xyo-network/react-chain-network popularity was classified as not popular.
We found that @xyo-network/react-chain-network demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.