Dart SDK for StarkNet ✨

Overview

⚠️ ⚠️ ⚠️ This package is a work in progress. Do not use in production. ⚠️ ⚠️ ⚠️

starknet.dart

Dart SDK for StarkNet

The goal of this dart package is to be able to call any JSON-RPC endpoint exposed by the StarkNet nodes (see the specs) in a type-safe way from any dart application.

📚 docs

💬 telegram chat

Motivation

StarkNet is a revolution in the web3 world: it allows to scale Ethereum and offers the best possible UX thanks to unique features like account abstraction or session keys.

But web3 mainstream adoption won't happen unless decentralized applications go to mobile.

That's why it's a priority to build the best possible Starknet SDK for dart applications, thus unlocking the era of Flutter mobile apps on StarkNet.

Roadmap

You can check out the full roadmap here. Talk to us on telgram if you want to challenge the priorities.

Features

  • Provider
  • Signer
  • Account

Infra

  • Setup CI for unit tests
  • Setup github workflow to publish to the pub.dev registry

Education

  • Implement a small flutter app example
  • Write a tutorial to show how to use this SDK in the context of a flutter app
  • Setup a docs website containing multiple user guides

Contributing

If you want to contribute to this project or have any suggestion, please check out our Contributor Guide.

Comments
  • Implement starknet_getNonce

    Implement starknet_getNonce

    starknet_getNonce API doc here.

    The boiler plate code has been implemented as part of #17. However, the method was unimplemented at the time of development.

    opened by prajwal27 2
  • Implement getClass methods

    Implement getClass methods

    • [x] starknet_getClass
    • [x] starknet_getClassHashAt
    • [x] starknet_getClassAt

    Specs: https://github.com/starkware-libs/starknet-specs/blob/cad17ef605ab337981ef11b28ba5343e51ad16ee/api/starknet_api_openrpc.json#L240-L339

    opened by gabsn 2
  • Implement getTransaction methods

    Implement getTransaction methods

    • [x] starknet_getTransactionByHash
    • [ ] starknet_getTransactionByBlockIdAndIndex
    • [x] starknet_getTransactionReceipt

    Specs: https://github.com/starkware-libs/starknet-specs/blob/cad17ef605ab337981ef11b28ba5343e51ad16ee/api/starknet_api_openrpc.json#L150-L239

    opened by gabsn 2
  • Bump certifi from 2022.9.24 to 2022.12.7

    Bump certifi from 2022.9.24 to 2022.12.7

    Bumps certifi from 2022.9.24 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies python 
    opened by dependabot[bot] 0
  • Wait for transaction

    Wait for transaction

    Closes #52

    This PR provide the following functions:

    • waitForState
    • waitForTransaction
    • waitForAcceptance

    These functions will return true when given transaction status is one of the expected states.

    opened by ptisserand 0
  • Add support for Invoke V1 transaction

    Add support for Invoke V1 transaction

    This pull request will fix invoke V0 transaction support and add support to invoke V1 transaction

    Version for invoke transaction will depend on Account supportedTxVersion

    To be paid 
    opened by ptisserand 0
  • Bump glob-parent and @openzeppelin/docs-utils in /contracts/lib/cairo_contracts/docs

    Bump glob-parent and @openzeppelin/docs-utils in /contracts/lib/cairo_contracts/docs

    Bumps glob-parent to 5.1.2 and updates ancestor dependency @openzeppelin/docs-utils. These dependencies need to be updated together.

    Updates glob-parent from 3.1.0 to 5.1.2

    Release notes

    Sourced from glob-parent's releases.

    v5.1.2

    Bug Fixes

    v5.1.1

    Bug Fixes

    v5.1.0

    Features

    • add flipBackslashes option to disable auto conversion of slashes (closes #24) (#25) (eecf91d)

    v5.0.0

    ⚠ BREAKING CHANGES

    • Drop support for node <6 & bump dependencies

    Miscellaneous Chores

    • Drop support for node <6 & bump dependencies (896c0c0)

    v4.0.0

    ⚠ BREAKING CHANGES

    • question marks are valid path characters on Windows so avoid flagging as a glob when alone
    • Update is-glob dependency

    Features

    • hoist regexps and strings for performance gains (4a80667)
    • question marks are valid path characters on Windows so avoid flagging as a glob when alone (2a551dd)
    • Update is-glob dependency (e41fcd8)
    Changelog

    Sourced from glob-parent's changelog.

    5.1.2 (2021-03-06)

    Bug Fixes

    6.0.2 (2021-09-29)

    Bug Fixes

    6.0.1 (2021-07-20)

    Bug Fixes

    • Resolve ReDoS vulnerability from CVE-2021-35065 (#49) (3e9f04a)

    6.0.0 (2021-05-03)

    ⚠ BREAKING CHANGES

    • Correct mishandled escaped path separators (#34)
    • upgrade scaffold, dropping node <10 support

    Bug Fixes

    • Correct mishandled escaped path separators (#34) (32f6d52), closes #32

    Miscellaneous Chores

    • upgrade scaffold, dropping node <10 support (e83d0c5)

    5.1.1 (2021-01-27)

    Bug Fixes

    5.1.0 (2021-01-27)

    Features

    • add flipBackslashes option to disable auto conversion of slashes (closes #24) (#25) (eecf91d)

    5.0.0 (2021-01-27)

    ⚠ BREAKING CHANGES

    • Drop support for node <6 & bump dependencies

    ... (truncated)

    Commits
    • eb2c439 chore: update changelog
    • 12bcb6c chore: release 5.1.2
    • f923116 fix: eliminate ReDoS (#36)
    • 0b014a7 chore: add JSDoc returns information (#33)
    • 2b24ebd chore: generate initial changelog
    • 9b6e874 chore: release 5.1.1
    • 749c35e ci: try wrapping the JOB_ID in a string
    • 5d39def ci: attempt to switch to published coveralls
    • 0b5b37f ci: put the npm step back in for only Windows
    • 473f5d8 ci: update azure build images
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by phated, a new releaser for glob-parent since your current version.


    Updates @openzeppelin/docs-utils from 0.1.2 to 0.1.3

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    To be paid 
    opened by dependabot[bot] 0
  • Migrate to 0.2.1

    Migrate to 0.2.1

    New specs: https://github.com/starkware-libs/starknet-specs/tree/v0.2.1 Inspiration: https://github.com/dontpanicdao/caigo

    • [ ] Support both 0.1 & 0.2.1
    opened by gabsn 0
  • Contract base class and ERC20 class implementations

    Contract base class and ERC20 class implementations

    #46

    In order to add ERC20 class, I have done the following:

    • moved felt.dart to types folder
    • added uint256.dart implementation in types folder
    • added contract.dart and erc20.dart implementations in contract folder.

    Please note that only ERC20 view methods are currently implemented

    Paid 
    opened by ptisserand 0
  • Update the tests to target v0.10.0 pathfinder node and fix the tests

    Update the tests to target v0.10.0 pathfinder node and fix the tests

    • [x] Modify here to target the pathfinder v0.10.0 node instead
    • [ ] Modify here to target the pathfinder v0.10.0 node instead
    • [x] Fix the tests to make sure the SDK actually works with pathfinder v0.10.0 specs
    opened by gabsn 0
  • Implement waitForTransaction

    Implement waitForTransaction

    Implement a function to wait for a contract to be deployed or a transaction to be accepted on l2.

    Inspiration: https://github.com/0xs34n/starknet.js/blob/2c08e5d8fe80469ba41222767193823b3d516536/src/provider/rpc.ts#L212

    opened by gabsn 0
  • Implement starknet_addDeclareTransaction

    Implement starknet_addDeclareTransaction

    Specs: https://github.com/starkware-libs/starknet-specs/blob/30e5bafcda60c31b5fb4021b4f5ddcfc18d2ff7d/api/starknet_write_api.json#L60-L101

    • [ ] Integration test
    • [ ] Strictly follow v0.1.0 specs
    opened by gabsn 0
  • Implement starknet_addDeployTransaction

    Implement starknet_addDeployTransaction

    Specs: https://github.com/starkware-libs/starknet-specs/blob/30e5bafcda60c31b5fb4021b4f5ddcfc18d2ff7d/api/starknet_write_api.json#L102-L154

    • [ ] Integration test
    • [ ] Follow v0.1.0 specs
    opened by gabsn 0
  • Add higher-level abstraction class to interact with contracts

    Add higher-level abstraction class to interact with contracts

    • [x] Add Contract generic clas
    • [ ] Add Erc20 class following open-zeppelin standard
    • [ ] Add Erc721 class following open-zeppelin standard (let @prajwal27 implements it, so he can learn more on smart contracts)
    • [ ] Add support to generate dart class from abi using the build runner.

    Inspiration by starknet.js:

    const erc20 = new Contract(compiledErc20.abi, erc20Address);
    
    erc20.connect(account);
    
    const { transaction_hash: mintTxHash } = await erc20.mint(
      account.address,
      "1000"
    );
    
    console.log(`Waiting for Tx to be Accepted on Starknet - Minting...`);
    await defaultProvider.waitForTransaction(mintTxHash);
    
    const balanceBeforeTransfer = await erc20.balance_of(account.address);
    

    You can also check what have been done by web3dart for solidity, especially their feature to automatically generate dart classes from the abi: https://github.com/xclud/web3dart/blob/main/lib/src/contracts/generated_contract.dart

    Image

    opened by gabsn 0
  • Implement tests for starknet_getStateUpdate

    Implement tests for starknet_getStateUpdate

    starknet_getStateUpdate API doc here.

    The boilerplate code has been implemented as part of #9. However, the method was unimplemented at the time of development.

    opened by prajwal27 1
  • Implement tests for starknet_blockHashAndNumber

    Implement tests for starknet_blockHashAndNumber

    starknet_blockHashAndNuber API doc here.

    The boilerplate code has been implemented as part of #27. However, the method was unimplemented at the time of development.

    opened by prajwal27 1
Owner
Gabin Marignier
Gabin Marignier
A native Dart SDK for Stripe.

stripe_fl stripe A native Dart SDK for Stripe. Documentation Initializing import 'package:stripe_fl/stripe_fl.dart'; Stripe.init( produc

Chiziaruhoma Ogbonda 3 May 15, 2020
MercadoPago Dart SDK

MercadoPago SDK module for Payments integration Usage To use this plugin, add mercadopago_sdk as a dependency in your pubspec.yaml file. Basic checkou

BMKero's 31 Oct 6, 2022
Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.

Official Flutter packages for Stream Chat Quick Links Register to get an API key for Stream Chat Flutter Chat SDK Tutorial Chat UI Kit Sample apps Thi

Stream 659 Dec 25, 2022
Replaces Flutter's bundled Dart SDK with the macOS arm64 version

This script replaces Flutter's bundled Dart SDK with the macOS arm64 version Get

null 21 Oct 9, 2022
Todo is an Simple Task Management App coded using Dart which is a peogramming language for Flutter SDK(2.5) supports Null Safety 📑🚩

Todo ?? ?? ?? Introduction Todo is an Simple Task Management App coded using Dart which is a peogramming language for Flutter SDK(2.5) supports Null S

navee-ramesh 6 Nov 5, 2022
Flutter-Udemy - - A Udemy clone using Flutter sdk and dart.

udemy_clone A new Flutter project. Below are some images : Getting Started This project is a starting point for a Flutter application. A few resources

Priyam Soni 3 Apr 24, 2022
O school_app é uma Aplicação Mobile para uma escola que foi desenvolvida utilizando Flutter SDK/Dart

O school_app é uma Aplicação Mobile para uma escola que foi desenvolvida utilizando Flutter SDK/Dart(Para o aplicativo móvel), Node.Js (Para a API) e PostgreSQL(Para o Banco de dados).

null 2 May 21, 2022
A Dart SDK for interacting with a Minecraft server using the RCON protocol.

A Dart SDK for interacting with a Minecraft server using the RCON protocol. Package on pub.dev Features Provides an API to connect to, log in to, send

Aidan Lok 2 Oct 4, 2022
a flutter socket client sdk for ezyfox-server

ezyfox-server-flutter-client flutter client for ezyfox server Architecture Offical documentation https://youngmonkeys.org/ezyfox-flutter-client-sdk/ P

Young Monkeys 44 Dec 13, 2022
Avo Inspector SDK for Flutter

Avo Inspector for Flutter @Hacktoberfest Happy Hacktoberfest! This repo is participating, check out the issues we've prepared for you If you need any

Avo 10 Oct 25, 2022
Flutter guide + SDK. Check Community repository for common information.

freeRASP for Flutter freeRASP for Flutter is a part of security SDK for the app shielding and security monitoring. Learn more about provided features

Talsec 63 Dec 26, 2022
Bug reporting SDK for Flutter apps.

Shake for Flutter Flutter plugin for Shake. How to use Install Shake Add Shake to your pubspec.yaml file. dependencies: shake_flutter: ^15.0.0 I

Shake 13 Oct 18, 2022
Flutter版微信SDK.WeChat SDK for flutter.

Fluwx 中文请移步此处 What's Fluwx Fluwx is flutter plugin for WeChatSDK which allows developers to call WeChatSDK native APIs. Join QQ Group now: 892398530。

OpenFlutter 2.7k Jan 3, 2023
RelatedDigital Flutter SDK

Table of Contents Introduction Requirements Installation Platform Integration Android iOS Usage Initializing Push Notifications Requesting Permission

Related Digital 34 Jun 26, 2022
A flutter plugin to get facebook deep links and log app events using the latest Facebook SDK to include support for iOS 14

Facebook Sdk For Flutter LinkedIn GitHub facebook_sdk_flutter allows you to fetch deep links, deferred deep links and log facebook app events. This wa

Saad Farhan 23 Dec 17, 2022
Android ve İOS gibi platformlar için mobil uygulama geliştirmenizi sağlayan bir SDK

Flutter Nedir? Google tarafından 2017 yılında piyasaya sürülmüş açık kaynak kodlu bir araçtır. Android ve İOS gibi platformlar için mobil uygulama gel

Google DSC Galatasaray 24 Mar 16, 2022
A flutter plugin to get android version(SDK INT).

get_sdk_int A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package that i

jinyus 0 Dec 28, 2021
A convenience wrapper for building Flutter apps with PDFTron mobile SDK.

About PDFTron Flutter PDFTron's Flutter PDF library brings smooth, flexible, and stand-alone document viewing and editing solutions using Flutter code

PDFTron Systems Inc. 157 Dec 26, 2022