DustSpendCreator
object DustSpendCreator
Creates DustSpend actions for transaction fee payment.
DustSpend: A DustSpend is a cryptographic proof that allows spending a dust UTXO to pay transaction fees. It contains:
v_fee: Fee amount in Specksold_nullifier: Nullifier of the UTXO being spentnew_commitment: Commitment for the change outputproof: Proof of validity (proof-preimage for unproven transactions)
Workflow:
DustLocalState → Select UTXO → Create DustSpend → Add to Intent → Submit TransactionContent copied to clipboard
Security:
Requires 32-byte seed to derive DustSecretKey
Seed is zeroized after use in JNI layer
DustSpend is serialized to JSON for transport
See also
/midnight-ledger/ledger/src/dust.rs (Rust implementation reference)
Types
Functions
Link copied to clipboard
fun createDustSpend(statePtr: Long, seed: ByteArray, utxoIndex: Int, vFee: BigInteger, currentTimeMs: Long = System.currentTimeMillis()): DustSpendCreator.DustSpend?
Creates a DustSpend action for fee payment.