Get the gopher Starkpilled
⚠️ starknet.go
is currently under active development and is experiencing a rearchitecture. It will undergo breaking changes.
starknet.go
will get your golang backends and WASM frontends to Starknet easily.
With simple abstractions for the Starknet RPC, account management and common
operations on the wallets. The package has excellent documentation for a smooth
0 to 1 experience.
🌟 Features
- Seamless interaction with the Starknet RPC
- Tight integration with Juno
- Account management: Deploy accounts easily
- Good concurrency support
Getting Started
- library documentation available at pkg.go.dev.
- simple call example to make a contract call to a mainnet contract
- deploy account example to deploy a new account contract on testnet.
- invoke transaction example to add a new invoke transaction on testnet.
Run Examples
starknet simpleCall
cd examples/simpleCall
go mod tidy
go run main.go
Check here for more details
starknet deployAccount
cd examples/deployAccount
go mod tidy
go run main.go
Check here for more details
starknet invokeTransaction
cd examples/simpleInvoke
go mod tidy
go run main.go
Check here for more details
RPC
starknet.go
RPC implements the Starknet RPC v0.6.0 spec:
Method | Implemented (*) |
---|---|
starknet_getBlockWithTxHashes |
✔️ |
starknet_getBlockWithTxs |
✔️ |
starknet_getStateUpdate |
✔️ |
starknet_getStorageAt |
✔️ |
starknet_getTransactionByHash |
✔️ |
starknet_getTransactionByBlockIdAndIndex |
✔️ |
starknet_getTransactionReceipt |
✔️ |
starknet_getTransactionStatus |
✔️ |
starknet_getClass |
✔️ |
starknet_getClassHashAt |
✔️ |
starknet_getClassAt |
✔️ |
starknet_getBlockTransactionCount |
✔️ |
starknet_call |
✔️ |
starknet_estimateFee |
✔️ |
starknet_estimateMessageFee |
✔️ |
starknet_blockNumber |
✔️ |
starknet_blockHashAndNumber |
✔️ |
starknet_chainId |
✔️ |
starknet_syncing |
✔️ |
starknet_getEvents |
✔️ |
starknet_getNonce |
✔️ |
starknet_addInvokeTransaction |
✔️ |
starknet_addDeclareTransaction |
✔️ |
starknet_addDeployAccountTransaction |
✔️ |
starknet_traceTransaction |
✔️ |
starknet_simulateTransaction |
✔️ |
starknet_specVersion |
✔️ |
starknet_traceBlockTransactions |
✔️ |
Run Tests
go test -v ./...
Run RPC Tests
go test -v ./rpc -env [mainnet|devnet|testnet|mock]
Run Benchmarks
go test -bench=.
Compatibility and stability
🤝 Contribute
We're always looking for passionate developers to join our community and
contribute to starknet.go
. Check out our contributing guide
for more information on how to get started.
📖 License
This project is licensed under the MIT license.
See LICENSE for more information.
Happy coding! 🎉
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!