TrustCore 調(diào)用事例

簡單流程

生成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)
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內(nèi)容