An open API service indexing awesome lists of open source software.

https://github.com/rootsoft/flutter-myalgo-connect

A Flutter web plugin to approve or deny Algorand transactions using MyAlgo Connect.
https://github.com/rootsoft/flutter-myalgo-connect

Last synced: about 1 month ago
JSON representation

A Flutter web plugin to approve or deny Algorand transactions using MyAlgo Connect.

Awesome Lists containing this project

README

          



# flutter-myalgo-connect
[![pub.dev][pub-dev-shield]][pub-dev-url]
[![Effective Dart][effective-dart-shield]][effective-dart-url]
[![Stars][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]

MyAlgo is an Algorand Wallet allowing you to freely interact with the Algorand blockchain.

MyAlgo provides the simplest and most secure way to send and receive Algos and tokens, organize and track all your Algorand wallets, manage your assets and much more.

The plugin was developed by RootSoft and is not affiliated with Rand Labs or MyAlgo is any way. For more information, check out the official MyAlgo [documentation](https://github.com/randlabs/myalgo-connect).

## Introduction

The integration with MyAlgo Wallet allows users secure access to Algorand DApps. Users only need to share their public addresses with the WebApp and this in turn allows them to review and sign all types of transactions without exposing their private keys. The main novelty of MyAlgo Connect lies in the fact that all the process is managed in the user’s browser without the need for any backend service nor downloads, extensions or browser plugins. Unlike extension based wallets like Metamask or AlgoSigner, MyAlgo Connect works with any browser (including Safari) and any device giving developers a native HTML5 solution that works on all platforms.

The flutter-myalgo-connect plugin follows the Javascript MyAlgo Connect API closely and all methods are available. The plugin integrates elegantly with the [algorand_dart](https://github.com/RootSoft/algorand-dart) SDK so transactions can be easily signed and approved.

Once installed, you can simply sign transactions and start sending payments:

```dart
/// Fetch the accounts
final accounts = await MyAlgoConnect.connect();

/// Sign the transaction
final signedTx = await MyAlgoConnect.signTransaction(data);
final blob = signedTx['blob'];

// Send the transaction
final txId = await algorand.sendRawTransaction(
base64Decode(blob),
);
```

## Getting started

### Installation

You can install the package via pub.dev:

```bash
flutter pub add flutter_myalgo_connect
```

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

```yaml
dependencies:
flutter_myalgo_connect: ^latest-version
```

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Next, add the MyAlgo Connect JS file to the bottom of your index.html file:

```html