
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@substrate/react-context
Advanced tools
This repo contains a set of utilities provided as react context.
in your App.jsx (or App.tsx)
import { ApiPromiseContextProvider } from '@substrate/react-context';
const WS_PROVIDER = process.env.REACT_APP_WS_PROVIDER;
const App = () => {
if (!WS_PROVIDER) {
console.error('REACT_APP_WS_PROVIDER not set');
return null;
}
const provider = new WsProvider(WS_PROVIDER);
return (
<ApiPromiseContextProvider provider={provider}>
<MainApp />
</ApiPromiseContextProvider>
);
};
Then you can access the api anywhere in your app using the hook useContext(ApiPromiseContext):
import { ApiPromiseContext } from '@substrate/react-context';
export default function () {
// get the api and the isApiReady flag
const { api, isApiReady } = useContext(ApiPromiseContext);
useEffect(() => {
// return early if the api is not ready
if (!isApiReady) {
return;
}
let unsubscribe: () => void;
// use the api
api.derive.chain.bestNumber((number) => {
setCurrentBlock(number);
})
.then(unsub => {unsubscribe = unsub;})
.catch(e => console.error(e));
return () => unsubscribe && unsubscribe();
}, [api, isApiReady]);
}
FAQs
Wrapper to connect React components to PolkadotJS Api
We found that @substrate/react-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.