diff --git a/v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md b/v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md deleted file mode 100644 index c2c5ded3..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/constructionMetadata.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -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 deleted file mode 100644 index 3c4fe187..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/constructionPayloads.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -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 deleted file mode 100644 index 0de6da0b..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/constructionPreprocess.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -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 deleted file mode 100644 index 038138d6..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/createNetworkTransaction.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -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 deleted file mode 100644 index 876d98d5..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/deriveAccount.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -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 deleted file mode 100644 index 34f06cd2..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getAccountBalance.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -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 deleted file mode 100644 index 33de37f7..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getAccountCoins.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -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 deleted file mode 100644 index ac2997b3..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getBlock.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -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 deleted file mode 100644 index e761b192..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getBlockTransaction.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -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 deleted file mode 100644 index 201e6c5d..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getHashOfTransaction.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -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 deleted file mode 100644 index 6812247e..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getNetworkList.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -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 deleted file mode 100644 index c68d3b82..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/getNetworkStatus.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -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 deleted file mode 100644 index f1a7af2e..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/parseTransaction.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -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 deleted file mode 100644 index cdc90ac6..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/searchTransactions.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -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 deleted file mode 100644 index 3824529c..00000000 --- a/v1.0/RPC Nodes/others/rpc-cardano/submitTransaction.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -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 diff --git a/v1.0/RPC Nodes/others/rpc-cardano.md b/v1.0/RPC Nodes/others/rpc-eos.md similarity index 85% rename from v1.0/RPC Nodes/others/rpc-cardano.md rename to v1.0/RPC Nodes/others/rpc-eos.md index df37f438..533b70ea 100644 --- a/v1.0/RPC Nodes/others/rpc-cardano.md +++ b/v1.0/RPC Nodes/others/rpc-eos.md @@ -1,6 +1,6 @@ --- -title: "Cardano" -slug: "rpc-cardano" +title: "Eos" +slug: "rpc-eos" excerpt: "" category: 65c5e93c623cad004b45d505 hidden: false diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_abi.md b/v1.0/RPC Nodes/others/rpc-eos/get_abi.md new file mode 100644 index 00000000..236951ac --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_abi.md @@ -0,0 +1,88 @@ +--- +title: "get_abi" +slug: "rpc-eos-get_abi" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + + +### Overview + +The `get_abi` method is utilized to retrieve the ABI (Application Binary Interface) associated with an EOS account. ABI is critical for encoding and decoding the data correctly to interact with the smart contracts deployed by the account. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getAbi({ accountName: 'b1' }) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} +### Example use cases: + +1. **Smart Contract Interaction:** + Developers can use the `get_abi` method to obtain the ABI of a smart contract, enabling them to interact with the contract's methods and access its state variables and structures. + +2. **Data Encoding and Decoding:** + The method is crucial for encoding the data sent to a smart contract and decoding the data received from it, facilitating seamless interaction with smart contracts deployed on the EOS blockchain. + +3. **Contract Development and Testing:** + `get_abi` is invaluable for developers in the development and testing phases of smart contract deployment, allowing for accurate and efficient contract interaction and validation. + +### Request Parameters + +The `getAbi` method usually requires one parameter in the request body: + +- `accountName` (string, required): The name of the EOS account whose ABI is being requested. + +### Return Object + +The `get_abi` method typically returns an object containing the ABI details including the version, types, structs, actions, tables, and more, of the requested account: + +- `version` (string): The version of the ABI. +- `types` (array): An array containing the types used in the ABI. +- `structs` (array): An array of structures defined in the ABI. +- `actions` (array): The actions that are defined in the ABI. +- `tables` (array): The tables that are defined in the ABI. +- `ricardian_clauses` (array): The ricardian clauses defined in the ABI. +- `error_messages` (array): Possible error messages that are defined in the ABI. +- `abi_extensions` (array): Any extensions to the ABI. + +### JSON-RPC Request Example + +```json +{ + "account_name": "b1" +} +``` +### JSON-RPC Response Example + +```json +{ + "version": "eosio::abi/1.0", + "types": [...], + "structs": [...], + "actions": [...], + "tables": [...], + "ricardian_clauses": [...], + "error_messages": [...], + "abi_extensions": [...] +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_account.md b/v1.0/RPC Nodes/others/rpc-eos/get_account.md new file mode 100644 index 00000000..d0a52c22 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_account.md @@ -0,0 +1,209 @@ +--- +title: "get_account" +slug: "rpc-eos-get_account" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_account` returns an object containing various details about a specific account on the blockchain. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const account = await tatum.rpc.getAccount({ accountName: 'b1' }) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Fetching Account Details:** +Developers or users may need to retrieve specific details about an account, such as the account's balance, permissions, resource allocation (CPU, NET, and RAM usage), and other parameters. + +2. **Checking Resource Allocation and Consumption:** +get_account can be used to monitor the amount of network, CPU, and RAM resources an account has allocated and consumed. This can help users manage their resources more effectively to ensure their dApps run smoothly. + +3. **Monitoring Staked and Unstaked Tokens:** +Users can utilize this method to check the status of their tokens, whether they are staked or unstaked, and make decisions about staking and unstaking based on this information. + +### Request Parameters + +The `getAccount` method requires the following parameter: + +- `accountName` (string, required): A unique identifier assigned to every account. It is required to be 12 characters long and can only contain the characters a-z, 1-5, and . (dot). + +### Return Object + +The `get_account` method returns an object containing detailed information about the requested account. The object includes the following fields: + +- `account_name` (string): The name of the requested account. +- `head_block_num` (integer): The most recent block number on the blockchain at the time of the request. +- `head_block_time` (string): The timestamp of the most recent block on the blockchain at the time of the request. +- `last_code_update` (string): The timestamp of the last time the account’s smart contract code was updated. +- `created` (string): The timestamp of when the account was created. +- `refund_request` (object): Details of any pending refund requests for the account due to unstaking resources. +- `ram_quota` (integer): The total RAM allocated to the account. +- `net_limit` (object): The available network bandwidth. +- `cpu_limit` (object): CPU time for the account. +- `total_resources` (object): A summary of the total resources (RAM, CPU, and NET) allocated to the account. +- `core_liquid_balance` (string): The amount of liquid (available) core token (usually EOS) the account holds. +- `self_delegated_bandwidth` (object): The amount of bandwidth the account has delegated to itself. +- `net_weight` (integer): The amount of network bandwidth staked by the account. +- `cpu_weight` (integer): CPU time staked by the account. +- `ram_usage` (integer): The amount of RAM currently used by the account. +- `privileged` (boolean): Indicates whether the account has elevated (privileged) permissions. +- `permissions` (array): A list of the account’s permissions and their details, including the public keys associated with the account and any custom permission structures. +- `voter_info` (object): Information related to the account’s voting, such as the proxies used, the number of votes, and the staked amount for voting. + +### JSON-RPC Request Example + +```json +{ + "account_name": "string" +} +``` + +### JSON-RPC Response Example + +```json +{ + "account_name": "b1", + "head_block_num": 333261323, + "head_block_time": "2023-09-27T12:52:25.000", + "privileged": false, + "last_code_update": "1970-01-01T00:00:00.000", + "created": "2018-06-09T11:58:03.500", + "core_liquid_balance": "0.2849 EOS", + "ram_quota": 9487, + "net_weight": "350078512340", + "cpu_weight": "296624975145", + "net_limit": { + "used": 271, + "available": "659675344495", + "max": "659675344766", + "last_usage_update_time": "2022-08-23T01:41:35.000", + "current_used": 0 + }, + "cpu_limit": { + "used": 4647, + "available": 26734970, + "max": 26739617, + "last_usage_update_time": "2022-08-23T01:41:35.000", + "current_used": 0 + }, + "ram_usage": 5010, + "permissions": [ + { + "perm_name": "active", + "parent": "owner", + "required_auth": { + "threshold": 2, + "keys": [ + { + "key": "EOS5BUDFbb2erXiRP8qHQAgVboCHgHGesbCubUfgXYJhnYZKSqNbD", + "weight": 1 + }, + { + "key": "EOS6hQ6v8vut1V2giQCYha7J225GCzFJtF3o7fy8JYuN7k6fG4n23", + "weight": 1 + }, + { + "key": "EOS7RodmQofvAxgYBJzfNuwRKr6TWh5LbCBfB4uQ8tjrjQ8Ukkwqq", + "weight": 1 + }, + { + "key": "EOS7c9jHNgbtTMYgpXvmTb1kW61oH6kwfGioWk75ugDMhsywe6rWu", + "weight": 1 + } + ], + "accounts": [], + "waits": [] + }, + "linked_actions": [] + }, + { + "perm_name": "owner", + "parent": "", + "required_auth": { + "threshold": 2, + "keys": [ + { + "key": "EOS5BUDFbb2erXiRP8qHQAgVboCHgHGesbCubUfgXYJhnYZKSqNbD", + "weight": 1 + }, + { + "key": "EOS6hQ6v8vut1V2giQCYha7J225GCzFJtF3o7fy8JYuN7k6fG4n23", + "weight": 1 + }, + { + "key": "EOS7RodmQofvAxgYBJzfNuwRKr6TWh5LbCBfB4uQ8tjrjQ8Ukkwqq", + "weight": 1 + }, + { + "key": "EOS7c9jHNgbtTMYgpXvmTb1kW61oH6kwfGioWk75ugDMhsywe6rWu", + "weight": 1 + } + ], + "accounts": [], + "waits": [] + }, + "linked_actions": [] + } + ], + "total_resources": { + "owner": "b1", + "net_weight": "35007851.2340 EOS", + "cpu_weight": "29662497.5145 EOS", + "ram_bytes": 8087 + }, + "self_delegated_bandwidth": { + "from": "b1", + "to": "b1", + "net_weight": "35007851.2340 EOS", + "cpu_weight": "29662497.5145 EOS" + }, + "refund_request": null, + "voter_info": { + "owner": "b1", + "proxy": "", + "producers": [], + "staked": "646723487485", + "last_vote_weight": "2768257912613634048.00000000000000000", + "proxied_vote_weight": "0.00000000000000000", + "is_proxy": 0, + "flags1": 0, + "reserved2": 0, + "reserved3": "0.0000 EOS" + }, + "rex_info": null, + "subjective_cpu_bill_limit": { + "used": 0, + "available": 0, + "max": 0, + "last_usage_update_time": "2000-01-01T00:00:00.000", + "current_used": 0 + }, + "eosio_any_linked_actions": [] +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_accounts_by_authorizers.md b/v1.0/RPC Nodes/others/rpc-eos/get_accounts_by_authorizers.md new file mode 100644 index 00000000..e1e7ba1d --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_accounts_by_authorizers.md @@ -0,0 +1,81 @@ +--- +title: "get_accounts_by_authorizers" +slug: "rpc-eos-get_accounts_by_authorizers" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_accounts_by_authorizers` method retrieves accounts associated with specific authorizers, serving as an essential tool for developers and users interested in understanding account access and control on the EOS blockchain. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getAccountsByAuthorizers({ + accounts: ["eosio"] +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Account Access Analysis:** + Developers can utilize this method to discern which accounts have access through specific authorizers, fortifying access control and security management. + +2. **Permission Management:** + Users managing multiple accounts can benefit from this method by identifying which accounts are controlled by specific authorizers, optimizing permission management processes. + +3. **Enhanced Account Retrieval:** + This method facilitates the retrieval of accounts based on specific authorizers, fostering efficient data interaction and management on the EOS blockchain. + +### Request Parameters + +The `getAccountsByAuthorizers` method requires the following parameters in the request body: + +* `keys` (array of strings): An array of public keys used to retrieve accounts. +* `accounts` (array of strings): An array of account names used to retrieve accounts. + * `actor` (string, required): Name of the actor. + * `permission` (string, required): Specifies the permission name. + +### Return Object + +The `get_accounts_by_authorizers` method typically returns an object containing: + +* `accounts` (array of strings): An array of account names associated with the provided authorizers. + +### JSON-RPC Request Example + +```json +{ + "keys": ["EOS6MRy..."], + "accounts": ["eosio"] +} +``` +### JSON-RPC Reponse Example + +```json +{ + "accounts": ["account1", "account2"] +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_activated_protocol_features.md b/v1.0/RPC Nodes/others/rpc-eos/get_activated_protocol_features.md new file mode 100644 index 00000000..aea70d92 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_activated_protocol_features.md @@ -0,0 +1,94 @@ +--- +title: "get_activated_protocol_features" +slug: "rpc-eos-get_activated_protocol_features" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_activated_protocol_features` method retrieves the activated protocol features for a producer node in the EOS blockchain. This method is crucial for developers and block producers to identify and understand the protocol features activated on a node, ensuring proper configuration and management of producer nodes. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getActivatedProtocolFeatures({ + lowerBound: 0, + upperBound: 100, + limit: 2, + searchByBlockNum: true, + reverse: false +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} +### Example use cases: + +1. **Producer Node Management:** + Developers and block producers can utilize this method to analyze and manage the activated protocol features, ensuring the optimal configuration of producer nodes. + +2. **Protocol Feature Exploration:** + This method allows users and developers to explore and understand the activated protocol features on the blockchain, enhancing their interaction and experience with the EOS blockchain. + +3. **Enhanced Feature Retrieval:** + The method provides extensive filtering options for retrieving activated protocol features, enabling users to efficiently manage and interact with the protocol features. + +### Request Parameters + +The `getActivatedProtocolFeatures` method requires the following parameters in the request body: + +* `params` (object, required): Defines the filters to retrieve the protocol features by. + * `lowerBound` (integer): Lower bound. + * `upperBound` (integer): Upper bound. + * `limit` (integer, default: 10): The limit. + * `searchByBlockNum` (boolean, required): Flag to indicate whether it has to search by block number. + * `reverse` (boolean, required): Flag to indicate whether it has to search in reverse. + +### Return Object + +The `get_activated_protocol_features` method returns an object with the following properties: + +* `activated_protocol_features` (Array of strings, required): Variant type, an array of strings representing the activated protocol features. +* `more` (integer): Represents whether there are more activated protocol features to be fetched. If there's `more` activated protocol features than the input parameter limit requested, it returns the ordinal of the next activated protocol feature which was not returned, otherwise, it returns zero. + +### JSON-RPC Request Example + +```json +{ + "params": { + "lower_bound": 0, + "upper_bound": 100, + "limit": 10, + "search_by_block_num": true, + "reverse": false + } +} +``` + +### JSON-RPC Response Example + +```json +{ + "activated_protocol_features": ["0a1b2c3d4e5f6789abcdef10", "1a2b3c4d5e6f7890abcdef01"], + "more": 1 +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_block.md b/v1.0/RPC Nodes/others/rpc-eos/get_block.md new file mode 100644 index 00000000..b5801541 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_block.md @@ -0,0 +1,119 @@ +--- +title: "get_block" +slug: "rpc-eos-get_block" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +{% hint style="warning" %} +Please note that you are able to get data only from block number 260742168 and newer. +{% endhint %} + +### Overview + +The `get_block` method returns an object containing various details about a specific block on the blockchain, providing block number or block id in request. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const block = await tatum.rpc.getBlock({ blockNumOrId: '260742168' }) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Block Verification:** +Developers or validators might use the `get_block` method to fetch specific block details for the purpose of verifying block information. It allows the comparison of block data retrieved from different nodes to ensure data consistency and integrity across the network. + +2. **Transaction Confirmation:** +Users and services might utilize the `get_block` method to confirm transaction inclusion within a block. By examining the transactions field of the returned block object, users can ascertain whether a specific transaction has been included and, consequently, confirm its successful execution. + +3. **Data Analysis and Chain Exploration:** +Researchers and analysts can employ the `get_block` method to retrieve detailed block data for analytical purposes, exploring block and transaction patterns, studying network activity, and gaining insights into blockchain operations and behavior. + +### Request Parameters + +The `getBlock` method requires the following parameter in the request body: + +- `blockNumOrId` (string, required): Provide either a block number or a block ID. + +### Return Object + +The `get_block` method returns an object containing the following parameters: + +- `timestamp` (string): Date/time string in the format YYYY-MM-DDTHH:MM:SS.sss. +- `producer` (string): The account name of the block producer. +- `confirmed` (integer): Number of prior blocks confirmed by this block producer in the current schedule. +- `previous` (string, Sha256): The ID of the block that immediately precedes this one. +- `transaction_mroot` (string, Sha256): The Merkle root of the transactions included in this block. +- `action_mroot` (string, Sha256): The Merkle root of the actions included in this block. +- `schedule_version` (integer): Number of times the producer schedule has changed since genesis. +- `new_producers` (nullable array of objects): Information about any new block producers that have been elected in this block. +- `header_extensions` (array of integers or strings): Any extensions to the block header. +- `new_protocol_features` (array of objects): List of new protocol features. +- `producer_signature` (string, Signature): Base58 encoded EOSIO cryptographic signature. +- `transactions` (array of objects): List of valid transaction receipts included in block. +- `block_extensions` (array of integers or strings): Any extensions to this block. +- `id` (string, Sha256): The ID of this block. +- `block_num` (integer): The height of this block in the chain. +- `ref_block_prefix` (integer): 32-bit portion of block ID. + +### JSON-RPC Request Example + +```json +{ + "block_num_or_id": "260742168" +} +``` + +### JSON-RPC Response Example + +```json +{ + "timestamp": "2023-09-26T16:50:32.500", + "producer": "eosio", + "confirmed": 0, + "previous": "0000004bc2b4483cfad9a2aeb93196c8c47744cc553d5ed30b71058e9aa2e410", + "transaction_mroot": "0000000000000000000000000000000000000000000000000000000000000000", + "action_mroot": "0e6e36f2db9fc3f7a7d3f1a1a7fd2aef9b9b9827060bbe5a8811e0e86e7d7d3a", + "schedule_version": 0, + "new_producers": null, + "header_extensions": [], + "new_protocol_features": [], + "producer_signature": "SIG_K1_Jyv4wSc8yr5UWwLq9m7eKzWEVJgEo9rzUq9Zt49gCQjzjxrtBQyd1ZQsZt5Ge9wXCUsMxra1mHLJyZXFqSRcR5wSEDF1", + "transactions": [ + { + "status": "executed", + "cpu_usage_us": 758, + "net_usage_words": 14, + "trx": [ "2", "e4be63d97b553a5d7b2c9b0 + +d21e753b69a3c0bf4a7f9f0b2ff806c16d8a8e959" ] + } + ], + "block_extensions": [], + "id": "0000004cc2b4483cfad9a2aeb93196c8c47744cc553d5ed30b71058e9aa2e410", + "block_num": 76, + "ref_block_prefix": 3708016389 +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_block_info.md b/v1.0/RPC Nodes/others/rpc-eos/get_block_info.md new file mode 100644 index 00000000..1730c35b --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_block_info.md @@ -0,0 +1,101 @@ +--- +title: "get_block_info" +slug: "rpc-eos-get_block_info" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +{% hint style="warning" %} +Please note that you are able to get data only from block number 260742168 and newer. +{% endhint %} + +### Overview + +The `get_block_info` method retrieves crucial information about a specific block in the EOS blockchain. It returns an object containing details such as block time, block number, previous block ID, producer, and transaction count. Similar to `get_block` but returns a fixed-size smaller subset of the block data. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const blockInfo = await tatum.rpc.getBlockInfo() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Fetching Specific Block Details:** + Developers and users may utilize the `get_block_info` method to gather information about a particular block, aiding in debugging or validating blockchain states and transactions. + +2. **Block Verification:** + Validators and network participants can employ this method to verify the integrity and authenticity of a block, ensuring the security and reliability of the network. + +3. **Data Analysis and Chain Exploration:** + Blockchain analysts and enthusiasts might use `get_block_info` to study block patterns and transaction activities, gaining insights into the network’s operations and behaviors. + +### Request Parameters + +The `getBlockInfo` method requires the following parameter in the request body: + +- `blockNumOrId` (string, required): It could be either a block number or a block ID. + +### Return Object + +The `get_block_info` method returns an object containing the following parameters: + +- `block_num` (integer): The block number. +- `ref_block_num` (integer): The reference block number. +- `id` (string): The ID of the block. +- `timestamp` (string): The timestamp when the block was produced. +- `producer` (string): The name of the block producer. +- `confirmed` (integer): The number of confirmed transactions in the block. +- `previous` (string): The ID of the previous block. +- `transaction_mroot` (string): The Merkle root of the transactions in the block. +- `action_mroot` (string): The Merkle root of the actions in the block. +- `schedule_version` (integer): The schedule version. +- `producer_signature` (string): The signature of the block producer. +- `ref_block_prefix` (integer): The reference block prefix. + +### JSON-RPC Request Example + +```json +{ + "block_num_or_id": "260742168" +} +``` +### JSON-RPC Response Example + +```json +{ + "block_num": 260742168, + "ref_block_num": 39960, + "id": "0f8a9c180c996f9a88e463ca22428b3ed13c7ddc5ad09fc9c77c3c635ef9872b", + "timestamp": "2022-08-03T16:00:36.000", + "producer": "eosasia11111", + "confirmed": 240, + "previous": "0f8a9c1787cb055ab97b9beae18b762d6c3b4cfebf25060ddcc47213a2ef64d2", + "transaction_mroot": "03313763ba0a854edbd46517bc515d090ff8e64c842e19ab91fb61f6f7bb0ce8", + "action_mroot": "7c91b3be9fab14fe589a99312c6366d4077f49a80fd1f0ad4077f7575bbb4fe8", + "schedule_version": 2023, + "producer_signature": "SIG_K1_KkDoLCNaRyV62pxoUW8XQDgbZ31TrvSEDVebKFrL6fU8EsVkEFL7Wx8YMXyx2ydqY9KhPSYKQZD6dtD2cnbBmsETsZsdxt", + "ref_block_prefix": 3395544200 +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_code.md b/v1.0/RPC Nodes/others/rpc-eos/get_code.md new file mode 100644 index 00000000..7e05566a --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_code.md @@ -0,0 +1,88 @@ +--- +title: "get_code" +slug: "rpc-eos-get_code" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_code` method returns an object containing the smart contract WASM code for a specified account on the EOS blockchain. This method is paramount for developers who are looking to analyze or understand the WASM code of deployed smart contracts, enabling an in-depth interaction and integration with the smart contracts. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getCode({ + accountName: "eosio.token", + codeAsWasm: 1 +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Smart Contract Analysis:** + Developers use this method to retrieve and analyze the WASM code of smart contracts, allowing for comprehensive understanding and debugging of the contract logic. + +2. **WASM Code Inspection:** + This method is vital for users and developers wishing to inspect the WASM code, ensuring the contract's integrity, functionality, and security. + +3. **Enhanced Integration and Interaction:** + Retrieving the WASM code facilitates seamless integration and interaction with smart contracts, ensuring proper deployment, execution, and management of contracts on the EOS blockchain. + +### Request Parameters + +The `getCode` method requires the following parameters in the request body: + +* `accountName` (string, required): The name of the account whose smart contract WASM code needs to be retrieved. Acceptable types are NamePrivileged, NameBasic, NameBid, and NameCatchAll. +* `codeAsWasm` (integer, required): This must be 1 (true). + +### Return Object + +The `get_code` method returns an object containing: + +* `name` (string): The name of the account from which the WASM code was retrieved. Acceptable types are NamePrivileged, NameBasic, NameBid, and NameCatchAll. +* `code_hash` (string): A Sha256 hash representing the WASM code of the retrieved smart contract. +* `wast` (string): The WebAssembly text format representation of the smart contract. +* `wasm` (string): The WebAssembly binary representation of the smart contract. +* `abi` (object): The ABI (Application Binary Interface) of the smart contract, representing the binary representation of the contract's interface. + +### JSON-RPC Request Example + +```json +{ + "accountName": "eosio.token", + "codeAsWasm": 1 +} +``` +### JSON-RPC Response Example + +```json +{ + "name": "eosio.token", + "code_hash": "a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890ab", + "wast": "... (WAST string) ...", + "wasm": "... (WASM binary string) ...", + "abi": { ... (ABI object) ... } +} + +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_currency_balance.md b/v1.0/RPC Nodes/others/rpc-eos/get_currency_balance.md new file mode 100644 index 00000000..bc68af97 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_currency_balance.md @@ -0,0 +1,84 @@ +--- +title: "get_currency_balance" +slug: "rpc-eos-get_currency_balance" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_currency_balance` method is used to retrieve the balance of a specific currency/token for a given account on the EOS blockchain. This method is essential for users and developers who wish to query and manage account balances, ensuring accurate and up-to-date financial data. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getCurrencyBalance({ + account: 'eosio', + code: 'eosio.token', + symbol: 'EOS' +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Balance Querying:** + Users and developers can utilize the `get_currency_balance` method to query the balances of specific currencies or tokens, enabling effective account management and financial planning. + +2. **Financial Management:** + This method is pivotal for financial management in decentralized applications, allowing for the implementation of features related to balance checking, fund transfer validations, and more. + +3. **Smart Contract Interaction:** + Developers can leverage this method to interact with token contracts to retrieve the balance of an account, facilitating the development of functionalities around token transactions and balance validations in dApps. + +### Request Parameters + +The `getCurrencyBalance` method requires the following parameters in the request body: + +- `account` (string, required): The name of the account for which the balance is being requested. +- `code` (string, required): The smart contract that operates the currency. +- `symbol` (string, optional): The symbol of the currency/token. If not provided, the balances of all tokens available under the smart contract will be returned. + +### Return Object + +Upon a successful request, the method returns an array containing the balances of the specified currency/token for the given account: + +- Each item in the array represents a balance in the format `"amount SYMBOL"` (e.g., `"100.0000 EOS"`). + +### JSON-RPC Request Example + +```json +{ + "account": "eosio", + "code": "eosio.token", + "symbol": "EOS" +} +``` +### JSON-RPC Response Example + +```json +[ + "1667.0290 EOS" +] +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_currency_stats.md b/v1.0/RPC Nodes/others/rpc-eos/get_currency_stats.md new file mode 100644 index 00000000..ad8b4c0c --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_currency_stats.md @@ -0,0 +1,88 @@ +--- +title: "get_currency_stats" +slug: "rpc-eos-get_currency_stats" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_currency_stats` method is utilized to retrieve the statistics for a specific currency on the EOS blockchain. By employing this method, users and developers can obtain crucial information about a currency, such as its supply, maximum supply, and issuer, thereby enabling in-depth analysis and insights into the currency's status and distribution. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getCurrencyStats({ + code: 'eosio.token', + symbol: 'EOS' +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Token Analysis:** + Individuals and analysts can utilize the `get_currency_stats` method to gather comprehensive details about a token's supply and issuer, facilitating profound analysis and research on the token’s characteristics and distribution. + +2. **Smart Contract Interaction:** + Developers can use this method to obtain necessary information about a token, which can aid in interacting efficiently with smart contracts that deal with tokens, for operations like transferring tokens or querying balances. + +3. **Market Analysis:** + `get_currency_stats` is instrumental for acquiring essential details about a token, which are critical for performing market analysis. This enables users and potential investors to make informed and insightful decisions based on the available token data. + +### Request Parameters + +The `getCurrencyStats` method requires the following parameters in the request body: + +- `code` (string, required): The contract that operates the token. +- `symbol` (string, required): The symbol of the token for which the statistics are being requested. + +### Return Object + +The `get_currency_stats` method typically returns an object containing the statistics of the requested currency. This object includes: + +- `supply` (string): The total supply of the token in circulation. +- `max_supply` (string): The maximum supply of the token that can ever be created. +- `issuer` (string): The account name of the issuer of the token. + +### JSON-RPC Request Example + +```json +{ + "code": "eosio.token", + "symbol": "EOS" +} +``` + +### JSON-RPC Response Example + +```json +{ + "EOS": { + "supply": "1168690795.8555 EOS", + "max_supply": "10000000000.0000 EOS", + "issuer": "eosio" + } +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_info.md b/v1.0/RPC Nodes/others/rpc-eos/get_info.md new file mode 100644 index 00000000..3aa0a083 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_info.md @@ -0,0 +1,96 @@ +--- +title: "get_info" +slug: "rpc-eos-get_info" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_info` RPC method in the EOS blockchain is used to retrieve various details about the blockchain's state, such as the head block, the last irreversible block, and the chain ID. It is one of the most fundamental RPC calls in the EOSIO blockchain, providing essential information about the network's status. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const info = await tatum.rpc.getInfo() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Checking Blockchain Status:** +Developers and users often use the `get_info` method to quickly check the status of the EOS blockchain, such as the head block number and the last irreversible block number, to ensure they are interacting with the most recent and confirmed state of the blockchain. + +2. **Synchronization and Validation:** +For node operators and block producers, `get_info` is crucial to verify that their node is synchronized with the network, and to compare the `chain_id` and other details to ensure they are on the correct chain and avoid forks. + +3. **Development and Debugging:** +Developers frequently use `get_info` during the development and debugging of dApps and smart contracts, to fetch real-time information about the blockchain, validate transactions, and test the behavior of their applications against the current state of the blockchain. + +### Request Parameters +The `getInfo` method does not require any parameters; it is a simple GET request to the endpoint. + +### Return Object +The `get_info` method returns an object with the following response parameters: + +- `server_version` (string): The version of the nodeos software running on the node. +- `chain_id` (string): The unique identifier for the EOSIO blockchain. +- `head_block_num` (integer): The most recent block number on the blockchain. +- `head_block_id` (string): The unique identifier of the head block. +- `head_block_time` (string): The timestamp of when the head block was produced. +- `head_block_producer` (string): The name of the block producer that produced the head block. +- `last_irreversible_block_num` (integer): The most recent block that has been irreversibly confirmed on the blockchain. +- `last_irreversible_block_id` (string): The unique identifier of the last irreversible block. +- `virtual_block_cpu_limit` (integer): The current limit on CPU usage for virtual blocks. +- `virtual_block_net_limit` (integer): The current limit on NET usage for virtual blocks. +- `block_cpu_limit` (integer): The current limit on CPU usage for blocks. +- `block_net_limit` (integer): The current limit on NET usage for blocks. +- `server_version_string` (string): The server version as a string. +- `fork_db_head_block_num` (integer): Sequential block number representing the best known head in the fork database tree. +- `fork_db_head_block_id` (string): Hash representing the best known head in the fork database tree. + +### JSON-RPC Response Example + +```json +{ + "server_version": "7e1ad13e", + "chain_id": "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906", + "head_block_num": 333261268, + "last_irreversible_block_num": 333260936, + "last_irreversible_block_id": "13dd2888c6e933ac455978baf53554605d95e0e2d2abd0c1159ddb218936fe03", + "head_block_id": "13dd29d4aa69b67d138d0bbb82ee4d1de74ec0cd404d58902381ea9d5bdbff67", + "head_block_time": "2023-09-27T12:51:57.500", + "head_block_producer": "eoseouldotio", + "virtual_block_cpu_limit": 200000, + "virtual_block_net_limit": 1048576000, + "block_cpu_limit": 200000, + "block_net_limit": 1048576, + "server_version_string": "v4.0.4", + "fork_db_head_block_num": 333261268, + "fork_db_head_block_id": "13dd29d4aa69b67d138d0bbb82ee4d1de74ec0cd404d58902381ea9d5bdbff67", + "server_full_version_string": "v4.0.4-7e1ad13e1e98b1e0703d0ea072b4fca5419cfdbe", + "total_cpu_weight": "383377176232761", + "total_net_weight": "96156545705220", + "earliest_available_block_num": 260742168, + "last_irreversible_block_time": "2023-09-27T12:49:11.500" +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_producers.md b/v1.0/RPC Nodes/others/rpc-eos/get_producers.md new file mode 100644 index 00000000..49ec0507 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_producers.md @@ -0,0 +1,89 @@ +--- +title: "get_producers" +slug: "rpc-eos-get_producers" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_producers` method is designed to retrieve a list of producers from the EOS blockchain. Producers are essential entities in the EOS network responsible for producing blocks, and this method provides valuable insights into their details and statuses, including active, pending, and proposed producers. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getProducers({ + limit: '10', + lowerBound: '0', + json: true +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Monitoring Network Health:** + Developers and network monitors can use the `get_producers` method to observe the active, pending, and proposed producers, assessing the overall health and consensus of the network. + +2. **Network Statistics:** + This method aids in gathering statistical data about the network, including the number and statuses of producers, facilitating enhanced network analysis and management. + +3. **Voting and Governance:** + `get_producers` can be instrumental for users involved in EOS governance, helping them to make informed decisions by providing a current list of producers along with their statuses. + +### Request Parameters + +The `get_producers` method requires the following parameters in the request body: + +- `limit` (string, required): The total number of producers to retrieve. +- `lowerBound` (string, required): In conjunction with limit, it can be used to paginate through the results. For example, limit=10 and lower_bound=10 would represent page 2. +- `json` (boolean, required): Indicates whether the result should be returned in JSON format. + +### Return Object + +The `getProducers` method typically returns an object containing lists of active, pending, and proposed producers: + +- `active` (Array of objects, nullable): A list of currently active producers. +- `pending` (Array of objects, nullable): A list of producers that are pending. +- `proposed` (Array of objects, nullable): A list of producers that are proposed. + +### JSON-RPC Request Example + +```json +{ + "limit": "10", + "lower_bound": "0", + "json": true +} +``` + +### JSON-RPC Response Example + +```json +{ + "active": [...], + "pending": [...], + "proposed": [...] +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_raw_abi.md b/v1.0/RPC Nodes/others/rpc-eos/get_raw_abi.md new file mode 100644 index 00000000..701c3f4a --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_raw_abi.md @@ -0,0 +1,75 @@ +--- +title: "get_raw_abi" +slug: "rpc-eos-get_raw_abi" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview +The `get_raw_abi` method is used to fetch the raw, serialized ABI (Application Binary Interface) for a specified account, providing essential details needed for interacting with smart contracts on the EOS network. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const rawAbi = await tatum.rpc.getRawAbi({ accountName: 'b1' }) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Smart Contract Interaction:** +Developers or users may use the `get_raw_abi` method to obtain the raw ABI of a smart contract, essential for decoding binary data and enabling effective interaction with the contract. +2. **ABI Analysis and Verification:** +The method allows developers and analysts to study and analyze the ABI of a contract, verify its integrity, and understand its structure and methods by comparing the retrieved `abi_hash` with known hash values. +3. **Development and Debugging:** +This method is crucial for developers during the development and debugging phases, enabling quick access to and assessment of the ABI, ensuring alignment with the contract’s intended design and functionality. + +### Request Parameters +The `getRawAbi` method has one parameter: + +- `accountName` (string, required): The unique EOSIO account name of the smart contract whose ABI is to be retrieved. + +### Return Object +The `get_raw_abi` method returns an object with the following parameters: + +- `account_name` (string, required): The name of the account whose ABI was retrieved. +- `code_hash` (string, required): The hash of the smart contract code. +- `abi_hash` (string, required): The hash of the ABI of the smart contract. +- `abi` (string, required): The raw, serialized ABI data. + +### JSON-RPC Request Example +```json +{ + "account_name": "b1" +} +``` + +### JSON-RPC Response Example +```json +{ + "account_name": "b1", + "code_hash": "0000000000000000000000000000000000000000000000000000000000000000", + "abi_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "abi": "" +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_raw_code_and_abi.md b/v1.0/RPC Nodes/others/rpc-eos/get_raw_code_and_abi.md new file mode 100644 index 00000000..96189d09 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_raw_code_and_abi.md @@ -0,0 +1,80 @@ +--- +title: "get_raw_code_and_abi" +slug: "rpc-eos-get_raw_code_and_abi" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_raw_code_and_abi` method is used to retrieve both the raw code and the ABI (Application Binary Interface) for a contract, based on the account name. This is pivotal for developers who wish to interact with, decode, and understand the underlying code and interfaces of smart contracts deployed on the EOS blockchain. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getRawCodeAndAbi({ accountName: 'eosio' }) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Understanding Smart Contracts:** + Developers can use the `get_raw_code_and_abi` method to gain insights into the raw code and ABI of smart contracts, enabling them to understand and interact with the contract's methods, state variables, and structures more effectively. + +2. **Development and Debugging:** + This method is crucial for developers in the development and debugging phases, allowing for precise interaction and validation of the contract's code and interfaces, thereby facilitating a smoother development process. + +3. **Enhanced Interaction with Smart Contracts:** + With the detailed insight provided by this method, developers can optimize their interaction with the smart contracts, making the development of decentralized applications more efficient and robust. + +### Request Parameters + +The `geRrawCodeAndAbi` method requires the following parameter in the request body: + +- `accountName` (string, required): This can be `NamePrivileged`, `NameBasic`, `NameBid`, or `NameCatchAll`. It represents the name of the account for which the raw code and ABI are being requested. + +### Return Object + +Upon a successful request, the method returns an object containing the following details: + +- `account_name` (string): Name of the account. +- `wasm` (string): The base64 encoded WebAssembly (WASM) code of the smart contract. +- `abi` (string): The base64 encoded ABI of the smart contract. + +### JSON-RPC Request Example + +```json +{ + "account_name": "eosio" +} +``` +### JSON-RPC Response Example + +```json +{ + "account_name": "eosio", + "wasm": "base64EncodedWASM", + "abi": "base64EncodedABI" +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_required_keys.md b/v1.0/RPC Nodes/others/rpc-eos/get_required_keys.md new file mode 100644 index 00000000..ec249eaa --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_required_keys.md @@ -0,0 +1,102 @@ +--- +title: "get_required_keys" +slug: "rpc-eos-get_required_keys" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_required_keys` method returns the required keys that are needed to sign a transaction. This feature is extremely valuable for users and developers aiming to ensure secure and accurate transaction signatures, thus maintaining the integrity of transactions within the EOS blockchain. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getRequiredKeys({ + transaction: { /* Transaction Object. See request params below. */ }, + availableKeys: ["EOS..."] +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Secure Transaction Signing:** + Users and developers can use the `get_required_keys` method to identify the specific keys required to sign a transaction, enhancing the security and accuracy of the signing process and avoiding unauthorized or faulty transactions. + +2. **Blockchain Interaction:** + This method is crucial for interactions and operations on the EOS blockchain where transactions are involved, ensuring that only the correct keys are utilized to sign the transactions, maintaining the validity and authenticity of the transactions. + +3. **Smart Contract Interaction:** + Developers interacting with smart contracts on the EOS blockchain can leverage this method to determine the appropriate keys to sign transactions related to smart contract execution, thereby maintaining the correctness and reliability of contract interactions. + +### Request Parameters + +The `getRequiredKeys` method mandates the following parameters in the request body: + +- `transaction` (object, required): Represents the transaction that is set to be signed. + - `expiration`: (string, required) - A date and time indicating when the transaction expires. + - `refBlockNum`: (number, required) - The reference block number. + - `refBlockPrefix`: (number, required) - The reference block prefix. + - `maxNetUsageWords`: (string | number, required) - The maximum net usage words. + - `maxCpuUsageMs`: (string | number, required) - The maximum CPU usage in milliseconds. + - `delaySec`: (number, required) - The delay in seconds. + - `contextFreeActions`: (Array of Action, required) - Context-free actions. + - `account`: (string, required) - EOSIO account name. + - `name`: (string, required) - Name of the action. + - `authorization`: (Array of objects, required) + - `actor`: (string, required) - EOSIO account name that is the actor. + - `permission`: (string, required) - Permission level for the actor. + - `data`: (object, required) + - `hexData`: (string, required) - Hexadecimal representation of the data for the action. + - `actions` (Array of objects, required) + - `account`: (string, required) - EOSIO account name. + - `name`: (string, required) - Name of the action. + - `authorization` (Array of objects, required) + - `actor`: (string, required) - EOSIO account name that is the actor. + - `permission`: (string, required) - Permission level for the actor. + - `data`: (object, required) + - `hexData`: (string, required) - Hexadecimal representation of the data for the action. +- `availableKeys` (array of strings, required): Represents the available public keys. + +### Return Object + +The `get_required_keys` method typically returns an object containing the keys that are required to sign the transaction. + +### JSON-RPC Request Example + +```json +{ + "transaction": { /* Transaction Object */ }, + "available_keys": ["EOS..."] +} +``` + +## JSON-RPC Response Example + +```json +{ + "required_keys": ["EOS..."] +} +``` diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_table_by_scope.md b/v1.0/RPC Nodes/others/rpc-eos/get_table_by_scope.md new file mode 100644 index 00000000..d9ba6fcd --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_table_by_scope.md @@ -0,0 +1,103 @@ +--- +title: "get_table_by_scope" +slug: "rpc-eos-get_table_by_scope" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_table_by_scope` method retrieves the table scope for a given contract in the EOS blockchain. It is essential for developers and users who interact with smart contracts and need to query table data associated with a specific contract. This method provides flexibility by allowing filtered and limited results, making it highly adaptable to various use cases. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getTableByScope({ + code: 'eosio.token', + table: 'accounts', + lowerBound: '0', + upperBound: '100', + limit: 10, + reverse: false, + show_payer: false +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Smart Contract Interaction:** + Developers can use this method to interact with and retrieve table data for a specific contract, which is crucial for accurate and efficient contract interaction and validation. + +2. **Data Analysis and Management:** + By retrieving table scope, users and developers can perform detailed data analysis and management, which aids in optimizing and improving smart contract functionalities. + +3. **Enhanced Querying:** + The flexible filtering options provided by this method facilitate enhanced querying capabilities, allowing users to retrieve precise and relevant data according to their requirements. + +### Request Parameters + +The `getTableByScope` method requires the following parameters in the request body: + +- `code` (string, required): The name of the contract to return table data for. +- `table` (string): To filter the results by table. +- `lowerBound` (string): Filters results to return the first element that is not less than the provided value in set. +- `upperBound` (string): Filters results to return the first element that is greater than the provided value in set. +- `limit` (integer , default: 10): Limit the number of results returned. +- `reverse` (boolean, default: false): Reverse the order of returned results. +- `showPayer` (boolean, default: false): Show RAM payer. + +### Return Object + +The `get_table_by_scope` method typically returns an array containing the requested table scope details related to the specified contract. + +### JSON-RPC Request Example + +```json +{ + "code": "eosio.token", + "table": "accounts", + "lower_bound": "0", + "upper_bound": "100", + "limit": 10, + "reverse": false, + "show_payer": false +} +``` + +### JSON-RPC Response Example + +```json +{ + "rows": [ + { + "code": "eosio.token", + "scope": "........ehbo5", + "table": "stat", + "payer": "eosio.token", + "count": 1 + } + ], + "more": "111222333445" +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/get_table_rows.md b/v1.0/RPC Nodes/others/rpc-eos/get_table_rows.md new file mode 100644 index 00000000..5a629c26 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/get_table_rows.md @@ -0,0 +1,99 @@ +--- +title: "get_table_rows" +slug: "rpc-eos-get_table_rows" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `get_table_rows` method retrieves rows from a specified table in a given smart contract on the EOS blockchain. This method is essential for developers and users who need to interact with and analyze the data stored in smart contract tables. It provides multiple filtering options, ensuring extensive flexibility in querying specific data. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} + +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.getTableRows({ + code: 'eosio.token', + table: 'accounts', + scope: 'eosio', + limit: 10 +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Smart Contract Data Interaction:** + Developers may find this method critical for interacting with the data within the tables of a smart contract, allowing for effective management and analysis of stored data. + +2. **Detailed Data Analysis:** + Users can employ this method to conduct detailed data analysis, which is pivotal for optimizing data use in smart contracts and enhancing functionalities. + +3. **Enhanced Query Flexibility:** + The diverse filtering options of this method enable the querying of specific data according to user needs, ensuring efficient and effective data retrieval and interaction. + +### Request Parameters + +The `getTableRows` method requires the following parameters in the request body: + +- `code` (string, required): The name of the smart contract that controls the provided table. +- `table` (string, required): The name of the table to query. +- `scope` (string, required): The account to which this data belongs. +- `indexPosition` (string): Position of the index used; accepted parameters are primary, secondary, tertiary, fourth, fifth, sixth, seventh, eighth, ninth, tenth. +- `keyType` (string): The type of key specified by indexPosition (e.g., uint64_t or name). +- `encodeType` (string): The encoding type used. +- `lowerBound` (string): Filters results to return the first element that is not less than the provided value in set. +- `upperBound` (string): Filters results to return the first element that is greater than the provided value in set. +- `limit` (integer , default: 10): Limits the number of results returned. +- `reverse` (boolean, default: false): Reverses the order of returned results. +- `showPayer` (boolean, default: false): Shows RAM payer. + +### Return Object + +The `get_table_rows` method typically returns an object containing the requested rows from the specified table associated with the provided smart contract. + +### JSON-RPC Request Example + +```json +{ + "code": "eosio.token", + "table": "accounts", + "scope": "eosio", + "limit": 10 +} +``` + +### JSON-RPC Response Example + +```json +{ + "rows": [ + {"30010000000000000000000000000000011030555d4db7b23b01000000000000000000000000003041000000000000000000000000000000000000000000000000000000000000000000"}, + {"c00e000000000000000000000000000000c0270900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}, + {"002400000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}, + {"50330000000000000000000000000000004c040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"} + ], + "more": true, + "next_key": "595056260442244752" +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/push_transaction.md b/v1.0/RPC Nodes/others/rpc-eos/push_transaction.md new file mode 100644 index 00000000..4f3f394e --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/push_transaction.md @@ -0,0 +1,91 @@ +--- +title: "push_transaction" +slug: "rpc-eos-push_transaction" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `push_transaction` method is utilized to transmit a transaction to the EOS blockchain. This method takes a transaction in JSON format and endeavors to apply it to the blockchain, facilitating numerous interactions such as transferring tokens and invoking smart contracts. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const transaction = { + signatures: [/* array of signatures */], + compression: false, + packedContextFreeData: 'string', // json to hex + packedTrx: 'string' // Transaction object json to hex +} + +const response = await tatum.rpc.pushTransaction(transaction) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Transaction Submission:** + Developers and users might employ the `push_transaction` method to broadcast transactions to the EOS network, allowing for various interactions and operations on the blockchain. + +2. **Smart Contract Interaction:** + Invoking actions on smart contracts deployed on the EOS blockchain is another crucial functionality of this method, granting users the ability to interface with decentralized applications. + +3. **Token Transfer:** + For transferring EOS tokens or other tokens available on the EOS blockchain between accounts, the `push_transaction` method is used. + +### Request Parameters + +The `pushTransaction` method mandates the following parameters in the request body: + +* `signatures` (array of strings, required) - An array of strings representing signatures needed to authorize the transaction. +* `compression` (boolean, required) - A boolean indicating the status of compression used, typically false. +* `packedContextFreeData` (string, required) - Represents the JSON converted to hex. +* `packedTrx` (string, required) - Specifies the transaction object, converted from JSON to hex. + +### Return Object + +When a transaction is successfully broadcasted, the `push_transaction` method typically returns nothing but a 200 OK status. + +### JSON-RPC Request Example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "push_transaction", + "params": { + "signatures": ["SIG_K1_..."], + "compression": false, + "packedContextFreeData": "746573742064617461", // Example hex of JSON data + "packedTrx": "00e1f5055c95b089c2e0d0e4" // Example hex of JSON transaction object + } +} +``` +### JSON-RPC Response Example + +```json +{ + "jsonrpc": "2.0", + "id": 1 +} +``` \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/push_transactions.md b/v1.0/RPC Nodes/others/rpc-eos/push_transactions.md new file mode 100644 index 00000000..faa85302 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/push_transactions.md @@ -0,0 +1,100 @@ +--- +title: "push_transactions" +slug: "rpc-eos-push_transactions" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `push_transactions` method is designed to submit multiple transactions to the EOS blockchain simultaneously. This method expects an array of transactions in JSON format and attempts to apply them to the blockchain, enabling a range of blockchain interactions like transferring tokens, invoking smart contracts, and more. + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const transactions = [{ + expiration: "2023-09-27T10:00:00", + refBlockNum: 12345, + refBlockPrefix: 67890, + maxNetUsageWords: "10", + maxCpuUsageMs: "10", + delaySec: 0, + contextFreeActions: [], + actions: [], + transactionExtensions: [] +}] + +const response = await tatum.rpc.pushTransaction(transactions) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Example use cases: + +1. **Bulk Transaction Submission:** + Developers and users can use the `push_transactions` method to broadcast multiple transactions to the EOS network in one go, facilitating various blockchain interactions and operations. + +2. **Bulk Smart Contract Interaction:** + This method is vital for invoking actions on multiple smart contracts deployed on the EOS blockchain, allowing users to interact with multiple decentralized applications simultaneously. + +3. **Bulk Token Transfer:** + `push_transactions` is used for transferring EOS tokens or other tokens deployed on the EOS blockchain between multiple accounts in a single request. + +### Request Parameters + +The `pushTransactions` method requires the following parameters in the request body: + +- `transactions` (array of Transaction Objects, required), each containing: + - `expiration` (string, required): Time that the transaction must be confirmed by. + - `refBlockNum` (integer, required) + - `refBlockPrefix` (integer, required): 32-bit portion of block ID. + - `maxNetUsageWords` (string or integer, required): A whole number. + - `maxCpuUsageMs` (string or integer, required): A whole number. + - `delaySec` (integer, required): Number of seconds to delay execution (used for scheduling). + - `contextFreeActions` (array of objects, required): Actions that are context-free. + - `actions` (array of objects, required): Actions that are context-dependent. + - `transactionExtensions` (array of array of integers or strings): Extensions to the transaction. + +### Return Object + +Upon successful broadcast of transactions, the `push_transactions` method typically does not return any object but acknowledges with a 200 OK status. + +### JSON-RPC Request Example + +```json +[ + { + "expiration": "2023-09-27T10:00:00", + "ref_block_num": 12345, + "ref_block_prefix": 67890, + "max_net_usage_words": "10", + "max_cpu_usage_ms": "10", + "delay_sec": 0, + "context_free_actions": [], + "actions": [], + "transaction_extensions": [] + } +] +``` +### JSON-RPC Response Example + +200 OK status implies successful broadcast, and typically no object is returned. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/send_transaction.md b/v1.0/RPC Nodes/others/rpc-eos/send_transaction.md new file mode 100644 index 00000000..601e6172 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/send_transaction.md @@ -0,0 +1,78 @@ +--- +title: "send_transaction" +slug: "rpc-eos-send_transaction" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +### Overview + +The `send_transaction` method is designed to submit a transaction to the EOS blockchain. This method expects a transaction in JSON format and will attempt to apply it to the blockchain, enabling various blockchain interactions such as transferring tokens, invoking smart contracts, etc. +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const response = await tatum.rpc.sendTransaction({ + signatures: [/* array of signatures */], + compression: false, + packedContextFreeData: 'string', // json to hex + packedTrx: 'string' // Transaction object json to hex +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} +### Example use cases: + +1. **Transaction Submission:** + Developers and users can utilize the `send_transaction` method to broadcast their transactions to the EOS network, enabling various blockchain interactions and operations. + +2. **Smart Contract Interaction:** + This method is crucial for invoking actions on smart contracts deployed on the EOS blockchain, allowing users to interact with decentralized applications. + +3. **Token Transfer:** + `send_transaction` is used for transferring EOS tokens or other tokens deployed on the EOS blockchain between accounts. + +### Request Parameters + +The `sendTransaction` method requires the following parameters in the request body: + +- `signatures` (array of strings, required): Array of signatures required to authorize the transaction. +- `compression` (boolean): Compression used, usually false. +- `packedContextFreeData` (string): JSON converted to hex. +- `packedTrx` (string): Transaction object converted from JSON to hex. + +### Return Object + +The `send_transaction` method typically does not return any object but acknowledges with a 200 OK status upon a successful transaction broadcast. + +### JSON-RPC Request Example + +```json +{ + "signatures": ["SIG_K1_..."], + "compression": false, + "packed_context_free_data": "0x...", + "packed_trx": "0x..." +} +``` +### JSON-RPC Response Example + +200 OK status implies successful broadcast, and typically no object is returned. \ No newline at end of file diff --git a/v1.0/RPC Nodes/others/rpc-eos/trace-api-get_block.md b/v1.0/RPC Nodes/others/rpc-eos/trace-api-get_block.md new file mode 100644 index 00000000..45728b17 --- /dev/null +++ b/v1.0/RPC Nodes/others/rpc-eos/trace-api-get_block.md @@ -0,0 +1,119 @@ +--- +title: "trace-api-get_block" +slug: "rpc-eos-trace-api-get_block" +excerpt: "Eos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Eos RPC" + image: [] + keywords: "eos, 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] + +{% hint style="warning" %} +Please note that you are able to get data only from block number 260742168 and newer. +{% endhint %} + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Eos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.EOS }) + +const block = await tatum.rpc.traceApiGetBlock({ blockNum: '260742168' }) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +{% hint style="info" %} +This method is available only on the full archive node. +{% endhint %} + +### Overview +The `get_block` method of the Trace API retrieves detailed information concerning a specific block in the blockchain, returning a JSON object that conforms to the BlockTraceV1 schema. This method is crucial for applications and services requiring access to block and transaction details such as the list of transactions, actions within those transactions, the producer of the block, and more. + +### Example use cases: + +1. **Block Verification:** +Developers or validators might use the `get_block` method to fetch specific block details for the purpose of verifying block information. It allows the comparison of block data retrieved from different nodes to ensure data consistency and integrity across the network. + +2. **Transaction Confirmation:** +Users and services might utilize the `get_block` method to confirm transaction inclusion within a block. By examining the transactions field of the returned block object, users can ascertain whether a specific transaction has been included and, consequently, confirm its successful execution. + +3. **Data Analysis and Chain Exploration:** +Researchers and analysts can employ the `get_block` method to retrieve detailed block data for analytical purposes, exploring block and transaction patterns, studying network activity, and gaining insights into blockchain operations and behavior. + +### Request Parameters + +The `getBlock` method accepts the following parameters: + +- `blockNum` (integer, required): The height of this block in the chain. + +### Return Object + +The return object provides detailed information about the requested block and contains the following fields: + +- `id` (string): A unique identifier for the block. +- `number` (integer): The height of this block in the chain. +- `previous_id` (string): The unique identifier of the previous block in the chain. +- `status` (string): String indicating whether the block is "pending" or "irreversible". +- `timestamp` (string): The timestamp when the block was produced. +- `producer` (string): Information about who produced the block. +- `transaction_mroot` (string): The Merkle root of all transactions in the block. +- `action_mroot` (string): The Merkle root of all actions in the block. +- `schedule_version` (integer): Indicates the number of times the producer schedule has changed since genesis. +- `transactions` (array): An array containing TransactionTraceV1 objects representing each transaction included in the block. + +### JSON-RPC Request Example + +```json +{ + "block_num": "260742168" +} +``` + +### JSON-RPC Response Example + +```json +{ + "id": "string", + "number": 0, + "previous_id": "string", + "status": "string", + "timestamp": "string", + "producer": "string", + "transactions": [ + { + "id": "string", + "actions": [ + { + "global_sequence": 0, + "receiver": "string", + "account": "string", + "action": "string", + "authorization": [ + { + "account": "string", + "permission": "string" + } + ], + "data": {} + } + ] + } + ] +} +```