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.
Initialization
JavaScript
Common Methods
Get 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 theAlgorand Faucet
- Paste your copied Algorand public address in the text input
- Now you can use your test Algorand in our example app
Get Wallet
Use thegetWallet
function to get the Algorand public address for the current user.
JavaScript
Sign Transaction
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 themagic.algorand.signTransaction()
method.
JavaScript
Sign Bid
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 themagic.algorand.signBid()
method.
JavaScript
Sign Group Transaction
To sign a standard Algorand blockchain Group transaction with magic user, you can call themagic.algorand.signGroupTransaction()
method.
JavaScript
Sign Group Transaction V2
To sign a standard Algorand blockchain Group transaction with magic user, you can call themagic.algorand.signGroupTransactionV2()
method.
JavaScript