API Reference

send(options)

Send a private transaction

Parameters

  • to - Recipient address

  • amount - Amount to send

  • token - Token symbol (default: 'SOL')

Example

await obscura.send({
  to: '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM',
  amount: 1.5,
  token: 'SOL'
});

getBalance()

Get your private balance across all supported tokens

Returns

Object with token symbols as keys and balances as values

Example

deposit(amount, token)

Deposit funds into your private account

Parameters

  • amount - Amount to deposit

  • token - Token symbol (default: 'SOL')

Example

withdraw(amount, token)

Withdraw funds from your private account to a public address

Parameters

  • amount - Amount to withdraw

  • token - Token symbol

  • to - (optional) Recipient address, defaults to connected wallet

Example

getTransactionHistory()

Get your private transaction history

Options

  • limit - Number of transactions (default: 50)

  • offset - Pagination offset

Example

connectWallet()

Connect a Solana wallet to your Obscura instance

Example


Usage Examples

Complete Example: Send Private Payment

Example: Batch Transactions

Last updated