Skip to content

AryanGodara/starknet.go

 
 

Repository files navigation

Go Reference test

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

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.7.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 ✔️

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):

drspacemn
drspacemn

💻
Gregory Guillou
Gregory Guillou

💻
Tarrence van As
Tarrence van As

💻
Alex Sumner
Alex Sumner

💻
Yun
Yun

💻
Zoraiz Mahmood
Zoraiz Mahmood

💻
Lucas @ StarkWare
Lucas @ StarkWare

💻
Coburn
Coburn

💻
Larko
Larko

💻
oxlime
oxlime

💻
Blaž Hrastnik
Blaž Hrastnik

💻
Florian
Florian

💻
greged93
greged93

💻
Jean-Sébastien Ney
Jean-Sébastien Ney

💻
Kristijan Rebernisak
Kristijan Rebernisak

💻
rianhughes
Rian Hughes

💻
Carmen
Carmen Irene Cabrera Rodríguez

💻
Josh
Josh Klopfenstein

💻
Antonio
Antonio Quental

📖
Jelilat
Jelilat Anofiu

💻
JorikSchellekens
Jorik Schellekens

📖
Akashneelesh
Akashneelesh

💡
fico
Fico

💻
Bitcoinnoobie
Bitcoinnoobie

💻
stranger80
stranger80

💻
omahs
omahs

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Golang Library for StarkNet/Cairo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.9%
  • Shell 0.1%