Algod Client
Algorand node operations and queries using the AlgodClient.
Examples (19)
Section titled “Examples (19)”| Example | Description |
|---|---|
| Node Health and Status | This example demonstrates how to check node health and status using the AlgodClient methods: healthCheck(), ready(), status(), and statusAfterBlock(). |
| Version and Genesis Information | This example demonstrates how to retrieve node version information and genesis configuration using the AlgodClient methods: version() and genesis(). |
| Ledger Supply Information | This example demonstrates how to retrieve ledger supply information using the AlgodClient method: supply(). |
| Account Information | This example demonstrates how to retrieve comprehensive account information using the AlgodClient methods: accountInformation(), accountApplicationInformation(), and accountAssetInformation(). |
| Transaction Parameters | This example demonstrates how to get suggested transaction parameters using suggestedParams() and transactionParams() methods. These parameters are essential for constructing valid transactions on the Algorand network. |
| Send and Confirm Transaction | This example demonstrates how to send transactions and wait for confirmation using sendRawTransaction() and pendingTransactionInformation(). It shows the complete lifecycle of submitting a transaction to the Algorand network. |
| Pending Transactions | This example demonstrates how to query pending transactions in the transaction pool using pendingTransactions() and pendingTransactionsByAddress(). Pending transactions are those that have been submitted but not yet confirmed in a block. |
| Block Data | This example demonstrates how to retrieve block information using the AlgodClient methods: block(), blockHash(), and blockTxIds(). |
| Asset Information | This example demonstrates how to retrieve asset information using the AlgodClient method: assetById() |
| Application Information | This example demonstrates how to retrieve application information using the AlgodClient method: applicationById() |
| Application Boxes | This example demonstrates how to query application boxes using the AlgodClient methods: applicationBoxes() and applicationBoxByName() |
| TEAL Compile and Disassemble | This example demonstrates how to compile TEAL source code to bytecode and disassemble bytecode back to TEAL using the AlgodClient methods:
|
| Transaction Simulation | This example demonstrates how to simulate transactions before submitting them to the Algorand network. Simulation allows you to:
|
| Ledger State Deltas | This example demonstrates how to retrieve ledger state deltas using:
State deltas show what changed in the ledger (accounts, balances, apps, assets) between rounds. Note: These endpoints may require node configuration to enable (EnableDeveloperAPI=true). |
| Transaction Proof | This example demonstrates how to get transaction proofs using:
Transaction proofs are cryptographic proofs that a transaction is included in a specific block. They are used for light client verification, allowing clients to verify transaction inclusion without downloading the entire blockchain. The proof uses a Merkle tree structure where:
|
| Light Block Header Proof | This example demonstrates how to get light block header proofs using:
Light block header proofs are part of Algorand’s State Proof system, which allows light clients and other blockchains to verify Algorand’s blockchain state without needing to sync all blocks or trust intermediaries. Key concepts:
|
| State Proof | This example demonstrates how to get state proofs using:
State proofs are cryptographic proofs that attest to the state of the Algorand blockchain. They allow external systems (like bridges, light clients, and other blockchains) to verify Algorand’s blockchain state without trusting any intermediary. Key concepts:
|
| DevMode Timestamp Offset | This example demonstrates how to manage block timestamp offset in DevMode using:
In DevMode, you can control the timestamp of blocks by setting an offset. This is useful for testing time-dependent smart contracts without waiting for real time to pass. Key concepts:
|
| Sync Round Management | This example demonstrates how to manage the sync round using:
What is the sync round? The sync round is a configuration that controls the minimum round the node will keep data for. When set, the node will:
This is useful for:
Key concepts:
|
Quick Start
Section titled “Quick Start”Run any example from the repository’s examples directory:
cd examplesnpm run example algod_client/01-*.ts