Reference for all available Bitcoin event scopes in Chainhook predicates.
Bitcoin scopes define the if_this
conditions in your Chainhook predicates. Each scope type monitors specific on-chain events on the Bitcoin blockchain.
txid
matches transactions by their transaction ID.
Name | Type | Required | Description |
---|
equals | string | Yes | 32-byte hex encoded transaction ID to match |
"equals": "0xfaaac1833dc4883e7ec28f61e35b41f896c395f8d288b1a177155de2abd6052f"
outputs
matches transactions based on their output scripts.
Operation | Description |
---|
op_return | Data embedded in transactions |
p2pkh | Pay-to-Public-Key-Hash outputs |
p2sh | Pay-to-Script-Hash outputs |
p2wpkh | Pay-to-Witness-Public-Key-Hash outputs |
p2wsh | Pay-to-Witness-Script-Hash outputs |
descriptor | Output descriptors for address derivation |
"equals" | "starts_with" | "ends_with": string
Parameter | Type | Required | Description |
---|
equals | string | No* | Match exact data |
starts_with | string | No* | Match data prefix |
ends_with | string | No* | Match data suffix |
*One of these parameters is required
"starts_with": "0xbtc2100"
Parameter | Type | Required | Description |
---|
equals | string | Yes | Bitcoin address to match |
"equals": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
Parameter | Type | Required | Description |
---|
equals | string | Yes | Script hash address to match |
"equals": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
Parameter | Type | Required | Description |
---|
equals | string | Yes | Native SegWit address to match |
"equals": "bc1qexampleaddress"
Parameter | Type | Required | Description |
---|
equals | string | Yes | Native SegWit script address to match |
"equals": "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3"
"range": [number, number]
Parameter | Type | Required | Description |
---|
expression | string | Yes | Output descriptor string |
range | array | Yes | Index range to derive [start, end] |
"expression": "wpkh(xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/0/*)",
This monitors addresses derived from index 0 to 10 of the provided extended public key.
stacks_protocol
matches Bitcoin transactions related to Stacks Proof of Transfer operations.
"scope": "stacks_protocol",
Name | Type | Required | Description |
---|
operation | string | Yes | PoT operation type to match |
Operation | Description |
---|
block_committed | Stacks block commitments |
leader_registered | Mining leader registrations |
inscription_feed | Ordinal inscription events |
stx_transferred | STX token transfers |
stx_locked | STX token locking events |
"scope": "stacks_protocol",
"operation": "block_committed"
"scope": "stacks_protocol",
"operation": "stx_transferred"
"scope": "stacks_protocol",
"operation": "inscription_feed"