Skip to content

Releases: farcasterxyz/hub-monorepo

@farcaster/shuttle@1.0.2

Choose a tag to compare

@warplet warplet released this 26 May 20:41
a908588

Patch Changes

  • 3e901ed: Scrub Postgres-uncastable characters (NUL and unpaired UTF-16 surrogates) from message body JSON before insert. These pass json validation but throw on body::jsonb and on any body->>'key' extraction, leaving rows that look fine at INSERT and blow up at read time.

@farcaster/shuttle@1.0.1

Choose a tag to compare

@warplet warplet released this 21 May 18:21
6ce520e

Patch Changes

  • Updated dependencies [ef52a8e]
    • @farcaster/hub-nodejs@0.16.0

@farcaster/hub-web@0.12.0

Choose a tag to compare

@warplet warplet released this 21 May 18:21
6ce520e

Minor Changes

  • ef52a8e: Add LIVE_AT user data protobuf support and core validation helpers.

Patch Changes

  • Updated dependencies [ef52a8e]
    • @farcaster/core@0.19.0

@farcaster/hub-nodejs@0.16.0

Choose a tag to compare

@warplet warplet released this 21 May 18:21
6ce520e

Minor Changes

  • ef52a8e: Add LIVE_AT user data protobuf support and core validation helpers.

Patch Changes

  • Updated dependencies [ef52a8e]
    • @farcaster/core@0.19.0

@farcaster/core@0.19.0

Choose a tag to compare

@warplet warplet released this 21 May 18:21
6ce520e

Minor Changes

  • ef52a8e: Add LIVE_AT user data protobuf support and core validation helpers.

@farcaster/shuttle@1.0.0

Choose a tag to compare

@warplet warplet released this 15 May 15:59
2abfea5

Major Changes

  • 8311e4c: feat(shuttle): add OnChainEventReconciliation and a typed onchain_events table

    Adds first-class support for reconciling on-chain events between the hub
    and the local database, mirroring the structure of
    MessageReconciliation.

    Highlights:

    • New OnChainEventReconciliation class (in
      src/shuttle/onChainEventReconciliation.ts) with
      reconcileOnChainEventsForFid / reconcileOnChainEventsOfTypeForFid.
      Both methods take an options object (rather than positional
      arguments) so the optional onDbOnChainEvent callback isn't a
      landmine sitting between the hub callback and the time-window
      arguments. The DB-side pass is opt-in via that callback. By default
      it covers ID_REGISTER, SIGNER, SIGNER_MIGRATED, STORAGE_RENT
      and TIER_PURCHASE events. The new RECONCILABLE_ONCHAIN_EVENT_TYPES
      const + ReconcilableOnChainEventType type pin the public types
      parameter to only the event kinds the reconciler actually has hub-
      side fetch logic for.

    • startTimestamp / stopTimestamp are Farcaster timestamp numbers
      (matching MessageReconciliation), validated once up front in the
      outer call, so input handling is consistent whether or not
      onDbOnChainEvent is provided.

    • Promotes onchain_events to a typed table on HubTables, with new
      exports OnChainEventsTable, OnChainEventRow,
      InsertableOnChainEventRow, and OnChainEventBodyJson. Body shapes
      are now JSON-safe (every protobuf Uint8Array field — e.g.
      IdRegisterEventBody.to, TierPurchaseBody.payer — is exposed as a
      0x-prefixed string), so values round-trip through a Postgres json
      column without being persisted as numeric-index objects. chainId /
      blockNumber are typed as number to match the package's global
      int8 → JS number pg parser; declaring them as bigint (the
      literal Postgres type) would silently mislead consumers and break
      the IN-list comparisons used by reconciliation.

    • Updates the example-app accordingly: migration 003_onchain_events
      now includes chainId and uses blockTimestamp (matching the hub
      event payload), and the example handler records signer-migrated and
      tier-purchase events alongside the existing ID-register / signer /
      storage-rent ones.

    • Adds integration test coverage for OnChainEventReconciliation:
      a regression test for the chainId / blockNumber IN-list
      comparison (now that those columns deserialize as JS number),
      hub-only and DB-only flagging, and the types filter.

    Marked as a major release because the new onchain_events field on the
    exported HubTables interface is a breaking change for consumers that
    already extend HubTables with their own onchain_events shape, and
    the example-app migration renames/adds columns relative to the prior
    example schema.

  • a089e1d: feat(shuttle): add UsernameProofReconciliation and a typed usernames table

    Adds first-class support for reconciling username proofs (fname,
    ENS L1, basenames) between the hub and the local database, mirroring
    the structure of MessageReconciliation:

    • New UsernameProofReconciliation class (in
      src/shuttle/usernameProofReconciliation.ts) with
      reconcileUsernameProofsForFid /
      reconcileUsernameProofsOfTypeForFid. The hub-side pass is always
      run, and the DB-side pass is opt-in via an onDbProof callback.

    • Promotes usernames to a typed table on HubTables, with new
      exports UsernamesTable, UsernameRow, InsertableUsernameRow.
      Adds an 004_usernames migration to the example app.

    Marked as a major release because the new usernames field on the
    exported HubTables interface is a breaking change for consumers that
    already extend HubTables with their own usernames table shape.

Minor Changes

  • 2328cf4: feat(shuttle): allow disabling DB-side reconciliation and filtering message types

    MessageReconciliation now lets callers opt out of the
    "DB messages missing from the hub" pass, which is useful during initial
    backfills where every DB row is missing from the hub by definition and
    streaming each one through the callback is just wasted work.

    • onDbMessage is now optional on both reconcileMessagesForFid and
      reconcileMessagesOfTypeForFid. When omitted, the DB-side scan is
      skipped entirely (no allActiveDbMessagesOfTypeForFid call) and the
      per-message hub-hash map that the DB pass needed is no longer
      populated, removing a per-FID memory cost on large backfills.
    • reconcileMessagesForFid accepts a new optional
      types: ReconcilableMessageType[] parameter to restrict
      reconciliation to a subset of message types (e.g. only LEND_STORAGE
      after a hub backfill of just that type). The new
      RECONCILABLE_MESSAGE_TYPES const + ReconcilableMessageType type
      pin this to the message types MessageReconciliation actually has
      hub-side RPCs for, so passing e.g. CAST_REMOVE is a compile-time
      error instead of a runtime "Unknown message type" throw.
    • DBMessage is now exported so consumers can type their onDbMessage
      callback without re-declaring the row shape.
    • Time-window resolution (fromFarcasterTime of startTimestamp /
      stopTimestamp) now happens once up front in
      reconcileMessagesForFid / reconcileMessagesOfTypeForFid instead
      of per-type inside the DB pass, so input handling is consistent
      whether or not onDbMessage is provided.
    • Bonus: fixes a stale @farcaster/hub-shuttle import in the example
      app that would otherwise fail tsc --noEmit.

    No behavior change for existing callers that pass an onDbMessage
    callback.

Patch Changes

  • 814c9f1: fix(shuttle): swallow xtrim errors when the Redis connection is no longer ready

    During process shutdown the periodic HubEventStreamConsumer.clearOldEvents
    timer can still fire while the underlying ioredis client is closing. The
    follow-up xtrim call against the closed connection produces unhandled
    promise rejections.

    EventStreamConnection.trim now wraps the xtrim call in a try/catch:
    if it fails and the client is no longer in a "ready" state, the
    error is swallowed (xtrim is best-effort periodic maintenance, the next
    invocation against a fresh client will catch up). Any other failure is
    rethrown so real errors stay visible.

@farcaster/shuttle@0.9.7

Choose a tag to compare

@warplet warplet released this 06 May 19:13
d76d9c6

Patch Changes

  • eb884b8: chore: rebuild against @farcaster/hub-nodejs@0.15.11 so the rolled-up
    .d.ts re-exports the new V16 types (KeyAddMessage / KeyRemoveMessage /
    SignerInfo / SignersByFidRequest / etc.) for consumers importing them
    through @farcaster/shuttle. No source change.

@farcaster/hub-web@0.11.9

Choose a tag to compare

@warplet warplet released this 06 May 18:59
e254c50

Patch Changes

  • af9bda8: feat: pull in snapchain V16 protos (signers and scopes / gasless signers)

    Regenerates protobuf bindings against snapchain e8e89a3, the client
    surface for engine version V16 (LATEST_PROTOCOL_VERSION 10 → 11;
    ProtocolFeature::GaslessSigners gate). V16 activates testnet
    2026-04-28 20:00 UTC and mainnet 2026-05-07 17:00 UTC.

    • MESSAGE_TYPE_KEY_ADD (16) and MESSAGE_TYPE_KEY_REMOVE (17) on
      MessageType, plus KeyAddBody / KeyRemoveBody and corresponding
      KeyAddData / KeyAddMessage / KeyRemoveData / KeyRemoveMessage
      type narrowings and isKeyAdd* / isKeyRemove* typeguards in core.
    • Backfills the previously-missing isLendStorageData /
      isLendStorageMessage typeguards.
    • New unified signer surface in RPC: GetSigner and GetSignersByFid
      return both on-chain and off-chain (gasless) keys via SignerResponse
      and SignersByFidResponse. The pre-existing GetOnChainSigner and
      GetOnChainSignersByFid are now marked deprecated; existing callers
      are unaffected. The Signer proto message is re-exported from core
      as SignerInfo to disambiguate from the existing cryptographic
      Signer interface.
    • GetSignersByFid accepts a SignersByFidRequest so callers can
      request current per-FID nonce counters (current_user_nonce,
      requester_fid_nonces).
    • BlocksRequest.shard_id is removed (server already ignored it; field
      number 1 is reserved on the wire).

    Adds LendStorage*, KeyAdd*, and KeyRemove* factories plus runtime
    tests for the new typeguards.

  • Updated dependencies [af9bda8]

    • @farcaster/core@0.18.11

@farcaster/hub-nodejs@0.15.11

Choose a tag to compare

@warplet warplet released this 06 May 18:59
e254c50

Patch Changes

  • af9bda8: feat: pull in snapchain V16 protos (signers and scopes / gasless signers)

    Regenerates protobuf bindings against snapchain e8e89a3, the client
    surface for engine version V16 (LATEST_PROTOCOL_VERSION 10 → 11;
    ProtocolFeature::GaslessSigners gate). V16 activates testnet
    2026-04-28 20:00 UTC and mainnet 2026-05-07 17:00 UTC.

    • MESSAGE_TYPE_KEY_ADD (16) and MESSAGE_TYPE_KEY_REMOVE (17) on
      MessageType, plus KeyAddBody / KeyRemoveBody and corresponding
      KeyAddData / KeyAddMessage / KeyRemoveData / KeyRemoveMessage
      type narrowings and isKeyAdd* / isKeyRemove* typeguards in core.
    • Backfills the previously-missing isLendStorageData /
      isLendStorageMessage typeguards.
    • New unified signer surface in RPC: GetSigner and GetSignersByFid
      return both on-chain and off-chain (gasless) keys via SignerResponse
      and SignersByFidResponse. The pre-existing GetOnChainSigner and
      GetOnChainSignersByFid are now marked deprecated; existing callers
      are unaffected. The Signer proto message is re-exported from core
      as SignerInfo to disambiguate from the existing cryptographic
      Signer interface.
    • GetSignersByFid accepts a SignersByFidRequest so callers can
      request current per-FID nonce counters (current_user_nonce,
      requester_fid_nonces).
    • BlocksRequest.shard_id is removed (server already ignored it; field
      number 1 is reserved on the wire).

    Adds LendStorage*, KeyAdd*, and KeyRemove* factories plus runtime
    tests for the new typeguards.

  • Updated dependencies [af9bda8]

    • @farcaster/core@0.18.11

@farcaster/core@0.18.11

Choose a tag to compare

@warplet warplet released this 06 May 18:59
e254c50

Patch Changes

  • af9bda8: feat: pull in snapchain V16 protos (signers and scopes / gasless signers)

    Regenerates protobuf bindings against snapchain e8e89a3, the client
    surface for engine version V16 (LATEST_PROTOCOL_VERSION 10 → 11;
    ProtocolFeature::GaslessSigners gate). V16 activates testnet
    2026-04-28 20:00 UTC and mainnet 2026-05-07 17:00 UTC.

    • MESSAGE_TYPE_KEY_ADD (16) and MESSAGE_TYPE_KEY_REMOVE (17) on
      MessageType, plus KeyAddBody / KeyRemoveBody and corresponding
      KeyAddData / KeyAddMessage / KeyRemoveData / KeyRemoveMessage
      type narrowings and isKeyAdd* / isKeyRemove* typeguards in core.
    • Backfills the previously-missing isLendStorageData /
      isLendStorageMessage typeguards.
    • New unified signer surface in RPC: GetSigner and GetSignersByFid
      return both on-chain and off-chain (gasless) keys via SignerResponse
      and SignersByFidResponse. The pre-existing GetOnChainSigner and
      GetOnChainSignersByFid are now marked deprecated; existing callers
      are unaffected. The Signer proto message is re-exported from core
      as SignerInfo to disambiguate from the existing cryptographic
      Signer interface.
    • GetSignersByFid accepts a SignersByFidRequest so callers can
      request current per-FID nonce counters (current_user_nonce,
      requester_fid_nonces).
    • BlocksRequest.shard_id is removed (server already ignored it; field
      number 1 is reserved on the wire).

    Adds LendStorage*, KeyAdd*, and KeyRemove* factories plus runtime
    tests for the new typeguards.