Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update JSON RPC 0.7.1 support #464

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 2 additions & 41 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,11 @@ The goal of this SDK is to be able to interact with StarkNet smart contracts in
## StarkNet Features Compatibility

### Transaction

| Feature | State | Version |
| -------------- | ------------------ | ------- |
| invoke | ✅ | 0, 1, 3 |
| declare | ✅ | 1, 2, 3 |
| deploy_account | ✅ | 1, 3 |

### Supported RPC methods for JSON RPC v0.7.1

| Feature | State |
| ---------------------------------------- | ------------------ |
| **Read** |
| starknet_getBlockWithTxHashes | ✅ |
| starknet_getBlockWithTxs | ✅ |
| starknet_getStateUpdate | ✅ |
| starknet_getStorageAt | ✅ |
| starknet_getTransactionByHash | ✅ |
| starknet_getTransactionByBlockIdAndIndex | ✅ |
| starknet_getTransactionReceipt | ✅ |
| starknet_getClass | ✅ |
| starknet_getClassHashAt | ✅ |
| starknet_getClassAt | ✅ |
| starknet_getBlockTransactionCount | ✅ |
| starknet_call | ✅ |
| starknet_estimateFee | ✅ |
| starknet_blockNumber | ✅ |
| starknet_blockHashAndNumber | ✅ |
| starknet_chainId | ✅ |
| starknet_pendingTransactions | ✅ |
| starknet_syncing | ✅ |
| starknet_getEvents | ✅ |
| starknet_getNonce | ✅ |
| **Write** |
| starknet_addInvokeTransaction | ✅ |
| starknet_addDeclareTransaction | ✅ |
| starknet_addDeployAccountTransaction | ✅ |

### Source code generation from contract ABI

| Feature | Cairo 0 (legacy) | Cairo 1 | Cairo 2 |
|--------------|--------------------|--------------------|--------------------|
| call | ✅ | ✅ | ❌ |
| invoke | ✅ | ✅ | ❌ |
| core types | ✅ | 🚧 | ❌ |
| custom types | ✅ | 🚧 | ❌ |
| event | ❌ | ❌ | ❌ |

### Supported JSON RPC version: 0.7.1
[See Starknet Provider supported methods](/packages/starknet-provider#supported-json-rpc-methods)
13 changes: 12 additions & 1 deletion docs/packages/starknet-builder.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Starknet Builder Package

**DEPRECATED PACKAGE**
**DEPRECATED PACKAGE**

### Source code generation from contract ABI

| Feature | Cairo 0 (legacy) | Cairo 1 | Cairo 2 |
|--------------|--------------------|--------------------|--------------------|
| call | ✅ | ✅ | ❌ |
| invoke | ✅ | ✅ | ❌ |
| core types | ✅ | 🚧 | ❌ |
| custom types | ✅ | 🚧 | ❌ |
| event | ❌ | ❌ | ❌ |

67 changes: 66 additions & 1 deletion docs/packages/starknet-provider.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,69 @@
# Call read-only method
# Starknet Provider

A Dart package for interacting with Starknet node using JSON-RPC, following the [Starknet JSON-RPC specification](https://github.com/starkware-libs/starknet-specs.git).

[Package documentation](https://pub.dev/documentation/starknet_provider/latest/)

## Transaction support

| Feature | State | Version |
| -------------- | ------------------ | ------- |
| invoke | ✅ | 0, 1, 3 |
| declare | ✅ | 1, 2, 3 |
| deploy_account | ✅ | 1, 3 |

## Supported JSON RPC methods

### Version: 0.7.1

### Read methods

Name of methods have been extracted from [starknet-specs](https://github.com/starkware-libs/starknet-specs.git) with the following command:
```bash
jq .methods[].name ../starknet-specs/api/starknet_api_openrpc.json
```
| Name | Implemented |
| ------------------------------------------ | ------------ |
| starknet_specVersion | ❌ |
| starknet_getBlockWithTxHashes | ✅ |
| starknet_getBlockWithTxs | ✅ |
| starknet_getBlockWithReceipts | ❌ |
| starknet_getStateUpdate | ✅ |
| starknet_getStorageAt | ✅ |
| starknet_getTransactionStatus | ❌ |
| starknet_getTransactionByHash | ✅ |
| starknet_getTransactionByBlockIdAndIndex | ✅ |
| starknet_getTransactionReceipt | ✅ |
| 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 | ✅ |

### Write methods

Name of methods have been extracted from [starknet-specs](https://github.com/starkware-libs/starknet-specs.git) with the following command:
```bash
jq .methods[].name ../starknet-specs/api/starknet_write_api.json
```

| Name | Implemented |
|--------------------------------------------|--------------|
| starknet_addInvokeTransaction | ✅ |
| starknet_addDeclareTransaction | ✅ |
| starknet_addDeployAccountTransaction | ✅ |


## Usage
### Call read-only method

```dart
import 'package:starknet/starknet.dart';
Expand Down
61 changes: 55 additions & 6 deletions packages/starknet_provider/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,60 @@
# Starknet provider
# Starknet Provider

Starknet provider for Dart and Flutter applications
A Dart package for interacting with Starknet node using JSON-RPC, following the [Starknet JSON-RPC specification](https://github.com/starkware-libs/starknet-specs.git).

### Transaction support

## Transaction support

| Feature | State | Version |
| -------------- | ------------------ | ------- |
| invoke | ✅ | 0, 1, 3 |
| declare | ✅ | 1, 2, 3 |
| deploy_account | ✅ | 1, 3 |
| invoke | ✅ | 0, 1, 3 |
| declare | ✅ | 1, 2, 3 |
| deploy_account | ✅ | 1, 3 |

## Supported JSON RPC version: 0.7.1

### Read methods

Name of methods have been extracted from [starknet-specs](https://github.com/starkware-libs/starknet-specs.git) with the following command:
```bash
jq .methods[].name ../starknet-specs/api/starknet_api_openrpc.json
```
| Name | Implemented |
| ------------------------------------------ | ------------ |
| starknet_specVersion | ❌ |
| starknet_getBlockWithTxHashes | ✅ |
| starknet_getBlockWithTxs | ✅ |
| starknet_getBlockWithReceipts | ❌ |
| starknet_getStateUpdate | ✅ |
| starknet_getStorageAt | ✅ |
| starknet_getTransactionStatus | ❌ |
| starknet_getTransactionByHash | ✅ |
| starknet_getTransactionByBlockIdAndIndex | ✅ |
| starknet_getTransactionReceipt | ✅ |
| 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 | ✅ |

### Write methods

Name of methods have been extracted from [starknet-specs](https://github.com/starkware-libs/starknet-specs.git) with the following command:
```bash
jq .methods[].name ../starknet-specs/api/starknet_write_api.json
```

| Name | Implemented |
|--------------------------------------------|--------------|
| starknet_addInvokeTransaction | ✅ |
| starknet_addDeclareTransaction | ✅ |
| starknet_addDeployAccountTransaction | ✅ |