Retrieves block header and chunk info. Works perfectly with "final", numeric height, or block hash.
Examples
near_set_endpoint("mainnet")
#> ✔ NEAR RPC endpoint set to <https://rpc.mainnet.near.org>
# Latest finalized block
near_get_block("final")
#> # A tibble: 1 × 10
#> height hash prev_hash timestamp author chunks_included gas_price
#> <int> <chr> <chr> <dttm> <chr> <int> <chr>
#> 1 176807972 Fa4r… 8FhVxDXP… 2025-12-14 13:46:58 x.poo… 9 100000000
#> # ℹ 3 more variables: total_supply <chr>, latest_protocol_version <int>,
#> # raw_response <list>
# By height
near_get_block(176259877)
#> Error in httr2::req_perform(.): HTTP 422 Unprocessable Entity.
# By hash (example)
near_get_block("CanDKa6nYDQ89iv5U7sE1YDFteBRkBG6qBJjiM5YwGtY")
#> # A tibble: 0 × 10
#> # ℹ 10 variables: height <int>, hash <chr>, prev_hash <chr>, timestamp <dttm>,
#> # author <chr>, chunks_included <int>, gas_price <chr>, total_supply <chr>,
#> # latest_protocol_version <int>, raw_response <list>
