Hedera action reference
This page is generated from the plugin registry. Do not edit it by hand.
Verify messages on Hedera Consensus Service via the public mirror node
For guidance and examples see the Hedera guide.
Set actionType in a node’s config to the action type shown under each heading. See the workflow definition page for the node format.
| Action | Action type |
|---|---|
| Verify HCS Message | hedera/verify-message |
Verify HCS Message
Action type: hedera/verify-message. Connection: not required.
Read a message from an HCS topic via the public mirror node and check it against an expected payload
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
topicId | string | Yes | Topic ID. The HCS topic to read, e.g. 0.0.99999999. | ||
sequenceNumber | string | Yes | Sequence Number. The topic sequence number to verify. | ||
expectedMessage | string | No | Expected Message. When set, verification succeeds only if the anchored payload matches (surrounding whitespace is ignored on both sides). Leave empty to just read the payload. | ||
expectedSubmitter | string | No | Expected Submitter. Hedera account id that must have submitted the message (e.g. 0.0.12345). Set this when gating a payment on verified: true, on a topic without a submit key anyone can write matching bytes, so the submitter is what proves authorship. Leave empty to skip the submitter check (it is still reported as payerAccountId). | ||
network | string | Yes | testnet | testnet, mainnet | Network. Which Hedera network’s public mirror node to query. |
Outputs
| Output | Description |
|---|---|
success | Whether the verification query completed |
found | Whether the mirror holds a message at this sequence (empty payloads count as found) |
verified | Whether the payload matches the expected message AND, when an expected submitter is configured, the message was submitted by that account (surrounding whitespace ignored; only asserted when an expected message is provided) |
message | The decoded anchored payload |
consensusTimestamp | Network-assigned consensus timestamp |
payerAccountId | The account that submitted this message, as recorded by the mirror, always exposed, so a workflow can gate on it downstream even without an expected submitter configured |
sequenceNumber | The verified sequence number |
error | Error message if failed |