RISE Logo-Light

API Methods

Core Shred API methods for realtime transaction processing

API Methods

Core methods that power RISE's realtime capabilities.

For standard Ethereum methods, visit the Ethereum JSON-RPC Documentation.

eth_sendRawTransactionSync

Sends a signed transaction and waits for instant confirmation, returning the complete transaction receipt.

This method is based on EIP-7966, which introduces synchronous transaction confirmation to Ethereum. RISE implements this standard to provide instant transaction finality.

Parameters

  1. data - Signed transaction data (hex string)

Returns

Complete TransactionReceipt object with all standard fields:

{
  transactionHash: string,
  blockNumber: string,
  blockHash: string,
  transactionIndex: string,
  from: string,
  to: string | null,
  gasUsed: string,
  cumulativeGasUsed: string,
  status: string, // "0x1" for success, "0x0" for failure
  logs: Log[],
  logsBloom: string,
  contractAddress: string | null
}

Example

const receipt = await client.request({
  method: 'eth_sendRawTransactionSync',
  params: ['0x...signed_transaction']
})

// Transaction is already confirmed!
console.log('Transaction hash:', receipt.transactionHash)
console.log('Status:', receipt.status === '0x1' ? 'Success' : 'Failed')

Using with viem

import { createWalletClient, http } from 'viem'
import { shredActions } from 'shreds/viem'
import { riseTestnet } from 'viem/chains'

const client = createWalletClient({
  chain: riseTestnet,
  transport: http()
}).extend(shredActions)

// Send transaction with instant preconfirmation receipts
const receipt = await client.sendTransactionSync({
  to: '0x...',
  value: parseEther('1.0')
})

console.log('Transaction confirmed:', receipt)

Key Benefits

  • Instant confirmation: No waiting for block inclusion
  • Complete receipt: All transaction details immediately available
  • Synchronous flow: Simplifies application logic
  • Error handling: Failed transactions return immediately with status 0x0

Usage Patterns

Synchronous Transaction Flow

import { sendTransactionSync } from 'shreds/viem'

// Traditional async pattern (not needed with RISE)
// const hash = await client.sendTransaction(tx)
// const receipt = await client.waitForTransactionReceipt({ hash })

// RISE synchronous pattern
const receipt = await sendTransactionSync(client, tx)
// Transaction already confirmed!

Performance Characteristics

RTT (Round-Trip Time) Targets

  • Shred Confirmation: 3-5ms (p50), 10ms (p99)
  • Event Delivery: < 10ms from transaction execution
  • State Updates: Immediate upon shred confirmation

Throughput

  • Transactions per Shred: 1-100
  • Shreds per Second: 1000+
  • Total TPS: 10,000+

Best Practices

1. Use Synchronous Methods for Critical Operations

// Preferred for payments and time-sensitive operations
const receipt = await client.sendTransactionSync(tx)

2. Handle Errors Immediately

try {
  const receipt = await client.sendTransactionSync(tx)
} catch (error) {
  // Handle failure immediately - no need to wait
  console.error('Transaction failed:', error)
}

Next Steps