
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.