
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@rmrk-team/rmrk-hooks
Advanced tools
React hooks for working with RMRK EVM NFTs.
pnpm install @rmrk-team/rmrk-hooks
import React from "react";
import type {Address} from "viem";
import {
NETWORK_CONTRACTS_PROPS,
RMRKUtilityContracts,
} from "@rmrk-team/rmrk-evm-utils";
import {RMRKContextProvider} from "@rmrk-team/rmrk-hooks";
import {QueryClient, QueryClientProvider} from "@tanstack/react-query";
import {WagmiProvider} from "wagmi";
import {hardhat} from "wagmi/chains";
const queryClient = new QueryClient();
// You can pass custom utility contracts to the RMRKContextProvider
const customUtilityContracts = {
[hardhat.id]: {
[NETWORK_CONTRACTS_PROPS.RMRKEquipRenderUtils]: "0x00",
[NETWORK_CONTRACTS_PROPS.RMRKBulkWriter]: "0x00",
[NETWORK_CONTRACTS_PROPS.RMRKCollectionUtils]: "0x00",
[NETWORK_CONTRACTS_PROPS.RMRKCatalogUtils]: "0x00",
},
} satisfies RMRKUtilityContracts;
const rmrkConfig = {
utilityContracts: customUtilityContracts,
};
export const Container = ({
contractAddress,
tokenId,
}: {
chainId: number;
contractAddress: Address;
tokenId: bigint;
children: React.ReactNode;
}) => {
return (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<RMRKContextProvider config={rmrkConfig}>
{children}
</RMRKContextProvider>
</QueryClientProvider>
</WagmiProvider>
);
};
import {
useFetchIpfsMetadata,
useGetAssetData,
useGetComposedState,
useGetInterfaceSupport,
} from '@rmrk-team/rmrk-hooks';
type Props = {
contractAddress: Address;
tokenId: bigint;
chainId: number;
}
export const Example = ({contractAddress, tokenId, chainId}: Props) => {
const {
isLoading: isLoadingComposableState,
isError: isErrorComposableState,
error: errorComposableState,
data: composableState,
} = useGetComposedState(
{
tokenId,
chainId,
contractAddress,
}
);
const {
fixedPartsWithMetadatas,
slotPartsWithMetadatas,
equippableGroupId,
assetMetadataUri,
catalogAddress,
} = composableState;
console.log(composableState)
return null;
}
export const App = () => {
return (
<Container>
<Example />
</Container>
)
}
FAQs
React hooks for working with NFTs built on RMRK standards
The npm package @rmrk-team/rmrk-hooks receives a total of 27 weekly downloads. As such, @rmrk-team/rmrk-hooks popularity was classified as not popular.
We found that @rmrk-team/rmrk-hooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.