nocheck=False, unsigned=False, rbf=None, password=None, locktime=None, addtransaction=False, wallet: Abstract_Wallet = None):
The guide doesn't seem to be including the "feerate" option...
Some notes from my brief experimentation using payto():
- fee is the TOTAL fee you want to pay in BTC (so, 0.00000500 would be 500 sats total fee)
- feerate is the fee in sats/byte that you want to pay (so 2 would be 2 sats/byte)
- You cannot specify the fee and feerate at the same time:
Exception: Cannot specify both 'fee' and 'feerate' at the same time!
- If you don't explicitly set the rbf option, it will use whatever is defined in your global Electrum settings.
- payto() will return a signed "rawtransaction" in hex, if you leave unsigned=False... if you set unsigned=True, you'll get a "PSBT" (Partially Signed Bitcoin Transaction) in what I believe is Base64 encoding. This can be viewed in "Tools -> Load Transaction -> From Text".
- from_addr is a comma-separated list of addresses that you want to "spend from"... eg "2NGAbopZg9ZpKeAqFQWcsEKNrnqFsg4Qqyb,2Mwv1humoLS5YxARhU8wPb19xDWLxLSKYXi"
- from_coin is a comma-separated list of coin "Output point" that you want to "spend from"... an "output point" is effectively the "transactionID:vout" of the UTXO as displayed in the "coins" tab. eg: "a504115e8740e6596ffedafc290c2a9e3ad64329c260764b1b231532be853ced:1" would be 198.58718211 tBTC from this transaction
- Even if you specify multiple addresses or coins using from_addr and/or from_coin... it won't necessarily use ALL of them. Electrum will only use as few as required to meet the "total amount to send"+"total fee" requirements as per it's "normal" method of selecting UTXOs to spend.
- You cannot include addrs/coins that have been "frozen".
- As noted above, payto() will only create (and optionally sign) the transaction. You will need to use the "broadcast()" function to actually send the transaction to the network.