Skip to content

Commit 2be1b34

Browse files
committed
feat(tron): add tron_sign_message and tron_verify_message client methods
Mirrors the ethereum_sign_message/ethereum_verify_message pattern. Pairs with firmware PR BitHighlander/keepkey-firmware#221.
1 parent 7e6c694 commit 2be1b34

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

keepkeylib/client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,25 @@ def tron_sign_tx(self, address_n, raw_tx):
16461646
tron_proto.TronSignTx(address_n=address_n, raw_tx=raw_tx)
16471647
)
16481648

1649+
@expect(tron_proto.TronMessageSignature)
1650+
def tron_sign_message(self, address_n, message, show_display=False):
1651+
return self.call(
1652+
tron_proto.TronSignMessage(
1653+
address_n=address_n,
1654+
message=message,
1655+
show_display=show_display,
1656+
)
1657+
)
1658+
1659+
def tron_verify_message(self, address, signature, message):
1660+
return self.call(
1661+
tron_proto.TronVerifyMessage(
1662+
address=address,
1663+
signature=signature,
1664+
message=message,
1665+
)
1666+
)
1667+
16491668
# ── TON ────────────────────────────────────────────────────
16501669
@expect(ton_proto.TonAddress)
16511670
def ton_get_address(self, address_n, show_display=False):

0 commit comments

Comments
 (0)