Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@magic-ext/algorand
Advanced tools
npm i magic-sdk @magic-ext/algorand
Setup AlgorandExtension with magic-sdk
import { Magic } from 'magic-sdk';
import { AlgorandExtension } from '@magic-ext/algorand';
const magic = new Magic('YOUR_API_KEY', {
extensions: [
new AlgorandExtension({
rpcUrl: 'algorand rpc url'
})
]
});
// or
const magic = new Magic('YOUR_API_KEY', {
extensions: {
algorand: new AlgorandExtension({
rpcUrl: 'algorand rpc url'
})
}
});
See the developer documentation to learn how you can master the Magic SDK in a matter of minutes.
Using getWallet function to get Algorand public address for current user.
const publicAddress = await magic.algorand.getWallet();
console.log('algorand public address', publicAddress);
By passing txnObj instance to magic.algorand.signTransaction()
method, it will automatically sign the transaction with current user and
generate transaction object including signature.
const txn = {
"to": "7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q",
"fee": 10,
"amount": 50,
"firstRound": 51,
"lastRound": 61,
"genesisID": "devnet-v33.0",
"genesisHash": "JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=",
"closeRemainderTo": "IDUTJEUIEVSMXTU4LGTJWZ2UE2E6TIODUKU6UW3FU3UKIQQ77RLUBBBFLA",
"note": new Uint8Array(Buffer.from("6gAVR0Nsv5Y=", "base64"))
};
const tx = await magic.algorand.signTransaction(txn);
console.log('signed transaction', tx)
By passing txnObj instance to magic.algorand.signBid()
method, it will automatically sign the bid with current user and
generate transaction object including signature.
const bid = {
"bidderKey": "IB3NJALXLDX5JLYCD4TMTMLVCKDRZNS4JONHMIWD6XM7DSKYR7MWHI6I7U",
"auctionKey": "7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q",
"bidAmount": 1000,
"maxPrice": 10,
"bidID": 2,
"auctionID": 56
};
const tx = await magic.algorand.signBid(bid);
console.log('send bid', tx)
FAQs
magic algorand extension
The npm package @magic-ext/algorand receives a total of 273 weekly downloads. As such, @magic-ext/algorand popularity was classified as not popular.
We found that @magic-ext/algorand demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.