Sending Intra-Rayls Sovereign Transactions
Overview
In the Rayls ecosystem there are two main types of transaction:
- Internal transactions within a single Rayls Sovereign ledger.
- Cross-chain transactions between institutions, carried via the Private Network Hub or Public Chain.
This page covers internal transactions within a single Rayls Sovereign ledger, and walks through sending transactions using the available methods, including the Rayls Custody Light APIs.
Prerequisites
- Set up a wallet or custody account in the Rayls Sovereign ledger.
- Have access to the Rayls Sovereign ledger's RPC endpoint or the Rayls Custody Light APIs.
- Have a sufficient token balance in your wallet for the transaction.
Executing Internal Transactions in the Sovereign ledger
1. Direct Contact to the Sovereign ledger Transaction Execution
Rayls is fully EVM-compatible, so it supports Ethereum-style transaction execution, which means developers familiar with Ethereum can use tools such as Ethers.js and Web3.js.
Example transaction using Ethers.js:
const { ethers } = require('ethers');
const provider = new ethers.JsonRpcProvider('<Privacy-Ledger-Endpoint>');
const privateKey = '<Your-Private-Key>';
const wallet = new ethers.Wallet(privateKey, provider);
async function sendTransaction() {
const tx = {
to: '<Recipient-Address>',
value: ethers.parseEther('1.0')
};
const transaction = await wallet.sendTransaction(tx);
await transaction.wait();
console.log('Transaction successful:', transaction);
}
sendTransaction();Updated 5 days ago
Did this page help you?
