Skip to main content
Version: Next

tx.txbuilder.completesubtransaction

Home > @blaze-cardano/tx > TxBuilder > completeSubTransaction

TxBuilder.completeSubTransaction() method​

Completes the builder as a CIP-0118 sub-transaction: no fee and no collateral, since the enclosing top-level transaction pays both.

Signature:

completeSubTransaction(imbalance?: Value): Promise<SubTransaction>;

Parameters​

Parameter

Type

Description

imbalance

Value

(Optional) What the sub-transaction leaves for the rest of the batch, per asset: positive for a surplus the batch collects, negative for a deficit the batch supplies. Defaults to balanced.

Returns:

Promise<SubTransaction>

{Promise} The sub-transaction, carrying its scripts and datums but no vkey witnesses.

Exceptions​

{UTxOSelectionError} If the wallet can't cover what imbalance leaves to it. CIP-0118 is not live on mainnet; this API may change.