@ramestta/sdk-ethers
v1.0.3
Published
Ethers.js plugin for @ramestta/sdk - Ramestta Network L3 Blockchain
Maintainers
Readme
@ramestta/sdk-ethers
Ethers.js plugin for @ramestta/sdk - Official SDK for Ramestta Network L3 Blockchain.
Network Architecture
L1: Ethereum (Root Chain)
↓
L2: Polygon (Parent Chain) - Root contracts deployed here
↓
L3: Ramestta (Child Chain) - Application chainInstallation
npm install @ramestta/sdk @ramestta/sdk-ethers ethersUsage
import { POSClient, use } from "@ramestta/sdk";
import { Web3ClientPlugin } from "@ramestta/sdk-ethers";
import { ethers } from "ethers";
// Install the ethers plugin
use(Web3ClientPlugin);
// Create providers
const parentProvider = new ethers.providers.JsonRpcProvider("https://polygon-rpc.com");
const childProvider = new ethers.providers.JsonRpcProvider("https://blockchain.ramestta.com");
// Create wallet/signer
const privateKey = "YOUR_PRIVATE_KEY";
const parentSigner = new ethers.Wallet(privateKey, parentProvider);
const childSigner = new ethers.Wallet(privateKey, childProvider);
// Initialize POS Client
const posClient = new POSClient();
await posClient.init({
network: "mainnet",
version: "v1",
parent: {
provider: parentSigner,
defaultConfig: {
from: parentSigner.address
}
},
child: {
provider: childSigner,
defaultConfig: {
from: childSigner.address
}
}
});
// Now you can use posClient for deposits, withdrawals, etc.Networks
| Network | Chain ID | RPC URL | |---------|----------|---------| | Ramestta Mainnet (L3) | 1370 | https://blockchain.ramestta.com | | Ramestta Testnet (L3) | 1371 | https://testnet.ramestta.com | | Polygon Mainnet (L2) | 137 | https://polygon-rpc.com |
Related Packages
- @ramestta/sdk - Core SDK
- @ramestta/sdk-web3 - Web3.js plugin (coming soon)
Documentation
For full documentation, visit https://docs.ramestta.com
License
MIT
