From cf565586e5b07d351fec6f9b0d3bb437d9d90631 Mon Sep 17 00:00:00 2001 From: productshiv Date: Fri, 5 Apr 2024 21:55:52 +0530 Subject: [PATCH] Adding Cardano --- .../rpc-algorand/broadcastTransaction.md | 59 ------- .../rpc-algorand/simulateTransaction.md | 76 -------- v1.0/RPC Nodes/others/rpc-bnb-beacon.md | 9 - .../others/rpc-bnb-beacon/abcInfo.md | 48 ----- .../others/rpc-bnb-beacon/abciQuerry.md | 61 ------- v1.0/RPC Nodes/others/rpc-bnb-beacon/block.md | 59 ------- .../others/rpc-bnb-beacon/blockResults.md | 58 ------- .../others/rpc-bnb-beacon/blockchain.md | 53 ------ .../others/rpc-bnb-beacon/broadcastTxAsync.md | 62 ------- .../rpc-bnb-beacon/broadcastTxCommit.md | 61 ------- .../others/rpc-bnb-beacon/broadcastTxSync.md | 57 ------ .../RPC Nodes/others/rpc-bnb-beacon/commit.md | 52 ------ .../others/rpc-bnb-beacon/genesis.md | 49 ------ .../RPC Nodes/others/rpc-bnb-beacon/health.md | 47 ----- .../others/rpc-bnb-beacon/netInfo.md | 56 ------ .../rpc-bnb-beacon/numUnconfirmedTxs.md | 51 ------ .../RPC Nodes/others/rpc-bnb-beacon/status.md | 47 ----- v1.0/RPC Nodes/others/rpc-bnb-beacon/tx.md | 52 ------ .../others/rpc-bnb-beacon/txSearch.md | 64 ------- .../others/rpc-bnb-beacon/unconfirmedTxs.md | 53 ------ .../others/rpc-bnb-beacon/validators.md | 56 ------ .../{rpc-algorand.md => rpc-cardano.md} | 4 +- .../rpc-cardano/constructionMetadata.md | 87 ++++++++++ .../rpc-cardano/constructionPayloads.md | 164 ++++++++++++++++++ .../rpc-cardano/constructionPreprocess.md | 155 +++++++++++++++++ .../rpc-cardano/createNetworkTransaction.md | 120 +++++++++++++ .../others/rpc-cardano/deriveAccount.md | 84 +++++++++ .../others/rpc-cardano/getAccountBalance.md | 97 +++++++++++ .../others/rpc-cardano/getAccountCoins.md | 92 ++++++++++ v1.0/RPC Nodes/others/rpc-cardano/getBlock.md | 76 ++++++++ .../others/rpc-cardano/getBlockTransaction.md | 81 +++++++++ .../rpc-cardano/getHashOfTransaction.md | 75 ++++++++ .../others/rpc-cardano/getNetworkList.md | 59 +++++++ .../others/rpc-cardano/getNetworkStatus.md | 77 ++++++++ .../others/rpc-cardano/parseTransaction.md | 77 ++++++++ .../others/rpc-cardano/searchTransactions.md | 122 +++++++++++++ .../others/rpc-cardano/submitTransaction.md | 75 ++++++++ 37 files changed, 1443 insertions(+), 1132 deletions(-) delete mode 100644 v1.0/RPC Nodes/others/rpc-algorand/broadcastTransaction.md delete mode 100644 v1.0/RPC Nodes/others/rpc-algorand/simulateTransaction.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/abcInfo.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/abciQuerry.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/block.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/blockResults.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/blockchain.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxAsync.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxCommit.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxSync.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/commit.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/genesis.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/health.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/netInfo.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/numUnconfirmedTxs.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/status.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/tx.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/txSearch.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/unconfirmedTxs.md delete mode 100644 v1.0/RPC Nodes/others/rpc-bnb-beacon/validators.md rename v1.0/RPC Nodes/others/{rpc-algorand.md => rpc-cardano.md} (85%) create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/constructionPayloads.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/constructionPreprocess.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/createNetworkTransaction.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/deriveAccount.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getAccountBalance.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getAccountCoins.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getBlock.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getBlockTransaction.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getHashOfTransaction.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getNetworkList.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/getNetworkStatus.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/parseTransaction.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/searchTransactions.md create mode 100644 v1.0/RPC Nodes/others/rpc-cardano/submitTransaction.md diff --git a/v1.0/RPC Nodes/others/rpc-algorand/broadcastTransaction.md b/v1.0/RPC Nodes/others/rpc-algorand/broadcastTransaction.md deleted file mode 100644 index 841d9f71..00000000 --- a/v1.0/RPC Nodes/others/rpc-algorand/broadcastTransaction.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "broadcastTransaction" -slug: "rpc-algorand-broadcastTransaction" -excerpt: "Algorand RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - broadcastTransaction: 'RAW_TRANSACTION', // Specify the byte encoded signed transaction to broadcast to network. -}; - -// Broadcast raw transaction to Algorand network -const transactionId = await tatum.rpc.broadcastTransaction(params); - -// Log the transaction ID -console.log('Algorand Transaction ID:', transactionId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `broadcastTransaction` method allows you to broadcast a raw transaction or transaction group to the Algorand network. - -### Example Use Cases - -1. **Transaction Broadcasting**: Developers can use this method to directly broadcast a byte encoded signed transaction to the Algorand network for further processing. - -### Request Parameters - -The `broadcastTransaction` method requires the following parameters: - -- `broadcastTransaction` (string, required): The byte encoded signed transaction to broadcast to the Algorand network. - -### Return Object - -The method returns an object representing the transaction ID of the submitted transaction on the Algorand network. - -Please note that the structure of the returned object may change in different Algorand RPC versions. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-algorand/simulateTransaction.md b/v1.0/RPC Nodes/others/rpc-algorand/simulateTransaction.md deleted file mode 100644 index bc2a2757..00000000 --- a/v1.0/RPC Nodes/others/rpc-algorand/simulateTransaction.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "simulateTransaction" -slug: "rpc-algorand-simulateTransaction" -excerpt: "Algorand RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - format: 'json', // Optional: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. -}; - -// Define the request body object -const requestBody = { - // Specify the transactions to simulate, along with any other inputs. - // Please refer to the Tatum SDK documentation for detailed information about the request body schema. -}; - -// Simulate the transaction or transaction group on the Algorand network -const simulationResult = await tatum.rpc.simulateTransaction(params, requestBody); - -// Log the simulation result -console.log('Algorand Transaction Simulation Result:', simulationResult); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `simulateTransaction` method allows you to simulate a raw transaction or transaction group as it would be evaluated on the Algorand network. The simulation will use blockchain state from the latest committed round. - -### Example Use Cases - -1. **Transaction Simulation**: Developers can use this method to test the validity and outcome of a transaction or transaction group before actually submitting it to the Algorand network. This can help avoid failed transactions and wasted resources. - -### Request Parameters - -The `simulateTransaction` method requires the following parameters: - -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. - -### Request Body - -The `simulateTransaction` method requires a request body object. Please refer to the Tatum SDK documentation for detailed information about the request body schema. - -### Return Object - -The method returns an object representing the result of the simulated transaction or transaction group. Please note that the structure of the returned object may vary depending on the format specified in the request parameters and the Algorand RPC version. - -### Error Responses - -- `400`: Bad Request. The request was invalid or missing required parameters. -- `401`: Invalid API Token. The API token used for authentication is invalid. -- `500`: Internal Error. An unexpected error occurred on the server. -- `503`: Service Temporarily Unavailable. The server is temporarily unable to handle the request. - -Please refer to the Tatum SDK documentation for more information about error responses. diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon.md deleted file mode 100644 index 5d77ea37..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Bnb Beacon" -slug: "rpc-bnb-beacon" -excerpt: "" -category: 65c5e93c623cad004b45d505 -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/abcInfo.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/abcInfo.md deleted file mode 100644 index 16961b80..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/abcInfo.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "abcInfo" -slug: "rpc-bnb-beacon-abcInfo" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Using the 'abciInfo' method to get information about the ABCI (Application Blockchain Interface) application -const abciInfoData = await tatum.rpc.abciInfo(); - -console.log(abciInfoData); - -// Destroying the Tatum SDK instance. This is necessary to stop any background jobs that the SDK may have started. -await tatum.destroy(); -``` - -### Overview - -The `abciInfo` method is utilized to retrieve information about the BNB Beacon Chain application. - -### Return Object - -The `abciInfo` method typically returns an object containing the details about the application. While the exact structure might vary, the return object may include the following fields: - -- `version` (string): The version of the application. -- `lastBlockHeight` (string number): The height of the last block processed. -- `lastBlockAppHash` (string number): The hash of the last block processed. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/abciQuerry.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/abciQuerry.md deleted file mode 100644 index c68a9f8f..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/abciQuerry.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "abciQuerry" -slug: "rpc-bnb-beacon-abciQuerry" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -/// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining query parameters for the 'abciQuery' method -const queryParams = { - path: 'YOUR_PATH_HERE', - data: 'YOUR_DATA_HERE', - height: 'YOUR_HEIGHT_VALUE', - prove: YOUR_PROVE_BOOLEAN -}; - -// Using the 'abciQuery' method to query data from the ABCI application -const abciQueryData = await tatum.rpc.abciQuery(queryParams); - -console.log(abciQueryData); - -// Destroying the Tatum SDK instance. This is necessary to stop any background jobs that the SDK may have started. -await tatum.destroy(); -``` - -### Overview - -The `abciQuery` method is used to query the BNB Beacon Chain application directly via ABCI. This provides a direct interface to the application layer, enabling specific data retrieval from the chain. - -### Parameters - -- `path` (string, required): The query path which corresponds to the type of data or information you want to retrieve. This is a required parameter and should follow a format like `"/a/b/c"`. -- `data` (string, required): The data associated with the query. This is also a required parameter and is used to provide additional context or filters for the query. -- `height` (string number, optional): The height at which to perform the query. If set to 0, it queries the latest data. This is an optional parameter. -- `prove` (boolean, optional): If set to `true`, the response will include proofs of the transactions' inclusion in the block. This is also an optional parameter. - -### Return Object - -The `abciQuery` method returns an object with details about the queried data from the application layer. The exact structure and content depend on the query path and data, but the return object might typically include: - -- `response` (object): The response data from the ABCI query. It may contain fields like `key`, `value`, `height`, and `index`. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/block.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/block.md deleted file mode 100644 index fe8087c2..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/block.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "block" -slug: "rpc-bnb-beacon-block" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the parameters for fetching a specific block from the blockchain -const blockParams = { - height: YOUR_HEIGHT_VALUE -}; - -// Fetching the block data using the 'block' method and the defined parameters -const blockData = await tatum.rpc.block(blockParams); - -console.log(blockData); - -// Destroying the Tatum SDK instance to stop any background jobs and free up resources -await tatum.destroy(); - -``` - -### Overview - -The `block` method is utilized to fetch block details for a specific height from the BNB Beacon Chain. Without specific block `height`, method returns last known block. - -### Parameters - -- `height` (string number, optional): The height of the block to be fetched. This is a optional parameter. - -### Return Object - -The `block` method returns an object containing the details of the block at the specified height. While the exact structure might vary, the return object may include fields like: - -- `header` (object): Information about the block header. -- `transactions` (array): List of transactions within the block. -- `blockHash` (string): Hash of the block. -- ... and other details depending on the BNB Beacon Chain's implementation and version. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/blockResults.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/blockResults.md deleted file mode 100644 index 9fc3be31..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/blockResults.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "blockResults" -slug: "rpc-bnb-beacon-blockResults" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the block height parameter for the query -const blockParams = { - height: YOUR_HEIGHT_VALUE -}; - -// Fetching and logging the block result data from the BNB Beacon Chain -const blockResultData = await tatum.rpc.blockResult(blockParams); -console.log(blockResultData); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `blockResult` method is used to fetch the results of transactions in a specified block on the BNB Beacon Chain. - -### Parameters - -- `height`: (string number, optional) The height of the block you are interested in. If not specified, it will default to the latest block. - -### Return Object - -The method returns an object containing detailed information about the transactions in the specified block. The exact structure of the returned object can depend on the BNB Beacon Chain's implementation and version. Some of the fields you might see include: - -- `block_meta` (object): Metadata about the block. -- `block` (object): Detailed information about the block itself. -- `results` (object): Results of transactions included in the block. -- `validator_updates` (array): Information about any validator updates. -- `consensus_param_updates` (object): Information about any updates to consensus parameters. - -(Note: The exact fields in the return object can differ based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/blockchain.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/blockchain.md deleted file mode 100644 index 146d06d2..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/blockchain.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "blockchain" -slug: "rpc-bnb-beacon-blockchain" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the block height range parameters for the query (optional) -const blockchainParams = { - minHeight: 'YOUR_MIN_HEIGHT_VALUE', // Optional: e.g., "12345" - maxHeight: 'YOUR_MAX_HEIGHT_VALUE' // Optional: e.g., "67890" -}; - -// Fetching blockchain data within the specified block height range -const blockchainData = await tatum.rpc.blockchain(blockchainParams); -console.log(blockchainData); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` -### Overview - -The `blockchain` method is utilized to fetch blockchain data from the BNB Beacon Chain. Users can optionally specify a block height range to filter the results. - -### Parameters - -- `minHeight` (string, optional): The minimum block height from which to fetch the data. If not provided, there is no lower limit. -- `maxHeight` (string, optional): The maximum block height up to which to fetch the data. If not provided, there is no upper limit. - -### Return Object - -The `blockchain` method returns an object that provides a snapshot of the blockchain data within the specified block height range. The exact structure of the return object can vary, but it generally includes information related to blocks, transactions, and possibly other blockchain-specific details. - -(Note: The exact fields in the return object can differ based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxAsync.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxAsync.md deleted file mode 100644 index 7a82fa20..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxAsync.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "broadcastTxAsync" -slug: "rpc-bnb-beacon-broadcastTxAsync" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the transaction to broadcast -const signedTx = 'SIGNED_TRANSACTION_STRING'; // Replace with your signed transaction string - -// Broadcasting the transaction asynchronously -const txResponse = await tatum.rpc.broadcastTxAsync({ tx: signedTx }); -console.log(txResponse); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `broadcastTxAsync` method is used to broadcast a signed transaction to the BNB Beacon Chain asynchronously. - -### Parameters - -- `tx` (string, required): The signed transaction string that you want to broadcast. - -### Return Object - -The method returns a promise that resolves to a JSON-RPC response containing information about the broadcasted transaction. The response includes the following fields: - -- `code` (string): The status code of the transaction. - - Example: `0` - -- `data` (string): Additional data related to the transaction. - - Example: `7B226F726465725F6964223A22383133453439333946313536374232313937303446464332414434444635384244453031303837392D3438227D` - -- `hash` (string): The hash of the broadcasted transaction. - - Example: `008EA3C57B15E34B045F69DCEB2A5589B979B2B58BA282C15DF2AEA8B441AB6B` - -- `log` (string): Transaction log information. - - Example: `Msg 0:` - -(Note: The exact response structure may vary depending on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxCommit.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxCommit.md deleted file mode 100644 index ee8e15b1..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxCommit.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "broadcastTxCommit" -slug: "rpc-bnb-beacon-broadcastTxCommit" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the signed transaction string to broadcast -const signedTx = 'SIGNED_TRANSACTION_STRING'; // Replace with your signed transaction string - -// Broadcasting the transaction and waiting for commit -const commitResponse = await tatum.rpc.broadcastTxCommit({ tx: signedTx }); -console.log(commitResponse); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `broadcastTxCommit` method is used to broadcast a signed transaction to the BNB beacon chain and wait for it to be included in a block (commit). This method provides information about the committed transaction, including its status, block height, and other relevant data. - -### Parameters - -- `tx` (string, required): The signed transaction string that you want to broadcast. - -### Return Object - -The method returns a response containing information about the committed transaction. The response includes the following fields: - -- `height` (string): The block height at which the transaction was included. - - Example: `7734637` - -- `hash` (string): The hash of the committed transaction. - - Example: `008EA3C57B15E34B045F69DCEB2A5589B979B2B58BA282C15DF2AEA8B441AB6B` - -- `check_tx` (object): Additional information related to the check transaction phase. - - Example: `{ }` - -- `deliver_tx` (object): Additional information related to the deliver transaction phase. - -(Note: The exact structure of the response may vary based on the BNB beacon chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxSync.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxSync.md deleted file mode 100644 index 01cc5e0c..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/broadcastTxSync.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "broadcastTxSync" -slug: "rpc-bnb-beacon-broadcastTxSync" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the signed transaction string to broadcast -const signedTx = 'SIGNED_TRANSACTION_STRING'; // Replace with your signed transaction string - -// Broadcasting the transaction synchronously -const syncResponse = await tatum.rpc.broadcastTxSync({ tx: signedTx }); -console.log(syncResponse); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `broadcastTxSync` method is used to broadcast a signed transaction to the BNB beacon chain synchronously. - -### Parameters - -- `tx` (string, required): The signed transaction string that you want to broadcast. - -(Note: The `tx` parameter should contain the signed transaction in the appropriate format for the BNB beacon chain.) - -### Return Object - -This method returns a JSON-RPC response containing information about the broadcasted transaction. The response includes the following fields: - -- `code` (string): The status code of the transaction. -- `data` (string): Additional data related to the transaction. -- `hash` (string): The hash of the broadcasted transaction. -- `log` (string): Transaction log information. - -(Note: The exact structure of the response may vary based on the BNB beacon chain's implementation and version.) diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/commit.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/commit.md deleted file mode 100644 index 44e19297..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/commit.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "commit" -slug: "rpc-bnb-beacon-commit" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the block height parameter for the query -const commitParams = { - height: 'YOUR_HEIGHT_VALUE', // e.g., "12345" -}; - -// Fetching commit information for the specified block height -const commitData = await tatum.rpc.commit(commitParams); -console.log(commitData); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `commit` method is used to retrieve the commit information of a specific block in the BNB Beacon Chain by providing the block height. If no height is provided, it will fetch commit information regarding the latest block. - -### Parameters - -- `height` (string, optional): The height of the block for which you want to retrieve commit information. - -### Return Object - -This method returns an object containing commit information for the specified block, including details like commit hash, precommit validators, and more. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/genesis.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/genesis.md deleted file mode 100644 index b9b25bce..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/genesis.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "genesis" -slug: "rpc-bnb-beacon-genesis" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Retrieve the genesis information -const genesisInfo = await tatum.rpc.genesis(); -console.log(genesisInfo); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `genesis` method is used to retrieve the genesis information of the Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object (Required) - -The method returns a Promise that resolves to a JSON-RPC response containing the following field: - -- `genesis` (object): General information about the Beacon Chain genesis. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/health.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/health.md deleted file mode 100644 index 842caeb2..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/health.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "health" -slug: "rpc-bnb-beacon-health" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Check the health status -const healthStatus = await tatum.rpc.health(); -console.log(healthStatus); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `health` method is used to check the health status of the Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object (Required) - -The method returns a Promise that resolves to a JSON-RPC response containing information about the health status of the Beacon Chain. - -(Note: The exact structure of the transaction objects and response may vary based on the BNB beacon chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/netInfo.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/netInfo.md deleted file mode 100644 index 03156c51..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/netInfo.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "netInfo" -slug: "rpc-bnb-beacon-netInfo" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BEACON_CHAIN }); - -// Retrieve network information -const networkInfo = await tatum.rpc.netInfo(); -console.log(networkInfo); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `netInfo` method is used to retrieve network information from the Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns a Promise that resolves to a JSON-RPC response containing the following fields: - -- `listening` (boolean): Indicates whether the BNB Beacon Chain node is currently listening for incoming connections. If it is listening, the value will be `true`, otherwise, it will be `false`. - -- `listeners` (array): An array of listener objects. Listener objects typically represent information about nodes or entities that are actively connected to the BNB Beacon Chain node, such as peers or clients. - -- `n_peers` (number): Represents the number of peers that the BNB Beacon Chain node is currently connected to. It provides a count of how many other nodes or entities the node is actively communicating with. - -- `peers` (array): An array of peer objects. Peer objects typically represent information about the peers or other nodes that the BNB Beacon Chain node is connected to. It may include details about these peers, such as their addresses, identities, or status. - - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/numUnconfirmedTxs.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/numUnconfirmedTxs.md deleted file mode 100644 index f0fd33d0..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/numUnconfirmedTxs.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "numUnconfirmedTxs" -slug: "rpc-bnb-beacon-numUnconfirmedTxs" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to Use It - -```typescript -// Importing Tatum SDK for BNB Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for BNB Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Retrieve the number of unconfirmed transactions -const numUnconfirmedTxs = await tatum.rpc.numUnconfirmedTxs(); -console.log(numUnconfirmedTxs); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `numUnconfirmedTxs` method is used to retrieve the number of unconfirmed transactions in the BNB Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns a Promise that resolves to a JSON-RPC response containing the following fields: - -- `n_txs` (string): The number of unconfirmed transactions. Example: `0` -- `total` (string): The total value associated with unconfirmed transactions. Example: `0` -- `total_bytes` (string): The total size in bytes of unconfirmed transactions. Example: `0` - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/status.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/status.md deleted file mode 100644 index 9832dfc7..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/status.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "status" -slug: "rpc-bnb-beacon-status" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Fetching and logging the status of the Beacon Chain -const statusData = await tatum.rpc.status(); -console.log(statusData); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `status` method is used to obtain information about the current status of the BNB Beacon Chain. - -### Return Object - -The `status` method provides an object that contains details about the current state of the chain. The returned structure might differ, but commonly includes these fields: - -- `nodeInfo` (object): Details about the node, like its ID, listen address, and version. -- `syncInfo` (object): Information about the node's synchronization status, like the latest block hash, height, and timestamp. -- `validator_info` (object): Information about the node as a validator, such as its address and voting power. - -(Note: The exact fields in the return object can differ based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/tx.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/tx.md deleted file mode 100644 index d0fe5f43..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/tx.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "tx" -slug: "rpc-bnb-beacon-tx" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the transaction hash parameter for the query -const txParams = { - hash: 'YOUR_TRANSACTION_HASH', // e.g., "0x1234abcd..." -}; - -// Fetching transaction information by hash -const txData = await tatum.rpc.tx(txParams); -console.log(txData); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `tx` method is used to retrieve detailed information about a specific transaction on the BNB Beacon Chain using the transaction's hash. - -### Parameters - -- `hash` (string, required): The hash of the transaction you want to retrieve information about. - -### Return Object - -This method returns an object containing detailed information about the specified transaction, including the transaction's hash, block height, and other relevant data. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/txSearch.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/txSearch.md deleted file mode 100644 index 79114f9f..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/txSearch.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: "txSearch" -slug: "rpc-bnb-beacon-txSearch" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the search parameters -const searchParams = { - query: 'QUERY_STRING', // Replace with your query string (Required) - prove: true, // Include proofs of transaction inclusion in the block (true/false) (Required) - page: '1', // Page number (1-based) (Optional) - per_page: '10' // Number of entries per page (max: 100) (Optional) -}; - -// Searching for transactions -const searchResults = await tatum.rpc.txSearch(searchParams); -console.log(searchResults); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `txSearch` method is used to search for transactions on the BNB beacon chain that match specific search criteria. - -### Parameters - -- `query` (string, Required): The query string used to search for transactions. -- `prove` (boolean, Required): Include proofs of the transaction's inclusion in the block (true/false). -- `page` (string number, Optional): Page number for paginating results (1-based). -- `per_page` (string number, Optional): Number of entries per page (max: 100). - -### Return Object - -The method returns a JSON-RPC response containing information about the matching transactions. The response includes the following fields: - -- `total_count` (string, Required): The total count of matching transactions. - - Example: `2` - -- `txs` (array, Required): An array of transaction objects. - - Example: `[ ]` - -(Note: The exact structure of the transaction objects and response may vary based on the BNB beacon chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/unconfirmedTxs.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/unconfirmedTxs.md deleted file mode 100644 index 3f903720..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/unconfirmedTxs.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "unconfirmedTxs" -slug: "rpc-bnb-beacon-unconfirmedTxs" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Define the limit for unconfirmed transactions -const limit = { limit : '10' }; - -// Retrieve unconfirmed transactions -const unconfirmedTxs = await tatum.rpc.unconfirmedTxs(limit); -console.log(unconfirmedTxs); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `unconfirmedTxs` method is used to retrieve unconfirmed transactions from the BNB Beacon Chain. - -### Parameters - -- `limit` (string, optional): The maximum number of unconfirmed transactions to retrieve. - -### Return Object (Required) - -- `n_txs` (number): The number of unconfirmed transactions. -- `total` (number): The total value associated with unconfirmed transactions. -- `total_bytes` (number): The total size in bytes of unconfirmed transactions. -- `txs` (array): An array of unconfirmed transaction objects. - -(Note: The exact structure of the transaction objects and response may vary based on the BNB beacon chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-bnb-beacon/validators.md b/v1.0/RPC Nodes/others/rpc-bnb-beacon/validators.md deleted file mode 100644 index c1423d5b..00000000 --- a/v1.0/RPC Nodes/others/rpc-bnb-beacon/validators.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "validators" -slug: "rpc-bnb-beacon-validators" -excerpt: "Bnb Beacon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Optional parameters -const params = { - height : 'your-height', - page : 'your-page', - perPage : 'entries-per-page' -}; -// Retrieve the current validator set -const validatorSet = await tatum.rpc.validators(params); -console.log(validatorSet); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `validators` method is used to retrieve the current validator set on the BNB Beacon Chain. - -### Parameters - -- `height` (string, optional): Height to return. If no height is provided, it will fetch the validator set corresponding to the latest block. -- `page` (string, optional): Page number (1-based). -- `perPage` (string, optional): Number of entries per page (max: 100). - -### Return Object (Required) - -- `block_height` (string): Example: `55` -- `validators` (array): An array of validator objects representing the validators in the set. Example: `[]` - -(Note: The exact structure of the validator objects and response may vary based on the BNB Beacon Chain's implementation and version.) \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-algorand.md b/v1.0/RPC Nodes/others/rpc-cardano.md similarity index 85% rename from v1.0/RPC Nodes/others/rpc-algorand.md rename to v1.0/RPC Nodes/others/rpc-cardano.md index 5a8f2c70..df37f438 100644 --- a/v1.0/RPC Nodes/others/rpc-algorand.md +++ b/v1.0/RPC Nodes/others/rpc-cardano.md @@ -1,6 +1,6 @@ --- -title: "Algorand" -slug: "rpc-algorand" +title: "Cardano" +slug: "rpc-cardano" excerpt: "" category: 65c5e93c623cad004b45d505 hidden: false diff --git a/v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md b/v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md new file mode 100644 index 00000000..c2c5ded3 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md @@ -0,0 +1,87 @@ +--- +title: "constructionMetadata" +slug: "rpc-cardano-constructionMetadata" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // string (optional) + metadata: { + [key: string]: any, // object (optional) + }, + }, + }, + options: { + // Optional object + }, + publicKeys: [ + { + hexBytes: 'PUBLIC_KEY_HEX_BYTES', // Required: Specifies the hexadecimal representation of the staking credential . + curveType: 'SECP256K1', // Required: Specifies the curve type for the staking credential .] + }, + ] +}; + +// Retrieve metadata for transaction construction on the Cardano network +const metadata = await tatum.rpc.constructionMetadata(params); + +// Log the metadata +console.log('Cardano Transaction Construction Metadata:', metadata); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `constructionMetadata` method allows you to retrieve metadata required to construct a transaction for a specific network. + +### Example Use Cases + +1. **Metadata Retrieval**: Developers can use this method along with the `constructionPreprocess` endpoint to retrieve metadata required for transaction construction in an offline environment. + +### Request Parameters + +The `constructionMetadata` method requires the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `options` (object, optional): Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required. +- `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. + - `hexBytes` (string, required): The hexadecimal representation of the public key. + - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). + + +### Return Object + +The method returns an object representing the metadata required to construct a transaction for a specific network. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/constructionPayloads.md b/v1.0/RPC Nodes/others/rpc-cardano/constructionPayloads.md new file mode 100644 index 00000000..3c4fe187 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/constructionPayloads.md @@ -0,0 +1,164 @@ +--- +title: "constructionPayloads" +slug: "rpc-cardano-constructionPayloads" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // Required: Specifies the blockchain . + network: 'MAINNET', // Required: Specifies the network name . + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // Optional: Specifies the sub-network name . + metadata: { + KEY: 'VALUE', // Optional: Specify metadata . + }, + }, + }, + operations: [ + { + operation_identifier: { + index: 1, // Required: Specifies the operation index (number). + network_index: 0, // Optional: Specifies the network index (number). + }, + related_operations: [ + { + index: 2, // Optional: Specifies the related operation index (number). + network_index: 1, // Optional: Specifies the related network index (number). + }, + ], + type: 'OPERATION_TYPE', // Required: Specifies the operation type. + status: 'OPERATION_STATUS', // Optional: Specifies the operation status . + account: { + address: 'ACCOUNT_ADDRESS', // Required: Specifies the account address . + sub_account: { + address: 'SUB_ACCOUNT_ADDRESS', // Optional: Specifies the sub-account address . + metadata: { + // Optional metadata object for the sub-account + }, + }, + metadata: { + // Optional metadata object for the account + }, + }, + amount: { + value: 'AMOUNT_VALUE', // Required: Specifies the amount value (string). + currency: { + symbol: 'CURRENCY_SYMBOL', // Required: Specifies the currency symbol . + decimals: 6, // Required: Specifies the currency decimals (number). + metadata: { + // Optional metadata for amount object + }, + }, + metadata: { + // Optional: Specify metadata here only if applicable. + }, + }, + coin_change: { + coin_identifier: { + identifier: 'COIN_IDENTIFIER', // Required: uniquely identifies a Coin. + }, + coin_action: 'coin_created', // Required + }, + metadata: { + // Optional: Specify operations metadata only if applicable. + } + }, + ], + metadata: { + // Optional metadata for constructionPayloads + }, + publicKeys: [ + { + hexBytes: 'PUBLIC_KEY_HEX_BYTES', // Required: Specifies the hexadecimal representation of the staking credential . + curveType: 'SECP256K1', // Required: Specifies the curve type for the staking credential .] + }, + ] +}; + +// Generate an unsigned transaction and signing payloads +const constructionPayloads = await tatum.constructionPayloads(params); + +// Log the construction payloads +console.log('Construction Payloads:', constructionPayloads); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `constructionPayloads` contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `constructionMetadata`. Optionally, the request can also include an array of publicKeys associated with the AccountIdentifiers returned in `constructionPreprocess` response. + + +### Example Use Cases + +1. **Transaction Construction**: Developers can use this method to construct an unsigned transaction that specifies the intent of the transaction but not all possible effects. The generated payloads can be signed by the specified account identifiers to complete the transaction. + +### Request Parameters + +The `constructionPayloads` method requires the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `operations` (array of objects, required): An array of operation objects, where each object represents a transaction to be included in the Cardano transaction. + - `operation_identifier` (object, required): An object containing an index that uniquely identifies the operation. + - `index` (number, required): The index of the operation. + - `network_index` (number, optional): The network-specific index of the operation. + - `related_operations` (array of objects, optional): An array of related operation identifiers if applicable. + - `index` (number, optional): The index of the related operation. + - `network_index` (number, optional): The network-specific index of the related operation. + - `type` (string, required): The type of the operation (e.g., "TRANSFER"). + - `status` (string, optional): The status of the operation (e.g., "SUCCESS"). + - `account` (object, required): An object containing information about the account. + - `address` (string, required): The Cardano account address associated with the operation. + - `sub_account` (object, optional): An optional sub-account object. + - `address` (string, optional): The sub-account address. + - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. + - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. + - `amount` (object, required): An object containing information about the transaction amount. + - `value` (string, required): The value of the transaction amount. + - `currency` (object, required): An object specifying the currency details. + - `symbol` (string, required): The symbol or code of the currency. + - `decimals` (number, required): The number of decimal places for the currency. + - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. + - `metadata` (object, optional): metadata object for the amount. + - `coin_change` (object, required): An object containing information about coin changes in the operation. + - `coin_identifier` (object, required): An object containing a coin identifier. + - `identifier` (string, required): Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.. + - `coin_action` (string, required): CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once. (e.g., 'coin_created' | 'coin_spent'). + - `metadata` (object, optional): An optional metadata object for the operation, including withdrawal, deposit, refund, staking credential, pool key hash, epoch, token bundle, pool registration certificate, pool registration parameters, and vote registration metadata details. +- `metadata` (object, optional): Specify the metadata for transaction construction. +- `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. + - `hexBytes` (string, required): The hexadecimal representation of the public key. + - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). + +### Return Object + +The `constructionPayloads` method returns an object representing the unsigned transaction blob and a collection of payloads that must be signed by particular AccountIdentifiers using a certain SignatureType. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/constructionPreprocess.md b/v1.0/RPC Nodes/others/rpc-cardano/constructionPreprocess.md new file mode 100644 index 00000000..0de6da0b --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/constructionPreprocess.md @@ -0,0 +1,155 @@ +--- +title: "constructionPreprocess" +slug: "rpc-cardano-constructionPreprocess" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // Required: Specifies the blockchain . + network: 'MAINNET', // Required: Specifies the network name . + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // Optional: Specifies the sub-network name . + metadata: { + KEY: 'VALUE', // Optional: Specify metadata . + }, + }, + }, + operations: [ + { + operation_identifier: { + index: 1, // Required: Specifies the operation index (number). + network_index: 0, // Optional: Specifies the network index (number). + }, + related_operations: [ + { + index: 2, // Optional: Specifies the related operation index (number). + network_index: 1, // Optional: Specifies the related network index (number). + }, + ], + type: 'OPERATION_TYPE', // Required: Specifies the operation type. + status: 'OPERATION_STATUS', // Optional: Specifies the operation status . + account: { + address: 'ACCOUNT_ADDRESS', // Required: Specifies the account address . + sub_account: { + address: 'SUB_ACCOUNT_ADDRESS', // Optional: Specifies the sub-account address . + metadata: { + // Optional metadata object for the sub-account + }, + }, + metadata: { + // Optional metadata object for the account + }, + }, + amount: { + value: 'AMOUNT_VALUE', // Required: Specifies the amount value (string). + currency: { + symbol: 'CURRENCY_SYMBOL', // Required: Specifies the currency symbol . + decimals: 6, // Required: Specifies the currency decimals (number). + metadata: { + // Optional metadata for amount object + }, + }, + metadata: { + // Optional: Specify metadata here only if applicable. + }, + }, + coin_change: { + coin_identifier: { + identifier: 'COIN_IDENTIFIER', // Required: uniquely identifies a Coin. + }, + coin_action: 'coin_created', // Required + }, + metadata: { + // Optional: Specify operations metadata only if applicable. + } + }, + ], + metadata: { + //Optional: Specify constructionPreprocess metadata only if applicable. + } +}; + +// Create a request to fetch metadata for transaction construction +const preprocessRequest = await tatum.rpc.constructionPreprocess(params); + +// Log the preprocess request +console.log('Construction Preprocess Request:', preprocessRequest); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `constructionPreprocess` method is called prior to `constructionPayloads` to construct a request for any metadata that is needed for transaction construction. This method is used to fetch information such as account nonce. The `options` object returned from this method will be sent to the `constructionMetadata` endpoint **UNMODIFIED** by the caller in an offline execution environment. If your Construction API implementation has configuration options, they MUST be specified in the `constructionPreprocess` request in the `metadata` field. + +### Example Use Cases + +1. **Transaction Construction**: Developers can use this method to fetch metadata required for transaction construction, such as the account nonce. +2. **Validation**: Validators can use this method to validate transaction data before the actual transaction construction. + +### Request Parameters + +The `constructionPreprocess` method requires the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `operations` (array of objects, required): An array of operation objects, where each object represents a transaction to be included in the Cardano transaction. + - `operation_identifier` (object, required): An object containing an index that uniquely identifies the operation. + - `index` (number, required): The index of the operation. + - `network_index` (number, optional): The network-specific index of the operation. + - `related_operations` (array of objects, optional): An array of related operation identifiers if applicable. + - `index` (number, optional): The index of the related operation. + - `network_index` (number, optional): The network-specific index of the related operation. + - `type` (string, required): The type of the operation (e.g., "TRANSFER"). + - `status` (string, optional): The status of the operation (e.g., "SUCCESS"). + - `account` (object, required): An object containing information about the account. + - `address` (string, required): The Cardano account address associated with the operation. + - `sub_account` (object, optional): An optional sub-account object. + - `address` (string, optional): The sub-account address. + - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. + - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. + - `amount` (object, required): An object containing information about the transaction amount. + - `value` (string, required): The value of the transaction amount. + - `currency` (object, required): An object specifying the currency details. + - `symbol` (string, required): The symbol or code of the currency. + - `decimals` (number, required): The number of decimal places for the currency. + - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. + - `metadata` (object, optional): metadata object for the amount. + - `coin_change` (object, required): An object containing information about coin changes in the operation. + - `coin_identifier` (object, required): An object containing a coin identifier. + - `identifier` (string, required): Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.. + - `coin_action` (string, required): CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once. (e.g., 'coin_created' | 'coin_spent'). + - `metadata` (object, optional): An optional metadata object for the operation, including withdrawal, deposit, refund, staking credential, pool key hash, epoch, token bundle, pool registration certificate, pool registration parameters, and vote registration metadata details. +- `metadata` (object, optional): Metadata for `constructionPreprocess` + +### Return Object + +The method returns an object representing the preprocess request for transaction construction. This object includes the metadata required for constructing the transaction. The `options` object in this request will be sent to the `constructionMetadata` endpoint **UNMODIFIED** by the caller in an offline execution environment. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/createNetworkTransaction.md b/v1.0/RPC Nodes/others/rpc-cardano/createNetworkTransaction.md new file mode 100644 index 00000000..038138d6 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/createNetworkTransaction.md @@ -0,0 +1,120 @@ +--- +title: "createNetworkTransaction" +slug: "rpc-cardano-createNetworkTransaction" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). + network: 'NETWORK_NAME', // Specify the network name. + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). + metadata: { + // Optional metadata key-value pairs. + }, + }, + }, + unsignedTransaction: 'UNSIGNED_TRANSACTION', // Specify the unsigned transaction blob. + signatures: [ + { + signing_payload: { + address: 'ADDRESS', // [DEPRECATED] Network-specific address (optional). + accountIdentifier: { + address: 'ADDRESS', // Account address. + subAccount: { + address: 'ADDRESS', // Sub-account address (optional). + metadata: { + // Sub-account metadata (optional). + }, + }, + metadata: { + // Account metadata (optional). + }, + }, + hexBytes: 'PAYLOAD_HEX', // Hex-encoded payload bytes. + signatureType: 'ecdsa', // Signature type (ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). + }, + publicKeys: [ + { + hexBytes: 'PUBLIC_KEY_HEX', // Hexadecimal representation of the public key. + curveType: 'secp256k1', // Curve type (secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). + }, + ], + signatureType: 'ecdsa', // Signature type (ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). + hexBytes: 'SIGNATURE_HEX', // Hex-encoded signature. + }, + ], +}; + +// Create network transaction from signatures +const networkTransaction = await tatum.rpc.createNetworkTransaction(params); + +// Log the network transaction +console.log('Network Transaction:', networkTransaction); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `createNetworkTransaction` method allows you to create a network-specific transaction from an unsigned transaction and an array of provided signatures. The signed transaction returned from this method will be sent to the `/construction/submit` endpoint by the caller. + +### Example Use Cases + +1. **Transaction Construction**: Developers can use this method to combine an unsigned Cardano transaction with the corresponding signatures, resulting in a fully signed network transaction ready to be submitted to the Cardano network. + +### Request Parameters + +The `createNetworkTransaction` method requires the following parameters in the request body: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `unsignedTransaction` (string, required): Contains the unsigned transaction blob returned by the `constructionPayloads` endpoint. The unsigned transaction represents the basic structure and details of the transaction before it is signed. +- `signatures` (array of objects, required): This parameter is an array of signatures. Each signature is represented by a Signature object. Signatures are required to create a network transaction by combining them with the unsigned transaction. + - `signing_payload` (object, required): The payload that was signed. + - `address` (string, optional): [DEPRECATED] The network-specific address of the account that should sign the payload. + - `accountIdentifier` (object, optional): An object containing information about the account. + - `address` (string, required): The Cardano account address associated with the operation. + - `sub_account` (object, optional): An optional sub-account object. + - `address` (string, optional): The sub-account address. + - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. + - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. + - `hex_bytes` (string, required): Hex-encoded string of the payload bytes. + - `signatureType` (string, enum, optional): Signature type (Choose from: ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). + - `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. + - `hexBytes` (string, required): The hexadecimal representation of the public key. + - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). + - `signatureType` (string, enum, required): Signature type (Choose from: ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). + - `hexBytes` (string, required): Hex-encoded string representing the signature. + +### Return Object + +The method returns an object representing the network transaction created from the unsigned transaction and provided signatures. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/deriveAccount.md b/v1.0/RPC Nodes/others/rpc-cardano/deriveAccount.md new file mode 100644 index 00000000..876d98d5 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/deriveAccount.md @@ -0,0 +1,84 @@ +--- +title: "deriveAccount" +slug: "rpc-cardano-deriveAccount" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // string (optional) + metadata: { + [key: string]: any, // object (optional) + }, + }, + }, + publicKeys: { + hexBytes: 'PUBLIC_KEY_HEX_BYTES', // string, required + curveType: 'secp256k1', // CurveType, required (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas) + }, + metadata: { + // metadata is optional object + }, +}; + +// Derive the account identifier from the public key +const accountIdentifier = await tatum.rpc.deriveAccount(params); + +// Log the account identifier +console.log('Account Identifier:', accountIdentifier); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `deriveAccount` method allows you to derive an account identifier (AccountIdentifier) from a public key. + +### Example Use Cases + +1. **Account Identification**: Developers can use this method to derive the account identifier associated with a public key. + +### Request Parameters + +The `deriveAccount` method requires the following parameter: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. + - `hexBytes` (string, required): The hexadecimal representation of the public key. + - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). +- `metadata` (object, optional): An optional metadata object. + +### Return Object + +The method returns an object representing the derived account identifier (AccountIdentifier) associated with the specified public key. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getAccountBalance.md b/v1.0/RPC Nodes/others/rpc-cardano/getAccountBalance.md new file mode 100644 index 00000000..34f06cd2 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getAccountBalance.md @@ -0,0 +1,97 @@ +--- +title: "getAccountBalance" +slug: "rpc-cardano-getAccountBalance" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + }, + accountIdentifier: { + address: 'ACCOUNT_ADDRESS', // string, required + sub_account: { + // Specify sub-account information if applicable + }, + metadata: { + chain_code: 'CHAIN_CODE', // Specify chain code only if applicable + }, + }, + blockIdentifier: { + index: 1123941, // number (int64), optional + hash: '0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85', // string, optional + }, // `blockIdentifier` is optional object + currency: { + symbol: 'ADA', // string, required + decimals: 6, // number, required + metadata: { + // Specify metadata if applicable + }, + }, // `currency` is optional object +}; + +// Retrieve the account balance for the specified Cardano account +const accountBalance = await tatum.rpc.getAccountBalance(params); + +// Log the account balance +console.log('Cardano Account Balance:', accountBalance); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountBalance` method allows you to get an account's balance for a specified Cardano account identifier and block identifier. + +### Example Use Cases + +1. **Balance Summary**: Developers can use this method to retrieve the balance summary of a Cardano account, including the total balance and balances of specific sub-accounts. + +### Request Parameters + +The `getAccountBalance` method requires the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `'CARDANO'` for Cardano. + - `network` (string, required): The network name for Cardano. +- `accountIdentifier` (object, optional): An object containing information about the account. + - `address` (string, required): The Cardano account address associated with the operation. + - `sub_account` (object, optional): An optional sub-account object. + - `address` (string, optional): The sub-account address. + - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. + - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. +- `blockIdentifier` (object, optional): An object containing information about the block. + - `index` (number, optional): The index of the block (Type: number, Format: int64). + - `hash` (string, optional): The hash of the block. +- `currency` (object, required): An object specifying the currency details. + - `symbol` (string, required): The symbol or code of the currency. + - `decimals` (number, required): The number of decimal places for the currency. + - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. + +### Return Object + +The method returns an object representing the account's balance for the specified Cardano account identifier and block identifier. It includes the total balance and balances of specific sub-accounts. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getAccountCoins.md b/v1.0/RPC Nodes/others/rpc-cardano/getAccountCoins.md new file mode 100644 index 00000000..33de37f7 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getAccountCoins.md @@ -0,0 +1,92 @@ +--- +title: "getAccountCoins" +slug: "rpc-cardano-getAccountCoins" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameter in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + }, + accountIdentifier: { + address: 'ACCOUNT_ADDRESS', // string, required + sub_account: { + // Specify sub-account information if applicable + }, + metadata: { + chain_code: 'CHAIN_CODE', // Specify chain code if applicable + }, + }, + includeMempool: true, // boolean, optional + currency: { + symbol: 'ADA', // string, required + decimals: 6, // number, required + metadata: { + // Specify metadata only if applicable + }, + }, +}; + +// Retrieve unspent coins for an account in Cardano blockchain +const unspentCoins = await tatum.rpc.getAccountCoins(params); + +// Log the unspent coins +console.log('Unspent Coins:', unspentCoins); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountCoins` method allows you to get an array of all unspent coins for a Cardano account. + +### Example Use Cases + +1. **Account Balance**: Developers can use this method to retrieve the unspent coins for a Cardano account and calculate its balance. + +### Request Parameters + +The `getAccountCoins` method requires the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `'CARDANO'` for Cardano. + - `network` (string, required): The network name for Cardano. +- `accountIdentifier` (object, optional): An object containing information about the account. + - `address` (string, required): The Cardano account address associated with the operation. + - `sub_account` (object, optional): An optional sub-account object. + - `address` (string, optional): The sub-account address. + - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. + - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. +- `includeMempool` (boolean, optional): An optional boolean flag to indicate whether to include mempool transactions. Default is `true`. +- `currency` (object, required): An object specifying the currency details. + - `symbol` (string, required): The symbol or code of the currency. + - `decimals` (number, required): The number of decimal places for the currency. + - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. + +### Return Object + +The method returns an object representing the unspent coins for the specified Cardano account. This object includes details about the unspent coins and the block identifier at which the lookup was performed. + +Please note that the structure of the returned object may vary based on the Cardano RPC version. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getBlock.md b/v1.0/RPC Nodes/others/rpc-cardano/getBlock.md new file mode 100644 index 00000000..ac2997b3 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getBlock.md @@ -0,0 +1,76 @@ +--- +title: "getBlock" +slug: "rpc-cardano-getBlock" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // string (optional) + metadata: { + [key: string]: any, // object (optional) + }, + }, + }, + blockIdentifier: { + index: 1123941, // number (int64), required + hash: '0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85', // string (optional) + }, +}; + +// Call the getBlock +const block = await tatum.rpc.getBlock(params); + +// Log the block details +console.log('Block:', block); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getBlock` method allows you to retrieve information about a specific Cardano block based on the provided parameters. + +### Request Body + +The request body should contain the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `blockIdentifier` (object): An object containing information about the block to retrieve. + - `index` (number, required): The index of the block (Type: number, Format: int64). + - `hash` (string): The hash of the block (optional). + +### Response + +The response will contain details about the specified Cardano block. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getBlockTransaction.md b/v1.0/RPC Nodes/others/rpc-cardano/getBlockTransaction.md new file mode 100644 index 00000000..e761b192 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getBlockTransaction.md @@ -0,0 +1,81 @@ +--- +title: "getBlockTransaction" +slug: "rpc-cardano-getBlockTransaction" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', + metadata: { + [key: string]: any + } // string (optional) + }, + }, + blockIdentifier: { + index: 1123941, // number (int64), required + hash: '0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85', // string, required + }, + transactionIdentifier: { + hash: 'TRANSACTION_HASH', // string, required + }, +}; + +// Call the getBlockTransaction +const transaction = await tatum.rpc.getBlockTransaction(params); + +// Log the transaction details +console.log('Transaction:', transaction); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getBlockTransaction` method allows you to retrieve information about a specific transaction within a Cardano block based on the provided parameters. + +### Request Body + +The request body should contain the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `blockIdentifier` (object, required): An object containing information about the block to which the transaction belongs. + - `index` (number, required): The index of the block (Type: number, Format: int64). + - `hash` (string, required): The hash of the block. +- `transactionIdentifier` (object, required): An object containing information about the transaction. + - `hash` (string, required): The hash of the transaction. + +### Response + +The response will contain details about the specified Cardano transaction. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getHashOfTransaction.md b/v1.0/RPC Nodes/others/rpc-cardano/getHashOfTransaction.md new file mode 100644 index 00000000..201e6c5d --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getHashOfTransaction.md @@ -0,0 +1,75 @@ +--- +title: "getHashOfTransaction" +slug: "rpc-cardano-getHashOfTransaction" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const hashRequest = { + networkIdentifier: { + blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). + network: 'NETWORK_NAME', // Specify the network name. + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). + metadata: { + // Optional metadata key-value pairs. + }, + }, + }, + signedTransaction: 'SIGNED_TRANSACTION', // Specify the signed transaction blob. +}; + +// Calculate the hash of the transaction +const transactionHash = await tatum.rpc.getHashOfTransaction(hashRequest); + +// Log the transaction hash +console.log('Transaction Hash:', transactionHash); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getHashOfTransaction` method allows you to calculate the unique transaction hash (ID) for a signed transaction. The transaction hash represents the unique identifier for a transaction on the Cardano blockchain. + +### Example Use Cases + +1. **Transaction Hash Calculation**: Developers can use this method to calculate the transaction hash for a signed transaction, which can be useful for tracking and verifying transactions on the Cardano network. + +### Request Parameters + +The `getHashOfTransaction` method requires the following parameters in the request body: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `signedTransaction` (string, required): The signed transaction blob for which you want to calculate the transaction hash. + +### Return Object + +The method returns a string representing the transaction hash (ID) of the provided signed transaction. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getNetworkList.md b/v1.0/RPC Nodes/others/rpc-cardano/getNetworkList.md new file mode 100644 index 00000000..6812247e --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getNetworkList.md @@ -0,0 +1,59 @@ +--- +title: "getNetworkList" +slug: "rpc-cardano-getNetworkList" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Optional metadata parameter +const params = metadata: { + [key: string]: any, // object (optional) + }, + +// Call the `getNetworkList` method +const networkList = await tatum.rpc.getNetworkList(params); + +// Log the network list +console.log('Network List:', networkList); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getNetworkList` method allows you to retrieve a list of available networks that the Rosetta server supports. + +### Example Use Cases + +1. **Supported Networks**: Developers can use this method to retrieve the list of networks supported by the Rosetta server. + +### Request Parameters + +The `getNetworkList` method has only optional metadata object. + +- `metadata` (object, optional) + +### Return Object + +The method returns an object representing the list of available networks supported by the Rosetta server. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/getNetworkStatus.md b/v1.0/RPC Nodes/others/rpc-cardano/getNetworkStatus.md new file mode 100644 index 00000000..c68d3b82 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/getNetworkStatus.md @@ -0,0 +1,77 @@ +--- +title: "getNetworkStatus" +slug: "rpc-cardano-getNetworkStatus" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + network_identifier: { + blockchain: 'CARDANO', // string, required + network: 'NETWORK_NAME', // string, required + sub_network_identifier: { + network: 'SUB_NETWORK_NAME', // string (optional) + metadata: { + [key: string]: any, // object (optional) + }, + }, + }, + metadata: { + [key: string]: any, // object (optional) + }, +}; + +// Retrieve the status of the Cardano network +const getNetworkStatus = await tatum.rpc.getNetworkStatus(params); + +// Log the network status +console.log('Cardano Network Status:', getNetworkStatus); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getNetworkStatus` method allows you to retrieve the current status of a Cardano network. + +### Example Use Cases + +1. **Network Information**: Developers can use this method to retrieve the current status and information of a Cardano network, including details about the network itself and its status. + +### Request Parameters + +The `getNetworkStatus` method requires the following parameters: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `metadata` (object, optional): Metadata associated with the network status. + +### Return Object + +The method returns an object representing the current status of the Cardano network. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-cardano/parseTransaction.md b/v1.0/RPC Nodes/others/rpc-cardano/parseTransaction.md new file mode 100644 index 00000000..f1a7af2e --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/parseTransaction.md @@ -0,0 +1,77 @@ +--- +title: "parseTransaction" +slug: "rpc-cardano-parseTransaction" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const parseRequest = { + networkIdentifier: { + blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). + network: 'NETWORK_NAME', // Specify the network name. + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). + metadata: { + // Optional metadata key-value pairs. + }, + }, + }, + signed: true, // Specify whether the transaction is signed (boolean). + transaction: 'TRANSACTION', // Specify the transaction blob (either unsigned or signed). +}; + +// Parse the transaction +const parsedTransaction = await tatum.rpc.transactionParse(parseRequest); + +// Log the parsed transaction +console.log('Parsed Transaction:', parsedTransaction); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `transactionParse` method allows you to parse either an unsigned or signed transaction and retrieve information about the transaction. It is used to examine the details of a transaction without submitting it to the blockchain. + +### Example Use Cases + +1. **Transaction Inspection**: Developers can use this method to inspect and verify the details of a transaction before submitting it to the Cardano network. + +### Request Parameters + +The `transactionParse` method requires the following parameters in the request body: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `signed` (boolean, required): A boolean indicating whether the transaction is signed. Set to `true` for a signed transaction and `false` for an unsigned transaction. +- `transaction` (string, required): The transaction blob, which must be either the unsigned transaction blob returned by `constructionPayloads` or the signed transaction blob returned by `constructionCombine`. + +### Return Object + +The method returns an object containing parsed information about the transaction, such as transaction inputs, outputs, and other details. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/others/rpc-cardano/searchTransactions.md b/v1.0/RPC Nodes/others/rpc-cardano/searchTransactions.md new file mode 100644 index 00000000..cdc90ac6 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/searchTransactions.md @@ -0,0 +1,122 @@ +--- +title: "searchTransactions" +slug: "rpc-cardano-searchTransactions" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const params = { + networkIdentifier: { + blockchain: 'CARDANO', + network: 'NETWORK_NAME', + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', + metadata: { + // Optional metadata key-value pairs. + }, + }, + }, + operator: { + // Specify search conditions (optional). + }, + max_block: 5, // The largest block index to consider (optional). + offset: 5, // The offset into the query result to start returning transactions (optional). + limit: 5, // The maximum number of transactions to return in one call (optional). + transactionIdentifier: { + hash: 'TRANSACTION_HASH', // string, required + }, + accountIdentifier: { + address: 'ACCOUNT_ADDRESS', // string, required + sub_account: { + // Specify sub-account information if applicable + }, + metadata: { + chain_code: 'CHAIN_CODE', // Specify chain code if applicable + }, + }, + coin_identifier: { + identifier: 'CO' // Specify search conditions (optional). + }, + currency: { + symbol: 'CURRENCY_SYMBOL', // Required: Specifies the currency symbol . + decimals: 6, // Required: Specifies the currency decimals (number). + metadata: { + // Optional metadata for amount object + }, + }, + status: 'reverted', // The network-specific operation status type (optional). + type: 'transfer', // The network-specific operation type (optional). + address: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', // Account address (optional). + success: true, // A synthetic condition (optional). +}; + +// Search for transactions +const transactions = await tatum.rpc.searchTransactions(params); + +// Log the retrieved transactions +console.log('Transactions:', transactions); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `searchTransactions` method allows you to search for transactions matching a set of provided conditions in canonical blocks. This can be useful for querying transaction data based on various criteria. + +### Example Use Cases + +1. **Transaction Query**: Developers can use this method to search for transactions that meet specific criteria, such as a particular status or operation type. +2. **Block Analysis**: Users can analyze transactions within a specific range of blocks to identify patterns or trends. + +## Request Parameters + +The `searchTransactions` method requires the following parameters in the request body: + +* `networkIdentifier` (object, required): An object containing information about the blockchain network. + * `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. + * `network` (string, required): The network name for Cardano. + * `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + * `network` (string, optional): The name of the sub-network within Cardano. + * `metadata` (object, optional): Metadata associated with the sub-network. +* `operator` (enum, optional): Additional search conditions `or` and `and`. +* `max_block` (number, optional): The largest block index to consider when searching for transactions. If not populated, the current block is considered the `max_block`. If you do not specify a `max_block`, it is possible that a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows). +* `offset` (number, optional): The offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change, and you must restart your search iteration. +* `limit` (number, optional): The maximum number of transactions to return in one call. The implementation may return <= `limit` transactions. +* `transactionIdentifier` (object, required): An object containing information about the transaction. + * `hash` (string, required): The hash of the transaction. +* `accountIdentifier` (object, optional): An object containing information about the account. + * `address` (string, required): The Cardano account address associated with the operation. + * `sub_account` (object, optional): An optional sub-account object. + * `address` (string, optional): The sub-account address. + * `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. + * `metadata` (object, optional): An optional metadata object for the account. +* `coinIdentifier` (object, optional): Specify search conditions for coin identifier. Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction\_hash: index. + * `identifier` (string, required): Example: '0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f: 1' +* `currency` (object, required): An object specifying the currency details. - `symbol` (string, required): The symbol or code of the currency. - `decimals` (number, required): The number of decimal places for the currency. - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. +* `status` (string, optional): The network-specific operation status type (optional). +* `type` (string, optional): The network-specific operation type (optional). +* `address` (string, optional): AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier. +* `success` (boolean, optional): A synthetic condition populated by parsing network-specific operation statuses. + +### Return Object + +The method returns a list of transactions that match the specified search criteria. diff --git a/v1.0/RPC Nodes/others/rpc-cardano/submitTransaction.md b/v1.0/RPC Nodes/others/rpc-cardano/submitTransaction.md new file mode 100644 index 00000000..3824529c --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-cardano/submitTransaction.md @@ -0,0 +1,75 @@ +--- +title: "submitTransaction" +slug: "rpc-cardano-submitTransaction" +excerpt: "Cardano RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cardano RPC" + image: [] + keywords: "cardano, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Cardano +const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); + +// Define the input parameters in a single object +const submitRequest = { + networkIdentifier: { + blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). + network: 'NETWORK_NAME', // Specify the network name. + subNetworkIdentifier: { + network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). + metadata: { + // Optional metadata. + }, + }, + }, + signedTransaction: 'SIGNED_TRANSACTION', // Specify the signed transaction to submit. +}; + +// Submit the signed transaction to the network +const transactionResponse = await tatum.rpc.submitTransaction(submitRequest); + +// Log the transaction response +console.log('Transaction Response:', transactionResponse); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `submitTransaction` method allows you to submit a signed transaction to the Cardano network for processing. After successfully constructing and signing a transaction, you can use this method to broadcast it to the network. + +### Example Use Cases + +1. **Transaction Submission**: Developers can use this method to submit a signed Cardano transaction to the network for execution. This is the final step in the transaction lifecycle. + +### Request Parameters + +The `submitTransaction` method requires the following parameters in the request body: + +- `networkIdentifier` (object, required): An object containing information about the blockchain network. + - `blockchain` (string, required): The blockchain identifier, which should be set to 'CARDANO' for Cardano. + - `network` (string, required): The network name for Cardano. + - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. + - `network` (string, required): The name of the sub-network within Cardano. + - `metadata` (object, optional): Metadata associated with the sub-network. +- `signedTransaction` (string, required): The signed transaction blob that you want to submit to the Cardano network. + +### Return Object + +The method returns an object representing the response from the Cardano network after submitting the signed transaction. This response may include details about the transaction's acceptance by the network. + +Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. \ No newline at end of file