For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rome SDK

Typed Solidity interfaces for calling Solana programs from EVM contracts, plus the Rust SDK behind Rome's off-chain services.

The Rome SDK provides typed Solidity interfaces for interacting with Solana programs from EVM smart contracts. It's the developer toolkit for building cross-runtime applications on Rome.

SDKs

Rome has SDKs for three audiences — app builders (TypeScript), contract developers (Solidity), and teams running their own services on Rome (Rust).

TypeScript SDK (@rome-protocol/sdk)

For dapp and frontend developers — the SDK most app builders start with. @rome-protocol/sdk wraps the Rome write path so a web app submits Rome transactions correctly: submitRomeTx (the correct write path plus gas/fee handling), PDA / ATA derivation, CPI invoke / invoke_signed encoders, precompile bindings, and a /bridge subpath. Repo-first install (npm publish pending):

npm install github:rome-protocol/rome-sdk-ts#v0.4.0
import { submitRomeTx } from '@rome-protocol/sdk';
// Submit any Rome EVM write through the correct write path (handles gas/fee encoding).

The public rome-dex app uses only a few of the SDK's helpers (PDA and token-account derivation, the CPI invoke encoder and the 1.3x gas pad), and cardo does not depend on it. Neither calls submitRomeTx or submitRomeTxV1, so read them for how an app calls the CPI precompile, not for the SDK's write path.

Both lanes, one SDK. submitRomeTx is the EVM lane (MetaMask). For the Solana lane — a Solana wallet driving your EVM app — submitRomeTxV1 mirrors it: the proxy composes one Solana v1 transaction for the call, the wallet signs twice with the same key (a readable authorization message, then the transaction), and Rome runs the call as an EVM transaction from the user's derived identity, with no EVM key. A call that does not fit one transaction is relayed by the proxy with the same authorization signature, and fundSyntheticGas tops up the native gas a relayed call spends. A relayed call that reverts resolves with receipt.status === "0x0" instead of throwing, so check it; the relayed calls and long calls section has the gas rule and the limits. Value moves in and out through buildFundLeg / buildSweepLeg as an ERC-20 wrapper (e.g. wUSDC), not native msg.value — the synthetic sender holds nothing at rest — and a first-time synthetic is provisioned once, explicitly, with buildCreatePdaCall. The earlier submitRomeTxSolanaLane, which builds a legacy Solana transaction in the client, is still in the SDK. See Build a dual-lane app and Call EVM from Solana.

Solidity SDK (@rome-protocol/rome-solidity)

For Solidity developers. Provides the precompile interfaces, ERC-20/SPL wrappers, PDA derivation, and CPI utilities. The npm publish is pending; today you consume these from the public rome-solidity repo (git dependency or copied files).

import {ISystemProgram, ICrossProgramInvocation, IHelperProgram, IWithdraw}
    from "@rome-protocol/rome-solidity/contracts/interface.sol";
import {SPL_ERC20} from "@rome-protocol/rome-solidity/contracts/erc20spl/erc20spl.sol";
import {RomeEVMAccount} from "@rome-protocol/rome-solidity/contracts/rome_evm_account.sol";

Rust SDK (rome-sdk)

For teams that run their own services on Rome. A Rust workspace that handles transaction composition, Solana interaction, gas pricing, and block indexing. The Proxy and Hercules are built on it. The source is in rome-protocol/rome-sdk. It sends Solana v1 transactions (4 KB, up to 64 accounts).

Building it. The workspace expects the repositories rome-sdk, rome-evm and mollusk cloned side by side, because it depends on the other two by relative path. That is also why the supported way to use it from another project is a path dependency, not a plain git dependency. You need Rust 1.85 or later and network access for the first build. rome-evm has no default network feature, so any build that compiles it needs exactly one of ci, testnet or mainnet; use ci for local work, for example cargo test -p rome-sdk --features ci. The repository README has the full steps and the feature table.

Licence. The Rust SDK is source-available, not open source: it is all rights reserved and may be used for personal, non-commercial purposes. Commercial use needs written permission from Rome Protocol; the repository's LICENSE says how to ask.

Solidity SDK: What's Included

Precompile Interfaces

Bind an interface to its precompile address:

SPL Token Operations

Use IHelperProgram (0xff…09) for user-PDA-signed SPL primitives:

On the cached track, the equivalent operations live on ISplCached (0xff…05) and IAssociatedSplCached (0xff…06). See interface.sol for all overloads; a contract uses one track consistently.

PDA Derivation

Cross-Program Invocation

ERC-20 over SPL Tokens

Borsh Deserialization

Metaplex Metadata

Rust SDK: Architecture

The Rust SDK is a Cargo workspace. Its core crates:

Crate
Purpose

rome-sdk

Core API: Rome struct, config, the three transaction types (RheaTx, RemusTx, RomulusTx)

rome-evm-client

EVM client for Rome chains, TxBuilder, ResourceFactory, emulator integration

rome-solana

Solana tower, RPC client, transaction batching and tracking

rome-utils

RLP, hex, JSON-RPC, authentication utilities

rome-obs

OpenTelemetry observability (traces, metrics, logs)

rome-meteora

Meteora DAMM v1 and v2 pool readers for gas pricing

rome-meta-hook

Client for the Meta-Hook Router program: Token-2022 transfer-hook configuration, extra account resolution, transfers with compute-budget estimates

rome-jito-bundler

Jito bundle builder for atomic multi-transaction submission

Transaction Types

Resource Pooling

The SDK pools Solana keypairs (payers) and holder account indices for parallel transaction submission:

SDK Roadmap

Built and Working

  • SPL Token wrappers and precompile interfaces

  • Meteora DAMM v1 swaps via CPI

  • Oracle Gateway V1 + V2 (Pyth Pull, Switchboard V3)

  • System Program helpers, Borsh deserialization

  • ERC20SPL Factory + bridge contracts

What's Next

Last updated

Was this helpful?