create
fun create(oldToken: DustToken, feeAmount: BigInteger, secretKey: String, newNonce: String): DustSpend
Creates a DustSpend from an old token and fee amount.
Algorithm:
Calculate old nullifier = Hash(secret_key, old_nonce, ...)
Calculate new value = old_value - fee
Create new dust token with new_value
Calculate new commitment = Hash(new_initial_value, owner, new_nonce, ctime)
Generate zero-knowledge proof
Note: Not yet implemented.
Return
DustSpend
Parameters
oldToken
The dust token being spent
feeAmount
Amount to pay in fees (Specks)
secretKey
Dust secret key (hex-encoded)
newNonce
New nonce for the change token