Skip to main content
The optimism API provides methods for interacting with Kona’s rollup state and configuration.

optimism_outputAtBlock

Returns the output root at a specific block number, including the L2 block reference, withdrawal storage root, state root, and sync status.

Parameters

  • blockNumber (BlockNumberOrTag): The block number to get the output for. Can be a number, “latest”, “earliest”, “pending”, “safe”, or “finalized”.

Returns

OutputResponse - An object containing:
  • version (string): The output version hash
  • outputRoot (string): The output root hash
  • blockRef (L2BlockInfo): Reference to the L2 block
  • withdrawalStorageRoot (string): The withdrawal storage root
  • stateRoot (string): The state root
  • syncStatus (SyncStatus): The current sync status of the node

Example

optimism_syncStatus

Returns the current synchronization status of the rollup node, including information about L1 and L2 block states.

Returns

SyncStatus - An object containing detailed sync information:
  • current_l1 (BlockInfo): The current L1 block that derivation is idled at
  • current_l1_finalized (BlockInfo): The current L1 finalized block (legacy/deprecated)
  • head_l1 (BlockInfo): The L1 head block reference
  • safe_l1 (BlockInfo): The L1 safe head block reference
  • finalized_l1 (BlockInfo): The finalized L1 block reference
  • unsafe_l2 (L2BlockInfo): The unsafe L2 block reference (absolute tip)
  • safe_l2 (L2BlockInfo): The safe L2 block reference (derived from L1)
  • finalized_l2 (L2BlockInfo): The finalized L2 block reference
  • cross_unsafe_l2 (L2BlockInfo): Cross-unsafe L2 block with verified cross-L2 dependencies
  • local_safe_l2 (L2BlockInfo): Local safe L2 block derived from L1, not yet cross-verified

Example

optimism_rollupConfig

Returns the rollup configuration parameters that define the rollup chain’s behavior and properties.

Returns

RollupConfig - An object containing the complete rollup configuration:
  • genesis (ChainGenesis): The genesis state of the rollup
  • blockTime (number): The block time of the L2 in seconds
  • maxSequencerDrift (number): Maximum sequencer drift in seconds
  • seqWindowSize (number): The sequencer window size
  • channelTimeout (number): Number of L1 blocks between channel open/close
  • graniteChannelTimeout (number): Channel timeout after Granite hardfork
  • l1ChainId (number): The L1 chain ID
  • l2ChainId (number): The L2 chain ID
  • batchInboxAddress (string): L1 address where batches are sent
  • depositContractAddress (string): L1 address for deposits
  • l1SystemConfigAddress (string): L1 address for system config
  • protocolVersionsAddress (string): L1 address for protocol versions
  • Additional configuration fields for hardforks, fees, and interoperability

Example

optimism_version

Returns the software version of the Kona rollup node.

Returns

string - The version string of the Kona software (e.g., “0.1.0”)

Example

Deprecated Methods

optimism_safeHeadAtL1Block

This RPC endpoint is not supported in Kona. It was used to track the safe head for every L1 block, but this is no longer necessary post-interop. Calling this method will return a “Method not found” error.

Returns

This method returns an error with code -32601 (Method not found).