Caigo is an MIT-licensed Go library for interacting with StarkNet.
- library documentation available at pkg.go.dev.
- curve example initializing the StarkCurve for signing and verification
- contract example for smart contract deployment and function call
- account example for Account initialization and invocation call
starkcurve
cd examples/curve
go mod tidy
go run main.gostarknet contract
cd examples/contract
go mod tidy
go run main.gostarknet account
cd examples/account
go mod tidy
go run main.goCaigo 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.
gotest-v ./...gotest-v ./rpc-env [mainnet|devnet|testnet|mock]gotest-bench=.Caigo is currently under active development and will under go breaking changes until the initial stable(v1.0.0) release. The example directories and *_test.go files should always be applicable for the latest commitment on the main branch. NOTE: examples and tests may be out of sync with tagged versions and pkg.go.dev documentation
If you find an issue/bug or have a feature request please submit an issue here Issues
If you are looking to contribute, please head to the Contributing section.