Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过ETH私钥导入生成新的identity可以成功,BTC私钥导入就不成功。 #97

Open
wkn66 opened this issue Sep 29, 2021 · 0 comments

Comments

@wkn66
Copy link

wkn66 commented Sep 29, 2021

    let source = WalletMeta.Source.privateKey
    var metadata = WalletMeta(source: source)
    metadata.chain = .btc
    metadata.network = Network.testnet
    metadata.segWit = .p2wpkh
    metadata.name = ""
   try?Identity.createIdentity(password: "", metadata: metadata)
    guard let wallet = try? WalletManager.importFromPrivateKey(privateKey, encryptedBy: "", metadata: metadata) else {
        print("1213")
        return 
    Identity.currentIdentity?.wallets.forEach({ (wallet) in
        print(wallet)
    })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant