
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.
@dsnp/mrc-rpc
Advanced tools
An easy way to get all the custom rpc and types config to be able to easily use MRC with the Polkadot JS API library.
npm install @polkadot/api
(Polkadot API Library)npm install @dsnp/mrc-rpc
For details on use, see the Polkadot API library documentation.
// es6 style imports
import { ApiPromise } from '@polkadot/api';
import { rpc, types } from "@dsnp/mrc-rpc";
// ...
const mrcAPI = await ApiPromise.create({
// ...
rpc,
types,
});
// commonjs require
const { ApiPromise } = require('@polkadot/api');
const { rpc, types } = require("@dsnp/mrc-rpc");
// ...
const mrcAPI = await ApiPromise.create({
// ...
rpc,
types,
});
See CONTRIBUTING.md for more information.
Optional responses are not mapped to null
and instead return an object with a few properties.
For more details see the code for the Option class.
const optionalExample = await api.rpc.msa.getMsaId(account);
// Does the Option have a value?
if (!optionalExample.isEmpty) {
// Get the value
return optionalExample.value;
}
return null;
Vector responses are not mapped directly to a JavaScript Array.
Instead they are mapped to the Vec class which does extend Array.
Thus, you can still use map
, forEach
, etc... with responses or access the values directing via .values()
.
Distributed under the Apache 2.0 License. See LICENSE
for more information.
FAQs
RPC configuration for MRC for use with Polkadotjs API
The npm package @dsnp/mrc-rpc receives a total of 0 weekly downloads. As such, @dsnp/mrc-rpc popularity was classified as not popular.
We found that @dsnp/mrc-rpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.