ACINQ / bitcoin-kmp

Kotlin Multiplatform Bitcoin Library
Apache License 2.0
68 stars 15 forks source link

Pulls the Chain inner-class out of the Bitcoin object #121

Closed dpad85 closed 8 months ago

dpad85 commented 8 months ago

Kotlin inner classes are not supported in Swift, and require workarounds, which are not even possible if the class is used throughout a project. We should avoid inner classes as much as possible.

For example: if you have outer class Foo and inner class Bar, then Foo.Bar doesn't appear within Swift. But also any function that uses Foo.Bar as either a parameter or return type is also unavailable in Swift.

Note: This may be fixed with https://skie.touchlab.co, but it's better to not have to use a generator in the first place.