diff --git a/.changeset/thick-mangos-cheat.md b/.changeset/thick-mangos-cheat.md new file mode 100644 index 000000000..c7fb74813 --- /dev/null +++ b/.changeset/thick-mangos-cheat.md @@ -0,0 +1,5 @@ +--- +'@siafoundation/explored-types': minor +--- + +Added host announcements to the ExplorerTransaction type. diff --git a/libs/explored-types/src/types.ts b/libs/explored-types/src/types.ts index f05d20801..b5476973c 100644 --- a/libs/explored-types/src/types.ts +++ b/libs/explored-types/src/types.ts @@ -9,6 +9,7 @@ import type { FileContractElement, FileContractID, Hash256, + PublicKey, SiacoinElement, SiacoinInput, SiacoinOutputID, @@ -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. */ @@ -181,6 +192,7 @@ export type ExplorerTransaction = { minerFees: Currency arbitraryData: string[][] signatures: TransactionSignature[] + hostAnnouncements: HostAnnouncement[] } /**