-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
911 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "Kadena" | ||
slug: "rpc-kadena" | ||
excerpt: "Kadena RPC" | ||
hidden: false | ||
createdAt: "Wed Mar 10 2024 10:00:00 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Wed Mar 10 2024 10:00:00 GMT+0000 (Coordinated Universal Time)" | ||
--- |
47 changes: 47 additions & 0 deletions
47
v1.0/RPC Nodes/rpc-others/rpc-kadena/rpc-kadena-checknodehealth.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: "kda_checkNodeHealth" | ||
slug: "rpc-kadena-checknodehealth" | ||
excerpt: "Kadena RPC" | ||
hidden: false | ||
metadata: | ||
image: [] | ||
keywords: "kadena, node, health-check" | ||
robots: "index" | ||
createdAt: "Wed Apr 11 2024 10:00:00 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Wed Apr 11 2024 10:00:00 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
## Overview | ||
|
||
The `/health-check` endpoint is utilized to confirm the operational status of a Kadena chainweb-node, ensuring it is active, running, and able to respond to API requests. To evaluate the consensus state or the blockchain's current cut, it is advisable to use the `/cut` endpoint. This health check plays a vital role in the maintenance and reliability of blockchain applications by verifying the node's readiness. | ||
|
||
## Parameters | ||
|
||
The `/health-check` endpoint does not require any parameters, simplifying the process for developers to quickly ascertain the health of a Kadena node. | ||
|
||
## Returns | ||
|
||
A successful call to the `/health-check` endpoint yields a plain text response that indicates the node's health status: | ||
|
||
- **200 OK**: "Health check OK." - This response signifies that the node is healthy and functional. | ||
|
||
## Request Example | ||
|
||
```curl | ||
curl --location 'https://api.tatum.io/v3/blockchain/node/kadena-mainnet/{api_key}/health-check' \ | ||
--header 'Content-Type: application/json' | ||
``` | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Kadena, Network } from "@tatumio/tatum"; | ||
|
||
const tatum = await TatumSDK.init<Kadena>({ network: Network.KADENA_MAINNET }); | ||
|
||
const healthStatus = await tatum.kadena.checkNodeHealth(); | ||
|
||
console.log(healthStatus); // Expected output: "Health check OK." | ||
|
||
await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs | ||
``` |
79 changes: 79 additions & 0 deletions
79
v1.0/RPC Nodes/rpc-others/rpc-kadena/rpc-kadena-getbatchblockpayloadwithoutputs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: "getBatchBlockPayloadWithOutputs" | ||
slug: "rpc-kadena-getbatchblockpayloadwithoutputs" | ||
excerpt: "Kadena Get Batch of Block Payloads with Outputs" | ||
hidden: false | ||
metadata: | ||
description: "Retrieve a batch of block payloads with outputs for specified payload hashes in the Kadena blockchain." | ||
image: [] | ||
keywords: "Kadena, block payload, batch, outputs, getPayloadOutputsBatch" | ||
robots: "index" | ||
createdAt: "Tue Apr 11 2024 00:00:00 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Tue Apr 11 2024 00:00:00 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
## Overview | ||
|
||
The `/chain/{chain}/payload/outputs/batch` endpoint retrieves a batch of block payloads along with their outputs, given a set of payload hashes. This method enables efficient bulk data retrieval, particularly useful for applications requiring detailed information across multiple blocks. | ||
|
||
## Parameters | ||
|
||
| Name | Type | Required | Description | | ||
| ----------- | ------ | -------- | ------------------------------------------------------------------------------- | | ||
| apiVersion | string | Yes | Version of Kadena API, e.g., "0.0" | | ||
| nodeVersion | enum | Yes | Node version, one of: "test-singleton", "development", "mainnet01", "testnet04" | | ||
| chain | string | Yes | The specific chain ID from which to retrieve data. | | ||
|
||
## Request Body | ||
|
||
You should include an array of payload hashes for which payloads with outputs are to be retrieved: | ||
|
||
```json | ||
{ | ||
"payloadHashes": ["hash1", "hash2", ...] | ||
} | ||
``` | ||
|
||
## Returns | ||
|
||
A successful call to this endpoint returns an array of the requested block payloads with outputs. The results may be returned in any order. | ||
|
||
| Field | Description | | ||
| ---------------- | ------------------------------------------------------------------ | | ||
| transactions | An array of transactions included in each payload. | | ||
| outputs | Detailed outputs of each transaction. | | ||
| minerData | Data about the miner who mined each block. | | ||
| transactionsHash | A hash of the transactions included in each payload. | | ||
| outputsHash | A hash of the outputs from the transactions in each payload. | | ||
| payloadHash | The hash of each payload itself, confirming the payload retrieved. | | ||
|
||
## Request Example | ||
|
||
```curl | ||
curl --location --request POST 'https://api.tatum.io/v3/blockchain/node/kadena-mainnet/{api_key})/chainweb/{apiVersion}/{nodeVersion}/chain/{chain}/payload/outputs/batch' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"payloadHashes": ["hash1", "hash2"] | ||
}' | ||
``` | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Kadena, Network } from "@tatumio/tatum"; | ||
|
||
const tatum = await TatumSDK.init<Kadena>({ network: Network.KADENA_MAINNET }); | ||
|
||
const payloadOutputsBatch = await tatum.kadena.getPayloadOutputsBatch({ | ||
network: { | ||
apiVersion: "0.0", | ||
nodeVersion: "mainnet01", | ||
chain: "0", // Example chain ID | ||
}, | ||
payloadHashes: ["hash1", "hash2"], | ||
}); | ||
|
||
console.log(payloadOutputsBatch); | ||
|
||
await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs | ||
``` |
78 changes: 78 additions & 0 deletions
78
v1.0/RPC Nodes/rpc-others/rpc-kadena/rpc-kadena-getbatchofblockpayload.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
title: "getBatchOfBlockPayload" | ||
slug: "rpc-kadena-getbatchofblockpayload" | ||
excerpt: "Kadena Get Payload Batch" | ||
hidden: false | ||
metadata: | ||
description: "Retrieve a batch of block payloads by hash in the Kadena blockchain." | ||
image: [] | ||
keywords: "Kadena, block payload, getPayloadBatch" | ||
robots: "index" | ||
createdAt: "Tue Apr 11 2024 00:00:00 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Tue Apr 11 2024 00:00:00 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
## Overview | ||
|
||
The `/chain/{chain}/payload/batch` endpoint retrieves a batch of block payloads given a set of payload hashes. This allows for efficient bulk retrieval of block data, crucial for applications that need to process or verify multiple blocks at once. | ||
|
||
## Parameters | ||
|
||
| Name | Type | Required | Description | | ||
| ----------- | ------ | -------- | ------------------------------------------------------ | | ||
| apiVersion | string | Yes | Version of Kadena API "0.0" | | ||
| nodeVersion | enum | Yes | "test-singleton" "development" "mainnet01" "testnet04" | | ||
| chain | string | Yes | The specific chain ID from which to retrieve data. | | ||
|
||
## Request Body | ||
|
||
The request body should include an array of payload hashes for which payloads are to be retrieved: | ||
|
||
```json | ||
{ | ||
"payloadHashes": ["hash1", "hash2", ...] | ||
} | ||
``` | ||
|
||
## Returns | ||
|
||
A successful call to this endpoint returns an array of the requested block payloads. The payloads may be returned in any order. | ||
|
||
| Field | Description | | ||
| ---------------- | ----------------------------------------------------------------- | | ||
| transactions | A list of transactions included in the block. | | ||
| minerData | Data about the miner who mined this block. | | ||
| transactionsHash | A hash of the transactions included in the block. | | ||
| outputsHash | A hash of the outputs from the transactions. | | ||
| payloadHash | The hash of the payload itself, confirming the payload retrieved. | | ||
|
||
## Request Example | ||
|
||
```curl | ||
curl --location --request POST 'https://api.tatum.io/v3/blockchain/node/kadena-mainnet/{api_key}/chainweb/{apiVersion}/{nodeVersion}/chain/{chain}/payload/batch' \ | ||
--header 'Content-Type: application/json' \ | ||
--data-raw '{ | ||
"payloadHashes": ["RClyuyZAacwvPpmLXKbTwrIRXWeUSjiNhJVP2esH8KM", "QxGCAz5AY1Y41nh1yWtgqhKhZ9pPiPRagFdIKNqBH74"] | ||
}' | ||
``` | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Kadena, Network } from "@tatumio/tatum"; | ||
|
||
const tatum = await TatumSDK.init<Kadena>({ network: Network.KADENA_MAINNET }); | ||
|
||
const payloadBatch = await tatum.kadena.getPayloadBatch({ | ||
network: { | ||
apiVersion: "0.0", | ||
nodeVersion: "mainnet01", | ||
chain: "0", // Example chain ID | ||
}, | ||
payloadHashes: ["your_payload_hash_here1", "your_payload_hash_here2"], | ||
}); | ||
|
||
console.log(payloadBatch); | ||
|
||
await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs | ||
``` |
68 changes: 68 additions & 0 deletions
68
v1.0/RPC Nodes/rpc-others/rpc-kadena/rpc-kadena-getblock.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: "kda_getBlock" | ||
slug: "rpc-kadena-getblock" | ||
excerpt: "Kadena RPC" | ||
hidden: false | ||
metadata: | ||
image: [] | ||
keywords: "kadena, get block, block" | ||
robots: "index" | ||
createdAt: "Wed Apr 11 2024 10:00:00 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Wed Apr 11 2024 10:00:00 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
|
||
## Overview | ||
|
||
The `/chain/{chain}/block` endpoint allows for retrieving a collection of blocks from a specified Kadena chain in ascending order that satisfies various query parameters. This comprehensive retrieval includes all blocks within the chain database, encompassing even orphaned blocks. This functionality is pivotal for developers requiring detailed insights into the chain's history and state for debugging and analytical purposes. | ||
|
||
## Parameters | ||
|
||
| Name | Type | Required | Description | | ||
| ----------- | ------- | -------- | ------------------------------------------------------ | | ||
| apiVersion | string | Yes | Version of Kadena API "0.0" | | ||
| nodeVersion | enum | Yes | "test-singleton" "development" "mainnet01" "testnet04" | | ||
| chain | string | Yes | The specific chain ID from which to retrieve blocks. | | ||
| limit | integer | No | The maximum number of blocks to return. | | ||
| next | string | No | A cursor for pagination to fetch subsequent blocks. | | ||
| minheight | integer | No | The minimum block height to include in the results. | | ||
| maxheight | integer | No | The maximum block height to include in the results. | | ||
|
||
## Returns | ||
|
||
| Name | Description | | ||
| ----- | ------------------------------------------------------------------------------------------------------ | | ||
| next | The cursor for the next page of blocks. | | ||
| items | An array of blocks, each including details such as the block header, transactions, and their outcomes. | | ||
| limit | The maximum number of blocks returned in this response. | | ||
|
||
## Request Example | ||
|
||
```curl | ||
curl --location 'https://api.tatum.io/v3/blockchain/node/kadena-mainnet/{api_key}/chainweb/{apiVersion}/{nodeVersion}/chain/{chain}/block?limit={limit}&next={next}&minheight={minheight}&maxheight={maxheight}' \ | ||
--header 'Content-Type: application/json' | ||
``` | ||
|
||
```javascript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Kadena, Network } from "@tatumio/tatum"; | ||
|
||
const tatum = | ||
(await TatumSDK.init) < Kadena > { network: Network.KADENA_MAINNET }; | ||
|
||
const blocks = await tatum.kadena.getBlock({ | ||
network: { | ||
apiVersion: "0.0", | ||
nodeVersion: "mainnet01", | ||
chain: "0", // Example chain ID | ||
}, | ||
limit: 2, | ||
next: "inclusive:o1S4NNFhKWg8T1HEkmDvsTH9Ut9l3_qHRpp00yRKZIk", | ||
minheight: 1000000, | ||
maxheight: 1000001, | ||
}); | ||
|
||
console.log(blocks); | ||
|
||
await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs | ||
``` |
Oops, something went wrong.