@@ -1628,9 +1628,26 @@ def solana_sign_tx(self, address_n, raw_tx):
16281628 )
16291629
16301630 @expect (solana_proto .SolanaMessageSignature )
1631- def solana_sign_message (self , address_n , message ):
1631+ def solana_sign_message (self , address_n , message , show_display = False ):
16321632 return self .call (
1633- solana_proto .SolanaSignMessage (address_n = address_n , message = message )
1633+ solana_proto .SolanaSignMessage (
1634+ address_n = address_n ,
1635+ message = message ,
1636+ show_display = show_display ,
1637+ )
1638+ )
1639+
1640+ @expect (solana_proto .SolanaOffchainMessageSignature )
1641+ def solana_sign_offchain_message (self , address_n , message , message_format ,
1642+ version = 0 , show_display = False ):
1643+ return self .call (
1644+ solana_proto .SolanaSignOffchainMessage (
1645+ address_n = address_n ,
1646+ version = version ,
1647+ message_format = message_format ,
1648+ message = message ,
1649+ show_display = show_display ,
1650+ )
16341651 )
16351652
16361653 # ── Tron ───────────────────────────────────────────────────
@@ -1646,6 +1663,37 @@ def tron_sign_tx(self, address_n, raw_tx):
16461663 tron_proto .TronSignTx (address_n = address_n , raw_tx = raw_tx )
16471664 )
16481665
1666+ @expect (tron_proto .TronMessageSignature )
1667+ def tron_sign_message (self , address_n , message , show_display = False ):
1668+ return self .call (
1669+ tron_proto .TronSignMessage (
1670+ address_n = address_n ,
1671+ message = message ,
1672+ show_display = show_display ,
1673+ )
1674+ )
1675+
1676+ @expect (proto .Success )
1677+ def tron_verify_message (self , address , signature , message ):
1678+ return self .call (
1679+ tron_proto .TronVerifyMessage (
1680+ address = address ,
1681+ signature = signature ,
1682+ message = message ,
1683+ )
1684+ )
1685+
1686+ @expect (tron_proto .TronTypedDataSignature )
1687+ def tron_sign_typed_hash (self , address_n , domain_separator_hash ,
1688+ message_hash = None ):
1689+ kwargs = dict (
1690+ address_n = address_n ,
1691+ domain_separator_hash = domain_separator_hash ,
1692+ )
1693+ if message_hash is not None :
1694+ kwargs ['message_hash' ] = message_hash
1695+ return self .call (tron_proto .TronSignTypedHash (** kwargs ))
1696+
16491697 # ── TON ────────────────────────────────────────────────────
16501698 @expect (ton_proto .TonAddress )
16511699 def ton_get_address (self , address_n , show_display = False ):
@@ -1659,6 +1707,16 @@ def ton_sign_tx(self, address_n, raw_tx):
16591707 ton_proto .TonSignTx (address_n = address_n , raw_tx = raw_tx )
16601708 )
16611709
1710+ @expect (ton_proto .TonMessageSignature )
1711+ def ton_sign_message (self , address_n , message , show_display = False ):
1712+ return self .call (
1713+ ton_proto .TonSignMessage (
1714+ address_n = address_n ,
1715+ message = message ,
1716+ show_display = show_display ,
1717+ )
1718+ )
1719+
16621720 # ── Zcash Address Display ─────────────────────────────────
16631721 @expect (zcash_proto .ZcashAddress )
16641722 def zcash_display_address (self , address_n , address , ak , nk , rivk , account = None ):
0 commit comments