I have only Waves private key


#1

Hi

I believe I only kept the private key and not the seed phrase. Is it possible to recover the funds with only the public and private keys?


#2

Fixed: found pyWaves that allows to transfer waves and tokens to another address.
Still not found a way to write a loop that calculate balance for each token and send assets to the new address.


#3

Isn’t it possible to send assets only with the private key? :thinking:


#4

This is the standard source code.
For Waves and assets, if I have exactly 10000000 (decimal digits…) with this script I am not able to send ALL balance, due to missing fees calculation.
The same for assets. But for waves the solution is simple, I will try decreasing until I find a number that will be accepted. But how to write a loop that compute exactly how much of the total balance of each asset (and waves too!) to send to the other address?

import pywaves as pw

myAddress = pw.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')
otherAddress = pw.Address('3PNTcNiUzppQXDL9RZrK3BcftbujiFqrAfM')
myAddress.sendWaves(otherAddress, 10000000)
myToken = myAddress.issueAsset('Token1', 'My Token', 1000, 0)
while not myToken.status():
    pass
myAddress.sendAsset(otherAddress, myToken, 50)