We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
下面是 Android 的测试 case,需要在 iOS 上面能得到一样的结果。
@Test fun genETHAddressByMnemonicCode() { val codes = "virus million sister elite junior comfort since grain train artefact lunch fever".split(" ") val seed = Bip44Utils.genSeedByInsertMnemonics(codes) println("seed:${seed.seedBytes?.encodeB64Url()}") // DID 派生规则生成的以太坊地址 val keyPair = IdGenerator.genAppKeyPair("", 0, seed.seedBytes!!, KeyType.ETHEREUM) val addressFromIdGen1 = IdGenerator.pk2Address( keyPair.publicKey, DidType.DID_TYPE_ETHEREUM ) println("addressFromIdGen1:${addressFromIdGen1}") Assert.assertEquals(addressFromIdGen1, "0xBA6f19e811A21a18F31D1320C18842b77f6D3afD") // 以太坊钱包默认派生规则生成的以太坊地址 val keyPair2 = Bip44Utils.genKeyPair(seed.seedBytes) val addressFromIdGen2 = IdGenerator.pk2Address( keyPair2.publicKey.toByteArray(), DidType.DID_TYPE_ETHEREUM ) println("addressFromIdGen2:${addressFromIdGen2}") Assert.assertEquals(addressFromIdGen2, "0xd89972DC4247fdf76570116A1CF643135a062916") }
The text was updated successfully, but these errors were encountered:
karthuszY
No branches or pull requests
下面是 Android 的测试 case,需要在 iOS 上面能得到一样的结果。
The text was updated successfully, but these errors were encountered: