Skip to content

Commit a871a8b

Browse files
feat(ffi): align managed account APIs with core/platform split
1 parent 190bf44 commit a871a8b

File tree

13 files changed

+1971
-603
lines changed

13 files changed

+1971
-603
lines changed

key-wallet-ffi/FFI_API.md

Lines changed: 476 additions & 170 deletions
Large diffs are not rendered by default.

key-wallet-ffi/cbindgen.toml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,22 @@ exclude = []
3434
prefix = ""
3535
item_types = ["functions", "enums", "structs", "typedefs", "opaque", "constants"]
3636

37-
# Force these to be forward-declared only:
37+
# Opaque types with Swift-compatible bodies (unsigned char _private[0] allows Swift to import)
3838
[export.body]
39-
"FFIPrivateKey" = ""
40-
"FFIExtendedPrivateKey" = ""
41-
"FFIPublicKey" = ""
42-
"FFIExtendedPublicKey" = ""
43-
"FFIWalletManager" = ""
44-
"FFIWallet" = ""
45-
"FFIAccount" = ""
46-
"FFIBLSAccount" = ""
47-
"FFIEdDSAAccount" = ""
48-
"FFIManagedAccount" = ""
49-
"FFIAccountCollection" = ""
50-
"FFIManagedAccountCollection" = ""
51-
"FFIAddressPool" = ""
39+
"FFIPrivateKey" = "{ unsigned char _private[0]; }"
40+
"FFIExtendedPrivateKey" = "{ unsigned char _private[0]; }"
41+
"FFIPublicKey" = "{ unsigned char _private[0]; }"
42+
"FFIExtendedPublicKey" = "{ unsigned char _private[0]; }"
43+
"FFIWalletManager" = "{ unsigned char _private[0]; }"
44+
"FFIWallet" = "{ unsigned char _private[0]; }"
45+
"FFIAccount" = "{ unsigned char _private[0]; }"
46+
"FFIBLSAccount" = "{ unsigned char _private[0]; }"
47+
"FFIEdDSAAccount" = "{ unsigned char _private[0]; }"
48+
"FFIManagedAccount" = "{ unsigned char _private[0]; }"
49+
"FFIManagedPlatformAccount" = "{ unsigned char _private[0]; }"
50+
"FFIAccountCollection" = "{ unsigned char _private[0]; }"
51+
"FFIManagedAccountCollection" = "{ unsigned char _private[0]; }"
52+
"FFIAddressPool" = "{ unsigned char _private[0]; }"
5253

5354
[export.rename]
5455
# Rename types to match C conventions

0 commit comments

Comments
 (0)