Para supports a bring-your-own RPC model. This makes it easy to use Para with any network (at any stage), from internal
devnets to any major mainnet network.
Prerequisites
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration. Before integrating Para with your application, ensure you have:
- Completed Para authentication setup in your application (see one of our Setup Guides)
- A valid Para API key
- An RPC endpoint for your desired network
Need an API key? Visit the Developer Portal to create API keys, manage billing, teams, and more.
For Ethers, just provide the RPC URL for your desired chain
import { ParaEthersSigner } from "@getpara/ethers-v6-integration";
import { ethers } from "ethers";
import Para from "@getpara/web-sdk";
// Initialize Para
const para = new Para(Environment.BETA, YOUR_API_KEY);
// Set up the provider
const provider = new ethers.JsonRpcProvider(YOUR_RPC_URL);
// Create the Para Ethers Signer
const ethersSigner = new ParaEthersSigner(para, provider);
To configure a custom chain, just add a new Chain
type as follows
(Reference List)
// source: https://wagmi.sh/core/api/chains
import { defineChain } from "viem";
export const mainnet = defineChain({
id: 1,
name: "Ethereum",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://cloudflare-eth.com"] },
},
blockExplorers: {
default: { name: "Etherscan", url: "https://etherscan.io" },
},
contracts: {
ensRegistry: {
address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
},
ensUniversalResolver: {
address: "0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da",
blockCreated: 16773775,
},
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
blockCreated: 14353601,
},
},
});
// Create the Para Viem Client
const paraViemSigner = createParaViemClient(para, {
account: viemParaAccount,
chain: mainnet,
transport: http("https://cloudflare-eth.com"),
});
This chain configuration can now be passed to a viem provider
(See Docs)
If youβre also already using wagmi, you can easily extend
@wagmi/chains
(Reference Docs) and automatically use Para
signers directly with your desired set of supported chains
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { paraConnector } from "@getpara/wagmi-v2-integration";
import { createConfig, WagmiProvider, type CreateConfigParameters } from "wagmi";
import { http } from "wagmi";
import { sepolia, mainnet } from "wagmi/chains";
import { para } from "./para"; // Your Para client initialization
// Create Para connector
const chains = [sepolia, mainnet];
// see wagmi integration guide for full config options
const connector = paraConnector({
para: para,
chains, // Add your supported chains
appName: "Your App Name",
options: {},
nameOverride: "Para",
idOverride: "para",
});
// Configure Wagmi
const config: CreateConfigParameters = {
chains: chains,
connectors: [connector],
transports: {
[(sepolia.id, mainnet.id)]: http(),
},
};
const wagmiConfig = createConfig(config);
const queryClient = new QueryClient();
Solana-Web3.js
Instantiate the Solana-Web3,js signer with your networkβs RPC URL of choice
import { ParaSolanaWeb3Signer } from "@getpara/solana-web3.js-v1-integration";
import { Connection, clusterApiUrl } from "@solana/web3.js";
import { para } from "./para"; // Your Para client initialization
// Set up SVM connection
const solanaConnection = new Connection(YOUR_RPC_URL);
// Create the Para Solana Signer
const solanaSigner = new ParaSolanaWeb3Signer(para, solanaConnection);
Initialize the signing client with your RPC URL of choice
import { ParaProtoSigner } from "@getpara/cosmjs-v0-integration";
import { SigningStargateClient } from "@cosmjs/stargate";
// Create the Para Proto Signer
// 'prefix' is optional and used for non-cosmos addresses (e.g., 'celestia' for celestia1... addresses)
const protoSigner = new ParaProtoSigner(para, "cosmos");
// Connect to the Cosmos network
const rpcUrl = YOUR_RPC_URL; // Replace with your preferred RPC endpoint
const client = await SigningStargateClient.connectWithSigner(rpcUrl, protoSigner);