diff --git a/docs/Architecture/Cross Chain/Verify.md b/docs/Architecture/Cross Chain/Verify.md index e69de29..898d90b 100644 --- a/docs/Architecture/Cross Chain/Verify.md +++ b/docs/Architecture/Cross Chain/Verify.md @@ -0,0 +1,67 @@ +# Cross Chain Transaction Verification + +This section provides guidance on verifying transactions across different blockchain chains, assuming that a side chain has already been deployed and indexed by the main chain. + +## Sending a Transaction + +Any transaction with the status "Mined" can be verified, provided that the transaction has been indexed. + +## Verifying the Transaction + +There are two scenarios for verification: + +- Verifying a transaction on the main chain. +- Verifying a transaction on a side chain. + +```protobuf +rpc VerifyTransaction (VerifyTransactionInput) returns (google.protobuf.BoolValue) { + option (aelf.is_view) = true; +} + +message VerifyTransactionInput { + aelf.Hash transaction_id = 1; + aelf.MerklePath path = 2; + int64 parent_chain_height = 3; + int32 verified_chain_id = 4; +} +``` + +The **VerifyTransaction** method is used for verification and returns whether the transaction was mined and indexed by the destination chain. The method is the same for both scenarios; only the input values differ. + +### Verifying a Main Chain Transaction + +To verify a main chain transaction on a side chain, use the **VerifyTransaction** method on the side chain with the following input values: + +- `parent_chain_height`: The height of the block on the main chain where the transaction was packed. +- `transaction_id`: The ID of the transaction to verify. +- `path`: The Merkle path obtained from the main chain's API using **GetMerklePathByTransactionIdAsync** with the transaction ID. +- `verified_chain_id`: The chain ID of the main chain. + +You can retrieve the Merkle path of a transaction in a block by using the chain's API method **GetMerklePathByTransactionIdAsync**. + +### Verifying a Side Chain Transaction + +For verifying a side chain transaction: + +1. Obtain the Merkle path using **GetMerklePathByTransactionIdAsync**, similar to main chain verification. +2. Retrieve the `CrossChainMerkleProofContext` of the transaction from the source chain using **GetBoundParentChainHeightAndMerklePathByHeight**. + +```protobuf +rpc GetBoundParentChainHeightAndMerklePathByHeight (google.protobuf.Int64Value) returns (CrossChainMerkleProofContext) { + option (aelf.is_view) = true; +} + +message CrossChainMerkleProofContext { + int64 bound_parent_chain_height = 1; + aelf.MerklePath merkle_path_from_parent_chain = 2; +} +``` + +Using the result from the above API, call **VerifyTransaction** on the target chain with: + +- `transaction_id`: The ID of the transaction to verify. +- `parent_chain_height`: Use the `bound_parent_chain_height` field from `CrossChainMerkleProofContext`. +- `path`: Concatenate the two Merkle paths in order: + - The Merkle path of the transaction (obtained from **GetMerklePathByTransactionIdAsync**). + - The `merkle_path_from_parent_chain` field from `CrossChainMerkleProofContext`. +- `verified_chain_id`: The chain ID of the side chain where the transaction was mined. diff --git a/docs/References/Web API/Chain API.md b/docs/References/Web API/Chain API.md new file mode 100644 index 0000000..d9314cb --- /dev/null +++ b/docs/References/Web API/Chain API.md @@ -0,0 +1,1158 @@ +# AELF API 1.0 + +## Chain API + +### Get information about a given block by block hash. Optionally with the list of its transactions. + +```http +GET /api/blockChain/block +``` + +| Parameter | Type | Description | Default | +| :-------------------- | :-------- | :-------------------------------- | :-------- | +| `blockHash` | `string` | Block hash _(optional)_ | | +| `includeTransactions` | `boolean` | Include transactions _(optional)_ | `"false"` | + +#### Responses + +- **200**: Success (`BlockDto`) + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Get information about a given block by block height. Optionally with the list of its transactions. + +```http +GET /api/blockChain/blockByHeight +``` + +| Parameter | Type | Description | Default | +| :-------------------- | :-------- | :-------------------------------- | :-------- | +| `blockHeight` | `integer` | Block height _(optional)_ | | +| `includeTransactions` | `boolean` | Include transactions _(optional)_ | `"false"` | + +#### Responses + +- **200**: Success (`BlockDto`) + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Get the height of the current chain. + +```http +GET /api/blockChain/blockHeight +``` + +#### Responses + +- **200**: Success (integer, int64) + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Get the current state about a given block. + +```http +GET /api/blockChain/blockState +``` + +| Parameter | Type | Description | +| :---------- | :------- | :---------------------- | +| `blockHash` | `string` | Block hash _(optional)_ | + +#### Responses + +- **200**: Success (`BlockStateDto`) + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Get the current status of the block chain. + +```http +GET /api/blockChain/chainStatus +``` + +#### Responses + +- **200**: Success (`ChainStatusDto`) + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Get the protobuf definitions related to a contract. + +```http +GET /api/blockChain/contractFileDescriptorSet +``` + +| Parameter | Type | Description | +| :-------- | :------- | :---------------------------- | +| `address` | `string` | Contract address _(optional)_ | + +#### Responses + +- **200**: Success (string, byte) + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Execute a raw transaction. + +```http +POST /api/blockChain/executeRawTransaction +``` + +#### Parameters + +| Type | Name | Schema | +| :------- | :------ | :-------------------------------------- | +| **Body** | `input` | `ExecuteRawTransactionDto` _(optional)_ | + +#### Responses + +| HTTP Code | Description | Schema | +| :-------: | :---------- | :----- | +| **200** | Success | string | + +#### Consumes + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Call a read-only method on a contract. + +```http +POST /api/blockChain/executeTransaction +``` + +#### Parameters + +| Type | Name | Schema | +| :------- | :------ | :----------------------------------- | +| **Body** | `input` | `ExecuteTransactionDto` _(optional)_ | + +#### Responses + +| HTTP Code | Description | Schema | +| :-------: | :---------- | :----- | +| **200** | Success | string | + +#### Consumes + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Get the merkle path of a transaction. + +```http +GET /api/blockChain/merklePathByTransactionId +``` + +#### Parameters + +| Type | Name | Schema | +| :-------: | :-------------- | :------------------ | +| **Query** | `transactionId` | string _(optional)_ | + +#### Responses + +| HTTP Code | Description | Schema | +| :-------: | :---------- | :-------------- | +| **200** | Success | `MerklePathDto` | + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Creates an unsigned serialized transaction. + +```http +POST /api/blockChain/rawTransaction +``` + +#### Parameters + +| Type | Name | Schema | +| :------- | :------ | :--------------------------------------- | +| **Body** | `input` | `CreateRawTransactionInput` _(optional)_ | + +#### Responses + +| HTTP Code | Description | Schema | +| :-------: | :---------- | :--------------------------- | +| **200** | Success | `CreateRawTransactionOutput` | + +#### Consumes + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Send a transaction. + +```http +POST /api/blockChain/sendRawTransaction +``` + +#### Parameters + +| Type | Name | Schema | +| :------- | :------ | :------------------------------------- | +| **Body** | `input` | `SendRawTransactionInput` _(optional)_ | + +#### Responses + +| HTTP Code | Description | Schema | +| :-------: | :---------- | :------------------------- | +| **200** | Success | `SendRawTransactionOutput` | + +#### Consumes + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +#### Tags + +- **BlockChain** + +--- + +### Broadcast a Transaction + +**POST** `/api/blockChain/sendTransaction` + +**Parameters** + +| Type | Name | Schema | Description | Required | +| -------- | ------- | ---------------------- | ----------- | -------- | +| **Body** | `input` | `SendTransactionInput` | - | No | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ----------------------- | +| **200** | Success | `SendTransactionOutput` | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Broadcast Multiple Transactions + +**POST** `/api/blockChain/sendTransactions` + +**Parameters** + +| Type | Name | Schema | Description | Required | +| -------- | ------- | ----------------------- | ----------- | -------- | +| **Body** | `input` | `SendTransactionsInput` | - | No | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------------ | +| **200** | Success | `` | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Estimate Transaction Fee + +**POST** `/api/blockChain/calculateTransactionFee` + +**Parameters** + +| Type | Name | Schema | Description | Required | +| -------- | ------- | ------------------------------ | ----------- | -------- | +| **Body** | `input` | `CalculateTransactionFeeInput` | - | No | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------------------------------- | +| **200** | Success | `CalculateTransactionFeeOutput` | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the Current Status of a Transaction + +**GET** `/api/blockChain/transactionResult` + +**Parameters** + +| Type | Name | Schema | Description | Required | +| --------- | --------------- | -------- | -------------- | -------- | +| **Query** | `transactionId` | `string` | Transaction ID | No | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `TransactionResultDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the Transaction Pool Status + +**GET** `/api/blockChain/transactionPoolStatus` + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | -------------------------------- | +| **200** | Success | `GetTransactionPoolStatusOutput` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the Current Status of a Transaction + +**GET** `/api/blockChain/transactionResult` + +**Parameters** + +| Type | Name | Description | Schema | +| --------- | ----------------- | -------------------------- | ------ | +| **Query** | **transactionId** | _Optional_. Transaction ID | string | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `TransactionResultDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get Multiple Transaction Results + +**GET** `/api/blockChain/transactionResults` + +**Parameters** + +| Type | Name | Description | Schema | Default | +| --------- | ------------- | --------------------------------- | --------------- | ------- | +| **Query** | **blockHash** | _Optional_. Block hash | string | | +| **Query** | **limit** | _Optional_. Limit results | integer (int32) | `10` | +| **Query** | **offset** | _Optional_. Offset for pagination | integer (int32) | `0` | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------------------------ | +| **200** | Success | `TransactionResultDto[]` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Net API + +#### Get Network Information + +**GET** `/api/net/networkInfo` + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `GetNetworkInfoOutput` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- Net + +--- + +#### Add a Node to Connected Network Nodes + +**POST** `/api/net/peer` + +**Parameters** + +| Type | Name | Description | Schema | +| -------- | --------- | -------------------------- | -------------- | +| **Body** | **input** | _Optional_. Add peer input | `AddPeerInput` | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------- | +| **200** | Success | boolean | + +| **401** | Unauthorized| | + +**Security** + +- Basic Authentication + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- Net + +--- + +#### Remove a Node from Connected Network Nodes + +**DELETE** `/api/net/peer` + +**Parameters** + +| Type | Name | Description | Schema | +| --------- | ----------- | ---------------------- | ------ | +| **Query** | **address** | _Optional_. IP address | string | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------- | +| **200** | Success | boolean | + +| **401** | Unauthorized| | + +**Security** + +- Basic Authentication + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- Net + +--- + +#### Get Peer Info about Connected Network Nodes + +**GET** `/api/net/peers` + +**Parameters** + +| Type | Name | Description | Schema | Default | +| --------- | --------------- | --------------------------- | ------- | --------- | +| **Query** | **withMetrics** | _Optional_. Include metrics | boolean | `"false"` | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ----------- | +| **200** | Success | `PeerDto[]` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +## Definitions + +### AddPeerInput + +##### Description + +Represents the input parameters for adding a peer. + +#### Schema + +| Name | Description | Schema | +| --------- | ----------- | ------ | +| Address\* | IP address | string | + +### BlockBodyDto + +#### Description + +Represents the body of a block, including transactions and transaction count. + +#### Schema + +| Name | Schema | +| ----------------- | ---------------- | +| Transactions\* | < string > array | +| TransactionsCount | integer (int32) | + +### BlockDto + +#### Description + +Represents a block, including its hash, body, header, and size. + +#### Schema + +| Name | Schema | +| --------- | ---------------- | +| BlockHash | string | +| Body\* | `BlockBodyDto` | +| Header\* | `BlockHeaderDto` | +| BlockSize | integer (int32) | + +### BlockHeaderDto + +#### Description + +Represents the header of a block, including various metadata. + +#### Schema + +| Name | Schema | +| -------------------------------- | ------------------ | +| Bloom | string | +| ChainId | string | +| Extra | string | +| Height | integer (int64) | +| MerkleTreeRootOfTransactions | string | +| MerkleTreeRootOfWorldState | string | +| MerkleTreeRootOfTransactionState | string | +| PreviousBlockHash | string | +| SignerPubkey | string | +| Time | string (date-time) | + +### BlockStateDto + +#### Description + +Represents the state of a block, including hash, height, changes, deletes, and previous hash. + +#### Schema + +| Name | Schema | +| ------------ | ---------------------- | +| BlockHash | string | +| BlockHeight | integer (int64) | +| Changes\* | < string, string > map | +| Deletes\* | < string > array | +| PreviousHash | string | + +### ChainStatusDto + +#### Description + +Represents the status of a blockchain network, including chain details and block heights. + +#### Schema + +| Name | Schema | +| ----------------------------- | ------------------------------- | +| BestChainHash\* | string | +| BestChainHeight\* | integer (int64) | +| Branches\* | < string, integer (int64) > map | +| ChainId\* | string | +| GenesisBlockHash\* | string | +| GenesisContractAddress | string | +| LastIrreversibleBlockHash\* | string | +| LastIrreversibleBlockHeight\* | integer (int64) | +| LongestChainHash\* | string | +| LongestChainHeight\* | integer (int64) | +| NotLinkedBlocks\* | < string, string > map | + +### CreateRawTransactionInput + +#### Description + +Represents the input parameters for creating a raw transaction. + +#### Schema + +| Name | Description | Schema | +| ---------------- | -------------------------- | --------------- | +| From\* | From address | string | +| MethodName\* | Contract method name | string | +| Params\* | Contract method parameters | string | +| RefBlockHash\* | Reference block hash | string | +| RefBlockNumber\* | Reference block height | integer (int64) | +| To\* | To address | string | + +### CreateRawTransactionOutput + +#### Description + +Represents the output of creating a raw transaction. + +#### Schema + +| Name | Schema | +| -------------- | ------ | +| RawTransaction | string | + +### ExecuteRawTransactionDto + +#### Description + +Represents the input parameters for executing a raw transaction. + +#### Schema + +| Name | Description | Schema | +| ---------------- | --------------- | ------ | +| RawTransaction\* | Raw transaction | string | +| Signature\* | Signature | string | + +### ExecuteTransactionDto + +#### Description + +Represents the input parameters for executing a transaction. + +#### Schema + +| Name | Description | Schema | +| ---------------- | --------------- | ------ | +| RawTransaction\* | Raw transaction | string | + +### GetNetworkInfoOutput + +#### Description + +Represents the output of getting network information. + +#### Schema + +| Name | Description | Schema | +| ----------------- | ----------------- | --------------- | +| Connections\* | Total connections | integer (int32) | +| ProtocolVersion\* | Network protocol | integer (int32) | +| Version\* | Node version | string | + +### GetTransactionPoolStatusOutput + +#### Description + +Represents the output of getting transaction pool status. + +#### Schema + +| Name | Schema | +| ----------- | --------------- | +| Queued\* | integer (int32) | +| Validated\* | integer (int32) | + +### LogEventDto + +#### Description + +Represents a log event. + +#### Schema + +| Name | Schema | +| ------------ | ---------------- | +| Address\* | string | +| Indexed\* | < string > array | +| Name\* | string | +| NonIndexed\* | string | + +### MerklePathDto + +#### Description + +Represents a Merkle path. + +#### Schema + +| Name | Schema | +| ----------------- | ----------------------------- | +| MerklePathNodes\* | < `MerklePathNodeDto` > array | + +### MerklePathNodeDto + +#### Description + +Represents a node in a Merkle path. + +#### Schema + +| Name | Schema | +| ----------------- | ------- | +| Hash\* | string | +| IsLeftChildNode\* | boolean | + +### MinerInRoundDto + +#### Description + +Represents information about a miner in a round. + +#### Schema + +| Name | Schema | +| ------------------------------ | ---------------------------- | +| ActualMiningTimes\* | < string (date-time) > array | +| ExpectedMiningTime\* | string (date-time) | +| ImpliedIrreversibleBlockHeight | integer (int64) | +| InValue\* | string | +| MissedBlocks\* | integer (int64) | +| Order\* | integer (int32) | +| OutValue\* | string | +| PreviousInValue\* | string | +| ProducedBlocks\* | integer (int64) | +| ProducedTinyBlocks\* | integer (int32) | + +### PeerDto + +#### Description + +Represents information about a peer node. + +#### Schema + +| Name | Schema | +| ---------------------------- | ------------------------- | +| BufferedAnnouncementsCount\* | integer (int32) | +| BufferedBlocksCount\* | integer (int32) | +| BufferedTransactionsCount\* | integer (int32) | +| ConnectionTime\* | integer (int64) | +| Inbound\* | boolean | +| IpAddress\* | string | +| ProtocolVersion\* | integer (int32) | +| RequestMetrics\* | < `RequestMetric` > array | +| ConnectionStatus\* | string | +| NodeVersion\* | string | + +### RequestMetric + +#### Description + +Represents metrics for a request. + +#### Schema + +| Name | Schema | +| --------------- | --------------- | +| Info\* | string | +| MethodName\* | string | +| RequestTime\* | `Timestamp` | +| RoundTripTime\* | integer (int64) | + +### RoundDto + +#### Description + +Represents a round in the blockchain. + +#### Schema + +| Name | Schema | +| --------------------------------------- | --------------------------------- | +| ConfirmedIrreversibleBlockHeight\* | integer (int64) | +| ConfirmedIrreversibleBlockRoundNumber\* | integer (int64) | +| ExtraBlockProducerOfPreviousRound\* | string | +| IsMinerListJustChanged\* | boolean | +| RealTimeMinerInformation\* | < string, `MinerInRoundDto` > map | +| RoundId\* | integer (int64) | +| RoundNumber\* | integer (int64) | +| TermNumber\* | integer (int64) | + +### SendRawTransactionInput + +#### Description + +Represents the input parameters for sending a raw transaction. + +#### Schema + +| Name | Description | Schema | +| ------------------- | --------------- | ------- | +| ReturnTransaction\* | Return detail | boolean | +| Signature\* | Signature | string | +| Transaction\* | Raw transaction | string | + +### SendRawTransactionOutput + +#### Description + +Represents the output of sending a raw transaction. + +#### Schema + +| Name | Schema | +| --------------- | ---------------- | +| Transaction | `TransactionDto` | +| TransactionId\* | string | + +### SendTransactionInput + +#### Description + +Represents the input parameters for sending a transaction. + +#### Schema + +| Name | Description | Schema | +| ---------------- | --------------- | ------ | +| RawTransaction\* | Raw transaction | string | + +### SendTransactionOutput + +#### Description + +Represents the output of sending a transaction. + +#### Schema + +| Name | Schema | +| --------------- | ------ | +| TransactionId\* | string | + +### SendTransactionsInput + +#### Description + +Represents the input parameters for sending multiple transactions. + +#### Schema + +| Name | Description | Schema | +| ----------------- | ---------------- | ------ | +| RawTransactions\* | Raw transactions | string | + +### TaskQueueInfoDto + +#### Description + +Represents information about a task queue. + +#### Schema + +| Name | Schema | +|--------- + +|-----------------| +| Count* | integer (int32) | +| Time* | string (date-time)| + +### Timestamp + +#### Description + +Represents a timestamp. + +#### Schema + +| Name | Schema | +| --------- | --------------- | +| Seconds\* | integer (int64) | +| Nanos\* | integer (int32) | + +### TransactionDto + +#### Description + +Represents a transaction. + +#### Schema + +| Name | Schema | +| ----------------- | ------------------ | +| Hash\* | string | +| Height\* | integer (int64) | +| MethodName\* | string | +| Params\* | string | +| Receiver\* | string | +| RefBlockNumber\* | integer (int64) | +| Sender\* | string | +| Time\* | string (date-time) | +| TransactionSize\* | integer (int32) | +| TxStatus\* | string | + +### TransactionResultDto + +#### Description + +Represents the result of a transaction. + +#### Schema + +| Name | Description | Schema | +| --------------- | ------------------------------ | ----------------------- | +| BlockHash | Block hash (optional) | string | +| BlockNumber | Block number (optional) | integer (int64) | +| Bloom | Bloom filter (optional) | string | +| Error | Error message (optional) | string | +| Logs | Logs (optional) | < `LogEventDto` > array | +| ReturnValue | Return value (optional) | string | +| Status | Transaction status (optional) | string | +| Transaction | Transaction details (optional) | `TransactionDto` | +| TransactionId | Transaction ID (optional) | string | +| TransactionSize | Transaction size (optional) | integer (int32) | + +### CalculateTransactionFeeInput + +#### Description + +Represents the input parameters for calculating transaction fees. + +#### Schema + +| Name | Description | Schema | +| -------------- | ------------------------------- | ------ | +| RawTransaction | Raw transaction data (optional) | string | + +### CalculateTransactionFeeOutput + +#### Description + +Represents the output of calculating transaction fees. + +#### Schema + +| Name | Description | Schema | +| -------------- | ---------------------------------- | ------------------------ | +| Success | Success flag (optional) | bool | +| TransactionFee | Transaction fee details (optional) | Dictionary | +| ResourceFee | Resource fee details (optional) | Dictionary | diff --git a/docs/References/Web API/Net API.md b/docs/References/Web API/Net API.md new file mode 100644 index 0000000..98c6e30 --- /dev/null +++ b/docs/References/Web API/Net API.md @@ -0,0 +1,1133 @@ +# AELF API 1.0 + +## Chain API + +### Get information about a given block by block hash. Optionally with the list of its transactions. + +```http +GET /api/blockChain/block +``` + +**Parameters** + +| Type | Name | Description | Schema | Default | +| --------- | --------------------- | ------------ | ------- | ------- | +| **Query** | `blockHash` | block hash | string | | +| | _optional_ | | | | +| **Query** | `includeTransactions` | include | boolean | "false" | +| | | transactions | | | +| | _optional_ | or not | | | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------- | +| **200** | Success | `BlockDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get information about a given block by block height. Optionally with the list of its transactions. + +```http +GET /api/blockChain/blockByHeight +``` + +**Parameters** + +| Type | Name | Description | Schema | Default | +| --------- | --------------------- | ------------ | ------- | ------- | +| **Query** | `blockHeight` | block height | integer | | +| | _optional_ | | (int64) | | +| **Query** | `includeTransactions` | include | boolean | "false" | +| | | transactions | | | +| | _optional_ | or not | | | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------- | +| **200** | Success | `BlockDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the height of the current chain. + +```http +GET /api/blockChain/blockHeight +``` + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | --------------- | +| **200** | Success | integer (int64) | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the current state about a given block + +```http +GET /api/blockChain/blockState +``` + +**Parameters** + +| Type | Name | Description | Schema | +| --------- | ----------- | ----------- | ------ | +| **Query** | `blockHash` | block hash | string | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | --------------- | +| **200** | Success | `BlockStateDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the current status of the block chain. + +```http +GET /api/blockChain/chainStatus +``` + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------- | +| **200** | Success | `ChainStatusDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the protobuf definitions related to a contract + +```http +GET /api/blockChain/contractFileDescriptorSet +``` + +**Parameters** + +| Type | Name | Description | Schema | +| --------- | --------- | ---------------- | ------ | +| **Query** | `address` | contract address | string | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------ | +| **200** | Success | byte | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Execute a raw transaction + +```http +POST /api/blockChain/executeRawTransaction +``` + +**Parameters** + +| Type | Name | Schema | +| -------- | ------- | -------------------------- | +| **Body** | `input` | `ExecuteRawTransactionDto` | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------ | +| **200** | Success | string | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Call a read-only method on a contract + +```http +POST /api/blockChain/executeTransaction +``` + +**Parameters** + +| Type | Name | Schema | +| -------- | ------- | ----------------------- | +| **Body** | `input` | `ExecuteTransactionDto` | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------ | +| **200** | Success | string | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Get the merkle path of a transaction + +```http +GET /api/blockChain/merklePathByTransactionId +``` + +**Parameters** + +| Type | Name | Schema | +| --------- | --------------- | ------ | +| **Query** | `transactionId` | string | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | --------------- | +| **200** | Success | `MerklePathDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Create an unsigned serialized transaction + +```http +POST /api/blockChain/rawTransaction +``` + +**Parameters** + +| Type | Name | Schema | +| -------- | ------- | --------------------------- | +| **Body** | `input` | `CreateRawTransactionInput` | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------------- | +| **200** | Success | `CreateRawTransactionOutput` | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +# Get the Current Status of a Transaction + +**GET** `/api/blockChain/transactionResult` + +**Parameters** + +| Type | Name | Schema | Description | Required | +| --------- | --------------- | -------- | -------------- | -------- | +| **Query** | `transactionId` | `string` | Transaction ID | No | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `TransactionResultDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +# Send a Transaction + +**POST** `/api/blockChain/sendRawTransaction` + +**Parameters** + +| Type | Name | Schema | +| -------- | --------- | -------------------------------------------------------- | +| **Body** | **input** | `SendRawTransactionInput <#sendrawtransactioninput>`\_\_ | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------------------------------------------- | +| **200** | Success | `SendRawTransactionOutput <#sendrawtransactionoutput>`\_\_ | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +# Broadcast a Transaction + +**POST** `/api/blockChain/sendTransaction` + +**Parameters** + +| Type | Name | Schema | +| -------- | --------- | -------------------------------------------------- | +| **Body** | **input** | `SendTransactionInput <#sendtransactioninput>`\_\_ | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------------------------------------- | +| **200** | Success | `SendTransactionOutput <#sendtransactionoutput>`\_\_ | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +# Broadcast Multiple Transactions + +**POST** `/api/blockChain/sendTransactions` + +**Parameters** + +| Type | Name | Schema | +| -------- | --------- | ---------------------------------------------------- | +| **Body** | **input** | `SendTransactionsInput <#sendtransactionsinput>`\_\_ | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------- | +| **200** | Success | `` array | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +# Estimate Transaction Fee + +**POST** `/api/blockChain/calculateTransactionFee` + +**Parameters** + +| Type | Name | Schema | Default | +| -------- | --------- | ------------------------------------------------------------------ | ------- | +| **Body** | **Input** | `CalculateTransactionFeeInput <#calculatetransactionfeeinput>`\_\_ | - | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | -------------------------------------------------------------------- | +| **200** | Success | `CalculateTransactionFeeOutput <#calculatetransactionfeeoutput>`\_\_ | + +**Consumes** + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +# Get the Current Status of a Transaction + +**GET** `/api/blockChain/transactionResult` + +## Parameters + +| Type | Name | Schema | Description | Required | +| --------- | --------------- | -------- | -------------- | -------- | +| **Query** | `transactionId` | `string` | Transaction ID | No | + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `TransactionResultDto` | + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- BlockChain + +--- + +# Get Task Queue Status + +**GET** `/api/blockChain/taskQueueStatus` + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ----------- | ------------------------ | +| **200** | Success | `TaskQueueInfoDto` array | + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- BlockChain + +--- + +# Get Transaction Pool Status + +**GET** `/api/blockChain/transactionPoolStatus` + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ----------- | -------------------------------- | +| **200** | Success | `GetTransactionPoolStatusOutput` | + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- BlockChain + +--- + +# Get Multiple Transaction Results + +**GET** `/api/blockChain/transactionResults` + +## Parameters + +| Type | Name | Description | Schema | Default | +| --------- | ----------- | ----------- | --------------- | ------- | +| **Query** | `blockHash` | block hash | string | | +| **Query** | `limit` | limit | integer (int32) | `10` | +| **Query** | `offset` | offset | integer (int32) | `0` | + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------------- | +| **200** | Success | `TransactionResultDto` array | + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- BlockChain + +--- + +# Net API + +## Get Network Information + +**GET** `/api/net/networkInfo` + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `GetNetworkInfoOutput` | + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- Net + +--- + +## Add Peer + +**POST** `/api/net/peer` + +## Parameters + +| Type | Name | Schema | +| -------- | ------- | -------------- | +| **Body** | `input` | `AddPeerInput` | + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ------------ | ------- | +| **200** | Success | boolean | +| **401** | Unauthorized | | + +## Security + +- Basic Authentication + +## Consumes + +- `application/json-patch+json; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/*+json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- Net + +--- + +## Remove Peer + +**DELETE** `/api/net/peer` + +## Parameters + +| Type | Name | Description | Schema | +| --------- | --------- | ----------- | ------ | +| **Query** | `address` | ip address | string | + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ------------ | ------- | +| **200** | Success | boolean | +| **401** | Unauthorized | | + +## Security + +- Basic Authentication + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- Net + +--- + +## Get Peers Info + +**GET** `/api/net/peers` + +## Parameters + +| Type | Name | Description | Schema | Default | +| --------- | ------------- | ----------- | ------ | --------- | +| **Query** | `withMetrics` | boolean | | `"false"` | + +## Responses + +| HTTP Code | Description | Schema | +| --------- | ----------- | --------------- | +| **200** | Success | `PeerDto` array | + +## Produces + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +## Tags + +- BlockChain + +--- + +### Get the Current Status of a Transaction + +**GET** `/api/blockChain/transactionResult` + +**Parameters** + +| Type | Name | Schema | Description | Required | +| --------- | --------------- | -------- | -------------- | -------- | +| **Query** | `transactionId` | `string` | Transaction ID | No | + +**Responses** + +| HTTP Code | Description | Schema | +| --------- | ----------- | ---------------------- | +| **200** | Success | `TransactionResultDto` | + +**Produces** + +- `text/plain; v=1.0` +- `application/json; v=1.0` +- `text/json; v=1.0` +- `application/x-protobuf; v=1.0` + +**Tags** + +- BlockChain + +--- + +### Definitions + +#### AddPeerInput + +| Name | Schema | Description | +| ----------- | ------ | ----------------------- | +| **Address** | string | ip address _(optional)_ | + +--- + +#### BlockBodyDto + +| Name | Schema | Description | +| --------------------- | --------------- | ----------------------------- | +| **Transactions** | string[] | array of strings _(optional)_ | +| **TransactionsCount** | integer (int32) | integer _(optional)_ | + +--- + +#### BlockDto + +| Name | Schema | Description | +| ------------- | --------------------------------- | ------------------------- | +| **BlockHash** | string | string _(optional)_ | +| **Body** | [BlockBodyDto](#blockbodydto) | block body _(optional)_ | +| **Header** | [BlockHeaderDto](#blockheaderdto) | block header _(optional)_ | +| **BlockSize** | integer (int32) | integer _(optional)_ | + +--- + +#### BlockHeaderDto + +| Name | Schema | Description | +| ------------------------------------ | ------------------ | -------------------- | +| **Bloom** | string | string _(optional)_ | +| **ChainId** | string | string _(optional)_ | +| **Extra** | string | string _(optional)_ | +| **Height** | integer (int64) | integer _(optional)_ | +| **MerkleTreeRootOfTransactions** | string | string _(optional)_ | +| **MerkleTreeRootOfWorldState** | string | string _(optional)_ | +| **MerkleTreeRootOfTransactionState** | string | string _(optional)_ | +| **PreviousBlockHash** | string | string _(optional)_ | +| **SignerPubkey** | string | string _(optional)_ | +| **Time** | string (date-time) | string _(optional)_ | + +--- + +#### BlockStateDto + +| Name | Schema | Description | +| ---------------- | --------------- | ----------------------------- | +| **BlockHash** | string | string _(optional)_ | +| **BlockHeight** | integer (int64) | integer _(optional)_ | +| **Changes** | map of strings | map _(optional)_ | +| **Deletes** | string[] | array of strings _(optional)_ | +| **PreviousHash** | string | string _(optional)_ | + +--- + +#### ChainStatusDto + +| Name | Schema | Description | +| ------------------------------- | ----------------------------------- | -------------------- | +| **BestChainHash** | string | string _(optional)_ | +| **BestChainHeight** | integer (int64) | integer _(optional)_ | +| **Branches** | map of strings and integers (int64) | map _(optional)_ | +| **ChainId** | string | string _(optional)_ | +| **GenesisBlockHash** | string | string _(optional)_ | +| **GenesisContractAddress** | string | string _(optional)_ | +| **LastIrreversibleBlockHash** | string | string _(optional)_ | +| **LastIrreversibleBlockHeight** | integer (int64) | integer _(optional)_ | +| **LongestChainHash** | string | string _(optional)_ | +| **LongestChainHeight** | integer (int64) | integer _(optional)_ | +| **NotLinkedBlocks** | map of strings | map _(optional)_ | + +--- + +#### CreateRawTransactionInput + +| Name | Schema | Description | +| ------------------ | --------------- | --------------------------------------- | +| **From** | string | from address _(required)_ | +| **MethodName** | string | contract method name _(required)_ | +| **Params** | string | contract method parameters _(required)_ | +| **RefBlockHash** | string | refer block hash _(required)_ | +| **RefBlockNumber** | integer (int64) | refer block height _(required)_ | +| **To** | string | to address _(required)_ | + +--- + +#### CreateRawTransactionOutput + +| Name | Schema | Description | +| ------------------ | ------ | ------------------- | +| **RawTransaction** | string | string _(optional)_ | + +--- + +#### ExecuteRawTransactionDto + +| Name | Schema | Description | +| ------------------ | ------ | ----------------------------------- | +| **RawTransaction** | string | raw transaction string _(optional)_ | +| **Signature** | string | signature string _(optional)_ | + +--- + +#### ExecuteTransactionDto + +| Name | Schema | Description | +| ------------------ | ------ | ----------------------------------- | +| **RawTransaction** | string | raw transaction string _(optional)_ | + +--- + +#### GetNetworkInfoOutput + +| Name | Schema | Description | +| ------------------- | --------------- | -------------------- | +| **Connections** | integer (int32) | integer _(optional)_ | +| **ProtocolVersion** | integer (int32) | integer _(optional)_ | +| **Version** | string | string _(optional)_ | + +--- + +#### GetTransactionPoolStatusOutput + +| Name | Schema | Description | +| ------------- | --------------- | -------------------- | +| **Queued** | integer (int32) | integer _(optional)_ | +| **Validated** | integer (int32) | integer _(optional)_ | + +--- + +#### LogEventDto + +| Name | Schema | Description | +| -------------- | -------- | ----------------------------- | +| **Address** | string | string _(optional)_ | +| **Indexed** | string[] | array of strings _(optional)_ | +| **Name** | string | string _(optional)_ | +| **NonIndexed** | string | string _(optional)_ | + +--- + +#### MerklePathDto + +| Name | Schema | Description | +| ------------------- | ----------------------------------------- | ------------------------------------------------------------- | +| **MerklePathNodes** | [MerklePathNodeDto](#merklepathnodedto)[] | array of [MerklePathNodeDto](#merklepathnodedto) _(optional)_ | + +--- + +#### MerklePathNodeDto + +| Name | Schema | Description | +| ------------------- | ------- | -------------------- | +| **Hash** | string | string _(optional)_ | +| **IsLeftChildNode** | boolean | boolean _(optional)_ | + +--- + +#### MinerInRoundDto + +| Name | Schema | Description | +| ---------------------------------- | ------------------ | ----------------------------------------- | +| **ActualMiningTimes** | string[] | array of strings (date-time) _(optional)_ | +| **ExpectedMiningTime** | string (date-time) | string (date-time) _(optional)_ | +| **ImpliedIrreversibleBlockHeight** | integer (int64) | integer (int64) _(optional)_ | +| **InValue** | string | string _(optional)_ | +| **MissedBlocks** | integer (int64) | integer (int64) _(optional)_ | +| **Order** | integer (int32) | integer (int32) _(optional)_ | +| **OutValue** | string | string _(optional)_ | +| **PreviousInValue** | string | string _(optional)_ | +| **ProducedBlocks** | integer (int64) | integer (int64) _(optional)_ | +| **ProducedTinyBlocks** | integer (int32) | integer (int32) _(optional)_ | + +--- + +#### PeerDto + +| Name | Schema | Description | +| ------------------------------ | --------------------------------- | ----------------------------------------------------- | +| **BufferedAnnouncementsCount** | integer (int32) | integer (int32) _(optional)_ | +| **BufferedBlocksCount** | integer (int32) | integer (int32) _(optional)_ | +| **BufferedTransactionsCount** | integer (int32) | integer (int32) _(optional)_ | +| **ConnectionTime** | integer (int64) | integer (int64) _(optional)_ | +| **Inbound** | boolean | boolean _(optional)_ | +| **IpAddress** | string | string _(optional)_ | +| **ProtocolVersion** | integer (int32) | integer (int32) _(optional)_ | +| **RequestMetrics** | [RequestMetric](#requestmetric)[] | array of [RequestMetric](#requestmetric) _(optional)_ | +| **ConnectionStatus** | string | string _(optional)_ | +| **NodeVersion** | string | string _(optional)_ | + +--- + +This structure should provide a clear overview of each variable's name, schema, and description. Let me know if you need any further adjustments! + +#### RequestMetric + +**Name:** RequestMetric + +| Name | Schema | Description | +| ----------------- | ----------------- | ----------- | +| **Info** | `string` | _optional_ | +| **MethodName** | `string` | _optional_ | +| **RequestTime** | `Timestamp` | _optional_ | +| **RoundTripTime** | `integer (int64)` | _optional_ | + +--- + +#### RoundDto + +**Name:** RoundDto + +| Name | Schema | Description | +| ----------------------------------------- | ----------------------------- | ----------- | +| **ConfirmedIrreversibleBlockHeight** | `integer (int64)` | _optional_ | +| **ConfirmedIrreversibleBlockRoundNumber** | `integer (int64)` | _optional_ | +| **ExtraBlockProducerOfPreviousRound** | `string` | _optional_ | +| **IsMinerListJustChanged** | `boolean` | _optional_ | +| **RealTimeMinerInformation** | `< string, MinerInRoundDto >` | _optional_ | +| **RoundId** | `integer (int64)` | _optional_ | +| **RoundNumber** | `integer (int64)` | _optional_ | +| **TermNumber** | `integer (int64)` | _optional_ | + +--- + +#### SendRawTransactionInput + +**Name:** SendRawTransactionInput + +| Name | Schema | Description | +| --------------------- | --------- | ------------------------------------ | +| **ReturnTransaction** | `boolean` | return transaction detail _optional_ | +| **Signature** | `string` | _optional_ | +| **Transaction** | `string` | raw transaction | + +--- + +#### SendRawTransactionOutput + +**Name:** SendRawTransactionOutput + +| Name | Schema | Description | +| ----------------- | ---------------- | ----------- | +| **Transaction** | `TransactionDto` | _optional_ | +| **TransactionId** | `string` | _optional_ | + +--- + +#### SendTransactionInput + +**Name:** SendTransactionInput + +| Name | Schema | Description | +| ------------------ | -------- | --------------- | +| **RawTransaction** | `string` | raw transaction | + +--- + +#### SendTransactionOutput + +**Name:** SendTransactionOutput + +| Name | Schema | Description | +| ----------------- | -------- | ----------- | +| **TransactionId** | `string` | _optional_ | + +--- + +#### SendTransactionsInput + +**Name:** SendTransactionsInput + +| Name | Schema | Description | +| ------------------- | -------- | ---------------- | +| **RawTransactions** | `string` | raw transactions | + +--- + +#### TaskQueueInfoDto + +**Name:** TaskQueueInfoDto + +| Name | Schema | Description | +| -------- | ----------------- | ----------- | +| **Name** | `string` | _optional_ | +| **Size** | `integer (int32)` | _optional_ | + +--- + +#### Timestamp + +**Name:** Timestamp + +| Name | Schema | Description | +| ----------- | ----------------- | ----------- | +| **Nanos** | `integer (int32)` | _optional_ | +| **Seconds** | `integer (int64)` | _optional_ | + +--- + +#### TransactionDto + +**Name:** TransactionDto + +| Name | Schema | Description | +| ------------------ | ----------------- | ----------- | +| **From** | `string` | _optional_ | +| **MethodName** | `string` | _optional_ | +| **Params** | `string` | _optional_ | +| **RefBlockNumber** | `integer (int64)` | _optional_ | +| **RefBlockPrefix** | `string` | _optional_ | +| **Signature** | `string` | _optional_ | +| **To** | `string` | _optional_ | + +--- + +#### TransactionResultDto + +**Name:** TransactionResultDto + +| Name | Schema | Description | +| ------------------- | ----------------- | ----------- | +| **BlockHash** | `string` | _optional_ | +| **BlockNumber** | `integer (int64)` | _optional_ | +| **Bloom** | `string` | _optional_ | +| **Error** | `string` | _optional_ | +| **Logs** | `< LogEventDto >` | _optional_ | +| **ReturnValue** | `string` | _optional_ | +| **Status** | `string` | _optional_ | +| **Transaction** | `TransactionDto` | _optional_ | +| **TransactionId** | `string` | _optional_ | +| **TransactionSize** | `integer (int32)` | _optional_ | + +--- + +#### CalculateTransactionFeeInput + +**Name:** CalculateTransactionFeeInput + +| Name | Schema | Description | +| ------------------ | -------- | ----------- | +| **RawTransaction** | `string` | _optional_ | + +--- + +### CalculateTransactionFeeOutput + +**Name:** CalculateTransactionFeeOutput + +| Name | Schema | Description | +| ------------------ | -------------------------- | ----------- | +| **Success** | `bool` | _optional_ | +| **TransactionFee** | `Dictionary` | _optional_ | +| **ResourceFee** | `Dictionary` | _optional_ | diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-curl-chain-stat.png b/docs/tutorials/aelf On The Cloud/gcp-curl-chain-stat.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-curl-chain-stat.png rename to docs/tutorials/aelf On The Cloud/gcp-curl-chain-stat.png diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-deployed.png b/docs/tutorials/aelf On The Cloud/gcp-deployed.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-deployed.png rename to docs/tutorials/aelf On The Cloud/gcp-deployed.png diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-docker-compose.png b/docs/tutorials/aelf On The Cloud/gcp-docker-compose.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-docker-compose.png rename to docs/tutorials/aelf On The Cloud/gcp-docker-compose.png diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-ssh-select.png b/docs/tutorials/aelf On The Cloud/gcp-ssh-select.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-ssh-select.png rename to docs/tutorials/aelf On The Cloud/gcp-ssh-select.png diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-step1.png b/docs/tutorials/aelf On The Cloud/gcp-step1.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-step1.png rename to docs/tutorials/aelf On The Cloud/gcp-step1.png diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-step2-a.png b/docs/tutorials/aelf On The Cloud/gcp-step2-a.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-step2-a.png rename to docs/tutorials/aelf On The Cloud/gcp-step2-a.png diff --git a/docs/tutorials/Running aelf On The Cloud/gcp-step2-b.png b/docs/tutorials/aelf On The Cloud/gcp-step2-b.png similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/gcp-step2-b.png rename to docs/tutorials/aelf On The Cloud/gcp-step2-b.png diff --git a/docs/tutorials/Running aelf On The Cloud/googleCloud.md b/docs/tutorials/aelf On The Cloud/googleCloud.md similarity index 100% rename from docs/tutorials/Running aelf On The Cloud/googleCloud.md rename to docs/tutorials/aelf On The Cloud/googleCloud.md