
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@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 42 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.