asyncapi: 3.0.0
info:
  title: Triport — Base normalized Flashblocks feed
  version: 0.1.0-n7-base-01
  description: Raw infrastructure firehose is the internal primary. Clients receive only bounded normalized preconfirmation events; decoder_validated and canonical_ready remain false even when an independent reconciliation status is present.
defaultContentType: application/json
servers:
  production: {$ref: '_shared.yaml#/servers/production'}
channels:
  baseFeed:
    address: /ws/base-feed/{key}
    parameters:
      key: {description: Triport API key.}
    x-scope: base:feed
    x-tier-required: pro
    x-tier-category: base_feed
    x-triport-tier:
      feature_id: base_feed
      minimum_tier: pro
      tiers:
        free:
          allowed: false
        basic:
          allowed: false
        pro:
          allowed: true
          subscriptions:
            max_streams: 1
            filter_required: true
          provider_required: true
        business:
          allowed: true
          subscriptions:
            max_streams: 2
            filter_required: true
          provider_required: true
        enterprise:
          allowed: true
          subscriptions:
            max_streams: 2
            filter_required: true
          provider_required: true
    x-availability: supported
    x-validation: positive_fixture
    x-upstream-transport: wss_push
    x-decoder-validated: false
    x-source-sha256: '7ef8de887793da452239eb285d45dafe2aa5e1a71d02fb366cb87ca983f231ff'
    messages:
      Flashblock: {$ref: '#/components/messages/Flashblock'}
      WSError: {$ref: '_shared.yaml#/components/messages/WSError'}
operations:
  receiveFlashblock:
    action: receive
    channel: {$ref: '#/channels/baseFeed'}
    messages: [{$ref: '#/channels/baseFeed/messages/Flashblock'}, {$ref: '#/channels/baseFeed/messages/WSError'}]
components:
  schemas:
    Flashblock:
      type: object
      additionalProperties: false
      description: Exact normalized feed.Event envelope emitted by internal/networks/base/feed; raw payload diff fields are not forwarded on this route.
      required: [kind, provenance, finality, freshness, partial, full_preconf, decoder_validated, canonical_ready, reconciliation]
      properties:
        kind: {type: string, enum: [data, gap, reorg, resync, degraded, close]}
        reason: {type: string}
        provenance:
          type: object
          additionalProperties: false
          required: [source, version, decoder_profile, deployed_version, position]
          properties:
            source: {type: string, const: 'wss://mainnet.flashblocks.base.org/ws'}
            version: {type: string, const: triport-base-feed-v1}
            decoder_profile: {type: string, const: 'base/base@v0.8.0:3049ce2e3a5132f2ef74b4ba14a1a952ea6abdfb'}
            deployed_version: {type: string, description: Observed producer version or unknown; never inferred from the pinned decoder profile.}
            position:
              type: object
              additionalProperties: false
              required: [index, number, session, frame]
              properties:
                payload_id: {type: string, pattern: '^0x[0-9a-fA-F]{16}$', description: Opaque payload id; not a canonical block hash.}
                index: {type: integer, minimum: 0, maximum: 18446744073709551615, description: Lossless uint64; no protocol maximum of 9 or 10.}
                number: {type: integer, minimum: 0, maximum: 18446744073709551615}
                session: {type: integer, minimum: 0, maximum: 18446744073709551615}
                frame: {type: integer, minimum: 0, maximum: 18446744073709551615}
        finality: {type: string, const: preconfirmed}
        freshness: {type: string, enum: [unverified, replay]}
        partial: {type: boolean}
        full_preconf: {type: boolean, const: false}
        decoder_validated: {type: boolean, const: false}
        canonical_ready: {type: boolean, const: false}
        reconciliation: {type: string, description: Independent reconciliation status; does not promote finality or canonical readiness.}
        transactions:
          type: array
          items:
            type: object
            additionalProperties: false
            required: [hash, type, raw]
            properties:
              hash: {type: string, pattern: '^0x[0-9a-fA-F]{64}$'}
              type: {type: integer, minimum: 0, maximum: 255}
              raw: {type: string, pattern: '^0x(?:[0-9a-fA-F]{2})+$', description: Original validated EIP-2718/RLP bytes.}
              from: {type: string, pattern: '^0x[0-9a-fA-F]{40}$'}
              to: {type: string, pattern: '^0x[0-9a-fA-F]{40}$'}
              logs:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  required: [address, topics]
                  properties:
                    address: {type: string, pattern: '^0x[0-9a-fA-F]{40}$'}
                    topics: {type: array, maxItems: 4, items: {type: string, pattern: '^0x[0-9a-fA-F]{64}$'}}
        hydration: {type: string, description: Optional best-effort marker; currently observed_hashes_only.}
  messages:
    Flashblock:
      title: Normalized Base Flashblock delta
      payload: {$ref: '#/components/schemas/Flashblock'}
