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 infrastructure operators (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.2.1
import { submitRomeTx } from '@rome-protocol/sdk';
// Submit any Rome EVM write through the correct write path (handles gas/fee encoding).

The public reference apps โ€” rome-dex and cardo โ€” consume this SDK.

Both lanes, one SDK. submitRomeTx is the EVM lane (MetaMask). For the Solana lane โ€” a Phantom/Solana wallet driving your EVM app โ€” submitRomeTxSolanaLane mirrors it: the user signs a Solana transaction and Rome runs it as an EVM transaction from their derived identity, with no EVM key. 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 auto-provisioned on first use. 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 infrastructure operators. A Rust workspace that handles transaction composition, Solana interaction, gas pricing, and block indexing. Used by the Proxy and Hercules.

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, transaction types (RheaTx, RemusTx, RomulusTx)

rome-evm-client

EVM rollup client, 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 DEX AMM pool adapters for gas pricing

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?