signAndSubmitTransfer

suspend fun signAndSubmitTransfer(intent: Intent, nightPrivateKey: ByteArray, ledgerParamsHex: String, fromAddress: String, dustSeed: ByteArray, timeoutMs: Long = DEFAULT_TIMEOUT_MS): TransactionSubmitter.SubmissionResult

Sign every input of an unsigned unshielded-transfer intent, then submit it with dust fees (#240 — Send NIGHT from the wallet pill).

Why the sign loop lives here, not in the caller: BIP-340 signing of an unshielded input needs a per-input signing message from FfiTransactionSerializer.getSigningMessageForInput, and that call stores binding randomness on the serializer instance which the later submitWithFees ->serialize reuses. Producing the message on a caller-side serializer and submitting through this one would decouple that randomness and the node would reject the binding. So the loop runs against this submitter's own serializer — the same instance that serializes for submission — keeping the coupling intact. Multi-UTXO transfers are handled: one signature per input, in input order.

Parameters

intent

Unsigned transfer Intent (from UnshieldedTransactionBuilder.buildTransfer)

nightPrivateKey

32-byte secp256k1 private key for the sender's NIGHT external role

ledgerParamsHex

SCALE-serialized ledger parameters (hex)

fromAddress

Sender's address (dust payer)

dustSeed

32-byte seed for deriving the DustSecretKey

timeoutMs

Maximum time to wait for finalization (default 60s)