Reputation: 23140
I am running a flow where I create a transaction with outputs and commit it to the ledger.
I now want to grab the input StateRef
s corresponding to the outputs of the transaction I just created and commited to ledger.
How can I retrieve these StateRef
s?
Upvotes: 1
Views: 501
Reputation: 23140
You can easily construct the StateRef
s manually.
For example, suppose you have a reference to the signed transaction you just created:
stx: SignedTransaction
And you want the input StateRef
of the third output of that transaction. You'd create this as follows:
val stateRef: StateRef = StateRef(stx.id, 2)
Upvotes: 1