Skip to content

oliverbytes/alchemy_web3

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Alchemy

An Alchemy Platform client for Flutter & Dart

Report Bug · Request Feature

Web3 development made easy

One magic line of code supercharges your development with the world’s most powerful blockchain developer platform, relied upon by the majority of the world's top blockchain apps.

Table of Contents

About The Project

An Alchemy Platform client for Flutter & Dart!

  • Supports Ethereum and Alchemy Enhanced APIs
  • Uses Web Sockets for Ethereum-based APIs and HTTP for Alchemy NFT APIs

Playground Desktop App

Supported Platforms

  • iOS
  • Android
  • MacOS
  • Windows
  • Linux
  • Web

Built With

Google Flutter SDK

Getting Started

Prerequisites

Installation

  1. Clone the repo
git clone https://github.com/oliverbytes/alchemy_web3.git
  1. Install packages dependencies
flutter pub get
  1. Run
flutter run

Usage

// Import Package
import 'package:alchemy_web3/alchemy.dart';

// Instantiate Object
final alchemy = Alchemy();

// Configuration
alchemy.init(
  httpRpcUrl: <Alchemy-HTTP-API-URL>,
  wsRpcUrl: <Alchemy-WS-API-URL>,
  verbose: true,
);

// start web sockets
alchemy.start();

// Making requests
final result = await alchemy.polygon.getBalance(
  address: '0x2355Dc1f1eEAfFE537535B7B7B410E5dCCBAC3b8',
);

result.fold(
  (error) => debugPrint(
    'Error: ${error.code} : ${error.message}',
  ),
  (response) => debugPrint(
    'Response: ${response.getInEther} : ${response.toString()}',
  ),
);

// stop web sockets
alchemy.stop();

Roadmap

  • Complete API
  • Improve Error Codes
  • Merge some web3dart functionalities
  • Unit Testing

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Oliver Martinez - @oliverbytes - [email protected]

Project Link: https://github.com/oliverbytes/alchemy_web3

Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •