Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -73,7 +73,7 @@ jobs:
pip install --upgrade pip
pip install "protobuf>=3.20,<4"
pip install -e .
pip install pytest semver rlp requests
pip install pytest semver rlp requests eth-keys pycryptodome

- name: Wait for emulator
run: |
Expand Down
62 changes: 60 additions & 2 deletions keepkeylib/client.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -1628,9 +1628,26 @@ def solana_sign_tx(self, address_n, raw_tx):
)

@expect(solana_proto.SolanaMessageSignature)
def solana_sign_message(self, address_n, message):
def solana_sign_message(self, address_n, message, show_display=False):
return self.call(
solana_proto.SolanaSignMessage(address_n=address_n, message=message)
solana_proto.SolanaSignMessage(
address_n=address_n,
message=message,
show_display=show_display,
)
)

@expect(solana_proto.SolanaOffchainMessageSignature)
def solana_sign_offchain_message(self, address_n, message, message_format,
version=0, show_display=False):
return self.call(
solana_proto.SolanaSignOffchainMessage(
address_n=address_n,
version=version,
message_format=message_format,
message=message,
show_display=show_display,
)
)

# ── Tron ───────────────────────────────────────────────────
Expand All@@ -1646,6 +1663,37 @@ def tron_sign_tx(self, address_n, raw_tx):
tron_proto.TronSignTx(address_n=address_n, raw_tx=raw_tx)
)

@expect(tron_proto.TronMessageSignature)
def tron_sign_message(self, address_n, message, show_display=False):
return self.call(
tron_proto.TronSignMessage(
address_n=address_n,
message=message,
show_display=show_display,
)
)

@expect(proto.Success)
def tron_verify_message(self, address, signature, message):
return self.call(
tron_proto.TronVerifyMessage(
address=address,
signature=signature,
message=message,
)
)

@expect(tron_proto.TronTypedDataSignature)
def tron_sign_typed_hash(self, address_n, domain_separator_hash,
message_hash=None):
kwargs = dict(
address_n=address_n,
domain_separator_hash=domain_separator_hash,
)
if message_hash is not None:
kwargs['message_hash'] = message_hash
return self.call(tron_proto.TronSignTypedHash(**kwargs))

# ── TON ────────────────────────────────────────────────────
@expect(ton_proto.TonAddress)
def ton_get_address(self, address_n, show_display=False):
Expand All@@ -1659,6 +1707,16 @@ def ton_sign_tx(self, address_n, raw_tx):
ton_proto.TonSignTx(address_n=address_n, raw_tx=raw_tx)
)

@expect(ton_proto.TonMessageSignature)
def ton_sign_message(self, address_n, message, show_display=False):
return self.call(
ton_proto.TonSignMessage(
address_n=address_n,
message=message,
show_display=show_display,
)
)

# ── Zcash Address Display ─────────────────────────────────
@expect(zcash_proto.ZcashAddress)
def zcash_display_address(self, address_n, address, ak, nk, rivk,
Expand Down
63 changes: 63 additions & 0 deletions keepkeylib/messages_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions keepkeylib/messages_ripple_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading