Skip to content
Open
646 changes: 476 additions & 170 deletions key-wallet-ffi/FFI_API.md

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions key-wallet-ffi/cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,22 @@ exclude = []
prefix = ""
item_types = ["functions", "enums", "structs", "typedefs", "opaque", "constants"]

# Force these to be forward-declared only:
# Opaque types with Swift-compatible bodies (unsigned char _private[0] allows Swift to import)
[export.body]
"FFIPrivateKey" = ""
"FFIExtendedPrivateKey" = ""
"FFIPublicKey" = ""
"FFIExtendedPublicKey" = ""
"FFIWalletManager" = ""
"FFIWallet" = ""
"FFIAccount" = ""
"FFIBLSAccount" = ""
"FFIEdDSAAccount" = ""
"FFIManagedAccount" = ""
"FFIAccountCollection" = ""
"FFIManagedAccountCollection" = ""
"FFIAddressPool" = ""
"FFIPrivateKey" = "{ unsigned char _private[0]; }"
"FFIExtendedPrivateKey" = "{ unsigned char _private[0]; }"
"FFIPublicKey" = "{ unsigned char _private[0]; }"
"FFIExtendedPublicKey" = "{ unsigned char _private[0]; }"
"FFIWalletManager" = "{ unsigned char _private[0]; }"
"FFIWallet" = "{ unsigned char _private[0]; }"
"FFIAccount" = "{ unsigned char _private[0]; }"
"FFIBLSAccount" = "{ unsigned char _private[0]; }"
"FFIEdDSAAccount" = "{ unsigned char _private[0]; }"
"FFIManagedAccount" = "{ unsigned char _private[0]; }"
"FFIManagedPlatformAccount" = "{ unsigned char _private[0]; }"
"FFIAccountCollection" = "{ unsigned char _private[0]; }"
"FFIManagedAccountCollection" = "{ unsigned char _private[0]; }"
"FFIAddressPool" = "{ unsigned char _private[0]; }"

[export.rename]
# Rename types to match C conventions
Expand Down
Loading
Loading