NFT / Marketplace·Ethereum · Polygon · Base · Arbitrum · Optimism · Zora · Solana · Tezos · Flow · Immutable
Rarible Protocol
Open-source multichain NFT marketplace SDK: list, buy, bid, mint, and transfer NFTs across EVM, Solana, Tezos, Flow, and others through a unified API.
- 01white-label NFT marketplaces
- 02cross-chain NFT trading
- 03NFT bid/ask order books
- 04multi-chain mint flows
- 05aggregated marketplace data
- pnpm add @rarible/sdk @rarible/types
| Variable | Scope | Description |
|---|---|---|
| RARIBLE_API_KEY | Server | Rarible API key from rarible.org for higher rate limits and SDK auth. |
Use the Rarible Protocol SDK for cross-chain NFT marketplace flows. Construct `const sdk = createRaribleSdk(walletClient, 'prod', { apiKey: process.env.RARIBLE_API_KEY! })` after the user connects via wagmi. Sell with `const action = await sdk.order.sell.prepare({ itemId: toItemId('ETHEREUM:0x...:tokenId') }); await action.submit({ amount: 1, price: '0.1', currency: { '@type': 'ETH' } })`. Buy with `sdk.order.buy.prepare({ orderId })` then `action.submit({ amount: 1 })`. Mint with `sdk.nft.mint.prepare({ collectionId })`. Read aggregated data via the API at `https://api.rarible.org/v0.1`.
- ⚑Rarible Protocol enforces creator royalties via on-chain order matching — but only for orders matched through Rarible's own exchange contract; cross-aggregated orders (e.g. matched on OpenSea Seaport) bypass it. Don't promise artists royalty enforcement on aggregated venues.
- ⚑Chain coverage in the SDK is broader than the marketplace UI — calling `sdk.order.sell` on Tezos/Flow works but you may have no taker liquidity; check `sdk.balances` and recent volume before listing.
- ⚑Item IDs are scoped per-blockchain with the format `ETHEREUM:address:tokenId` — passing a raw `address:tokenId` silently defaults to Ethereum and can resolve the wrong token on cross-chain dApps.
- ⚑Mint config quirks: `lazyMint` only works on Rarible's collection contracts (RaribleUserToken / RaribleUserTokenERC1155). Custom contracts require an on-chain mint and the SDK call falls through to a plain `mint(to, tokenId, uri)` ABI call which may revert on non-Rarible interfaces.
- ⚑Metadata returned by the API is normalized + cached on Rarible's gateway, not the original `tokenURI` — if you store `meta.image` directly you're persisting a proxy URL; resolve to the IPFS CID via `meta.contents.url[0]` and re-pin for permanence.
- ⚑Order signatures use EIP-712 with chain-specific domains — signing on Polygon and submitting against Base will fail with `InvalidSignature`; always re-sign per chain when the user switches networks.
- ⚑API rate limits without a key are aggressive (~10 RPS); always pass `RARIBLE_API_KEY` server-side or burst-heavy reads will start failing with 429s in production.