
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
@magic-ext/polkadot
Advanced tools
npm i magic-sdk @magic-ext/polkadot
Setup PolkadotExtension with magic-sdk
import { Magic } from 'magic-sdk';
import { PolkadotExtension } from '@magic-ext/polkadot';
const magic = new Magic('YOUR_API_KEY', {
extensions: [
new PolkadotExtension({
rpcUrl: 'polkadot rpc url'
})
]
});
// or
const magic = new Magic('YOUR_API_KEY', {
extensions: {
polkadot: new PolkadotExtension({
rpcUrl: 'polkadot rpc url'
})
}
});
See the developer documentation to learn how you can master the Magic SDK in a matter of minutes.
Using getAccount function to get Polkadot public address for current user.
const publicAddress = await magic.polkadot.getAccount();
console.log('icon public address', publicAddress);
Send polkadot native currency
const handlerSendTransaction = async () => {
const tx = await magic.polkadot.sendTransaction(
'5H3pELHbg9skXE2HfLqP23UPgrgu2Juj55CH6sdDGWc2HKNs',
1000000000000000,
);
console.log('transaction hash', tx)
};
const handlerContractCall = async () => {
const api = await ApiPromise.create({ provider: new WsProvider('ws://127.0.0.1:9944/') });
await api.isReady;
const abi = new Abi(api.registry, contractABI);
const data = abi.messages.flip();
const tx = await magic.polkadot.contractCall('5C52CfgkwANdFuN3VgPSprQwNWKfkLWMHJbMRzp12h4YarCa', 0, 1000000, data);
console.log('transaction hash', tx)
}
FAQs
magic polkadot extension
The npm package @magic-ext/polkadot receives a total of 941 weekly downloads. As such, @magic-ext/polkadot popularity was classified as not popular.
We found that @magic-ext/polkadot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 17 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.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.