FfiTransactionSerializer

FFI-based serializer backed by the Rust ledger.

Serializes a signed Intent to SCALE codec using the ledger's types. Converts Kotlin models → JSON → Rust FFI → SCALE hex.

Constructors

Link copied to clipboard
constructor(networkId: String)

Properties

Link copied to clipboard

The binding commitment captured by the last getSigningMessageForInput call, or null if none yet. A multi-input signer reads this after the first input and feeds it back as bindingHex for the remaining inputs so all signatures cover one shared binding.

Functions

Link copied to clipboard
fun getSigningMessageForInput(inputs: List<UtxoSpend>, outputs: List<UtxoOutput>, inputIndex: Int, ttl: Long, bindingHex: String? = null): String?

Public API: Get signing message for a specific input.

Link copied to clipboard
fun getTransactionHash(sealedTxHex: String): String?

Get the Midnight transaction hash from a sealed transaction.

Link copied to clipboard
open override fun sealProvenTransaction(provenTxHex: String): String?

JNI: Seals a proven transaction by transforming the binding commitment.

Link copied to clipboard
open override fun serialize(intent: Intent): String

Serialize a signed Intent to SCALE codec hex.

Link copied to clipboard
fun serializeWithDust(inputs: List<UtxoSpend>, outputs: List<UtxoOutput>, signatures: List<ByteArray>, dustState: DustLocalState, seed: ByteArray, dustUtxosJson: String, ttl: Long, currentTimeMs: Long): String

Serialize a signed transaction with Dust fee payment to SCALE codec hex.