Get the gopher Starkpilled
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
Run Examples
starknet simpleCall
cd examples/simpleCall
go run main.go
Check here for more details
starknet simpleDeclare
cd examples/simpleDeclare
go run main.go
Check here for more details
starknet deployAccount
cd examples/deployAccount
go run main.go
Check here for more details
starknet invoke
cd examples/invoke
go run main.go simpleInvoke.go verboseInvoke.go
Check here for more details
starknet deployContractUDC
cd examples/deployContractUDC
go run main.go
Check here for more details.
starknet readEvents
cd examples/readEvents
go run main.go
Check here for more details
starknet typedData
cd examples/typedData
go run main.go
Check here for more details.
starknet websocket
cd examples/websocket
go run main.go
Check here for more details.
Check here for some FAQ answered by these examples.
RPC
starknet.go
RPC implements the Starknet RPC v0.8.0 spec
Method |
Implemented (*) |
starknet_getBlockWithReceipts |
β |
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 |
β |
starknet_getStorageProof |
β |
starknet_getMessagesStatus |
β |
starknet_getCompiledCasm |
β |
WebSocket Methods
Method |
Implemented (*) |
starknet_subscribeEvents |
β |
starknet_subscribeNewHeads |
β |
starknet_subscribePendingTransactions |
β |
starknet_subscribeTransactionStatus |
β |
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!