Skip to content

Commit

Permalink
feat(explored-types): add hostAnnouncements to ExplorerTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
telestrial committed Sep 24, 2024
1 parent 137b55d commit 9d752e0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-mangos-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/explored-types': minor
---

Added host announcements to the ExplorerTransaction type.
12 changes: 12 additions & 0 deletions libs/explored-types/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
FileContractElement,
FileContractID,
Hash256,
PublicKey,
SiacoinElement,
SiacoinInput,
SiacoinOutputID,
Expand Down Expand Up @@ -111,6 +112,16 @@ export type TxpoolTransactions = {
// for more independent data types--one would not need the original contract to display
// a list of revisions, for example.

/**
* HostAnnouncement represents a signed announcement of a host's network address.
* Announcements may be made via arbitrary data (in a v1 transaction) or via attestation
* (in a v2 transaction).
*/
type HostAnnouncement = {
publicKey: PublicKey
netAddress: string
}

/**
* The origin of a `SiacoinOutput`--whether it came from a miner or a transaction.
*/
Expand Down Expand Up @@ -181,6 +192,7 @@ export type ExplorerTransaction = {
minerFees: Currency
arbitraryData: string[][]
signatures: TransactionSignature[]
hostAnnouncements: HostAnnouncement[]
}

/**
Expand Down

0 comments on commit 9d752e0

Please sign in to comment.