美文网首页
TrustCore 调用事例

TrustCore 调用事例

作者: 雨影 | 来源:发表于2020-08-28 16:35 被阅读0次

    简单流程

    生成HDWallet

     let wallet = HDWallet(mnemonic: "shoot island position soft burden budget tooth cruel issue economy destroy above", passphrase: "")
    

    币种类型

    let coin = CoinType.XXXCoin
    

    私钥

    let privateKey = wallet.getKeyForCoin(coin: coin)
    

    地址

    let derivedAddress = coin.deriveAddress(privateKey: privateKey)
    

    DerivationPath 方式

    let path = DerivationPath("m/44'/60'/0'/0/0")
    let path = DerivationPath(purpose: .bip44, coin: CoinType.ethereum.slip44Id, account: 0, change: 0, address: 0)
    

    HDWallet -》私钥

    let key0 = wallet.getKeyBIP44(coin: .ethereum, account: 0, change: 0, address: 0)
    

    相关文章

      网友评论

          本文标题:TrustCore 调用事例

          本文链接:https://www.haomeiwen.com/subject/ckjlsktx.html