class

Tron::Key

Inherits Reference < Object

Constants

ADDRESS_PREFIX = "41"

Constructors

new(priv : String | Nil = nil)
Source

Instance methods

address

TRON-адрес: keccak256(pub[1..])[last 20] + 0x41 → base58check.

Source
personal_sign(message : String) : String

personal_sign: Ethereum-style префикс + keccak256 + sign.

Source
private_bytes
Source
private_hex
Source
private_key
Source
public_bytes
Source
public_bytes_compressed
Source
public_hex
Source
public_hex_compressed
Source
public_key
Source
sign(blob : Bytes) : String

Подпись 32-байтового blob → hex (65 байт: 64 подпись + recid).

Source
sign_typed_data(hash : Bytes) : String

TIP-191: v = 27 + recid.

Source
verify(blob : Bytes, signature_hex : String, public_key : Bytes | Nil = nil) : Bool

Расширение порта (в tron.rb 1.2.4 публичного verify нет).

Source