From ecec83f121734d1b1a99c6f4490c75e909531b3c Mon Sep 17 00:00:00 2001 From: John Williams Date: Wed, 13 Nov 2024 09:49:18 -0500 Subject: [PATCH] refactor(explored-types): add outputID to ExplorerFileContract --- .changeset/stale-bags-kick.md | 5 +++++ libs/explored-types/src/types.ts | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .changeset/stale-bags-kick.md diff --git a/.changeset/stale-bags-kick.md b/.changeset/stale-bags-kick.md new file mode 100644 index 000000000..06c99c266 --- /dev/null +++ b/.changeset/stale-bags-kick.md @@ -0,0 +1,5 @@ +--- +'@siafoundation/explored-types': minor +--- + +Updated ExplorerFileContract type for refactored inclusion of output ID. diff --git a/libs/explored-types/src/types.ts b/libs/explored-types/src/types.ts index d0f9f913b..aba0ccf45 100644 --- a/libs/explored-types/src/types.ts +++ b/libs/explored-types/src/types.ts @@ -6,7 +6,6 @@ import type { ConsensusNetwork, ConsensusState, Currency, - FileContractElement, FileContractID, Hash256, PublicKey, @@ -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 @@ -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 } /**