Q Safe Wallet
  • Getting Started
    • Overview
    • FAQs
  • Technical Details
    • Account Creation in Wallet
    • Quranium Chain Transaction Signing
    • ML-KEM Encryption for Backups
    • Backup and Recovery
  • All Features
    • Onboarding
    • Activity Section
    • Add Account
    • Multichain
    • Sending Transaction
    • Deposit Funds
    • Swapping
  • MULTICHAIN COMPATIBILITY
    • Quranium
    • Bitcoin & Derivatives
    • EVM
    • Solana
    • Other chains
  • BEST PRACTICES
    • Secure Your Backup and Mnemonic
    • Validate Transaction Details Before Signing
    • Monitor Account Activity Across Chains
    • Safe Interaction with DApps
Powered by GitBook
On this page
  1. Technical Details

Quranium Chain Transaction Signing

  • How It Works:

  1. Transaction Creation:

  • Users input recipient address, amount, and gas fees.

  • The wallet converts values to hexadecimal and fetches dynamic gas prices from the Quranium node.

  1. SLH-DSA Signing:

  • A 49,856-byte signature is generated using the SLH-DSA algorithm.

  • The user’s public key is appended to the signature for Quranium-specific verification.

  1. Transaction Structure:

  • Quranium uses a RLP encoding with 7 fields (nonce, gas price, gas limit, to-address, value, data, and signature+publicKey).

const finalTxFields = [
  hexTxData.nonce,      // Nonce (transaction count)
  hexTxData.gasPrice,   // Gas price in Wei
  hexTxData.gas,        // Gas limit
  hexTxData.to,         // Recipient address
  hexTxData.value,      // Amount in Wei
  hexTxData.data,       // Transaction data (empty for transfers)
  sig                   // Signature + Public Key
];

const rawTx = '0x' + rlp.encode(finalTxFields).toString('hex');

This structure ensures compatibility with Quranium nodes.

  1. Broadcasting:

  • The signed transaction is sent to the Quranium network for processing.

const response = await axios.post('http://20.19.88.188:8545', {
  jsonrpc: '2.0',
  method: 'eth_sendRawTransaction',
  params: [rawTx], // Raw signed transaction
  id: 1,
});
  • Code Flow Summary

  1. User Input → Transaction Data :

    • addressTo, amount, gasFee → hexTxData.

  2. Signing :

    • hexTxData → RLP encode + Keccak-256 → msgHash → SLH-DSA signature.

  3. Final Transaction :

    • signature + publicKey → RLP encode → rawTx.

  4. Broadcast :

    • eth_sendRawTransaction → Quranium node.

PreviousAccount Creation in WalletNextML-KEM Encryption for Backups

Last updated 7 days ago