DigiByte-Core / digiassetsd

RESTful web server for DigiAsset protocol operations, implemented in Node.js.
0 stars 3 forks source link

sendasset no way to define change #2

Open mctrivia opened 5 years ago

mctrivia commented 5 years ago

quantum computers are coming. As long as funds are never deposited into an address that has sent funds DigiByte is quantum secure. Unfortunetly the asset server has no way to define the change address for funds used to send an asset. As a result all funds and assets involved with the original sending address are at risk. A field to define where to send change funds needs to be available.

mctrivia commented 4 years ago

https://github.com/DigiByte-Core/digiassetsd/blob/0b008478d70365107a62ce6431b98994870da868/coluutils.js#L377

not tested but I believe this would work args.tx.addOutput(metadata.changeAddress||metadata.issueAddress, lastOutputValue ? lastOutputValue : args.change);

ChillingSilence commented 4 years ago

Once we have tested that change and it's submitted as a pull request, I'm confident it would be accepted, it makes good sense (though, having it optional so as not to break backwards compatibility where it's being used right now).