OSIRIS Documentation
Welcome to the OSIRIS developer documentation. OSIRIS is a next-generation Layer-1 blockchain featuring native oracles, account abstraction, and L2 scaling.
Quick Start
Get started with OSIRIS in minutes:
1. Connect to the Network
const API_URL = 'https://osirisnetwork.live/api';
// Get blockchain status
const status = await fetch(`${API_URL}/status`).then(r => r.json());
console.log(status);
2. Check a Balance
const address = '0x...';
const balance = await fetch(`${API_URL}/wallet/balance/${address}`)
.then(r => r.json());
console.log(`Balance: ${balance.balance} OSI`);
Architecture
OSIRIS is built with a modular architecture:
| Layer | Components |
|---|---|
| Cryptographic | Ed25519, SHA-256, Merkle Trees |
| Persistence | LevelDB Storage Engine |
| Network | P2P WebSocket, Gossip Protocol |
| Consensus | Proof of Stake, Validator Selection |
| Core | Blockchain, Transaction Pool, VM |
| Scaling | Parallel Execution, State Channels, Rollups |
| API | REST, WebSocket, JSON-RPC |
API: Blockchain
/api/status
Get current blockchain status including height, latest block, and network info.
/api/blocks/latest
Get the most recent block.
/api/blocks/:height
Get a block by height.
API: Transactions
/api/transactions
Submit a signed transaction.
{
"from": "0x...",
"to": "0x...",
"amount": 100,
"nonce": 0,
"signature": "..."
}
/api/transactions/:hash
Get transaction by hash.
API: Wallet
/api/wallet/balance/:address
Get OSI balance for an address.
/api/ecosystem/portfolio/:address
Get all token balances for an address.
Native Oracles
OSIRIS includes built-in price oracles with validator attestation:
/api/ecosystem/oracle/prices
Get all current prices.
/api/ecosystem/oracle/price/:asset
Get price for a specific asset (e.g., OSI-USD).
Smart Contracts
OSIRIS supports JavaScript-based smart contracts:
// Example: Simple Token Contract
const token = {
balances: {},
transfer(from, to, amount) {
if (this.balances[from] < amount) throw new Error('Insufficient');
this.balances[from] -= amount;
this.balances[to] = (this.balances[to] || 0) + amount;
return true;
}
};
Need Help?
Join our community or check the whitepaper for more details.