mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
btc: add script_type to get_public_node
This commit is contained in:
parent
fb22b894ba
commit
555bb62e3f
@ -597,9 +597,10 @@ def get_address(connect, coin, address, script_type, show_display):
|
||||
@click.option("-c", "--coin", default="Bitcoin")
|
||||
@click.option("-n", "--address", required=True, help="BIP-32 path, e.g. m/44'/0'/0'")
|
||||
@click.option("-e", "--curve")
|
||||
@click.option("-t", "--script-type", type=CHOICE_INPUT_SCRIPT_TYPE, default="address")
|
||||
@click.option("-d", "--show-display", is_flag=True)
|
||||
@click.pass_obj
|
||||
def get_public_node(connect, coin, address, curve, show_display):
|
||||
def get_public_node(connect, coin, address, curve, script_type, show_display):
|
||||
client = connect()
|
||||
address_n = tools.parse_path(address)
|
||||
result = btc.get_public_node(
|
||||
@ -608,6 +609,7 @@ def get_public_node(connect, coin, address, curve, show_display):
|
||||
ecdsa_curve_name=curve,
|
||||
show_display=show_display,
|
||||
coin_name=coin,
|
||||
script_type=script_type,
|
||||
)
|
||||
return {
|
||||
"node": {
|
||||
|
@ -4,7 +4,12 @@ from .tools import CallException, expect, normalize_nfc, session
|
||||
|
||||
@expect(proto.PublicKey)
|
||||
def get_public_node(
|
||||
client, n, ecdsa_curve_name=None, show_display=False, coin_name=None
|
||||
client,
|
||||
n,
|
||||
ecdsa_curve_name=None,
|
||||
show_display=False,
|
||||
coin_name=None,
|
||||
script_type=proto.InputScriptType.SPENDADDRESS,
|
||||
):
|
||||
return client.call(
|
||||
proto.GetPublicKey(
|
||||
@ -12,6 +17,7 @@ def get_public_node(
|
||||
ecdsa_curve_name=ecdsa_curve_name,
|
||||
show_display=show_display,
|
||||
coin_name=coin_name,
|
||||
script_type=script_type,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
|
||||
import mock
|
||||
|
||||
from trezorlib.transport import all_transports
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user