BTC
Ordinals
BRC-20

Transaction Types

Comprehensive Bitcoin Transaction Support

LaserEyes supports all major Bitcoin transaction types, from standard BTC transfers to Ordinals inscriptions and BRC-20 tokens.

BTC Transfer
Standard transactions
Ordinals
Inscription support
BRC-20
Token operations

Supported Types

BTC Transactions

Standard Bitcoin transactions with support for multiple inputs, outputs, and fee estimation.

P2PKH
P2SH
P2WPKH
P2WSH

Ordinal Inscriptions

Full support for inscribing and transferring Ordinals with various content types.

Text
Image
JSON
HTML

BRC-20 Tokens

Complete BRC-20 token support including minting, transferring, and balance checking.

Deploy
Mint
Transfer

Custom Transactions

Build custom transaction types with our flexible transaction builder API.

Custom Scripts
Multi-sig

Implementation Examples

BTC Transfer

import { useLaserEyes } from '@omnisat/lasereyes-react'

function SendBitcoin() {
  const { sendBitcoin } = useLaserEyes()

  const handleSend = async () => {
    try {
      const txid = await sendBitcoin({
        address: 'bc1q...',
        amount: 0.001, // BTC
        feeRate: 10 // sats/vB
      })
      console.log('Transaction sent:', txid)
    } catch (error) {
      console.error('Failed to send:', error)
    }
  }
}

Ordinal Inscription

import { useLaserEyes } from '@omnisat/lasereyes-react'

function InscribeOrdinal() {
  const { inscribe } = useLaserEyes()

  const handleInscribe = async () => {
    try {
      const txid = await inscribe({
        content: 'Hello, Ordinals!',
        contentType: 'text/plain',
        feeRate: 15
      })
      console.log('Inscription created:', txid)
    } catch (error) {
      console.error('Failed to inscribe:', error)
    }
  }
}

BRC-20 Transfer

import { useLaserEyes } from '@omnisat/lasereyes-react'

function TransferBRC20() {
  const { transferBRC20 } = useLaserEyes()

  const handleTransfer = async () => {
    try {
      const txid = await transferBRC20({
        ticker: 'ORDI',
        amount: '100',
        recipient: 'bc1q...',
        feeRate: 12
      })
      console.log('Transfer initiated:', txid)
    } catch (error) {
      console.error('Failed to transfer:', error)
    }
  }
}

Advanced Features

Custom Transaction Builder

import { useLaserEyes } from '@omnisat/lasereyes-react'

function BuildCustomTx() {
  const { createTransaction } = useLaserEyes()

  const handleCustomTx = async () => {
    const tx = await createTransaction()
      .addInput({
        txid: '1234...',
        vout: 0,
        value: 10000
      })
      .addOutput({
        address: 'bc1q...',
        value: 5000
      })
      .addOutput({
        script: '6a0b48656c6c6f20576f726c64', // OP_RETURN
        value: 0
      })
      .sign()

    const txid = await tx.broadcast()
    console.log('Custom transaction sent:', txid)
  }
}

Best Practices

Fee Estimation

Always use proper fee estimation to ensure transactions are confirmed in a timely manner.

Error Handling

Implement comprehensive error handling for all transaction types.

Transaction Validation

Validate all transaction parameters before sending to prevent errors.

User Confirmation

Always request user confirmation before broadcasting transactions.