@ramestta/sdk-web3
v1.0.0
Published
Web3.js plugin for @ramestta/sdk - Official SDK for Ramestta Network L3 Blockchain
Maintainers
Readme
@ramestta/sdk-web3
Web3.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-web3 web3Usage
import { POSClient, use } from "@ramestta/sdk";
import { Web3ClientPlugin } from "@ramestta/sdk-web3";
import Web3 from "web3";
// Install the web3 plugin
use(Web3ClientPlugin);
// Create providers
const parentProvider = new Web3.providers.HttpProvider("https://polygon-rpc.com");
const childProvider = new Web3.providers.HttpProvider("https://blockchain.ramestta.com");
// Initialize POS Client
const posClient = new POSClient();
await posClient.init({
network: "mainnet",
version: "v1",
parent: {
provider: parentProvider,
defaultConfig: {
from: userAddress
}
},
child: {
provider: childProvider,
defaultConfig: {
from: userAddress
}
}
});
// 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-ethers - Ethers.js plugin
Documentation
For full documentation, visit https://docs.ramestta.com
License
MIT
