Azure Key Vault is a cloud service that provides a secure store for secrets. You can securely store keys, passwords, certificates, and other secrets. Azure key vaults may be created and managed through the Azure portal. In this tutorial, you create a key vault, then use it to store a secret and retrieve the secret to sign transactions on Algorand.
- Create free or paid azure account
- Login in to the portal
- Create Key Vault
src/Transaction.js
The code here handles connecting to the Algorand Purestake API client, creating a payment transaction, Signing the transaction with secret from Azure KeyVault.src/VaultSecret.js
This handles connecting to the azure identity and secret client and making a request to get the secret.src/RecoverAccount.js
This handles recovering of Algorand wallet using the secret from Azure KeyVault
NOTE
Create .env
file at the root of your project to store sensitive information. Your .env
file should look like this. The value should not be quotted.
API_KEY = YOUR PURESTAKE API KEY
KEY_VAULT_URI = YOUR KEY VAULT URI
SECRET_NAME = YOUR SECRET NAME
ALGOD_SERVER = https://testnet-algorand.api.purestake.io/ps2/
PORT =
To install required dependencies do
npm install
NOTE
Ensure you are logged in using the azure cli, to be able to access the secret before running the below code. To login to azure using the cli
do az login
. To run the below code ensure you are in the src
folder.
- To run the VaultSecret code run
node VaultSecret.js
- To run the transaction code run
node Transaction.js
- To run the recovery code run
node RecoverAccount.js
Distributed under the MIT License. See for more information. LICENSE
For more detailed step by step guide checkout the blog post here. And here is the link to the youtube demo
This project is not audited and should not be used in a production environment.