<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/BlockSpentOutputs/transactionSpentOutputs(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel17BlockSpentOutputsC011transactiondE02atAA011TransactiondE0CSi_tF"
  },
  "title" : "transactionSpentOutputs(at:)"
}
-->

# transactionSpentOutputs(at:)

Returns the spent outputs for the transaction at the given index as
an owned [`TransactionSpentOutputs`](/documentation/BitcoinKernel/TransactionSpentOutputs) (safe to store past this
block’s lifetime).

```
func transactionSpentOutputs(at index: Int) -> TransactionSpentOutputs
```

## Parameters

`index`

Zero-based index into the undo data. Index `0`
corresponds to the block’s first **non-coinbase** transaction
(block transaction index 1).

## Discussion> Precondition: `index` must be in `0..<count`.