Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Aes(val cipher: String, val ciphertext: String? = null, val iv: String)
Link copied to clipboard
@Serializable
data class Cipher(val aes: Aes, val ciphertext: String, val kdf: Kdf, val mac: String)
Link copied to clipboard
data class ExtendedKey(val keyPair: ECKeyPair, chainCode: ByteArray, depth: Byte, parentFingerprint: Int, sequence: Int, versionBytes: ByteArray)

HD Wallet中的扩展密钥

Link copied to clipboard
@Serializable
data class Kdf(val kdf: String, val kdfParams: KdfParams)
Link copied to clipboard
@Serializable
data class KdfParams(val dkLen: Int, val n: Int, val p: Int, val r: Int, val salt: String)

KDF结构体

Link copied to clipboard

助记词支持的语言

Link copied to clipboard
data class MnemonicWords(val words: Collection<String>)
Link copied to clipboard
data class Seed(val seed: ByteArray)

种子

Link copied to clipboard
@Serializable
data class Wallet(val address: String?, val cipher: Cipher, val uuid: String, val isGM: Boolean)

Functions

Link copied to clipboard

计算密钥对的指纹,该指纹是基于其压缩形式的公钥生成的。

Link copied to clipboard
fun ExtendedKey.generateChildKey(element: BIP44Element, isGM: Boolean = true): ExtendedKey

根据给定的父级扩展密钥(ExtendedKey)和BIP44路径元素(BIP44Element)来生成子级扩展密钥的。 该函数遵循比特币和其他基于secp256k1或sm2p256v1曲线的加密货币所使用的BIP32标准进行派生。

Link copied to clipboard
fun Seed.toExtendedKey(publicKeyOnly: Boolean = false, isGM: Boolean = true, testnet: Boolean = false): ExtendedKey
Link copied to clipboard
fun Seed.toKey(path: String, isGM: Boolean = true, testnet: Boolean = false): ExtendedKey
Link copied to clipboard

返回对应语言的字符集

Link copied to clipboard