greged93 / caigo

Golang Library for StarkNet/Cairo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Reference test

Get the gopher high on StarkNet

⚠️ 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 (uses the RPC types, resulting in updates and breaking changes landing quickly)
  • Account management: Deploy accounts easily
  • Good concurrency support

Getting Started

Run Examples

starkcurve

cd examples/curve
go mod tidy
go run main.go

starknet contract

cd examples/contract
go mod tidy
go run main.go

starknet account

cd examples/account
go mod tidy
go run main.go

RPC

starknet.go RPC implements the StarkNet RPC Spec:

Method Implemented (*)
starknet_getBlockByHash ✔️
starknet_getBlockByNumber ✔️
starknet_getTransactionByHash ✔️
starknet_getTransactionReceipt ✔️
starknet_getClass ✔️
starknet_getClassHashAt ✔️
starknet_getClassAt ✔️
starknet_call ✔️
starknet_blockNumber ✔️
starknet_chainId ✔️
starknet_syncing ✔️
starknet_getEvents ✔️
starknet_addInvokeTransaction ✔️
starknet_addDeployTransaction ✔️
starknet_addDeclareTransaction ✔️
starknet_estimateFee ✔️
starknet_getBlockTransactionCountByHash ✔️
starknet_getBlockTransactionCountByNumber ✔️
starknet_getTransactionByBlockNumberAndIndex ✔️
starknet_getTransactionByBlockHashAndIndex ✔️
starknet_getStorageAt ✔️
starknet_getNonce ✔️
starknet_getStateUpdate ✔️
*starknet_traceBlockTransactions
*starknet_traceTransaction

(*) some methods are not implemented because they are not yet available from eqlabs/pathfinder.

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

💻

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

About

Golang Library for StarkNet/Cairo

License:MIT License


Languages

Language:Go 91.0%Language:Cairo 8.2%Language:Makefile 0.6%Language:Shell 0.2%