Skip to content

Commit

Permalink
refactor(explored-types): add outputID to ExplorerFileContract
Browse files Browse the repository at this point in the history
  • Loading branch information
telestrial committed Nov 19, 2024
1 parent 252e67b commit ecec83f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-bags-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/explored-types': minor
---

Updated ExplorerFileContract type for refactored inclusion of output ID.
14 changes: 12 additions & 2 deletions libs/explored-types/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {
ConsensusNetwork,
ConsensusState,
Currency,
FileContractElement,
FileContractID,
Hash256,
PublicKey,
Expand Down Expand Up @@ -163,7 +162,7 @@ export type ExplorerSiafundOutput = SiafundElement & { spentIndex: ChainIndex }
* An `ExplorerFileContract` is a core type FileContractElement with added resolved/
* valid state, transactionID, and confirmation transaction and proof transaction information.
*/
export type ExplorerFileContract = FileContractElement & {
export type ExplorerFileContract = {
resolved: boolean
valid: boolean

Expand All @@ -174,6 +173,17 @@ export type ExplorerFileContract = FileContractElement & {

proofIndex: ChainIndex | null
proofTransactionID: TransactionID | null

id: FileContractID
filesize: number
fileMerkleRoot: Hash256
windowStart: number
windowEnd: number
payout: Currency
validProofOutputs: (SiacoinOutput & { id: SiacoinOutputID })[]
missedProofOutputs: (SiacoinOutput & { id: SiacoinOutputID })[]
unlockHash: Hash256
revisionNumber: number
}

/**
Expand Down

0 comments on commit ecec83f

Please sign in to comment.