diff --git a/documentation/references/apis/00_latest_height.md b/documentation/references/apis/00_latest_height.md index cfec8fb..509f3e2 100644 --- a/documentation/references/apis/00_latest_height.md +++ b/documentation/references/apis/00_latest_height.md @@ -5,7 +5,7 @@ sidebar_label: Latest Height --- ```bash title=ENDPOINT -GET /testnet/latest/height +GET /{network}/block/height/latest ``` Returns the latest block height. diff --git a/documentation/references/apis/01_latest_hash.md b/documentation/references/apis/01_latest_hash.md index 8b5ae81..478bd89 100644 --- a/documentation/references/apis/01_latest_hash.md +++ b/documentation/references/apis/01_latest_hash.md @@ -5,7 +5,7 @@ sidebar_label: Latest Hash --- ```bash title=ENDPOINT -GET /testnet/latest/hash +GET /{network}/block/hash/latest ``` Returns the latest block hash. diff --git a/documentation/references/apis/02_latest_block.md b/documentation/references/apis/02_latest_block.md index 665d7b7..54725cb 100644 --- a/documentation/references/apis/02_latest_block.md +++ b/documentation/references/apis/02_latest_block.md @@ -5,7 +5,7 @@ sidebar_label: Latest Block --- ```bash title=ENDPOINT -GET /testnet/latest/block +GET /{network}/block/latest ``` Returns the latest block. diff --git a/documentation/references/apis/03_latest_state_root.md b/documentation/references/apis/03_latest_state_root.md index 5c7cee4..ae0179f 100644 --- a/documentation/references/apis/03_latest_state_root.md +++ b/documentation/references/apis/03_latest_state_root.md @@ -5,7 +5,7 @@ sidebar_label: Latest State Root --- ```bash title=ENDPOINT -GET /testnet/latest/stateRoot +GET /{network}/stateRoot/latest ``` Returns the latest state root. diff --git a/documentation/references/apis/04_get_block.md b/documentation/references/apis/04_get_block.md index 6650056..57f296c 100644 --- a/documentation/references/apis/04_get_block.md +++ b/documentation/references/apis/04_get_block.md @@ -5,7 +5,7 @@ sidebar_label: Get Block --- ```bash title=ENDPOINT -GET /testnet/block/{height_or_hash} +GET /{network}/block/{height_or_hash} ``` Returns the block for the given block height or block hash. diff --git a/documentation/references/apis/05_get_blocks.md b/documentation/references/apis/05_get_blocks.md index 3bd28df..e0dff4e 100644 --- a/documentation/references/apis/05_get_blocks.md +++ b/documentation/references/apis/05_get_blocks.md @@ -5,7 +5,7 @@ sidebar_label: Get Blocks --- ```javascript title=ENDPOINT -GET /testnet/blocks?start={start_height}&end={end_height} +GET /{network}/blocks ``` Returns the blocks for the given block range. diff --git a/documentation/references/apis/06_get_height.md b/documentation/references/apis/06_get_height.md index 546ba74..a4295a8 100644 --- a/documentation/references/apis/06_get_height.md +++ b/documentation/references/apis/06_get_height.md @@ -5,7 +5,7 @@ sidebar_label: Get Height --- ```bash title=ENDPOINT -GET /testnet/height/{blockHash} +GET /{network}/height/{blockHash} ``` Returns the height for the given block hash. diff --git a/documentation/references/apis/07_get_block_transactions.md b/documentation/references/apis/07_get_block_transactions.md index 916e5f9..e3354b5 100644 --- a/documentation/references/apis/07_get_block_transactions.md +++ b/documentation/references/apis/07_get_block_transactions.md @@ -5,7 +5,7 @@ sidebar_label: Get Block Transactions --- ```bash title=ENDPOINT -GET /testnet/block/{height}/transactions +GET /{network}/block/{height_or_hash}/transactions ``` Returns the transactions for the given block height. @@ -14,7 +14,7 @@ Returns the transactions for the given block height. | Parameter | Type | Required | Description | |:----------|:----:|:--------:|:------------------------------------------------| -| `height` | u32 | Yes | The block height of the requested transactions. | +| `height` or `hash` | u32 or string | Yes | The block height or hash of the requested block | ### Response diff --git a/documentation/references/apis/08_get_transaction.md b/documentation/references/apis/08_get_transaction.md index c827d5f..5280077 100644 --- a/documentation/references/apis/08_get_transaction.md +++ b/documentation/references/apis/08_get_transaction.md @@ -5,7 +5,7 @@ sidebar_label: Get Transaction --- ```bash title=ENDPOINT -GET /testnet/transaction/{transactionID} +GET /{network}/transaction/{transactionID} ``` Returns the transaction for the given transaction ID. diff --git a/documentation/references/apis/09_get_memory_pool_transactions.md b/documentation/references/apis/09_get_memory_pool_transactions.md index bf0a63d..8c195ae 100644 --- a/documentation/references/apis/09_get_memory_pool_transactions.md +++ b/documentation/references/apis/09_get_memory_pool_transactions.md @@ -5,7 +5,7 @@ sidebar_label: Get Memory Pool Transactions --- ```bash title=ENDPOINT -GET /testnet/memoryPool/transactions +GET /{network}/memoryPool/transactions ``` Returns the transactions in the memory pool. diff --git a/documentation/references/apis/10_get_program.md b/documentation/references/apis/10_get_program.md index 9d3edb8..0e0c74f 100644 --- a/documentation/references/apis/10_get_program.md +++ b/documentation/references/apis/10_get_program.md @@ -5,7 +5,7 @@ sidebar_label: Get Program --- ```bash title=ENDPOINT -GET /testnet/program/{programID} +GET /{network}/program/{programID} ``` Returns the program for the given program ID. diff --git a/documentation/references/apis/11_get_mapping_names.md b/documentation/references/apis/11_get_mapping_names.md index e3d9556..cff851e 100644 --- a/documentation/references/apis/11_get_mapping_names.md +++ b/documentation/references/apis/11_get_mapping_names.md @@ -5,7 +5,7 @@ sidebar_label: Get Mapping Names --- ```bash title=ENDPOINT -GET /testnet/program/{programID}/mappings +GET /{network}/program/{programID}/mappings ``` Returns the names of the mappings in a program for the given program ID. diff --git a/documentation/references/apis/12_get_mapping_value.md b/documentation/references/apis/12_get_mapping_value.md index 1c0a511..26bbcb0 100644 --- a/documentation/references/apis/12_get_mapping_value.md +++ b/documentation/references/apis/12_get_mapping_value.md @@ -5,7 +5,7 @@ sidebar_label: Get Mapping Value --- ```bash title=ENDPOINT -GET /testnet/program/{programID}/mapping/{mappingName}/{mappingKey} +GET /{network}/program/{programID}/mapping/{mappingName}/{mappingKey} ``` Returns the value in a key-value mapping corresponding to the supplied mappingKey. diff --git a/documentation/references/apis/13_get_state_path_for_commitment.md b/documentation/references/apis/13_get_state_path_for_commitment.md index a69f237..060b5bf 100644 --- a/documentation/references/apis/13_get_state_path_for_commitment.md +++ b/documentation/references/apis/13_get_state_path_for_commitment.md @@ -5,7 +5,7 @@ sidebar_label: Get State Path For Commitment --- ```bash title=ENDPOINT -GET /testnet/statePath/{commitment} +GET /{network}/statePath/{commitment} ``` Returns the state path for the given commitment. diff --git a/documentation/references/apis/14_get_beacons.md b/documentation/references/apis/14_get_beacons.md deleted file mode 100644 index 215ecc0..0000000 --- a/documentation/references/apis/14_get_beacons.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: get_beacons -title: Get Beacons -sidebar_label: Get Beacons ---- - -```bash title=ENDPOINT -GET /testnet/beacons -``` - -Returns the list of current beacon node addresses. - -### Arguments - -None - -### Response - -| Parameter | Type | Description | -|:---------:|:--------------------------------------:|:-------------------------:| -| `result` | [array](../../concepts/beginner/00_accounts.md) | The beacon Aleo addresses | \ No newline at end of file diff --git a/documentation/references/apis/14_get_committee.md b/documentation/references/apis/14_get_committee.md index cacf1fd..184fd45 100644 --- a/documentation/references/apis/14_get_committee.md +++ b/documentation/references/apis/14_get_committee.md @@ -5,7 +5,7 @@ sidebar_label: Get Committee --- ```bash title=ENDPOINT -GET /testnet/latest/committee +GET /{network}/committee/latest ``` Returns the list of current committee members and their stake. diff --git a/documentation/references/apis/15_get_peers_count.md b/documentation/references/apis/15_get_peers_count.md index 83c31cd..b86a734 100644 --- a/documentation/references/apis/15_get_peers_count.md +++ b/documentation/references/apis/15_get_peers_count.md @@ -5,7 +5,7 @@ sidebar_label: Get Peers Count --- ```bash title=ENDPOINT -GET /testnet/peers/count +GET /{network}/peers/count ``` Returns the number of peers connected to the node. diff --git a/documentation/references/apis/16_get_peers_all.md b/documentation/references/apis/16_get_peers_all.md index 8f70469..6548e34 100644 --- a/documentation/references/apis/16_get_peers_all.md +++ b/documentation/references/apis/16_get_peers_all.md @@ -5,7 +5,7 @@ sidebar_label: Get Peers All --- ```bash title=ENDPOINT -GET /testnet/peers/all +GET /{network}/peers/all ``` Returns the peers connected to the node. diff --git a/documentation/references/apis/17_get_peers_all_metrics.md b/documentation/references/apis/17_get_peers_all_metrics.md index 7afa913..c2958cf 100644 --- a/documentation/references/apis/17_get_peers_all_metrics.md +++ b/documentation/references/apis/17_get_peers_all_metrics.md @@ -5,7 +5,7 @@ sidebar_label: Get Peers All Metrics --- ```bash title=ENDPOINT -GET /testnet/peers/all/metrics +GET /{network}/peers/all/metrics ``` Returns the peers and their types connected to the node. diff --git a/documentation/references/apis/18_get_node_address.md b/documentation/references/apis/18_get_node_address.md index bfc7437..62126a1 100644 --- a/documentation/references/apis/18_get_node_address.md +++ b/documentation/references/apis/18_get_node_address.md @@ -5,7 +5,7 @@ sidebar_label: Get Node Address --- ```bash title=ENDPOINT -GET /testnet/node/address +GET /{network}/node/address ``` Returns the address of the node. diff --git a/documentation/references/apis/19_find_block_hash.md b/documentation/references/apis/19_find_block_hash.md index 147c8c5..94fb8e8 100644 --- a/documentation/references/apis/19_find_block_hash.md +++ b/documentation/references/apis/19_find_block_hash.md @@ -5,7 +5,7 @@ sidebar_label: Find Block Hash --- ```bash title=ENDPOINT -GET /testnet/find/blockHash/{transactionID} +GET /{network}/find/blockHash/{transactionID} ``` Returns the block hash of the block containing the given transaction ID. diff --git a/documentation/references/apis/20_find_transaction_id_from_program_id.md b/documentation/references/apis/20_find_transaction_id_from_program_id.md index 0dbed16..7541153 100644 --- a/documentation/references/apis/20_find_transaction_id_from_program_id.md +++ b/documentation/references/apis/20_find_transaction_id_from_program_id.md @@ -5,7 +5,7 @@ sidebar_label: Find Transaction ID from Program ID --- ```bash title=ENDPOINT -GET /testnet/find/transactionID/deployment/{programID} +GET /{network}/find/transactionID/deployment/{programID} ``` Returns the transaction ID of the transaction containing the given program ID. diff --git a/documentation/references/apis/21_find_transaction_id_from_transition_id.md b/documentation/references/apis/21_find_transaction_id_from_transition_id.md index 530516b..61de233 100644 --- a/documentation/references/apis/21_find_transaction_id_from_transition_id.md +++ b/documentation/references/apis/21_find_transaction_id_from_transition_id.md @@ -5,7 +5,7 @@ sidebar_label: Find Transaction ID from Transition ID --- ```bash title=ENDPOINT -GET /testnet/find/transactionID/{transitionID} +GET /{network}/find/transactionID/{transitionID} ``` Returns the transaction ID of the transaction containing the given transition ID. @@ -14,7 +14,7 @@ Returns the transaction ID of the transaction containing the given transition ID | Parameter | Type | Description | |:---------:|:------:|:-----------------:| -| `result` | String | The transition ID | +| `transitionID` | String | The transition ID | ### Response diff --git a/documentation/references/apis/22_find_transition_id.md b/documentation/references/apis/22_find_transition_id.md index b49870b..47b3ef7 100644 --- a/documentation/references/apis/22_find_transition_id.md +++ b/documentation/references/apis/22_find_transition_id.md @@ -5,7 +5,7 @@ sidebar_label: Find Transition ID --- ```bash title=ENDPOINT -GET /testnet/find/transitionID/{inputOrOutputID} +GET /{network}/find/transitionID/{inputOrOutputID} ``` Returns the transition ID of the transition corresponding to the ID of the input or output. diff --git a/documentation/references/apis/23_get_env_info.md b/documentation/references/apis/23_get_env_info.md deleted file mode 100644 index 12483b0..0000000 --- a/documentation/references/apis/23_get_env_info.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: get_env_info -title: Get Environment Info -sidebar_label: Get Environment Info ---- - -```bash title=ENDPOINT -GET /testnet/node/env -``` - -Returns the environment info of the node. -The snarkOS command line arguments to start the node as well as the GitHub branch and commit hash. - -### Arguments - -None - -### Response - -| Parameter | Type | Description | -|:---------:|:------:|:--------------------:| -| `result` | Object | The environment info | diff --git a/documentation/references/apis/24_transaction_broadcast.md b/documentation/references/apis/24_transaction_broadcast.md deleted file mode 100644 index 9432285..0000000 --- a/documentation/references/apis/24_transaction_broadcast.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -id: transaction_broadcast -title: Transaction Broadcast -sidebar_label: Transaction Broadcast ---- - -```bash title=ENDPOINT -POST /testnet/transaction/broadcast -``` - -Broadcasts the transaction to the ledger. - -### Body - -| Type | Description | -|:------:|:---------------------------------------:| -| string | The serialized transaction to broadcast | - -### Response - -| Parameter | Type | Description | -|:---------:|:------:|:-----------------------------------------------:| -| `result` | string | The status of the transaction broadcast attempt |