diff --git a/docs/packages/avnu_provider.mdx b/docs/packages/avnu_provider.mdx index cb63fd6b..629c2ba3 100644 --- a/docs/packages/avnu_provider.mdx +++ b/docs/packages/avnu_provider.mdx @@ -9,6 +9,7 @@ AVNU Paymaster Provider is a Dart package that provides a way to interact with the AVNU paymaster service. +📚 [API Documentation](https://pub.dev/documentation/avnu_provider/latest/) ## I. Introduction With this provider you (as sponsor) will be able to pay your users' gas fees and you (as a user) will be able to execute gasless transactions sponsored by the sponsor. The user simply signs typed data containing the calls they want to execute. The gas fees in ETH will be paid by Avnu relayers to execute the transaction. The process is as follows: diff --git a/docs/packages/secure-store.mdx b/docs/packages/secure-store.mdx index 12970d32..0f0d3bbd 100644 --- a/docs/packages/secure-store.mdx +++ b/docs/packages/secure-store.mdx @@ -2,6 +2,7 @@ The secure store is a Flutter allowing to securely store secret on a device, either using a password, or using biometrics. +📚 [API Documentation](https://pub.dev/documentation/secure_store/latest/) | | PasswordStore | BiometricsStore | | ------- | ------------- | --------------- | | IOS | ✅ | ✅ | diff --git a/docs/packages/starknet-provider.mdx b/docs/packages/starknet-provider.mdx index c6e85c60..e5980ccf 100644 --- a/docs/packages/starknet-provider.mdx +++ b/docs/packages/starknet-provider.mdx @@ -1,16 +1,15 @@ # 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 | +| Feature | State | Version | +| -------------- | ----- | ------- | +| invoke | ✅ | 0, 1, 3 | +| declare | ✅ | 1, 2, 3 | +| deploy_account | ✅ | 1, 3 | ## Supported JSON RPC methods @@ -19,81 +18,49 @@ A Dart package for interacting with Starknet node using JSON-RPC, following the ### 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 | ✅ | + +| 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 | ✅ | - +| Name | Implemented | +| ------------------------------------ | ----------- | +| starknet_addInvokeTransaction | ✅ | +| starknet_addDeclareTransaction | ✅ | +| starknet_addDeployAccountTransaction | ✅ | -## Usage ### Call read-only method - -```dart -import 'package:starknet/starknet.dart'; - -void main() async { - final provider = JsonRpcProvider.infuraGoerliTestnet; - final accountAddress = Felt.fromHexString( - '0x046a1aa85bb0e68cd29fadbc81791208ddebee17886f075935e5b72f4aa898aa'); - final ethContractAddress = Felt.fromHexString( - '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'); - final ethDecimals = 18; - - final response = await provider.call( - request: FunctionCall( - contractAddress: ethContractAddress, - entryPointSelector: getSelectorByName('balanceOf'), - calldata: [accountAddress], - ), - blockId: BlockId.blockTag("latest"), - ); - - response.when( - error: (error) { - throw Exception(error); - }, - result: (result) { - final ethBalance = Uint256.fromFeltList(result).toBigInt() / - BigInt.from(10).pow(ethDecimals); - print("ETH balance: ${ethBalance}"); // ETH balance: 8.142616847371661 - }, - ); -} -``` diff --git a/docs/packages/starknet.mdx b/docs/packages/starknet.mdx index f83f6daf..c1ac1834 100644 --- a/docs/packages/starknet.mdx +++ b/docs/packages/starknet.mdx @@ -1 +1,2 @@ # Starknet Package +📚 [API Documentation](https://pub.dev/documentation/starknet/latest/) \ No newline at end of file diff --git a/docs/packages/wallet-kit.mdx b/docs/packages/wallet-kit.mdx index 623238e6..cded8b5f 100644 --- a/docs/packages/wallet-kit.mdx +++ b/docs/packages/wallet-kit.mdx @@ -1 +1,2 @@ # Wallet Kit Package +📚 [API Documentation](https://pub.dev/documentation/wallet_kit/latest/) \ No newline at end of file diff --git a/packages/secure_store/README.md b/packages/secure_store/README.md index 73419597..fb2f5d4f 100644 --- a/packages/secure_store/README.md +++ b/packages/secure_store/README.md @@ -85,7 +85,7 @@ Change your `MainActivity` to extend `FlutterFragmentActivity` instead of `Flutt ```kt package com.example.example -import io.flutter.embedding.android.FlutterActivity +import io.flutter.embedding.android.FlutterFragmentActivity class MainActivity: FlutterFragmentActivity() { }