@ -1172,19 +1172,7 @@ class LightningRpc(UnixDomainSocketRpc):
return self . call ( " withdraw " , payload )
return self . call ( " withdraw " , payload )
def _deprecated_txprepare ( self , destination , satoshi , feerate = None , minconf = None ) :
def txprepare ( self , outputs , feerate = None , minconf = None , utxos = None ) :
warnings . warn ( " txprepare now takes output arg: expect removal "
" in Mid-2020 " ,
DeprecationWarning )
payload = {
" destination " : destination ,
" satoshi " : satoshi ,
" feerate " : feerate ,
" minconf " : minconf ,
}
return self . call ( " txprepare " , payload )
def txprepare ( self , * args , * * kwargs ) :
"""
"""
Prepare a Bitcoin transaction which sends to [ outputs ] .
Prepare a Bitcoin transaction which sends to [ outputs ] .
The format of output is like [ { address1 : amount1 } ,
The format of output is like [ { address1 : amount1 } ,
@ -1194,13 +1182,6 @@ class LightningRpc(UnixDomainSocketRpc):
Outputs will be reserved until you call txdiscard or txsend , or
Outputs will be reserved until you call txdiscard or txsend , or
lightningd restarts .
lightningd restarts .
"""
"""
if ' destination ' in kwargs or ' satoshi ' in kwargs :
return self . _deprecated_txprepare ( * args , * * kwargs )
if len ( args ) and not isinstance ( args [ 0 ] , list ) :
return self . _deprecated_txprepare ( * args , * * kwargs )
def _txprepare ( outputs , feerate = None , minconf = None , utxos = None ) :
payload = {
payload = {
" outputs " : outputs ,
" outputs " : outputs ,
" feerate " : feerate ,
" feerate " : feerate ,
@ -1209,8 +1190,6 @@ class LightningRpc(UnixDomainSocketRpc):
}
}
return self . call ( " txprepare " , payload )
return self . call ( " txprepare " , payload )
return _txprepare ( * args , * * kwargs )
def txdiscard ( self , txid ) :
def txdiscard ( self , txid ) :
"""
"""
Cancel a Bitcoin transaction returned from txprepare . The outputs
Cancel a Bitcoin transaction returned from txprepare . The outputs