Home / Blockfrost.io / blockfrost-backend-ryo
May 29, 1-2 AM (0)
May 29, 2-3 AM (0)
May 29, 3-4 AM (0)
May 29, 4-5 AM (0)
May 29, 5-6 AM (0)
May 29, 6-7 AM (0)
May 29, 7-8 AM (0)
May 29, 8-9 AM (0)
May 29, 9-10 AM (0)
May 29, 10-11 AM (0)
May 29, 11-12 PM (0)
May 29, 12-1 PM (0)
May 29, 1-2 PM (0)
May 29, 2-3 PM (0)
May 29, 3-4 PM (0)
May 29, 4-5 PM (0)
May 29, 5-6 PM (0)
May 29, 6-7 PM (0)
May 29, 7-8 PM (0)
May 29, 8-9 PM (0)
May 29, 9-10 PM (0)
May 29, 10-11 PM (0)
May 29, 11-12 AM (0)
May 30, 12-1 AM (0)
May 30, 1-2 AM (0)
May 30, 2-3 AM (0)
May 30, 3-4 AM (0)
May 30, 4-5 AM (0)
May 30, 5-6 AM (0)
May 30, 6-7 AM (0)
May 30, 7-8 AM (0)
May 30, 8-9 AM (0)
May 30, 9-10 AM (0)
May 30, 10-11 AM (0)
May 30, 11-12 PM (0)
May 30, 12-1 PM (0)
May 30, 1-2 PM (0)
May 30, 2-3 PM (0)
May 30, 3-4 PM (0)
May 30, 4-5 PM (0)
May 30, 5-6 PM (0)
May 30, 6-7 PM (0)
May 30, 7-8 PM (0)
May 30, 8-9 PM (0)
May 30, 9-10 PM (0)
May 30, 10-11 PM (0)
May 30, 11-12 AM (0)
May 31, 12-1 AM (0)
May 31, 1-2 AM (0)
May 31, 2-3 AM (0)
May 31, 3-4 AM (0)
May 31, 4-5 AM (0)
May 31, 5-6 AM (0)
May 31, 6-7 AM (0)
May 31, 7-8 AM (0)
May 31, 8-9 AM (0)
May 31, 9-10 AM (0)
May 31, 10-11 AM (0)
May 31, 11-12 PM (0)
May 31, 12-1 PM (0)
May 31, 1-2 PM (0)
May 31, 2-3 PM (0)
May 31, 3-4 PM (0)
May 31, 4-5 PM (0)
May 31, 5-6 PM (0)
May 31, 6-7 PM (0)
May 31, 7-8 PM (0)
May 31, 8-9 PM (0)
May 31, 9-10 PM (0)
May 31, 10-11 PM (0)
May 31, 11-12 AM (0)
Jun 01, 12-1 AM (0)
Jun 01, 1-2 AM (0)
Jun 01, 2-3 AM (0)
Jun 01, 3-4 AM (0)
Jun 01, 4-5 AM (0)
Jun 01, 5-6 AM (0)
Jun 01, 6-7 AM (0)
Jun 01, 7-8 AM (0)
Jun 01, 8-9 AM (0)
Jun 01, 9-10 AM (0)
Jun 01, 10-11 AM (0)
Jun 01, 11-12 PM (0)
Jun 01, 12-1 PM (0)
Jun 01, 1-2 PM (0)
Jun 01, 2-3 PM (0)
Jun 01, 3-4 PM (0)
Jun 01, 4-5 PM (0)
Jun 01, 5-6 PM (0)
Jun 01, 6-7 PM (0)
Jun 01, 7-8 PM (0)
Jun 01, 8-9 PM (0)
Jun 01, 9-10 PM (0)
Jun 01, 10-11 PM (0)
Jun 01, 11-12 AM (0)
Jun 02, 12-1 AM (0)
Jun 02, 1-2 AM (0)
Jun 02, 2-3 AM (0)
Jun 02, 3-4 AM (0)
Jun 02, 4-5 AM (0)
Jun 02, 5-6 AM (0)
Jun 02, 6-7 AM (0)
Jun 02, 7-8 AM (0)
Jun 02, 8-9 AM (0)
Jun 02, 9-10 AM (0)
Jun 02, 10-11 AM (0)
Jun 02, 11-12 PM (0)
Jun 02, 12-1 PM (0)
Jun 02, 1-2 PM (0)
Jun 02, 2-3 PM (0)
Jun 02, 3-4 PM (0)
Jun 02, 4-5 PM (0)
Jun 02, 5-6 PM (0)
Jun 02, 6-7 PM (0)
Jun 02, 7-8 PM (0)
Jun 02, 8-9 PM (0)
Jun 02, 9-10 PM (0)
Jun 02, 10-11 PM (0)
Jun 02, 11-12 AM (0)
Jun 03, 12-1 AM (0)
Jun 03, 1-2 AM (0)
Jun 03, 2-3 AM (0)
Jun 03, 3-4 AM (0)
Jun 03, 4-5 AM (0)
Jun 03, 5-6 AM (0)
Jun 03, 6-7 AM (0)
Jun 03, 7-8 AM (0)
Jun 03, 8-9 AM (0)
Jun 03, 9-10 AM (2)
Jun 03, 10-11 AM (1)
Jun 03, 11-12 PM (0)
Jun 03, 12-1 PM (0)
Jun 03, 1-2 PM (0)
Jun 03, 2-3 PM (0)
Jun 03, 3-4 PM (0)
Jun 03, 4-5 PM (0)
Jun 03, 5-6 PM (0)
Jun 03, 6-7 PM (0)
Jun 03, 7-8 PM (0)
Jun 03, 8-9 PM (0)
Jun 03, 9-10 PM (0)
Jun 03, 10-11 PM (0)
Jun 03, 11-12 AM (0)
Jun 04, 12-1 AM (0)
Jun 04, 1-2 AM (0)
Jun 04, 2-3 AM (0)
Jun 04, 3-4 AM (0)
Jun 04, 4-5 AM (0)
Jun 04, 5-6 AM (0)
Jun 04, 6-7 AM (0)
Jun 04, 7-8 AM (1)
Jun 04, 8-9 AM (0)
Jun 04, 9-10 AM (0)
Jun 04, 10-11 AM (4)
Jun 04, 11-12 PM (0)
Jun 04, 12-1 PM (0)
Jun 04, 1-2 PM (3)
Jun 04, 2-3 PM (0)
Jun 04, 3-4 PM (0)
Jun 04, 4-5 PM (0)
Jun 04, 5-6 PM (0)
Jun 04, 6-7 PM (0)
Jun 04, 7-8 PM (0)
Jun 04, 8-9 PM (0)
Jun 04, 9-10 PM (0)
Jun 04, 10-11 PM (0)
Jun 04, 11-12 AM (0)
Jun 05, 12-1 AM (0)
Jun 05, 1-2 AM (0)
11 commits this week May 29, 2026 - Jun 05, 2026
fix: annotate nullable text params with ::text to prevent 42P08
node-postgres sends JS null without a type tag, so Postgres has to infer
each parameter's type from how it's used in the SQL. When a nullable text
param (order_by, retired, expired) appears only in IS NULL checks and OR
clauses, inference can give up and raise 42P08 "could not determine data
type of parameter $N" — observed on /governance/dreps?retired=true.

Pinning the parameter slot's type with $N::text bypasses inference. The
::text is on the parameter, not the value — works equally for NULL and
'true'/'false'.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fix: narrow metadata_hash to string when metadata object is constructed
voting_anchor.data_hash is NOT NULL in db-sync, so metadata_hash is
guaranteed non-null whenever metadata_url is non-null (both come from
the same row). TS can narrow metadata_url from the explicit null check
but doesn't know about the inter-column correlation; asserting the type
here keeps the openapi schema's required-string contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fix: return metadata as null when DRep has no registration anchor
Mirrors the 404 behavior of /dreps/:drep_id/metadata in list form. When a
DRep has never carried a voting anchor (e.g. special DReps such as
drep_always_abstain), the metadata field is now `null` instead of an
object with all-null inner fields.

Bumps @blockfrost/openapi to 0.1.89-beta.1 for the matching schema change.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fix: off-by-one in expiry threshold epoch
The single-DRep /dreps/{id} query defines expired as
  (current_epoch - last_active_epoch) > drep_activity
which is satisfied iff last_active_epoch <= current_epoch - drep_activity - 1.

The filtered SQL was computing the threshold epoch as
  current_epoch - drep_activity
which marks a DRep as expired when its last activity was exactly drep_activity
epochs ago — contradicting the strict-greater-than semantics. Subtract 1 to
align with the single-DRep query.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fix: coalesce expiry_threshold MAX to avoid NULL three-valued logic
If the boundary epoch has no blocks, MAX(tx.id) returns NULL and the
`expired` predicate evaluates to NULL instead of FALSE, which silently
drops every row from BOTH `expired=true` and `expired=false` filter
results. COALESCE to 0 so the predicate is always a real boolean and
the "fails open" comment in the file is actually true.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: enrich /governance/dreps with voting power, status, metadata + filter/sort params
Embeds the per-DRep fields previously requiring N+1 calls to /dreps/{id} and
/dreps/{id}/metadata into the paginated /dreps response: amount, has_script,
retired, expired, last_active_epoch, and the off-chain metadata object.

Adds query params:
- order_by=amount  (in addition to existing order=asc|desc)
- retired=true|false
- expired=true|false

Routes to a separate SQL path when retired/expired filters are present, since
filtering on computed fields requires full-table aggregation; the unfiltered
path keeps its page-first plan and stays fast.

Depends on a future @blockfrost/openapi release exposing the new schema and
query params.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>