Interface
lockCollects input cell candidates for the lock script.
It's a constructor that initializes objects implementing function
collect()
to provide input cells. Attention that transaction builders
will not match fromInfo
and lock script. It's the responsibility of
CellCollector
to filter based on fromInfo
. For example, when
fromInfo
does not match, the function collect()
should not return
any cell.
Optional
setupScans the transaction and add signing entries into txSkeleton.signingEnties
.
the updated txSkeleton
Called when a candidate input cell is found.
What this function should do:
txSkeleton
and an output cell with
the same fields since functions like transfer
, injectCapacity
,
payFee
, and payFeeByFeeRate
collects account balance in outputs.cellDeps
the updated transaction skeleton
Generated using TypeDoc
LockScriptInfo describes how to integrate a lock script in transaction building.
Custom lock scripts must register their LockScriptInfo before using
transfer
,injectCapacity
,payFee
,payFeeByFeeRate
viaregisterCustomLockScriptInfos
.See an example in custom_lock_script_info.ts.