### Install TrueBlocks Explorer SDK Source: https://github.com/trueblocks/trueblocks-core/blob/master/docs/content/docs/install/install-sdks.md Clones the TrueBlocks explorer repository, navigates into it, copies the example environment file, installs project dependencies, and starts the development server for local development. ```bash git clone git@github.com:TrueBlocks/trueblocks-explorer.git cd trueblocks-explorer cp .env.example .env yarn yarn develop ``` -------------------------------- ### Chifra Init Command Reference and Example Output Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_help_long.txt Provides a detailed reference for the `chifra init` command, including its expected arguments, options, publisher details, supported capabilities, and the JSON output format. An example of an error message during integration testing is also included. ```APIDOC Command: init Args: [] Opts: {"publisher":"0x0"} Publisher: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 Caps: -fmt,-noHeader,-file,-output,-append Format: json Example Output: { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### TrueBlocks Core Export API HTTP GET Request Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/sdk_tests/acctExport_old_bug.txt An example of an HTTP GET request to the TrueBlocks Core `/export` API endpoint, demonstrating how to specify an Ethereum address, maximum records, and starting record index in the query string. ```HTTP export?addrs=0xf503017d7baf7fbc0fff7492b751025c6a78179b&maxRecords=1&firstRecord=212 ``` -------------------------------- ### TrueBlocks Core `chifra init` Command Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_no_params.txt Provides a detailed reference for the `chifra init` command, including its arguments, optional parameters, supported capabilities, and an example of the JSON response. ```APIDOC Command: chifra init Description: Initializes the TrueBlocks Core environment. Arguments: None Options: publisher: string (hex address) Description: Specifies the publisher address. Default: "0x0" Capabilities (Caps): -fmt: Format output. -noHeader: Suppress header in output. -file: Output results to a file. -output: Specify the output file path. -append: Append results to an existing file. Output Format: json Example JSON Output: { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### TrueBlocks Core `init` Command Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_fmt_default.txt Describes the `init` command, its arguments, options, and the expected JSON output format, including an example error response. ```APIDOC Command: init Description: Initializes the TrueBlocks Core project. Arguments: - Args: [] (No arguments required) Options: - Opts: - publisher: "0x0" (Default publisher address) Output Details: - Publisher: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 (Example publisher address) - Capabilities (Caps): -fmt, -noHeader, -file, -output, -append - Format: json Example JSON Output: { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### Install TrueBlocks Explorer GUI Source: https://github.com/trueblocks/trueblocks-core/blob/master/docs/content/docs/install/install-docker.md Commands to clone the TrueBlocks Explorer repository, navigate into it, copy the example environment file, install dependencies, and start the development server. Ensure the `chifra serve` process is running in a separate terminal before executing these commands. ```Shell git clone git@github.com:TrueBlocks/trueblocks-explorer.git cd trueblocks-explorer cp .env.example .env yarn yarn develop ``` -------------------------------- ### Install TrueBlocks Explorer Frontend Source: https://github.com/trueblocks/trueblocks-core/blob/master/docs/content/docs/install/install-explorer.md Clones the TrueBlocks Explorer repository, sets up environment variables, installs dependencies, and starts the development server. Ensure `chifra serve` is running in a separate terminal before proceeding. ```shell git clone git@github.com:TrueBlocks/trueblocks-explorer.git cd trueblocks-explorer cp .env.example .env yarn yarn develop ``` -------------------------------- ### chifra init Command Line Interface Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_by_file_bad.txt Comprehensive documentation for the `chifra init` command, detailing its general usage and available command-line flags. This section outlines how to initialize or freshen Bloom filters and full index chunks, along with various options to control the download process. ```APIDOC Usage: chifra init [flags] Flags: -a, --all in addition to Bloom filters, download full index chunks (recommended) -e, --example string create an example for the SDK with the given name -d, --dry_run display the results of the download without actually downloading -P, --publisher string the publisher of the index to download (hidden) -F, --first_block uint do not download any chunks earlier than this block -s, --sleep float seconds to sleep between downloads -v, --verbose enable verbose output -h, --help display this help screen Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### chifra init Command-Line Interface Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_caps_allowed.txt Comprehensive documentation for the `chifra init` command, including its general usage syntax, a detailed list of all available flags with their descriptions and types, and important behavioral notes regarding index management. ```APIDOC Usage: chifra init [flags] Flags: -a, --all in addition to Bloom filters, download full index chunks (recommended) -e, --example string create an example for the SDK with the given name -d, --dry_run display the results of the download without actually downloading -P, --publisher string the publisher of the index to download (hidden) -F, --first_block uint do not download any chunks earlier than this block -s, --sleep float seconds to sleep between downloads -v, --verbose enable verbose output -h, --help display this help screen Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### TrueBlocks Monitors API: Invalid Query Parameter Error Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/api_tests/acctExport_caps_disallowed_3_m.txt This snippet shows an HTTP GET request to the TrueBlocks 'monitors' endpoint with an invalid query parameter 'ether'. The subsequent JSON response indicates an 'Invalid key' error, guiding developers on correct parameter usage. ```HTTP monitors?addrs=trueblocks.ethðer ``` ```JSON { "errors": [ "Invalid key (ether) in monitors route." ] } ``` -------------------------------- ### chifra init Command-Line Interface (CLI) Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_help_long.txt Provides a comprehensive reference for the `chifra init` command, outlining its purpose, usage syntax, and all available flags. It details how to initialize the TrueBlocks system, download the Unchained Index, and manage various aspects of the download process. ```APIDOC chifra init --help Purpose: Initialize the TrueBlocks system by downloading the Unchained Index from IPFS. Usage: chifra init [flags] Flags: -a, --all in addition to Bloom filters, download full index chunks (recommended) -e, --example string create an example for the SDK with the given name -d, --dry_run display the results of the download without actually downloading -P, --publisher string the publisher of the index to download (hidden) -F, --first_block uint do not download any chunks earlier than this block -s, --sleep float seconds to sleep between downloads -v, --verbose enable verbose output -h, --help display this help screen Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### Export Ethereum Transaction Data by Address via HTTP Request Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/api_tests/acctExport_old_bug.txt This snippet shows an example HTTP GET request to the TrueBlocks `export` endpoint. Parameters include the target Ethereum address (`addrs`), maximum number of records (`maxRecords`), starting record index (`firstRecord`), and desired output format (`fmt=json`). ```HTTP export?addrs=0xf503017d7baf7fbc0fff7492b751025c6a78179b&maxRecords=1&firstRecord=212&fmt=json ``` -------------------------------- ### TrueBlocks Traces API Request Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTraces/sdk_tests/getTraces_by_filter3.txt An example HTTP GET request to the TrueBlocks `traces` endpoint, demonstrating how to specify JSON format and filter by specific addresses. ```HTTP traces?fmt=json&filter=0x2ed0c4!0x2ed128!!0x8bbb73bcb5d553b5a556358d27625323fd781d37!!1 ``` -------------------------------- ### TrueBlocks `init` Command Reference and Example Output Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_caps_disallowed_2.txt Details the `init` command for TrueBlocks, including its arguments, options, and capabilities, along with an example of its JSON output, which may include error messages. ```APIDOC Command: init Args: - output: Specifies output format. Opts: - publisher: "0x0" (default) Publisher: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 Capabilities: -fmt: Format output -noHeader: Suppress header -file: Output to file -output: Specify output path -append: Append to file Format: json ``` ```JSON { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### TrueBlocks Core `init` Command/API Details and Example Output Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_by_file_bad.txt Details the `init` command/API endpoint for TrueBlocks Core, including its arguments, options, publisher, capabilities, and an example of its JSON output, specifically showing an error case. ```APIDOC Command/API: init Description: Initializes the TrueBlocks Core system or component. Arguments: - None Options: - publisher: string (default: "0x0") Description: Specifies the publisher address. Publisher Address: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 Capabilities: - -fmt: Format output - -noHeader: Suppress header - -file: Output to file - -output: Specify output path - -append: Append to file Expected Format: json ``` ```JSON { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### TrueBlocks API: Get Address Transaction List Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/api_tests/acctExport_list_prepare_1.txt This example shows a direct HTTP GET request to the TrueBlocks `list` endpoint, specifying an Ethereum address, desired JSON format, and a `lastBlock` filter. The accompanying JSON block illustrates the structure of the successful response, detailing individual transactions and overall blockchain metadata. ```HTTP list?addrs=0x001d14804b399c6ef80e64576f657660804fec0b&fmt=json&lastBlock=1501460 ``` ```JSON { "data": [ { "address": "0x001d14804b399c6ef80e64576f657660804fec0b", "blockNumber": 0, "transactionIndex": 2 }, { "address": "0x001d14804b399c6ef80e64576f657660804fec0b", "blockNumber": 202249, "transactionIndex": 0 }, { "address": "0x001d14804b399c6ef80e64576f657660804fec0b", "blockNumber": 1501459, "transactionIndex": 2 } ], "meta": { "client": "0xdeadbeef", "finalized": "0xdeadbeef", "staging": "0xdeadbeef", "ripe": "0xdeadbeef", "unripe": "0xdeadbeef", "chainId": 1, "networkId": 1, "chain": "mainnet" } } ``` -------------------------------- ### API Call Example: Get Tokens by Blocks and Addresses Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTokens/api_tests/getTokens_invalid_params_3.txt This snippet demonstrates an example API call to the `/tokens` endpoint, querying for tokens associated with specific block numbers and addresses. It also shows a typical JSON error response when required parameters are missing or invalid. ```HTTP GET /tokens?blocks=21321321312321%200xd26114cd6ee289accf82350c8d8487fedb8a0c07 HTTP/1.1 ``` ```JSON { "errors": [ "You must specify at least two address" ] } ``` -------------------------------- ### TrueBlocks Core `init` Command Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_fmt_api.txt Provides a reference for the `init` command in TrueBlocks Core, outlining its arguments, options, publisher details, supported capabilities, and the expected JSON output format, including an example error response. ```APIDOC Command: init Description: Initializes the TrueBlocks Core system. Arguments: [] Options: - publisher: string (default: "0x0") Description: Specifies the publisher address. Publisher Example: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 Capabilities (Caps): - -fmt: Format output. - -noHeader: Suppress header. - -file: Output to a file. - -output: Specify output path. - -append: Append to output file. Output Format: json Example JSON Output (Error): { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### TrueBlocks Export API Request Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/api_tests/acctExport_ens_test_export.txt An example of a GET request to the TrueBlocks export API, specifying an Ethereum address (`rhyslindmark.eth`) and a block range (`firstBlock` to `lastBlock`) to retrieve transaction data. ```HTTP export?addrs=rhyslindmark.eth&firstBlock=4037786&lastBlock=4081450 ``` -------------------------------- ### chifra init Command Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/chifra/chifra_help_init.txt Detailed API documentation for the 'chifra init' command, including its purpose, usage syntax, and a comprehensive list of all supported flags with their descriptions and types. This command is essential for setting up or refreshing the TrueBlocks index. ```APIDOC Command: chifra init Purpose: Initialize the TrueBlocks system by downloading the Unchained Index from IPFS. Usage: chifra init [flags] Flags: -a, --all (boolean): In addition to Bloom filters, download full index chunks (recommended). -e, --example (string): Create an example for the SDK with the given name. -d, --dry_run (boolean): Display the results of the download without actually downloading. -P, --publisher (string): The publisher of the index to download (hidden). -F, --first_block (uint): Do not download any chunks earlier than this block. -s, --sleep (float): Seconds to sleep between downloads. -v, --verbose (boolean): Enable verbose output. -h, --help (boolean): Display this help screen. Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### Example Output of TrueBlocks `chifra status` Command Source: https://github.com/trueblocks/trueblocks-core/blob/master/src/other/migrations/README-v0.25.0.md An example of the expected output from the `chifra status` command after a successful TrueBlocks migration, showing client, TrueBlocks version, config paths, and chain details. ```shell Client: erigon/2021.11.3/linux-amd64/go1.16.3 (archive, tracing) TrueBlocks: GHC-TrueBlocks//0.25.0-alpha (eskey, no pinkey) Config Path: $HOME/.local/share/trueblocks/ Chain (ids): mainnet (1,1) Cache Path: $HOME/.local/share/trueblocks/cache/mainnet/ Index Path: $HOME/.local/share/trueblocks/unchained/mainnet/ RPC Provider: http://localhost:8545/ ``` -------------------------------- ### chifra init API Changes Source: https://github.com/trueblocks/trueblocks-core/blob/master/CHANGES.md Documentation for the `chifra init` command, detailing the addition of an `--examples ` option to create a folder with a simple SDK example file. ```APIDOC chifra init: - Added: --examples option - Creates a folder with a simple SDK example file ready to run. ``` -------------------------------- ### TrueBlocks Export API Request and Response Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/api_tests/acctExport_neighbor4.txt Demonstrates an example HTTP GET request to the TrueBlocks export API for a specific address and its corresponding JSON response structure, including data and metadata. ```HTTP export?addrs=0x05a56e2d52c817161883f50c441c3228cfe54d9f&neighbors&firstBlock=0&lastBlock=10 ``` ```APIDOC { "data": [ { "address": "0x05a56e2d52c817161883f50c441c3228cfe54d9f", "blockNumber": 1, "transactionIndex": 99999, "traceIndex": "", "reason": "miner" }, { "address": "0x05a56e2d52c817161883f50c441c3228cfe54d9f", "blockNumber": 5, "transactionIndex": 99999, "traceIndex": "", "reason": "miner" } ], "meta": { "client": "0xdeadbeef", "finalized": "0xdeadbeef", "staging": "0xdeadbeef", "ripe": "0xdeadbeef", "unripe": "0xdeadbeef", "chainId": 1, "networkId": 1, "chain": "mainnet", "first_block": "0xdeadbeef", "last_block": "0xdeadbeef", "accountedFor": { "tags": "", "address": "0x05a56e2d52c817161883f50c441c3228cfe54d9f", "name": "0x05a56e2d52c817161883f50c441c3228cfe54d9f", "symbol": "", "source": "", "decimals": 18 } } } ``` -------------------------------- ### chifra init Command Operational Notes Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_list_local.txt Important notes and considerations for using the `chifra init` command, covering default behaviors, interactions with options, and re-running instructions for index maintenance. ```APIDOC Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### chifra init Command Reference and Example Output Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_fmt_txt.txt Reference for the `chifra init` command, including its arguments, options, publisher, capabilities, and expected JSON output format. This command is used for initializing TrueBlocks Core. ```APIDOC init? Args: [] Opts: {"publisher":"0x0"} Publisher: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 Caps: -fmt,-noHeader,-file,-output,-append Format: json ``` ```json { "errors": [ "integration testing was skipped for chifra init" ] } ``` -------------------------------- ### Query TrueBlocks Records for a Specific Address Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/acctExport/api_tests/acctExport_122_list_fb_fr_mr.txt This example demonstrates how to query TrueBlocks data for a specific Ethereum address using a URL-based API. It retrieves a paginated list of records, specifying the address, output format (text), starting block number, starting record index, and maximum number of records. The output shows the address, block number, and transaction index for each retrieved record. ```APIDOC list?addrs=0x05a56e2d52c817161883f50c441c3228cfe54d9f&fmt=txt&firstBlock=90&firstRecord=3&maxRecords=10 address blockNumber transactionIndex 0x05a56e2d52c817161883f50c441c3228cfe54d9f 500 99998 0x05a56e2d52c817161883f50c441c3228cfe54d9f 563 99998 0x05a56e2d52c817161883f50c441c3228cfe54d9f 987 99998 0x05a56e2d52c817161883f50c441c3228cfe54d9f 1450 99999 0x05a56e2d52c817161883f50c441c3228cfe54d9f 1580 99998 0x05a56e2d52c817161883f50c441c3228cfe54d9f 1586 99998 0x05a56e2d52c817161883f50c441c3228cfe54d9f 1861 99999 0x05a56e2d52c817161883f50c441c3228cfe54d9f 1912 99998 0x05a56e2d52c817161883f50c441c3228cfe54d9f 2057 99999 0x05a56e2d52c817161883f50c441c3228cfe54d9f 2256 99999 ``` -------------------------------- ### chifra init Command-Line Interface Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/docs/content/chifra/admin.md Detailed documentation for the `chifra init` command, including its purpose, usage syntax, available flags, and important notes for initialization of the TrueBlocks system. ```APIDOC Purpose: Initialize the TrueBlocks system by downloading the Unchained Index from IPFS. Usage: chifra init [flags] Flags: -a, --all in addition to Bloom filters, download full index chunks (recommended) -e, --example string create an example for the SDK with the given name -d, --dry_run display the results of the download without actually downloading -F, --first_block uint do not download any chunks earlier than this block -s, --sleep float seconds to sleep between downloads -v, --verbose enable verbose output -h, --help display this help screen Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### TrueBlocks Core Transactions API Endpoint and Error Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTrans/api_tests/getTrans_caps_allowed.txt Details the GET /transactions API endpoint, listing its supported query parameters and providing an example JSON error response for an invalid parameter like 'failOnPurpose'. ```APIDOC GET /transactions Query Parameters: transactions: string (e.g., "12.0") - Transaction identifier or count. chain: boolean - Include chain information. fmt: boolean - Format output. nocolor: boolean - Disable color output. noop: boolean - No operation. version: boolean - Show version. verbose: boolean - Enable verbose output. noHeader: boolean - Suppress header. file: string - Output to file. output: string - Specify output format. append: boolean - Append to file. cache: boolean - Use cache. decache: boolean - Clear cache. ether: boolean - Display ether values. failOnPurpose: boolean - (Invalid parameter, causes error) Example Error Response: HTTP/1.1 400 Bad Request Content-Type: application/json { "errors": [ "Invalid key (failOnPurpose) in transactions route." ] } ``` -------------------------------- ### Example HTTP Request to Retrieve Token Data Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTokens/sdk_tests/getTokens_fmt_junk.txt An example HTTP GET request URL for the `tokens` endpoint, demonstrating how to specify multiple Ethereum addresses and a target block number as query parameters. ```HTTP tokens?addrs=0xd26114cd6ee289accf82350c8d8487fedb8a0c07%200xb9e7f8568e08d5659f5d29c4997173d84cdf2607&blocks=2000000 ``` -------------------------------- ### chifra init Command Basic Usage and Error Handling Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_fmt_txt.txt Illustrates the fundamental usage of the `chifra init` command, showing how to invoke it and an example of an error encountered when an unknown flag `--fmt` is provided. This command is essential for setting up or updating TrueBlocks index data. ```CLI chifra init --fmt txt Error: unknown flag: --fmt Usage: chifra init [flags] ``` -------------------------------- ### Verifying Unchained Index State After Initialization Source: https://github.com/trueblocks/trueblocks-core/blob/master/docs/content/tutorials/step1.md After successfully running `chifra init` to download the Bloom filter, this command is re-executed to confirm that the Unchained Index now contains data and is ready for use, allowing users to proceed with querying transactional histories. ```bash chifra chunks blooms ``` -------------------------------- ### Example TrueBlocks Tokens API Request URL Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTokens/sdk_tests/getTokens_dup_with_addr.txt An example HTTP GET request URL for the TrueBlocks Core `tokens` API, demonstrating how to query token information for specific addresses at block 4150000. ```HTTP tokens?addrs=0xd26114cd6ee289accf82350c8d8487fedb8a0c07%200x5e44c3e467a49c9ca0296a9f130fc433041aaa28%200x5e44c3e467a49c9ca0296a9f130fc433041aaa28&blocks=4150000 ``` -------------------------------- ### chifra init Command Line Usage and Error Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_fmt_csv.txt This snippet demonstrates the basic usage of the `chifra init` command and illustrates an error encountered when an unknown flag is provided. It shows the expected command structure. ```Shell chifra init --fmt csv Error: unknown flag: --fmt Usage: chifra init [flags] ``` -------------------------------- ### chifra daemon Command Usage and Error Example Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/daemon/daemon_caps_disallowed_7.txt Illustrates the basic usage of the `chifra daemon` command, including an example of an unknown flag error and the general syntax. This command is used to start the TrueBlocks API server. ```Shell chifra daemon --ether Error: unknown flag: --ether Usage: chifra daemon [flags] Aliases: daemon, serve ``` -------------------------------- ### Example API Request to Get Specific Transactions Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTrans/api_tests/getTrans_bad_blkhash_msg_raw.txt Demonstrates how to query the TrueBlocks Core API for specific transactions by providing a comma-separated list of block hash and transaction index pairs, requesting the response in JSON format. ```HTTP Request transactions?transactions=0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53.1%200x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53.5&fmt=json ``` -------------------------------- ### chifra init Command API Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_fmt_api.txt Detailed API documentation for the `chifra init` command, outlining its general usage and all supported flags with their types and descriptions. This command is essential for managing the TrueBlocks index by downloading or refreshing its components. ```APIDOC chifra init Command: Usage: chifra init [flags] Flags: -a, --all: Type: boolean Description: in addition to Bloom filters, download full index chunks (recommended) -e, --example: Type: string Description: create an example for the SDK with the given name -d, --dry_run: Type: boolean Description: display the results of the download without actually downloading -P, --publisher: Type: string Description: the publisher of the index to download (hidden) -F, --first_block: Type: uint Description: do not download any chunks earlier than this block -s, --sleep: Type: float Description: seconds to sleep between downloads -v, --verbose: Type: boolean Description: enable verbose output -h, --help: Type: boolean Description: display this help screen ``` -------------------------------- ### chifra init Command Line Interface Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/init_help.txt This documentation provides a comprehensive reference for the `chifra init` command, which is used to initialize the TrueBlocks system by downloading the Unchained Index from IPFS. It details the command's purpose, usage syntax, available flags, and important notes regarding its operation and behavior. ```APIDOC chifra init Command: Purpose: Initialize the TrueBlocks system by downloading the Unchained Index from IPFS. Usage: chifra init [flags] Flags: -a, --all in addition to Bloom filters, download full index chunks (recommended) -e, --example string create an example for the SDK with the given name -d, --dry_run display the results of the download without actually downloading -P, --publisher string the publisher of the index to download (hidden) -F, --first_block uint do not download any chunks earlier than this block -s, --sleep float seconds to sleep between downloads -v, --verbose enable verbose output -h, --help display this help screen Notes: - If run with no options, this tool will download or freshen only the Bloom filters. - The --first_block option will fall back to the start of the containing chunk. - You may re-run the tool as often as you wish. It will repair or freshen the index. ``` -------------------------------- ### Example HTTP Request for a Single Transaction Query Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTrans/sdk_tests/getTrans_bug_3302_type_2.txt An example HTTP GET request to the TrueBlocks Core API to fetch details for a specific transaction hash. This demonstrates how to construct the URL with the `transactions` query parameter. ```HTTP GET /transactions?transactions=0xbe10c6a9b7e971be08540d7255804bbe96e9c46fe79b210b642f8adf687a8306 HTTP/1.1 Host: [TrueBlocks_Core_Host] ``` -------------------------------- ### Example TrueBlocks API Request for Transactions Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/tools/getTrans/api_tests/getTrans_bad_hash_msg_raw.txt This snippet shows an example HTTP GET request to the TrueBlocks API's 'transactions' endpoint. It queries for multiple transaction hashes, which are URL-encoded and separated by spaces in the query parameter. ```HTTP transactions?transactions=0x060e4cf9fa8d34a8b423b5b3691b2541255ff7974ff16699e104edcfb63bd521%200x0766ec95bf12f9600afc6c33c287f9d2356d85f15f0d7eeeb6647f5d4ddfbc11%200x060e4cf9fa8d34a8b423b5b3691b2541255ff7974ff16699e104edcfb63bd521 ``` -------------------------------- ### TrueBlocks Core `init` Command/API Reference Source: https://github.com/trueblocks/trueblocks-core/blob/master/tests/gold/apps/init/sdk_tests/init_fmt_json.txt Reference for the `init` command in TrueBlocks Core, showing available arguments, options, and a sample JSON response for an error condition, demonstrating its usage and output format. ```APIDOC Command/Endpoint: init?dryRun&verbose Arguments: dryRun, verbose Options: dryRun: boolean (e.g., true) publisher: string (e.g., "0x0") verbose: boolean (e.g., true) Sample Invocation/Configuration: DryRun: true Publisher: 0x02f2b09b33fdbd406ead954a31f98bd29a2a3492 Verbose: true Caps: -fmt,-noHeader,-file,-output,-append Format: json Sample JSON Response (Error): { "errors": [ "integration testing was skipped for chifra init" ] } ```