Algorand
Installation
Magic interacts with the Algorand blockchain via Magic's extension NPM package @magic-ext/algorand
. The Algorand extension also lets you interact with the blockchain using methods from Algorand's Javascript SDK.
note
You can skip straight to our kitchen sink example directly:
- NPM
- Yarn
Initializing Extension
- ES Modules/TypeScript
Get User Info
Get Wallet
Using getWallet
function to get Algorand public address for current user.
- ES Modules/TypeScript
Sign Transaction
Getting Test Algorand
Before you can send transaction on the Algorand blockchain, you'll need to acquire some test Algorand.
- Go to our Algorand Example application
- Login with your email address
- Copy your Algorand public address
- Go to the Algorand Faucet
- Paste your copied Algorand public address in the text input
- Now you can use your test Algorand in our example app
Call Extension Method
Note that the Magic Algorand extension follows the method names and conventions by Algorand's Javascript SDK. To sign a standard Algorand blockchain transaction, you can call the magic.algorand.signTransaction()
method.
- ES Modules/TypeScript
Sign Bid
Call Extension Method
Note that the Magic Algorand extension follows the method names and conventions by Algorand's Javascript SDK. To sign a standard Algorand blockchain Bid, you can call the magic.algorand.signBid()
method.
- ES Modules/TypeScript