- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.py
More file actions
Latest commit
executable file
·16 lines (12 loc) · 487 Bytes
/
Copy pathtest.py
File metadata and controls
executable file
·16 lines (12 loc) · 487 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
fromelectrum_scripting.walletimportWalletScriptingasws
ws.setup()
# cmd: listunspent
ws.call('listunspent')
# cmd: paytomany
tx=ws.call('paytomany', unsigned=True, password='123321', outputs=[['bc1q9tguzkmqul768z9hxkeg8hd6yrrhexymwmykygwk4m6g4t8msheq3z0rxm', '0.001']])
# util: qr
ws.qr(tx['hex'], 'unsigned_tx.svg')
# cmd: signtransaction
tx_signed=ws.call('signtransaction', password='123321', tx=tx['hex'])
ws.qr(tx_signed['hex'], 'signed_tx.svg')