Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
janus committed Jan 27, 2024
1 parent e0c6a0b commit f484af2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/functional/mocks/multi_signers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3
# Copyright (c) 2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

import argparse
import json
import sys

def enumerate(args):
sys.stdout.write(json.dumps([{"fingerprint": "00000001", "type": "trezor", "model": "trezor_t"},
{"fingerprint": "00000002", "type": "trezor", "model": "trezor_one"}]))

parser = argparse.ArgumentParser(prog='./multi_signers.py', description='External multi-signer mock')

subparsers = parser.add_subparsers(description='Commands', dest='command')
subparsers.required = True

parser_enumerate = subparsers.add_parser('enumerate', help='list available signers')
parser_enumerate.set_defaults(func=enumerate)


if not sys.stdin.isatty():
buffer = sys.stdin.read()
if buffer and buffer.rstrip() != "":
sys.argv.extend(buffer.rstrip().split(" "))

args = parser.parse_args()

args.func(args)

0 comments on commit f484af2

Please sign in to comment.