pub struct ResolvedTx {
pub hash: String,
pub tx_hex: String,
/* private fields */
}Expand description
A resolved transaction ready for signing.
Fields§
§hash: StringTransaction hash.
tx_hex: StringHex-encoded CBOR transaction bytes.
Implementations§
Source§impl ResolvedTx
impl ResolvedTx
Sourcepub fn signing_hash(&self) -> &str
pub fn signing_hash(&self) -> &str
Returns the transaction hash that signers will sign.
Sourcepub fn add_witness(self, witness: TxWitness) -> Self
pub fn add_witness(self, witness: TxWitness) -> Self
Attaches a pre-computed witness produced outside any registered Signer.
This is the canonical entry point for wallet-app integrations: the consumer
hands txHex (or hash) to an external wallet, gets back a witness, and
attaches it before calling sign(). The witness is appended to the TRP
SubmitParams.witnesses array after any witnesses produced by registered
signer parties, in attach order. May be called any number of times.
The SDK does not verify the witness against the tx hash; that binding is enforced by TRP at submit time.
Sourcepub fn sign(self) -> Result<SignedTx, Error>
pub fn sign(self) -> Result<SignedTx, Error>
Signs the transaction with every signer party.
Manually attached witnesses (via add_witness) are appended after
witnesses produced by registered signer parties, in attach order.
Succeeds with zero registered signers when at least one witness has
been manually attached.