Repository: SiaFoundation/web
Pull request #1048: fix(types): v2 element structure change
Author: login: alexfreska
Created: 2025-05-05T14:40:58Z | Merged: 2025-05-07T17:30:38Z

- The v2 element structure was changed in core, this matches the change.



Diff:
diff --git a/.changeset/two-numbers-glow.md b/.changeset/two-numbers-glow.md
new file mode 100644
index 000000000..cac4d591f
--- /dev/null
+++ b/.changeset/two-numbers-glow.md
@@ -0,0 +1,5 @@
+---
+'@siafoundation/types': minor
+---
+
+The v2 element structure was changed.
diff --git a/apps/walletd/lib/__snapshots__/signSeedV2.spec.ts.snap b/apps/walletd/lib/__snapshots__/signSeedV2.spec.ts.snap
index 1cb1b7153..f0fe7de37 100644
--- a/apps/walletd/lib/__snapshots__/signSeedV2.spec.ts.snap
+++ b/apps/walletd/lib/__snapshots__/signSeedV2.spec.ts.snap
@@ -8,16 +8,18 @@ Object {
       Object {
         "parent": Object {
           "id": "aa3e781330c9b3991e0141807df1327fadf114ca6c37acb9e58004f942d91dfb",
-          "leafIndex": 304248,
           "maturityHeight": 0,
-          "merkleProof": Array [
-            "0a7a4c392f78899e3c38c5cd9e6a673b2c7afec97930af539af9c8e20209aa78",
-            "a1e074dc48634a234b7366a0d7ab19cd05e3e698e1d44bf07e24d75ae0c65b3c",
-          ],
           "siacoinOutput": Object {
             "address": "90c6057cdd2463eca61f83796e83152dbba28b6cb9a74831a043833051ec9f422726bfff2ee8",
             "value": "1000000000000000000000000",
           },
+          "stateElement": Object {
+            "leafIndex": 304248,
+            "merkleProof": Array [
+              "0a7a4c392f78899e3c38c5cd9e6a673b2c7afec97930af539af9c8e20209aa78",
+              "a1e074dc48634a234b7366a0d7ab19cd05e3e698e1d44bf07e24d75ae0c65b3c",
+            ],
+          },
         },
         "satisfiedPolicy": Object {
           "policy": Object {
@@ -38,16 +40,18 @@ Object {
       Object {
         "parent": Object {
           "id": "32e430158591b4073a6834e9f4c4b67162e348844f569f4e472896bb72efb724",
-          "leafIndex": 305723,
           "maturityHeight": 0,
-          "merkleProof": Array [
-            "8c02aeec48de589ce497ebe72fb8b527cfe022ef513fcfdc56745c84832f00ec",
-            "1bf63b9959e60272fd7a48a8cecd4120a852c0e14557ea27ccad6ea2071e70b3",
-          ],
           "siacoinOutput": Object {
             "address": "f2dbf56b5b0c698d7fbf43f646c76169d84e597e8b37fada97348beeecaa812d400ac4ce7981",
             "value": "97984280000000000000000000",
           },
+          "stateElement": Object {
+            "leafIndex": 305723,
+            "merkleProof": Array [
+              "8c02aeec48de589ce497ebe72fb8b527cfe022ef513fcfdc56745c84832f00ec",
+              "1bf63b9959e60272fd7a48a8cecd4120a852c0e14557ea27ccad6ea2071e70b3",
+            ],
+          },
         },
         "satisfiedPolicy": Object {
           "policy": Object {
diff --git a/apps/walletd/lib/mocks/mockSeedWallet.ts b/apps/walletd/lib/mocks/mockSeedWallet.ts
index 64d698408..d4c31ff4b 100644
--- a/apps/walletd/lib/mocks/mockSeedWallet.ts
+++ b/apps/walletd/lib/mocks/mockSeedWallet.ts
@@ -47,20 +47,22 @@ export function getMockScenarioSeedWallet() {
     outputs: [
       {
         id: 'aa3e781330c9b3991e0141807df1327fadf114ca6c37acb9e58004f942d91dfb',
-        leafIndex: 304248,
-        merkleProof: [
-          '0a7a4c392f78899e3c38c5cd9e6a673b2c7afec97930af539af9c8e20209aa78',
-          'a1e074dc48634a234b7366a0d7ab19cd05e3e698e1d44bf07e24d75ae0c65b3c',
-          '44d107342962e2068d289ce090c87b7bf0c847f734bdfad10db5546e402c3ad7',
-          '64ea3e65ecd5ebc1c0ce014673148060855ce550571208b6303b8e2a83e33451',
-          '19e37bf7747c6d8c7b87d2474dbbd3a8f5b26d89642f8e1af4b9b02abdfb2ea6',
-          '1fc2ac9f70211a3be6f334db14feb8b327458aee49d3539770640cbdec9b4a5f',
-          'defbbc18c64349f11e75537955861ececce0fadf10baec456f6c74b024820af1',
-          '87d27ff868ca3b1dce59ae754eaec48239718e81e2e6f3b7b418f5a00362bcf7',
-          '93d823c55fbd09de462a8e355921433b3693d63de58ea8e2780a2c2ffabd0fee',
-          'a68820d6b79b2735b15c69d0fc26b11252bb27f22b9088559ed13f9420f5dda1',
-          '1bbcead690290291ea9628214a121ef783411693975171803bf5716a3a6ff19b',
-        ],
+        stateElement: {
+          leafIndex: 304248,
+          merkleProof: [
+            '0a7a4c392f78899e3c38c5cd9e6a673b2c7afec97930af539af9c8e20209aa78',
+            'a1e074dc48634a234b7366a0d7ab19cd05e3e698e1d44bf07e24d75ae0c65b3c',
+            '44d107342962e2068d289ce090c87b7bf0c847f734bdfad10db5546e402c3ad7',
+            '64ea3e65ecd5ebc1c0ce014673148060855ce550571208b6303b8e2a83e33451',
+            '19e37bf7747c6d8c7b87d2474dbbd3a8f5b26d89642f8e1af4b9b02abdfb2ea6',
+            '1fc2ac9f70211a3be6f334db14feb8b327458aee49d3539770640cbdec9b4a5f',
+            'defbbc18c64349f11e75537955861ececce0fadf10baec456f6c74b024820af1',
+            '87d27ff868ca3b1dce59ae754eaec48239718e81e2e6f3b7b418f5a00362bcf7',
+            '93d823c55fbd09de462a8e355921433b3693d63de58ea8e2780a2c2ffabd0fee',
+            'a68820d6b79b2735b15c69d0fc26b11252bb27f22b9088559ed13f9420f5dda1',
+            '1bbcead690290291ea9628214a121ef783411693975171803bf5716a3a6ff19b',
+          ],
+        },
         siacoinOutput: {
           value: '1000000000000000000000000',
           address:
@@ -70,15 +72,17 @@ export function getMockScenarioSeedWallet() {
       },
       {
         id: '32e430158591b4073a6834e9f4c4b67162e348844f569f4e472896bb72efb724',
-        leafIndex: 305723,
-        merkleProof: [
-          '8c02aeec48de589ce497ebe72fb8b527cfe022ef513fcfdc56745c84832f00ec',
-          '1bf63b9959e60272fd7a48a8cecd4120a852c0e14557ea27ccad6ea2071e70b3',
-          '21b7e1606e9fd677059c58a1a687682182f71ce09e071431dcaff823a3a5d49e',
-          'e81ac37d3b4db6166dc1bb10ebfa49f57cbf99aababd36ee4e3e5e12082dc6dc',
-          'ecc307c6c3e505d97ccf821938e5e5702ef0130d33c991ca95735f7d9706a4b8',
-          '9560060ee399793f102e092afdfdbdd33692706256955e8390af552de0addfc0',
-        ],
+        stateElement: {
+          leafIndex: 305723,
+          merkleProof: [
+            '8c02aeec48de589ce497ebe72fb8b527cfe022ef513fcfdc56745c84832f00ec',
+            '1bf63b9959e60272fd7a48a8cecd4120a852c0e14557ea27ccad6ea2071e70b3',
+            '21b7e1606e9fd677059c58a1a687682182f71ce09e071431dcaff823a3a5d49e',
+            'e81ac37d3b4db6166dc1bb10ebfa49f57cbf99aababd36ee4e3e5e12082dc6dc',
+            'ecc307c6c3e505d97ccf821938e5e5702ef0130d33c991ca95735f7d9706a4b8',
+            '9560060ee399793f102e092afdfdbdd33692706256955e8390af552de0addfc0',
+          ],
+        },
         siacoinOutput: {
           value: '97988210000000000000000000',
           address:
@@ -161,11 +165,13 @@ export function getMockScenarioSeedWallet() {
               address:
                 '90c6057cdd2463eca61f83796e83152dbba28b6cb9a74831a043833051ec9f422726bfff2ee8',
             },
-            leafIndex: 304248,
-            merkleProof: [
-              '0a7a4c392f78899e3c38c5cd9e6a673b2c7afec97930af539af9c8e20209aa78',
-              'a1e074dc48634a234b7366a0d7ab19cd05e3e698e1d44bf07e24d75ae0c65b3c',
-            ],
+            stateElement: {
+              leafIndex: 304248,
+              merkleProof: [
+                '0a7a4c392f78899e3c38c5cd9e6a673b2c7afec97930af539af9c8e20209aa78',
+                'a1e074dc48634a234b7366a0d7ab19cd05e3e698e1d44bf07e24d75ae0c65b3c',
+              ],
+            },
           },
           satisfiedPolicy: {
             policy: {
@@ -189,11 +195,13 @@ export function getMockScenarioSeedWallet() {
               address:
                 'f2dbf56b5b0c698d7fbf43f646c76169d84e597e8b37fada97348beeecaa812d400ac4ce7981',
             },
-            leafIndex: 305723,
-            merkleProof: [
-              '8c02aeec48de589ce497ebe72fb8b527cfe022ef513fcfdc56745c84832f00ec',
-              '1bf63b9959e60272fd7a48a8cecd4120a852c0e14557ea27ccad6ea2071e70b3',
-            ],
+            stateElement: {
+              leafIndex: 305723,
+              merkleProof: [
+                '8c02aeec48de589ce497ebe72fb8b527cfe022ef513fcfdc56745c84832f00ec',
+                '1bf63b9959e60272fd7a48a8cecd4120a852c0e14557ea27ccad6ea2071e70b3',
+              ],
+            },
           },
           satisfiedPolicy: {
             policy: {
diff --git a/libs/types/src/core.ts b/libs/types/src/core.ts
index 82e3ac2d8..6a04f5ed4 100644
--- a/libs/types/src/core.ts
+++ b/libs/types/src/core.ts
@@ -17,9 +17,8 @@ export type Address = string
 export type MerkleProof = Hash256[] | null
 
 export type StateElement = {
-  id: string
   leafIndex: number
-  merkleProof: MerkleProof
+  merkleProof?: MerkleProof
 }
 
 export type UnlockConditions = {
@@ -59,14 +58,18 @@ export type SiacoinOutput = {
   address: string
 }
 
-export type SiacoinElement = StateElement & {
-  siacoinOutput: SiacoinOutput
+export type SiacoinElement = {
+  id: string
   maturityHeight: number
+  siacoinOutput: SiacoinOutput
+  stateElement: StateElement
 }
 
-export type SiafundElement = StateElement & {
+export type SiafundElement = {
+  id: string
+  maturityHeight: number
   siafundOutput: SiafundOutput
-  claimStart: string
+  stateElement: StateElement
 }
 
 export type CoveredFields = {
@@ -83,8 +86,10 @@ export type CoveredFields = {
   signatures?: number[]
 }
 
-export type FileContractElement = StateElement & {
+export type FileContractElement = {
+  id: string
   fileContract: FileContract
+  stateElement: StateElement
 }
 
 export type FileContract = {
diff --git a/libs/types/src/v2.ts b/libs/types/src/v2.ts
index d1f112ca4..18d5cd222 100644
--- a/libs/types/src/v2.ts
+++ b/libs/types/src/v2.ts
@@ -1,5 +1,6 @@
 import {
   Address,
+  BlockID,
   ChainIndex,
   Currency,
   Hash256,
@@ -97,12 +98,22 @@ export type SatisfiedPolicy = {
   preimages?: string[]
 }
 
-export type V2FileContractElement = StateElement & {
+export type V2FileContractElement = {
+  id: string
   v2FileContract: V2FileContract
+  stateElement: StateElement
 }
 
-export type AttestationElement = StateElement & {
+export type AttestationElement = {
+  id: string
   attestation: Attestation
+  stateElement: StateElement
+}
+
+export type ChainIndexElement = {
+  id: BlockID
+  stateElement: StateElement
+  chainIndex: ChainIndex
 }
 
 type V2FileContractResolutionTypeBase = {
@@ -137,9 +148,7 @@ export type V2FileContractResolutionDataStorageProof =
   V2FileContractResolutionTypeBase & {
     type: 'storage proof'
     resolution: {
-      proofIndex: StateElement & {
-        chainIndex: ChainIndex
-      }
+      proofIndex: ChainIndexElement
       leaf: string
       proof: MerkleProof
     }


Reviews:
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

This PR updates the v2 element structure to align with the core changes. Key changes include:
- Removing StateElement intersection and introducing explicit "id" and "stateElement" properties in various element types.
- Adding a new ChainIndexElement type to encapsulate block identification and chain index data.
- Adjusting the core StateElement type by making "merkleProof" optional.

### Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

| File                              | Description                                                                                         |
| --------------------------------- | --------------------------------------------------------------------------------------------------- |
| libs/types/src/v2.ts              | Updated v2 element types to use explicit "id" and "stateElement" properties; added ChainIndexElement. |
| libs/types/src/core.ts            | Refactored core types by removing "id" from StateElement, making "merkleProof" optional, and updating element types accordingly. |
| .changeset/two-numbers-glow.md    | Added changeset noting the update to the v2 element structure.                                      |




state: COMMENTED
author_association: NONE
submitted_at: 2025-05-05T14:42:03Z
user: login: telestrial
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T16:22:19Z
user: login: peterjan
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-06T08:24:56Z

Review comments:
diff_hunk: @@ -97,12 +98,22 @@ export type SatisfiedPolicy = {
   preimages?: string[]
 }
 
-export type V2FileContractElement = StateElement & {
+export type V2FileContractElement = {
path: libs/types/src/v2.ts
user: login: Copilot
body: [nitpick] Consider adding inline documentation for the new 'id' field to clarify its role within the V2FileContractElement type.
```suggestion
export type V2FileContractElement = {
  // A unique identifier for the file contract element.
```
created_at: 2025-05-05T14:42:02Z
author_association: NONE
diff_hunk: @@ -17,9 +17,8 @@ export type Address = string
 export type MerkleProof = Hash256[] | null
 
path: libs/types/src/core.ts
user: login: Copilot
body: [nitpick] The change to make 'merkleProof' optional in StateElement impacts the public API; ensure that the scenarios for its omission are clearly documented.
```suggestion

/**
 * Represents an element in the state with an optional Merkle proof.
 * 
 * - `leafIndex`: The index of the leaf in the Merkle tree.
 * - `merkleProof`: An optional Merkle proof for the element. This will be `undefined` 
 *   if the proof is not available or not required for the current operation.
 */
```
created_at: 2025-05-05T14:42:02Z
author_association: NONE
diff_hunk: @@ -97,12 +98,22 @@ export type SatisfiedPolicy = {
   preimages?: string[]
 }
 
-export type V2FileContractElement = StateElement & {
+export type V2FileContractElement = {
+  id: string
   v2FileContract: V2FileContract
+  stateElement: StateElement
 }
 
-export type AttestationElement = StateElement & {
+export type AttestationElement = {
+  id: string
   attestation: Attestation
+  stateElement: StateElement
+}
+
path: libs/types/src/v2.ts
user: login: Copilot
body: [nitpick] Add inline documentation for the ChainIndexElement type to explain its purpose and how it differs from other element types.
```suggestion

/**
 * Represents an element that maps a BlockID to its associated StateElement and ChainIndex.
 * 
 * This type is used to track the state of a specific block in the blockchain, including its
 * position in the chain (via `chainIndex`) and its associated state information (via `stateElement`).
 * 
 * Unlike other element types such as `V2FileContractElement` or `AttestationElement`, which
 * are tied to specific domain objects (e.g., file contracts or attestations), `ChainIndexElement`
 * is focused on the blockchain structure itself.
 */
```
created_at: 2025-05-05T14:42:03Z
author_association: NONE

PR comments:
user: login: vercel[bot]
created_at: 2025-05-05T14:41:00Z
body: [vc]: #tlibrM5JxQh1Vg9pFkdOs7iKWBJtTbMiYdalc3+U6B8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJob3N0ZCIsInJvb3REaXJlY3RvcnkiOm51bGwsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9zaWEtZm91bmRhdGlvbi9ob3N0ZC81V0g0NXJqbnY5V0hhcU0zYkh6Y2hGUTZTcHdwIiwicHJldmlld1VybCI6Imhvc3RkLWdpdC1maXh0eXBlc3YyZWxlbWVudHN0cnVjdHVyZXdhc2NoYW5nZWQtc2lhLWZvdW5kYXRpb24udmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJJR05PUkVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6IiJ9fSx7Im5hbWUiOiJleHBsb3JlciIsInJvb3REaXJlY3RvcnkiOm51bGwsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9zaWEtZm91bmRhdGlvbi9leHBsb3Jlci8yaUZFQ1FVb0I2YnFNREVRQXBtS1FiY29FcWtBIiwicHJldmlld1VybCI6ImV4cGxvcmVyLWdpdC1maXh0eXBlc3YyZWxlbWVudHN0cnVjdHVyZXdhLTNjYzE3Ni1zaWEtZm91bmRhdGlvbi52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IklHTk9SRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn19LHsibmFtZSI6InJlbnRlcmQiLCJyb290RGlyZWN0b3J5IjpudWxsLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vc2lhLWZvdW5kYXRpb24vcmVudGVyZC9FTUI3TnhnZzQzNnFBdWdVOWhqSFNOZ0VXeUY0IiwicHJldmlld1VybCI6InJlbnRlcmQtZ2l0LWZpeHR5cGVzdjJlbGVtZW50c3RydWN0dXJld2FzY2hhbmdlZC1zaWEtZm91bmRhdGlvbi52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IklHTk9SRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn19LHsibmFtZSI6IndlYnNpdGUiLCJyb290RGlyZWN0b3J5IjpudWxsLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vc2lhLWZvdW5kYXRpb24vd2Vic2l0ZS9HYXg2Wk1uRk5rYUM2aTY5MmtoaVNFRVRYVVBDIiwicHJldmlld1VybCI6IndlYnNpdGUtZ2l0LWZpeHR5cGVzdjJlbGVtZW50c3RydWN0dXJld2FzY2hhbmdlZC1zaWEtZm91bmRhdGlvbi52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IklHTk9SRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn19LHsibmFtZSI6ImV4cGxvcmVyLXplbiIsInJvb3REaXJlY3RvcnkiOm51bGwsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9zaWEtZm91bmRhdGlvbi9leHBsb3Jlci16ZW4vQm5lSEpLOG9acTY0dDlXcUwzYzh2TGdoVGp1NCIsInByZXZpZXdVcmwiOiJleHBsb3Jlci16ZW4tZ2l0LWZpeHR5cGVzdjJlbGVtZW50c3RydWN0dS1kZDkyNDMtc2lhLWZvdW5kYXRpb24udmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJJR05PUkVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6IiJ9fV19
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)


<details><summary>5 Skipped Deployments</summary>

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **explorer** | ⬜️ Ignored ([Inspect](https://vercel.com/sia-foundation/explorer/2iFECQUoB6bqMDEQApmKQbcoEqkA)) | [Visit Preview](https://explorer-git-fixtypesv2elementstructurewa-3cc176-sia-foundation.vercel.app) |  | May 7, 2025 3:59pm |
| **explorer-zen** | ⬜️ Ignored ([Inspect](https://vercel.com/sia-foundation/explorer-zen/BneHJK8oZq64t9WqL3c8vLghTju4)) | [Visit Preview](https://explorer-zen-git-fixtypesv2elementstructu-dd9243-sia-foundation.vercel.app) |  | May 7, 2025 3:59pm |
| **hostd** | ⬜️ Ignored ([Inspect](https://vercel.com/sia-foundation/hostd/5WH45rjnv9WHaqM3bHzchFQ6Spwp)) | [Visit Preview](https://hostd-git-fixtypesv2elementstructurewaschanged-sia-foundation.vercel.app) |  | May 7, 2025 3:59pm |
| **renterd** | ⬜️ Ignored ([Inspect](https://vercel.com/sia-foundation/renterd/EMB7Nxgg436qAugU9hjHSNgEWyF4)) | [Visit Preview](https://renterd-git-fixtypesv2elementstructurewaschanged-sia-foundation.vercel.app) |  | May 7, 2025 3:59pm |
| **website** | ⬜️ Ignored ([Inspect](https://vercel.com/sia-foundation/website/Gax6ZMnFNkaC6i692khiSEETXUPC)) | [Visit Preview](https://website-git-fixtypesv2elementstructurewaschanged-sia-foundation.vercel.app) |  | May 7, 2025 3:59pm |
</details>






author_association: NONE
user: login: changeset-bot[bot]
created_at: 2025-05-05T14:41:02Z
body: ###  🦋  Changeset detected

Latest commit: a91919b24b69cf25e11ecb00fa9ec39d92ebf5d8

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 21 packages</summary>

  | Name                             | Type  |
| -------------------------------- | ----- |
| @siafoundation/types             | Minor |
| @siafoundation/clusterd          | Patch |
| @siafoundation/design-system     | Patch |
| @siafoundation/explored-types    | Patch |
| @siafoundation/hostd-types       | Patch |
| @siafoundation/react-core        | Major |
| @siafoundation/renterd-types     | Patch |
| @siafoundation/sdk               | Patch |
| @siafoundation/units             | Patch |
| @siafoundation/walletd-mock      | Patch |
| @siafoundation/walletd-types     | Patch |
| @siafoundation/e2e               | Patch |
| @siafoundation/explored-js       | Patch |
| @siafoundation/explored-react    | Patch |
| @siafoundation/hostd-js          | Patch |
| @siafoundation/hostd-react       | Patch |
| @siafoundation/renterd-react     | Patch |
| @siafoundation/sia-central-react | Patch |
| @siafoundation/walletd-react     | Patch |
| @siafoundation/renterd-js        | Patch |
| @siafoundation/walletd-js        | Patch |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/SiaFoundation/web/new/fix_types_v2_element_structure_was_changed?filename=.changeset/dirty-buses-care.md&value=---%0A%22%40siafoundation%2Ftypes%22%3A%20patch%0A%22walletd%22%3A%20patch%0A---%0A%0Afix(types)%3A%20v2%20element%20structure%20change%0A)


author_association: NONE
user: login: alexfreska
created_at: 2025-05-05T14:41:21Z
body: * **#1051** <a href="https://app.graphite.dev/github/pr/SiaFoundation/web/1051?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#1050** <a href="https://app.graphite.dev/github/pr/SiaFoundation/web/1050?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#1048** <a href="https://app.graphite.dev/github/pr/SiaFoundation/web/1048?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a> 👈 <a href="https://app.graphite.dev/github/pr/SiaFoundation/web/1048?utm_source=stack-comment-view-in-graphite" target="_blank">(View in Graphite)</a>
* `main`


<h2></h2>

This stack of pull requests is managed by <a href="https://graphite.dev?utm-source=stack-comment"><b>Graphite</b></a>. Learn more about <a href="https://stacking.dev/?utm_source=stack-comment">stacking</a>.
<!-- Current dependencies on/for this PR: -->
author_association: MEMBER
user: login: telestrial
created_at: 2025-05-05T16:22:15Z
body: We'll have to wait for tests to confirm, but I believe this change plays nice with the explorer. Getting ID on core V2FileContract is nice, particularly where it is embedded in other types.
author_association: CONTRIBUTOR
user: login: alexfreska
created_at: 2025-05-07T17:30:24Z
body: ### Merge activity

* **May 7, 1:30 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/SiaFoundation/web/1048).
* **May 7, 1:30 PM EDT**: @alexfreska merged this pull request with [Graphite](https://app.graphite.dev/github/pr/SiaFoundation/web/1048).

author_association: MEMBER