Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nethermindeth/starknet.go
Golang Library for StarkNet/Cairo
https://github.com/nethermindeth/starknet.go
nubia
Last synced: 4 days ago
JSON representation
Golang Library for StarkNet/Cairo
- Host: GitHub
- URL: https://github.com/nethermindeth/starknet.go
- Owner: NethermindEth
- License: mit
- Created: 2022-01-03T22:48:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-22T20:42:37.000Z (about 1 month ago)
- Last Synced: 2024-11-24T20:36:43.829Z (about 1 month ago)
- Topics: nubia
- Language: Go
- Homepage:
- Size: 4.63 MB
- Stars: 152
- Watchers: 10
- Forks: 109
- Open Issues: 63
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
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
- library documentation available at [pkg.go.dev](https://pkg.go.dev/github.com/NethermindEth/starknet.go).
- [simple call example](./examples/simpleCall) to make a contract call to a testnet contract.
- [deploy account example](./examples/deployAccount) to deploy a new account contract on testnet.
- [invoke transaction example](./examples/simpleInvoke) to add a new invoke transaction on testnet.
- [deploy contract UDC example](./examples/deployContractUDC) to deploy an ERC20 token using [UDC (Universal Deployer Contract)](https://docs.starknet.io/architecture-and-concepts/accounts/universal-deployer/) on testnet.
- [typed data example](./examples/typedData) to sign and verify a typed data.### Run Examples
***starknet simpleCall***
```sh
cd examples/simpleCall
go run main.go
```
> Check [here](examples/simpleCall/README.md) for more details***starknet deployAccount***
```sh
cd examples/deployAccount
go run main.go
```> Check [here](examples/deployAccount/README.md) for more details
***starknet invokeTransaction***
```sh
cd examples/simpleInvoke
go run main.go
```> Check [here](examples/simpleInvoke/README.md) for more details
***starknet deployContractUDC***
```sh
cd examples/deployContractUDC
go run main.go
```> Check [here](examples/deployContractUDC/README.md) for more details.
Check [here](https://github.com/NethermindEth/starknet.go/tree/main/examples) for some FAQ answered by these examples.### RPC
`starknet.go` RPC implements the Starknet [RPC v0.7.1 spec](https://github.com/starkware-libs/starknet-specs/tree/v0.7.1)
| Method | Implemented (*) |
| ------------------------------------------ | ------------------ |
| `starknet_getBlockWithReceipts` | :heavy_check_mark: |
| `starknet_getBlockWithTxHashes` | :heavy_check_mark: |
| `starknet_getBlockWithTxs` | :heavy_check_mark: |
| `starknet_getStateUpdate` | :heavy_check_mark: |
| `starknet_getStorageAt` | :heavy_check_mark: |
| `starknet_getTransactionByHash` | :heavy_check_mark: |
| `starknet_getTransactionByBlockIdAndIndex` | :heavy_check_mark: |
| `starknet_getTransactionReceipt` | :heavy_check_mark: |
| `starknet_getTransactionStatus` | :heavy_check_mark: |
| `starknet_getClass` | :heavy_check_mark: |
| `starknet_getClassHashAt` | :heavy_check_mark: |
| `starknet_getClassAt` | :heavy_check_mark: |
| `starknet_getBlockTransactionCount` | :heavy_check_mark: |
| `starknet_call` | :heavy_check_mark: |
| `starknet_estimateFee` | :heavy_check_mark: |
| `starknet_estimateMessageFee` | :heavy_check_mark: |
| `starknet_blockNumber` | :heavy_check_mark: |
| `starknet_blockHashAndNumber` | :heavy_check_mark: |
| `starknet_chainId` | :heavy_check_mark: |
| `starknet_syncing` | :heavy_check_mark: |
| `starknet_getEvents` | :heavy_check_mark: |
| `starknet_getNonce` | :heavy_check_mark: |
| `starknet_addInvokeTransaction` | :heavy_check_mark: |
| `starknet_addDeclareTransaction` | :heavy_check_mark: |
| `starknet_addDeployAccountTransaction` | :heavy_check_mark: |
| `starknet_traceTransaction` | :heavy_check_mark: |
| `starknet_simulateTransaction` | :heavy_check_mark: |
| `starknet_specVersion` | :heavy_check_mark: |
| `starknet_traceBlockTransactions` | :heavy_check_mark: |### Run Tests
```go
go test -v ./...
```### Run RPC Tests
```go
go test -v ./rpc -env [mainnet|devnet|testnet|mock]
```### Run Benchmarks
```go
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](./docs/CONTRIBUTING.md)
for more information on how to get started.## π License
This project is licensed under the **MIT license**.
See [LICENSE](LICENSE) for more information.
Happy coding! π
## Contributors β¨Thanks goes to these wonderful people
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
drspacemn
π»
Gregory Guillou
π»
Tarrence van As
π»
Alex Sumner
π»
Yun
π»
Zoraiz Mahmood
π»
Lucas @ StarkWare
π»
Coburn
π»
Larko
π»
oxlime
π»
BlaΕΎ Hrastnik
π»
Florian
π»
greged93
π»
Jean-SΓ©bastien Ney
π»
Kristijan Rebernisak
π»
Rian Hughes
π»
Carmen Irene Cabrera RodrΓguez
π»
Josh Klopfenstein
π»
Antonio Quental
π
Jelilat Anofiu
π»
Jorik Schellekens
π
Akashneelesh
π‘
Fico
π»
Bitcoinnoobie
π»
stranger80
π»
omahs
π
This project follows the
[all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!