API Reference
Complete API reference for the Privacy Boost Android SDK.Generated Documentation
Full API documentation can be generated usingcargo doc:
PrivacyBoostSdk
Main SDK class for Android.Constructor
config- SDK configuration
Properties
Connection Methods
connect
wallet- Implementation ofWalletDelegateinterface
ConnectResult with wallet and privacy addresses
Throws:
SDKError.ChainMismatchif wallet is on wrong networkSDKError.WalletErrorif signing fails
disconnect
Authentication Methods
login
LoginResult with privacy address and MPK
Throws:
SDKError.NotConnectedif wallet not connectedSDKError.NetworkErrorif backend unreachable
logout
State Accessors
Balance Methods
getBalance
tokenAddress- ERC-20 token contract address
TokenBalance with shielded and wallet amounts
getAllBalances
Vault Operations
deposit
tokenAddress- Token contract addressamount- Amount in wei (as string)
DepositResult with transaction hash
withdraw
tokenAddress- Token contract addressamount- Amount in wei (as string)recipient- Recipient Ethereum address
WithdrawResult with transaction hash
send
tokenAddress- Token contract addressamount- Amount in wei (as string)recipientPrivacyAddress- Recipient’s 194-char privacy address
TransferResult with transaction hash
Transaction History
txType- Filter by type: “deposit”, “withdraw”, “transfer”tokenAddress- Filter by tokenlimit- Maximum results
Session Persistence
exportSession
ExportedSession or null if not authenticated
importSession
true if session is valid and imported
Utilities
Types
SdkConfig
ConnectResult
LoginResult
TokenBalance
DepositResult
WithdrawResult
TransferResult
Transaction
ExportedSession
WalletDelegate Interface
SDKError
See Also
- Getting Started - Quick start guide
- WalletDelegate Guide - Wallet integration
- Keystore Guide - Session persistence