On this page:
3.12.1 Algorand Algorand:   mnemonic Algorand:   Algo  Signer

3.12 Testing Reach programs in the browser

Dan Burton <dan@reach.sh>

Reach is designed to work securely in a browser-based Web app by leveraging browser-based wallets to sign transactions. This document will give you a few hints about configuring wallets like MetaMask for Ethereum and AlgoSigner for Algorand.

    3.12.1 Algorand Algorand: mnemonic Algorand: AlgoSigner

3.12.1 Algorand

The Reach standard library gives you a few options for how to sign transactions for Algorand. You can use reach.setSignStrategy to configure the behavior of reach.getDefaultAccount. Algorand: mnemonic

import * as reach from '@reach-sh/stdlib/ALGO';

The mnemonic strategy is the simplest, and is the default. Reach prompts the user for their mnemonic, and uses it to derive the secret key needed for signing. Algorand: AlgoSigner

import * as reach from '@reach-sh/stdlib/ALGO';

The AlgoSigner strategy will prompt the user for their account address, and will use AlgoSigner to sign transactions.

Reach requires features of TEAL 3 which are not yet available on Algorand MainNet. Reach programs can be run on a development network, like the one created by reach run. For AlgoSigner to work with a development network, it must be configured appropriately. Here’s how to configure AlgoSigner for the Reach Devnet:

The configuration: