Skip to content

NethermindEth/starknet.go

Repository files navigation

Go Reference Main tests

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

Check here for some FAQ.

RPC

starknet.go RPC implements the Starknet RPC v0.9.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_subscribeNewTransactions ✔️
starknet_subscribeNewTransactionReceipts ✔️

Run Tests

go test -v ./...

Run RPC Tests

go test -v ./rpc -env [mainnet|devnet|testnet|mock]

Run Benchmarks

go test -bench=.

📖 License

This project is licensed under the MIT license.

See LICENSE for more information.

Happy coding! 🎉

Contributors ✨

Thanks goes to these wonderful people

Contributors 68

Languages