AlgoSigner class

AlgoSigner is a blockchain wallet that makes it easy to use Algorand-based applications on the web.

Simply create or import your Algorand account, visit a compatible dApp, and approve or deny transactions — all from within your browser.

AlgoSigner injects a JavaScript library into every web page the browser user visits, which allows the site to interact with the extension. The dApp can use the injected library to connect to the user's Wallet, discover account addresses it holds, query the Network (make calls to AlgoD v2 or the Indexer) and request AlgoSigner to request for the user to sign a transaction initiated by the application.

All methods of the injected library return a Future that needs to be handled by the dApp.

Constructors

AlgoSigner()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

accounts({required String ledger}) Future<List>
Returns an array of accounts present in the Wallet for the given Network.
algod({required String ledger, required String path, String? body, String? method, String? contentType}) Future<Map<String, dynamic>>
Proxies the requested path to the Algod v2 API. Is limited to endpoints made available by the API server. By default, all calls to the AlgoSigner.algod method are GET.
connect() Future<Map<String, dynamic>>
Requests access to the Wallet for the dApp, may be rejected or approved. Every access to the extension begins with a connect request, which if approved by the user, allows the dApp to follow-up with other requests.
indexer({required String ledger, required String path}) Future<Map<String, dynamic>>
Proxies the requested path to the Indexer v2 API. Is limited to endpoints made available by the API server. The API backend may be configured by advanced users and is not guaranteed to respond as expected.
send({required String ledger, required String transaction}) Future<String>
Send a base64 encoded signed transaction blob to AlgoSigner to transmit to the Network.
signTransaction(Map<String, dynamic> transactions) Future<List<Map<String, dynamic>>>
Send an transaction object to AlgoSigner for approval. The Network is determined from the 'genesis-id' property. If approved, the response is an array of signed transaction objects, with the binary blob field base64 encoded to prevent transmission issues.
signTransactions(List<Map<String, dynamic>> transactions) Future<List<Map<String, dynamic>>>
Send transaction objects to AlgoSigner for approval. The Network is determined from the 'genesis-id' property. If approved, the response is an array of signed transaction objects, with the binary blob field base64 encoded to prevent transmission issues.