
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@chainsafe/sprinter-react
Advanced tools
The Sprinter React SDK is a React wrapper for the Sprinter SDK, enabling easy interaction with blockchain networks through React components and hooks. It provides context management and custom hooks for retrieving balances, tokens, supported chains, and solutions for asset transfers.
To install the package, use npm or yarn:
npm install @chainsafe/sprinter-react @chainsafe/sprinter-sdk
# or
yarn add @chainsafe/sprinter-react @chainsafe/sprinter-sdk
Wrap your application in the SprinterContext to gain access to blockchain-related data within your component tree.
import React from 'react';
import { SprinterContext } from '@chainsafe/sprinter-react';
const App = () => (
<SprinterContext>
<YourComponent />
</SprinterContext>
);
export default App;
Inside your components, you can use the provided hooks to interact with blockchain data:
import React, { useEffect } from 'react';
import { useSprinterBalances, useSprinterTokens } from '@chainsafe/sprinter-react';
const YourComponent = () => {
const ownerAddress = "0xYourAddressHere";
const { balances, getUserBalances } = useSprinterBalances(ownerAddress);
useEffect(() => {
getUserBalances();
}, [getUserBalances]);
return (
<div>
<h1>Balances:</h1>
<pre>{JSON.stringify(balances, null, 2)}</pre>
<h1>Available Tokens:</h1>
<pre>{JSON.stringify(tokens, null, 2)}</pre>
</div>
);
};
export default YourComponent;
The following hooks are provided by the SDK:
useSprinter(): Access everything from the Sprinter context.useSprinterBalances(account: Address): Retrieve user balances for a given account.useSprinterTokens(): Retrieve available tokens.useSprinterChains(): Retrieve available blockchain chains.useSprinterSolution(): Retrieve solutions for asset transfers.useSprinterCallSolution(): Call solutions for transferring assets.You can pass custom fetch options when initializing the context:
<SprinterContext fetchOptions={{ baseUrl: "https://api.test.sprinter.buildwithsygma.com/" }}>
<YourComponent />
</SprinterContext>
For more detailed docs you can check out SDK docs page.
Contributions are welcome! Feel free to open issues or submit pull requests for new features or bug fixes.
FAQs
Unknown package
The npm package @chainsafe/sprinter-react receives a total of 111 weekly downloads. As such, @chainsafe/sprinter-react popularity was classified as not popular.
We found that @chainsafe/sprinter-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.