Skip to content

Generate a public address from a private key in the TRON network #15

@kostasoft

Description

@kostasoft

Please tell me how to generate a public address from a private key in the TRON network?

final keyBytes = BytesUtils.fromHexString(privateKeyHex);
final privKey = Secp256k1PrivateKey.fromBytes(keyBytes);
final pubKey = privKey.publicKey.publicKey;
final pubBytes = pubKey.toBytes();
return Base58Encoder.encode(pubBytes);
// The result is incorrect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions