
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@futureverse/mint-sdk-react
Advanced tools
NPM:
npm install @futureverse/mint-sdk-react --save
Yarn:
yarn add @futureverse/mint-sdk-react
import {
TrnApiProvider,
useCreateAndSendExtrinsic,
useTrnApi,
} from '@futureverse/mint-sdk-react';
import { useCallback } from 'react';
import { useSigner } from 'wagmi';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
function useCreateMintExtrinsic(
collectionId: string,
numberOfTokens: number,
owner: string
) {
const { trnApi } = useTrnApi();
return trnApi.tx.nft.mint(collectionId, numberOfTokens, owner);
}
function ExtrinsicDemo() {
const { trnApi } = useTrnApi();
const { data: signer } = useSigner();
const collectionId = '<your collection id>';
const numberOfTokens = 1; // How many tokens to mint
const address = 'FuturePass or address to mint to';
const extrinsic = useCreateMintExtrinsic(
collectionId,
numberOfTokens,
address
);
const { mutateAsync } = useCreateAndSendExtrinsic(trnApi);
const submitTransaction = useCallback(async () => {
if (!signer) return
const { result } = await mutateAsync({
account: address,
extrinsic,
signer,
});
return result;
}, [extrinsic, mutateAsync, signer]);
// Your UI code to call submitTransaction
return <></>;
}
const queryClient = new QueryClient();
function DemoApp() {
return (
// Provide a TRN API provider to your application
// If using @futureverse/react you can exclude this provider
// import { useTrnApi } from '@futureverse/react';
<QueryClientProvider client={queryClient}>
<TrnApiProvider network="porcini">
<ExtrinsicDemo />
</TrnApiProvider>
</QueryClientProvider>
);
}
FAQs
## Installation
The npm package @futureverse/mint-sdk-react receives a total of 5 weekly downloads. As such, @futureverse/mint-sdk-react popularity was classified as not popular.
We found that @futureverse/mint-sdk-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 18 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.