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)

Functions

Link copied to clipboard
fun getSigningMessageForInput(inputs: List<UtxoSpend>, outputs: List<UtxoOutput>, inputIndex: Int, ttl: Long): 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): String

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