Skip to content

Commit e68ee5a

Browse files
fix(key-wallet-ffi): rustdoc + regenerate FFI_API.md
- Drop intra-doc links to private `FFIManagedCoreAccountInner` variants on `keys_account()` so `cargo doc -D warnings` (and the Documentation CI job) passes; the enum is internal and doesn't need to appear in public rustdoc. - Regenerate `key-wallet-ffi/FFI_API.md` to pick up the updated descriptions on `managed_core_account_get_balance` / `_get_utxo_count` (the verify-ffi pre-commit hook). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f48b1db commit e68ee5a

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

key-wallet-ffi/FFI_API.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,14 @@ Functions: 108
233233
| `managed_core_account_free_transactions` | Free transactions array returned by managed_core_account_get_transactions ... | managed_account |
234234
| `managed_core_account_get_account_type` | Get the account type of a managed account # Safety - `account` must be a... | managed_account |
235235
| `managed_core_account_get_address_pool` | Get an address pool from a managed account by type This function returns... | managed_account |
236-
| `managed_core_account_get_balance` | Get the balance of a managed account # Safety - `account` must be a valid... | managed_account |
236+
| `managed_core_account_get_balance` | Get the balance of a managed account | managed_account |
237237
| `managed_core_account_get_external_address_pool` | Get the external address pool from a managed account This function returns... | managed_account |
238238
| `managed_core_account_get_index` | Get the account index from a managed account Returns the primary account... | managed_account |
239239
| `managed_core_account_get_internal_address_pool` | Get the internal address pool from a managed account This function returns... | managed_account |
240240
| `managed_core_account_get_network` | Get the network of a managed account # Safety - `account` must be a valid... | managed_account |
241241
| `managed_core_account_get_transaction_count` | Get the number of transactions in a managed account Only available with the... | managed_account |
242242
| `managed_core_account_get_transactions` | Get all transactions from a managed account Returns an array of... | managed_account |
243-
| `managed_core_account_get_utxo_count` | Get the number of UTXOs in a managed account # Safety - `account` must be... | managed_account |
243+
| `managed_core_account_get_utxo_count` | Get the number of UTXOs in a managed account | managed_account |
244244
| `managed_platform_account_free` | Free a managed platform account handle # Safety - `account` must be a... | managed_account |
245245
| `managed_platform_account_get_account_index` | Get the account index of a managed platform account # Safety - `account`... | managed_account |
246246
| `managed_platform_account_get_address_pool` | Get the address pool from a managed platform account Platform accounts only... | managed_account |
@@ -3095,7 +3095,7 @@ managed_core_account_get_balance(account: *const FFIManagedCoreAccount, balance_
30953095
```
30963096

30973097
**Description:**
3098-
Get the balance of a managed account # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance - `balance_out` must be a valid pointer to an FFIBalance structure
3098+
Get the balance of a managed account. Returns `false` (and leaves `balance_out` untouched) when the handle wraps a keys-only account (identity / asset-lock / provider) — those don't track per-account balances. Use [`managed_core_account_get_account_type`] to disambiguate, or only call this for funds-bearing accounts. # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance - `balance_out` must be a valid pointer to an FFIBalance structure
30993099

31003100
**Safety:**
31013101
- `account` must be a valid pointer to an FFIManagedCoreAccount instance - `balance_out` must be a valid pointer to an FFIBalance structure
@@ -3207,7 +3207,7 @@ managed_core_account_get_utxo_count(account: *const FFIManagedCoreAccount,) -> c
32073207
```
32083208

32093209
**Description:**
3210-
Get the number of UTXOs in a managed account # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance
3210+
Get the number of UTXOs in a managed account. Always returns 0 for keys-only accounts (identity / asset-lock / provider), which do not track per-account UTXOs. # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance
32113211

32123212
**Safety:**
32133213
- `account` must be a valid pointer to an FFIManagedCoreAccount instance

key-wallet-ffi/src/managed_account.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ impl FFIManagedCoreAccount {
7878
}
7979

8080
/// Returns the inner [`ManagedCoreKeysAccount`] regardless of variant —
81-
/// for [`FFIManagedCoreAccountInner::Funds`], this returns the
82-
/// composed-inner keys account; for [`FFIManagedCoreAccountInner::Keys`],
83-
/// the account itself. Use this when the desired data lives on the
84-
/// shared keys-account state (address pools, transactions, network,
85-
/// monitor revision).
81+
/// for the funds-bearing variant this returns the composed-inner keys
82+
/// account; for the keys-only variant it returns the account itself.
83+
/// Use this when the desired data lives on the shared keys-account state
84+
/// (address pools, transactions, network, monitor revision).
8685
pub fn keys_account(&self) -> &ManagedCoreKeysAccount {
8786
match &self.inner {
8887
FFIManagedCoreAccountInner::Funds(a) => a.keys(),

0 commit comments

Comments
 (0)