> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tài liệu tham khảo API của Rust SDK

> Mọi phương thức Solana API trong Helius Rust SDK theo danh mục — DAS API, RPC V2, Giao dịch thông minh, Sender, Giao dịch nâng cao, webhook và staking.

Tài liệu tham khảo đầy đủ về các phương thức của [Helius Rust SDK](https://github.com/helius-labs/helius-rust-sdk). Để biết cách cài đặt và bắt đầu, hãy xem [tổng quan về Rust SDK](/docs/vi/agents/rust-sdk).

## DAS API (Tiêu chuẩn tài sản kỹ thuật số)

Truy vấn NFT, NFT nén, token có thể thay thế và các tài sản kỹ thuật số khác bằng một giao diện hợp nhất.

```rust theme={"system"}
helius.rpc().get_asset(GetAsset { id, .. })                              // Single asset by mint
helius.rpc().get_asset_batch(GetAssetBatch { ids, .. })                  // Multiple assets
helius.rpc().get_assets_by_owner(GetAssetsByOwner { owner_address, .. }) // Assets by wallet
helius.rpc().get_assets_by_authority(GetAssetsByAuthority { .. })        // Assets by update authority
helius.rpc().get_assets_by_creator(GetAssetsByCreator { .. })            // Assets by creator
helius.rpc().get_assets_by_group(GetAssetsByGroup { .. })                // Assets by collection
helius.rpc().search_assets(SearchAssets { .. })                          // Flexible search
helius.rpc().get_asset_proof(GetAssetProof { id })                       // Merkle proof (cNFTs)
helius.rpc().get_asset_proof_batch(GetAssetProofBatch { ids })           // Batch Merkle proofs
helius.rpc().get_token_accounts(GetTokenAccounts { .. })                 // Token accounts
helius.rpc().get_nft_editions(GetNftEditions { .. })                     // Print editions
helius.rpc().get_signatures_for_asset(GetAssetSignatures { id, .. })     // Transaction history for asset
```

## Các phương thức RPC V2

Các phương thức RPC nâng cao với chức năng phân trang, lọc phía máy chủ và các biến thể tự động phân trang.

```rust theme={"system"}
helius.rpc().get_transactions_for_address(address, options)              // Transaction history (pagination_token)
helius.rpc().get_program_accounts_v2(program_id, config)                 // Program accounts (pagination_key)
helius.rpc().get_all_program_accounts(program_id, config)                // Auto-paginating variant
helius.rpc().get_token_accounts_by_owner_v2(owner, filter, config)       // Token accounts v2 (pagination_key)
helius.rpc().get_all_token_accounts_by_owner(owner, filter, config)      // Auto-paginating variant
helius.rpc().get_priority_fee_estimate(request)                          // Fee estimates
```

## Giao dịch thông minh và Helius Sender

Tạo và gửi các giao dịch được tối ưu hóa với khả năng tự động ước tính đơn vị tính toán, phí ưu tiên và định tuyến đa khu vực.

```rust theme={"system"}
helius.send_smart_transaction(config)                                    // Auto-optimized send
helius.create_smart_transaction(config)                                  // Build without sending
helius.create_smart_transaction_with_seeds(config)                       // Thread-safe (seed-based)
helius.send_smart_transaction_with_seeds(config, send_opts, timeout)     // Thread-safe send
helius.send_smart_transaction_with_sender(config, sender_opts)           // Build + send via Sender
helius.create_smart_transaction_with_tip_for_sender(config, tip)         // Build with tip
helius.send_and_confirm_via_sender(tx, last_block, sender_opts)          // Send pre-built tx via Sender
helius.determine_tip_lamports(swqos_only)                                // Calculate tip amount
helius.fetch_tip_floor_75th()                                            // Get Jito tip floor
helius.warm_sender_connection(region)                                    // Warm connection via /ping
helius.get_compute_units(instructions, payer, lookup_tables, signers)    // Simulate CU usage
helius.poll_transaction_confirmation(signature)                          // Poll confirmation status
```

## Giao dịch nâng cao

Phân tích các giao dịch thô thành định dạng dễ đọc, có nhãn.

```rust theme={"system"}
helius.parse_transactions(ParseTransactionsRequest { transactions })     // Parse by signatures
helius.parsed_transaction_history(ParsedTransactionHistoryRequest { .. })// Parse by address
```

## Webhook

Tạo và quản lý thông báo HTTP POST theo thời gian thực cho các sự kiện trên chuỗi.

```rust theme={"system"}
helius.create_webhook(CreateWebhookRequest { .. })                       // Create webhook
helius.get_webhook_by_id(webhook_id)                                     // Get webhook config
helius.get_all_webhooks()                                                // List all webhooks
helius.edit_webhook(EditWebhookRequest { .. })                           // Update webhook
helius.delete_webhook(webhook_id)                                        // Delete webhook
helius.append_addresses_to_webhook(webhook_id, &addresses)               // Add monitored addresses
helius.remove_addresses_from_webhook(webhook_id, &addresses)             // Remove monitored addresses
```

## API Ví

Truy vấn số dư ví, lịch sử giao dịch, các lần chuyển và thông tin danh tính thông qua các điểm cuối REST.

```rust theme={"system"}
helius.get_wallet_identity(wallet)                                       // Identity info
helius.get_batch_wallet_identity(&addresses)                             // Batch identity (max 100)
helius.get_wallet_balances(wallet, page, limit, zero_bal, native, nfts)  // Token balances
helius.get_wallet_history(wallet, limit, before, after, tx_type, token_accts)  // Transaction history
helius.get_wallet_transfers(wallet, limit, cursor)                       // Transfer history
helius.get_wallet_funding_source(wallet)                                 // Funding source
```

## Staking

Stake SOL vào trình xác thực Helius và quản lý các tài khoản stake.

```rust theme={"system"}
helius.create_stake_transaction(owner, amount_sol)                       // Create + delegate stake
helius.create_unstake_transaction(owner, stake_account)                  // Deactivate stake
helius.create_withdraw_transaction(owner, stake_acct, dest, lamports)    // Withdraw
helius.get_stake_instructions(owner, amount_sol)                         // Get raw instructions + keypair
helius.get_unstake_instruction(owner, stake_account)                     // Deactivate instruction
helius.get_withdraw_instruction(owner, stake_acct, dest, lamports)       // Withdraw instruction
helius.get_withdrawable_amount(stake_account, include_rent_exempt)       // Check withdrawable balance
helius.get_stake_accounts(wallet)                                        // List stake accounts
```

## Máy khách Solana nhúng

Truy cập các máy khách Solana RPC nền tảng để thực hiện các thao tác tiêu chuẩn.

```rust theme={"system"}
helius.connection()                  // Sync SolanaRpcClient (Arc)
helius.async_connection()?           // Async SolanaRpcClient (requires new_async)
helius.ws()                          // Enhanced WebSocket (Option)

// Standard Solana RPC via embedded client
let balance = helius.connection().get_balance(&pubkey)?;
let async_client = helius.async_connection()?;
let balance = async_client.get_balance(&pubkey).await?;
```
