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 Specks

  • old_nullifier: Nullifier of the UTXO being spent

  • new_commitment: Commitment for the change output

  • proof: Proof of validity (proof-preimage for unproven transactions)

Workflow:

DustLocalState → Select UTXO → Create DustSpend → Add to Intent → Submit Transaction

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

Link copied to clipboard
data class DustSpend(val vFee: BigInteger, val oldNullifier: String, val newCommitment: String, val proof: String)

Result of DustSpend creation.

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.