Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions key-wallet-ffi/FFI_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document provides a comprehensive reference for all FFI (Foreign Function I

**Auto-generated**: This documentation is automatically generated from the source code. Do not edit manually.

**Total Functions**: 260
**Total Functions**: 261

## Table of Contents

Expand Down Expand Up @@ -140,7 +140,7 @@ Functions: 63

### Account Management

Functions: 108
Functions: 109

| Function | Description | Module |
|----------|-------------|--------|
Expand Down Expand Up @@ -231,14 +231,15 @@ Functions: 108
| `managed_account_collection_summary_data` | Get structured account collection summary data for managed collection ... | managed_account_collection |
| `managed_account_collection_summary_free` | Free a managed account collection summary and all its allocated memory #... | managed_account_collection |
| `managed_core_account_free` | Free a managed account handle # Safety - `account` must be a valid pointer... | managed_account |
| `managed_core_account_free_transactions` | Free transactions array returned by managed_core_account_get_transactions ... | managed_account |
| `managed_core_account_free_transactions` | Free a transactions array returned by `managed_core_account_get_transactions`... | managed_account |
| `managed_core_account_get_account_type` | Get the account type of a managed account # Safety - `account` must be a... | managed_account |
| `managed_core_account_get_address_pool` | Get an address pool from a managed account by type This function returns... | managed_account |
| `managed_core_account_get_balance` | Get the balance of a managed account | managed_account |
| `managed_core_account_get_external_address_pool` | Get the external address pool from a managed account This function returns... | managed_account |
| `managed_core_account_get_index` | Get the account index from a managed account Returns the primary account... | managed_account |
| `managed_core_account_get_internal_address_pool` | Get the internal address pool from a managed account This function returns... | managed_account |
| `managed_core_account_get_network` | Get the network of a managed account # Safety - `account` must be a valid... | managed_account |
| `managed_core_account_get_special_transactions` | Get the transactions of a managed account that carry a DIP-2 special payload... | managed_account |
| `managed_core_account_get_transaction_count` | Get the number of transactions in a managed account Only available with the... | managed_account |
| `managed_core_account_get_transactions` | Get all transactions from a managed account Returns an array of... | managed_account |
| `managed_core_account_get_utxo_count` | Get the number of UTXOs in a managed account | managed_account |
Expand Down Expand Up @@ -3066,10 +3067,10 @@ managed_core_account_free_transactions(transactions: *mut FFITransactionRecord,
```

**Description:**
Free transactions array returned by managed_core_account_get_transactions Only available with the `keep-finalized-transactions` Cargo feature, in which configuration `managed_core_account_get_transactions` is also available — the two functions are paired. # Safety - `transactions` must be a pointer returned by `managed_core_account_get_transactions` - `count` must be the count returned by `managed_core_account_get_transactions` - This function must only be called once per allocation
Free a transactions array returned by `managed_core_account_get_transactions` or `managed_core_account_get_special_transactions`. # Safety - `transactions` must be a pointer returned by one of the paired getters - `count` must be the count returned alongside it - This function must only be called once per allocation

**Safety:**
- `transactions` must be a pointer returned by `managed_core_account_get_transactions` - `count` must be the count returned by `managed_core_account_get_transactions` - This function must only be called once per allocation
- `transactions` must be a pointer returned by one of the paired getters - `count` must be the count returned alongside it - This function must only be called once per allocation

**Module:** `managed_account`

Expand Down Expand Up @@ -3187,6 +3188,22 @@ Get the network of a managed account # Safety - `account` must be a valid poin

---

#### `managed_core_account_get_special_transactions`

```c
managed_core_account_get_special_transactions(account: *const FFIManagedCoreAccount, transactions_out: *mut *mut FFITransactionRecord, count_out: *mut usize,) -> bool
```

**Description:**
Get the transactions of a managed account that carry a DIP-2 special payload (provider registrations / updates, asset locks, …). Unlike `managed_core_account_get_transactions` this is available in every feature configuration: provider-relevant records are retained in memory even after their block is chainlocked (see `ManagedCoreKeysAccount::drop_finalized_transaction` in `key-wallet`), so a provider-key account's registration history — including each masternode's service IP — remains queryable without the `keep-finalized-transactions` feature. Returns records in txid order. Each record's `special_transaction_payload` field is non-null. # Safety - `account` must be a valid pointer to an FFIManagedCoreAccount instance - `transactions_out` must be a valid pointer to receive the transactions array pointer - `count_out` must be a valid pointer to receive the count - The caller must free the returned array using `managed_core_account_free_transactions`

**Safety:**
- `account` must be a valid pointer to an FFIManagedCoreAccount instance - `transactions_out` must be a valid pointer to receive the transactions array pointer - `count_out` must be a valid pointer to receive the count - The caller must free the returned array using `managed_core_account_free_transactions`

**Module:** `managed_account`

---

#### `managed_core_account_get_transaction_count`

```c
Expand Down
1 change: 1 addition & 0 deletions key-wallet-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub mod managed_account;
pub mod managed_account_collection;
pub mod managed_wallet;
pub mod mnemonic;
pub mod special_payload;
pub mod transaction;
pub mod transaction_checking;
pub mod tx_decode;
Expand Down
Loading
Loading