The goal of this SDK is to be able to interact with Starknet smart contracts in a type-safe way.
You can also call the JSON-RPC endpoint exposed by the Starknet full nodes (see the specs).
📚 docs
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.
You can follow the progress of the project directly on the kanban.
If you want to contribute to this project or have any suggestion, please check out our Contributor Guide.
- Install python deps. Make sure to select the python interpreter from the local .venv created by poetry if you're using VS Code.
poetry install
If you have an error about gmp install it like this :
brew install gmp
- Run devnet in one terminal
poetry run devnet start
- Setup devnet by deploying contracts
poetry run devnet setup
You can also deploy contracts one by one:
poetry run deploy balance
- Interact with deployed contracts:
poetry run interact get_balance
poetry run interact increase_balance 10
You can run the tests with the following command:
dart test
To run the tests on devnet use the following command:
NETWORK=devnet dart test -t integration-devnet-040
You simply need to create a PR where you:
- Bump the package version
- Add an entry to the
CHANGELOG
Make sure it passes all the CI tests, then merge it to release a new version of the package.
To avoid writing too much boilerplate, we use the freezed library to automatically generate serializer logic.
You can run the following command to generate those classes:
dart run build_runner build
Alternatively, you can hit Cmd + Shift + B
in vscode.
To generate docs, run:
dart doc .
For more advanced features, check out the dartdoc package.
protostar build
You can see compiled contracts in the contracts/build
folder.