Build / Integration Guide / Complete API Reference
10. Complete API Reference
📋 Complete Reference: All gRPC methods available for Tari wallet and base node integration with pseudocode and grpcurl examples.
💼 Wallet API Methods
Core Methods
// Core wallet operations provide basic wallet information and state
FUNCTION getWalletVersion():
// Simple version check - no parameters needed
RETURN walletClient.GetVersion()
FUNCTION getWalletState():
// Returns comprehensive wallet status including:
// - Blockchain sync height
// - Balance information
// - Network connectivity status
RETURN walletClient.GetState()
FUNCTION checkWalletConnectivity():
// Quick connectivity check without full state
RETURN walletClient.CheckConnectivity()
FUNCTION getWalletIdentity():
// Returns wallet's public key and addresses
RETURN walletClient.Identify()
FUNCTION getWalletAddresses():
// Get basic address formats (binary)
RETURN walletClient.GetAddress()
FUNCTION getCompleteAddresses():
// Get all address formats (binary, base58, emoji)
RETURN walletClient.GetCompleteAddress()
FUNCTION generateAddressWithPaymentId(paymentId):
// Generate address tied to specific payment ID
paymentIdBytes = convertToBytes(paymentId)
RETURN walletClient.GetPaymentIdAddress(paymentIdBytes)
Transaction Methods
// Transaction operations for sending, tracking, and querying payments
FUNCTION transfer(recipients):
// Send one or more one-sided payments in a single call
RETURN walletClient.Transfer({ recipients: recipients })
FUNCTION getCompletedTransactions():
// List all completed (mined) transactions
RETURN walletClient.GetCompletedTransactions()
FUNCTION getPendingTransactions():
// List transactions awaiting confirmation
RETURN walletClient.GetPendingTransactions()
FUNCTION getTransactionInfo(transactionIds):
// Get detailed status for specific transaction IDs
RETURN walletClient.GetTransactionInfo({ transaction_ids: transactionIds })
FUNCTION cancelTransaction(transactionId):
// Cancel a pending (not yet mined) transaction
RETURN walletClient.CancelTransaction({ tx_id: transactionId })
FUNCTION streamTransactionEvents():
// Real-time stream of transaction lifecycle events (preferred over polling)
RETURN walletClient.StreamTransactionEvents()
Advanced Methods
// Advanced wallet operations for coin management and reporting
FUNCTION coinSplit(amountPerSplit, splitCount):
// Split UTXOs into smaller denominations, useful for liquidity management
RETURN walletClient.CoinSplit({
amount_per_split: amountPerSplit,
split_count: splitCount
})
FUNCTION getBalance():
// Get available, pending incoming, and pending outgoing balances
RETURN walletClient.GetBalance()
FUNCTION importUtxo(utxo):
// Import a previously exported UTXO (used in cold wallet workflows)
RETURN walletClient.ImportUtxo(utxo)
FUNCTION setBaseNode(nodePublicKey, nodeAddress):
// Switch which base node the wallet syncs against
RETURN walletClient.SetBaseNode({
public_key: nodePublicKey,
address: nodeAddress
})
FUNCTION exportViewKey():
// Export a view-only key for watch-only wallet setups
RETURN walletClient.ExportViewKey()
⛓️ Base Node API Methods
Node Information
// Base node information provides blockchain state and node status
FUNCTION getNodeVersion():
// Get base node software version
RETURN baseNodeClient.GetVersion()
FUNCTION getNodeIdentity():
// Get node's public key, addresses, and network identity
RETURN baseNodeClient.Identify()
FUNCTION getTipInfo():
// Get current blockchain tip information including:
// - Best block height and hash
// - Accumulated difficulty
// - Sync status
RETURN baseNodeClient.GetTipInfo()
FUNCTION getSyncInfo():
// Get detailed synchronization status
RETURN baseNodeClient.GetSyncInfo()
FUNCTION getSyncProgress():
// Get sync progress with state information
RETURN baseNodeClient.GetSyncProgress()
FUNCTION getConsensusConstants(blockHeight):
// Get network consensus rules for specific block height
request = {block_height: blockHeight}
RETURN baseNodeClient.GetConstants(request)
FUNCTION checkForUpdates():
// Check if newer software version is available
RETURN baseNodeClient.CheckForUpdates()
FUNCTION getNetworkState():
// Get comprehensive network state including peers and difficulty
RETURN baseNodeClient.GetNetworkState()
Blockchain Data
// Blockchain query operations for blocks and headers
FUNCTION getBlockByHeight(height):
// Fetch a full block at a specific height
RETURN baseNodeClient.GetBlocks({ heights: [height] })
FUNCTION getHeaderByHeight(height):
// Fetch just the header (faster than a full block)
RETURN baseNodeClient.GetHeaderByHeight({ height: height })
FUNCTION searchUtxos(commitments):
// Search for specific UTXOs by commitment
RETURN baseNodeClient.SearchUtxos({ commitments: commitments })
FUNCTION getMempoolTransactions():
// List transactions currently in the mempool, awaiting mining
RETURN baseNodeClient.GetMempoolTransactions()
FUNCTION getBlockTemplate():
// Get a block template for mining (used by mining pools/miners)
RETURN baseNodeClient.GetNewBlockTemplate()
Network Methods
// Peer-to-peer network operations
FUNCTION listConnectedPeers():
// List currently connected peer nodes
RETURN baseNodeClient.ListConnectedPeers()
FUNCTION addPeer(peerAddress, publicKey):
// Manually add a trusted peer
RETURN baseNodeClient.AddPeer({
address: peerAddress,
public_key: publicKey
})
FUNCTION banPeer(publicKey, durationSeconds):
// Ban a misbehaving peer for a period of time
RETURN baseNodeClient.BanPeer({
public_key: publicKey,
duration: durationSeconds
})
FUNCTION getNetworkDifficulty():
// Get current network mining difficulty
RETURN baseNodeClient.GetNetworkDifficulty()
🎉 Congratulations!
You’ve completed the comprehensive Tari exchange integration guide with pseudocode explanations and grpcurl testing examples. You now have all the tools and knowledge needed to successfully integrate Minotari (XTM) into your cryptocurrency exchange with a deep understanding of each operation.
📞 Support and Resources
- Documentation: https://rfc.tari.com
- GitHub Repository: https://github.com/tari-project/tari
- Discord Community: https://discord.gg/tari
- Downloads: tari.com/wallets
- grpcurl Documentation: https://github.com/fullstorydev/grpcurl
💡 Next Steps
- Test all pseudocode logic before implementing
- Use grpcurl examples to validate your gRPC setup
- Test the integration thoroughly on testnet
- Implement comprehensive monitoring and alerting
- Set up proper backup and disaster recovery procedures
- Conduct security audits before going live
- Join the Tari community for ongoing support