encodeKey static method
String
encodeKey(
- Secp256k1PrivateKey key, {
- List<
int> netVer = const [], - CryptoKeyEncoding pubKeyMode = CryptoKeyEncoding.base,
Implementation
static String encodeKey(
Secp256k1PrivateKey key, {
List<int> netVer = const [],
CryptoKeyEncoding pubKeyMode = CryptoKeyEncoding.base,
}) {
return key.takeSecretKey().useValue((k) {
return Base58Encoder.encodeWithChecksum([
...netVer,
...k,
if (pubKeyMode == CryptoKeyEncoding.base) WifConst.comprPubKeySuffix,
]);
});
}