Skip to content

Repository files navigation

Caution

This repository is no longer under maintenance and will be archived soon. Thank you to all contributors and users who supported starknet.go over the years. The codebase remains available in read-only mode for reference purposes.

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

About

Golang Library for StarkNet/Cairo

Topics

Resources

Stars

178 stars

Watchers

12 watching

Forks

Releases

Used by

Contributors

Languages