Skip to content

Commit a128097

Browse files
committed
Remove [create|sign|send]transaction interface
Remove [create|sign|send]transaction. There preferred interface for creating and sending transactions is now the `tx` command.
1 parent 2e15481 commit a128097

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

green_cli/common.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -425,49 +425,6 @@ def gettransactions(session, summary, details):
425425
result = _txlist_summary(result) if summary else format_output(result)
426426
click.echo(result)
427427

428-
@green.command()
429-
@click.option('--addressee', '-a', type=(Address(), Amount()), expose_value=False, multiple=True)
430-
@click.option('--subaccount', default=0, expose_value=False, callback=details_json)
431-
@click.option('--fee-rate', '-f', type=int, expose_value=False, callback=details_json)
432-
@with_login
433-
@print_result
434-
def createtransaction(session, details):
435-
"""Create an outgoing transaction."""
436-
add_utxos_to_transaction(session, details)
437-
return gdk_resolve(gdk.create_transaction(session.session_obj, json.dumps(details)))
438-
439-
@green.command()
440-
@click.argument('details', type=click.File('rb'))
441-
@with_login
442-
@print_result
443-
@with_gdk_resolve
444-
def signtransaction(session, details):
445-
"""Sign a transaction.
446-
447-
Pass in the transaction details json from createtransaction. TXDETAILS can be a filename or - to
448-
read from standard input, e.g.
449-
450-
$ green createtransaction -a <address> 1000 | green signtransaction -
451-
"""
452-
details = details.read().decode('utf-8')
453-
return gdk.sign_transaction(session.session_obj, details)
454-
455-
@green.command()
456-
@click.argument('details', type=click.File('rb'))
457-
@with_login
458-
@print_result
459-
@with_gdk_resolve
460-
def sendtransaction(session, details):
461-
"""Send a transaction.
462-
463-
Send a transaction previously returned by signtransaction. TXDETAILS can be a filename or - to
464-
read from standard input, e.g.
465-
466-
$ green createtransaction -a <address> 1000 | green signtransaction - | green sendtransaction -
467-
"""
468-
details = details.read().decode('utf-8')
469-
return gdk.send_transaction(session.session_obj, details)
470-
471428
def _send_transaction(session, details):
472429
add_utxos_to_transaction(session, details)
473430
details = gdk_resolve(gdk.create_transaction(session.session_obj, json.dumps(details)))

0 commit comments

Comments
 (0)