Skip to content

TrustWalletCore/WalletCore pod in Kotlin Multiplatform - almost no classes #2492

Closed

Description

@igemonster

Describe the bug
Only a Crypto class is available from cocoapods.WalletCore in Kotlin (and CryptoMeta which doesn't look too different).

To Reproduce
In a Kotlin Multiplatform Mobile project for iOS and Android, try to access TrustWalletCore cocoapod from Kotlin:

// build.gradle.kts (:shared)
cocoapods {
   version = "1.0"
   podfile = project.file("../iosApp/Podfile")
   pod("WalletCore")
}

the Podfile is

target 'iosApp' do
  pod 'TrustWalletCore'
end

This successfully enables import cocoapods.WalletCore.* in shared/iosMain (see screenshot). Without the above cocoapods {...} the import is unavailable. So far so good.

Expected behavior
Many classes available for import in Kotlin: WalletCore classes like HDWallet, EthereumSigningInput, AnySigner etc.

Screenshots
image

Additional context
I can see/use these library classes in Swift, in Xcode via pod TrustWalletCore (and import WalletCore).

By the looks of it, the available Crypto class is generated from the Pod/library by commonizer in 0_WalletCore.knm (about 15 expect functions in total - a couple here for illustration):

@kotlin.commonizer.ObjCCallable public open external expect fun base58Encode(data: platform.Foundation.NSData): kotlin.String { /* compiled code */ }

@kotlin.commonizer.ObjCCallable public open external expect fun generateMnemonicFromSeed(seed: platform.Foundation.NSData): kotlin.String { /* compiled code */ }

Crypto has mnemonic-related functionality, as well as signHash/verifySignature but not much else.

Activity

  1. added
    bug
    on Aug 11, 2022
  2. locked and limited conversation to collaborators on Aug 12, 2022
  3. converted this issue into a discussion #2494 on Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions