# 0.3 Changelog

Detailed patch notes for the `0.3.x` release line.

Root summary: [../../CHANGELOG.md](../../CHANGELOG.md)

When a patch introduces any new CLI surface, include a fenced `bash` command
example here and in the root changelog. New CLI surface includes commands,
subcommands, options, option values, and new supported option combinations.
Cleanup-only patches without CLI behavior changes should not include command
examples.

## 0.3.8 - 2026-06-25

### Added

- Adds `icq icrc capabilities <ledger-canister-id>` for live generic ICRC
  endpoint probing.
- Probes `icrc1_supported_standards`, `icrc106_get_index_principal`,
  `icrc3_get_blocks`, `icrc3_supported_block_types`, `icrc3_get_archives`, and
  `icrc3_get_tip_certificate`.
- Keeps each probe independent so optional endpoints that are not exported by
  a ledger appear as `unsupported` rows with the original error preserved in
  JSON instead of failing the whole command.
- Text output shows supported standards and capability rows; JSON keeps raw
  status, details, and error fields for scripts.

```bash
icq icrc capabilities mxzaz-hqaaa-aaaar-qaada-cai
icq icrc capabilities mxzaz-hqaaa-aaaar-qaada-cai --format json
```

## 0.3.7 - 2026-06-25

### Added

- Adds `icq icrc tip-certificate <ledger-canister-id>` for live ICRC-3 tip
  certificate inspection through `icrc3_get_tip_certificate`.
- Keeps the report live-only and includes the queried `source_endpoint`.
- Text output shows certificate and hash tree byte counts plus truncated hex
  previews when present so terminal output stays readable. JSON keeps
  `certificate_present` plus optional full `certificate_hex` and
  `hash_tree_hex` strings and byte counts for scripts.

```bash
icq icrc tip-certificate mxzaz-hqaaa-aaaar-qaada-cai
icq icrc tip-certificate mxzaz-hqaaa-aaaar-qaada-cai --format json
```

## 0.3.6 - 2026-06-25

### Added

- Adds `icq icrc block-types <ledger-canister-id>` for live ICRC-3 supported
  block type discovery through `icrc3_supported_block_types`.
- Adds `icq icrc archives <ledger-canister-id>` for live ICRC-3 archive range
  discovery through `icrc3_get_archives`.
- Adds optional `--from <canister-id>` support to archive discovery so callers
  can request archive rows after the last archive canister they have already
  seen.
- Keeps both reports live-only and includes the queried `source_endpoint`.
  Archive range `start` and `end` values remain string fields in JSON to
  preserve raw Candid `nat` values.

```bash
icq icrc block-types ryjl3-tyaaa-aaaaa-aaaba-cai
icq icrc block-types ryjl3-tyaaa-aaaaa-aaaba-cai --format json
icq icrc archives ryjl3-tyaaa-aaaaa-aaaba-cai
icq icrc archives ryjl3-tyaaa-aaaaa-aaaba-cai --from qaa6y-5yaaa-aaaaa-aaafa-cai --format json
```

## 0.3.5 - 2026-06-25

### Added

- Adds `icq icrc transactions <ledger-canister-id>` for live generic ICRC
  transaction/block history pages.
- Queries `icrc3_get_blocks` on the ledger canister with bounded live page
  sizes.
- Adds `--start <index>` and `--limit <count>` to choose the first block index
  and page size. The first slice defaults to `--start 0 --limit 25` and caps
  live page sizes at 100 blocks.
- Includes returned archive callbacks/ranges without following archive
  callbacks yet.
- Text output shows compact block summaries with block type, transaction kind,
  timestamp nanoseconds, and raw amount base units. JSON includes those summary
  fields plus a typed `raw_block` representation that preserves ICRC-3 value
  variants and stringifies block/log numeric values.

```bash
icq icrc transactions ryjl3-tyaaa-aaaaa-aaaba-cai
icq icrc transactions ryjl3-tyaaa-aaaaa-aaaba-cai --start 100 --limit 50 --format json
```

## 0.3.4 - 2026-06-25

### Changed

- Shares ICRC/SNS token metadata text helpers for optional values, truncation,
  and raw metadata value rendering so both command families preserve the same
  human-facing token metadata formatting.
- Centralizes generic ICRC live query setup for IC agent creation and ledger
  canister principal parsing across token, balance, allowance, and index
  reports.
- Reuses the shared ICRC-106 index-error formatter directly from SNS token
  reports instead of keeping a duplicate SNS wrapper.
- Replaces the remaining plain test `unwrap` with an explicit expectation.
- Keeps CLI behavior, report schemas, cache paths, and output unchanged.

## 0.3.3 - 2026-06-25

### Added

- Adds `icq icrc index <ledger-canister-id>` for live ICRC-106 index canister
  discovery.
- Queries `icrc106_get_index_principal` and reports `index_canister_id` when
  the ledger has an index configured.
- Preserves ledger-level ICRC-106 errors such as an unset index principal in
  `index_error` instead of hiding them behind a failed token metadata report.
- Keeps the index command live-only and includes the queried
  `source_endpoint` in text and JSON reports.

```bash
icq icrc index ryjl3-tyaaa-aaaaa-aaaba-cai
icq icrc index ryjl3-tyaaa-aaaaa-aaaba-cai --format json
```

## 0.3.2 - 2026-06-24

### Added

- Adds `icq icrc allowance <ledger-canister-id> <owner-principal>
  <spender-principal>` for live ICRC-2 allowance reports.
- Adds optional `--owner-subaccount <hex>` and `--spender-subaccount <hex>`
  arguments for 32-byte account subaccounts on the allowance owner and spender
  accounts.
- Queries `icrc1_symbol`, `icrc1_decimals`, and `icrc2_allowance` so text
  output can render a token-denominated allowance while JSON keeps
  `allowance` and `expires_at_unix_nanos` as raw string fields.
- Keeps the allowance command live-only and includes the queried
  `source_endpoint` in text and JSON reports.

```bash
icq icrc allowance ryjl3-tyaaa-aaaaa-aaaba-cai aaaaa-aa aaaaa-aa
icq icrc allowance ryjl3-tyaaa-aaaaa-aaaba-cai aaaaa-aa aaaaa-aa --owner-subaccount 0000000000000000000000000000000000000000000000000000000000000000 --spender-subaccount 0000000000000000000000000000000000000000000000000000000000000000
```

## 0.3.1 - 2026-06-24

### Changed

- Consolidates duplicated ICRC ledger wire types, no-arg and argument-bearing
  ledger query helpers, ICRC-1 token metadata fetching, and metadata row
  conversion into a shared `icrc::ledger` module.
- Moves generic `icq icrc token` and SNS token metadata reports onto the
  shared ICRC-1 token metadata fetch path while keeping their command-specific
  report DTOs, text rendering, and JSON schemas unchanged.
- Keeps SNS-specific discovery and `icrc106_get_index_principal` presentation
  in the SNS report layer, but reuses the shared ICRC ledger query/error
  adapter for the underlying call.
- Removes the old SNS-only ICRC token Candid type module and the duplicate SNS
  metadata-row conversion path.

## 0.3.0 - 2026-06-24

### Added

- Adds a new top-level `icq icrc` command family for generic ICRC ledger
  queries that are not tied to SNS discovery.
- Adds `icq icrc token <ledger-canister-id>` for live ICRC token metadata
  reports. The report queries `icrc1_name`, `icrc1_symbol`, `icrc1_decimals`,
  `icrc1_fee`, `icrc1_total_supply`, `icrc1_minting_account`,
  `icrc1_supported_standards`, and `icrc1_metadata`.
- Adds `icq icrc balance <ledger-canister-id> <principal>` for live ICRC
  account balance reports, with optional `--subaccount <hex>` support for
  32-byte ICRC subaccounts.
- Adds `--source-endpoint <url>` and `--format text|json` support to the new
  ICRC token and balance commands.
- Keeps the ICRC commands live-only for this slice. Text and JSON reports
  include `source_endpoint`, and JSON preserves raw base-unit fields while text
  renders token amounts with ledger decimals.
- Adds clap parser coverage for the new command family, including principal
  validation and subaccount hex normalization at the CLI boundary, plus
  fixture-backed report tests with no live network calls.

```bash
icq icrc token ryjl3-tyaaa-aaaaa-aaaba-cai
icq icrc token ryjl3-tyaaa-aaaaa-aaaba-cai --format json
icq icrc balance ryjl3-tyaaa-aaaaa-aaaba-cai aaaaa-aa
icq icrc balance ryjl3-tyaaa-aaaaa-aaaba-cai aaaaa-aa --subaccount 0000000000000000000000000000000000000000000000000000000000000000
```
