You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get the wallet manager from the SPV client Returns an opaque pointer to FFIWalletManagerthat contains a cloned Arc reference to the wallet manager. This allows direct interaction with the wallet manager without going through the client. # Safety The caller must ensure that: - The client pointer is valid - The returned pointer is freed using `wallet_manager_free` from key-wallet-ffi # Returns An opaque pointer (void*) to the wallet manager, or NULL if the client is not initialized. Swift should treat this as an OpaquePointer. Get a handle to the wallet manager owned by this client. # Safety - `client` must be a valid, non-null pointer.
1125
+
Get the wallet manager from the SPV client Returns a pointer to an `FFIWalletManager` wrapper that clones the underlying `Arc<RwLock<WalletManager>>`. This allows direct interaction with the wallet manager without going back through the client for each call. # Safety The caller must ensure that: - The client pointer is valid - The returned pointer is released exactly once using `dash_spv_ffi_wallet_manager_free`# Returns A pointer to the wallet manager wrapper, or NULL if the client is not initialized.
1125
1126
1126
1127
**Safety:**
1127
-
The caller must ensure that: - The client pointer is valid - The returned pointer is freed using `wallet_manager_free` from key-wallet-ffi
1128
+
The caller must ensure that: - The client pointer is valid - The returned pointer is released exactly once using `dash_spv_ffi_wallet_manager_free`
Release a wallet manager obtained from `dash_spv_ffi_client_get_wallet_manager`. This simply forwards to `wallet_manager_free` in key-wallet-ffi so that lifetime management is consistent between direct key-wallet usage and the SPV client pathway. # Safety - `manager` must either be null or a pointer previously returned by `dash_spv_ffi_client_get_wallet_manager`.
1249
+
1250
+
**Safety:**
1251
+
- `manager` must either be null or a pointer previously returned by `dash_spv_ffi_client_get_wallet_manager`.
2. **Cleanup Required**: All returned pointers must be freed using the appropriate `_destroy` function
1267
1284
3. **Thread Safety**: The SPV client is thread-safe
1268
1285
4. **Error Handling**: Check return codes and use `dash_spv_ffi_get_last_error()` for details
1269
-
5.**Opaque Pointers**: `dash_spv_ffi_client_get_wallet_manager()` returns `void*`for Swift compatibility
1286
+
5. **Shared Ownership**: `dash_spv_ffi_client_get_wallet_manager()` returns `FFIWalletManager*` that must be released with `dash_spv_ffi_wallet_manager_free()`
0 commit comments