1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-17 01:52:02 +00:00

trezorlib: post-merge updates

This commit is contained in:
matejcik 2018-08-06 16:15:44 +02:00
parent 2bb7088281
commit a3d560529c
8 changed files with 7 additions and 28 deletions

View File

@ -30,19 +30,6 @@ def verify_message(client, coin_name, address, signature, message):
return isinstance(resp, proto.Success) return isinstance(resp, proto.Success)
# @expect(proto.EncryptedMessage)
# def encrypt_message(client, pubkey, message, display_only, coin_name, n):
# if coin_name and n:
# return client.call(proto.EncryptMessage(pubkey=pubkey, message=message, display_only=display_only, coin_name=coin_name, address_n=n))
# else:
# return client.call(proto.EncryptMessage(pubkey=pubkey, message=message, display_only=display_only))
# @expect(proto.DecryptedMessage)
# def decrypt_message(client, n, nonce, message, msg_hmac):
# return client.call(proto.DecryptMessage(address_n=n, nonce=nonce, message=message, hmac=msg_hmac))
@session @session
def sign_tx(client, coin_name, inputs, outputs, version=None, lock_time=None, expiry=None, overwintered=None, debug_processor=None): def sign_tx(client, coin_name, inputs, outputs, version=None, lock_time=None, expiry=None, overwintered=None, debug_processor=None):
# start = time.time() # start = time.time()

View File

@ -479,8 +479,6 @@ class ProtocolMixin(object):
sign_tx = MovedTo(btc.sign_tx) sign_tx = MovedTo(btc.sign_tx)
sign_message = MovedTo(btc.sign_message) sign_message = MovedTo(btc.sign_message)
verify_message = MovedTo(btc.verify_message) verify_message = MovedTo(btc.verify_message)
# encrypt_message = MovedTo(btc.encrypt_message)
# decrypt_message = MovedTo(btc.decrypt_message)
# CoSi functionality # CoSi functionality
cosi_commit = MovedTo(cosi.commit) cosi_commit = MovedTo(cosi.commit)

View File

@ -18,13 +18,10 @@ import base64
import struct import struct
from . import messages from . import messages
from . import tools from .tools import expect
from .client import field
from .client import expect
@field('address') @expect(messages.RippleAddress, field="address")
@expect(messages.RippleAddress)
def get_address(client, address_n, show_display=False): def get_address(client, address_n, show_display=False):
return client.call( return client.call(
messages.RippleGetAddress( messages.RippleGetAddress(

View File

@ -19,9 +19,8 @@ import pytest
from .common import TrezorTest from .common import TrezorTest
from .conftest import TREZOR_VERSION from .conftest import TREZOR_VERSION
from binascii import hexlify from binascii import hexlify
from trezorlib.client import CallException
from trezorlib.ripple import get_address from trezorlib.ripple import get_address
from trezorlib.tools import parse_path from trezorlib.tools import parse_path, CallException
@pytest.mark.ripple @pytest.mark.ripple

View File

@ -21,8 +21,7 @@ from .conftest import TREZOR_VERSION
from binascii import unhexlify from binascii import unhexlify
from trezorlib import messages from trezorlib import messages
from trezorlib import ripple from trezorlib import ripple
from trezorlib.client import CallException from trezorlib.tools import parse_path, CallException
from trezorlib.tools import parse_path
@pytest.mark.ripple @pytest.mark.ripple

View File

@ -21,8 +21,7 @@ from .conftest import TREZOR_VERSION
from binascii import hexlify from binascii import hexlify
from trezorlib import stellar from trezorlib import stellar
from trezorlib import messages as proto from trezorlib import messages as proto
from trezorlib.client import CallException from trezorlib.tools import parse_path, CallException
from trezorlib.tools import parse_path
@pytest.mark.stellar @pytest.mark.stellar

View File

@ -21,8 +21,7 @@ from .conftest import TREZOR_VERSION
from binascii import hexlify from binascii import hexlify
from trezorlib import stellar from trezorlib import stellar
from trezorlib import messages from trezorlib import messages
from trezorlib.client import CallException from trezorlib.tools import parse_path, CallException
from trezorlib.tools import parse_path
@pytest.mark.stellar @pytest.mark.stellar

View File

@ -14,6 +14,7 @@
# You should have received a copy of the License along with this library. # You should have received a copy of the License along with this library.
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>. # If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
import functools
import hashlib import hashlib
import struct import struct
import unicodedata import unicodedata