<p>Since Bitcoin core is unaware of Ordinals, I guess you'd have ask it for the raw tx data and parse the witness data looking for the &quot;ord&quot; fingerprint, following Casey Rodarmor's specification. You might also want to check the Inscription  MIME type etc to distinguish BRC-20 from other inscription types.</p>
<hr />
<p>Look for ASCII &quot;ord&quot; (hex 6f7264) at the appropriate offset in the second† witness component. It is described in <a href="https://docs.ordinals.com/inscriptions.html" rel="nofollow noreferrer">the documentation</a></p>
<p>See <a href="https://bitcoin.stackexchange.com/q/118988/13866">How to differentiate between BTC transactions and BRC20 transactions on a blockchain?</a></p>
<p>†strictly penultimate IIRC.</p>

CC BY-SA 4.0
2023-06-07T13:11:35.507Z
"txinwitness": ["4491854e7bd95a6cb10955829e37b899bdb3682950922d4cfe7aa14f38e0e7976a6786ee6bf4cb4a07dc7672e4955180f9425081d11f2fd03387de7ea344ecce",        "20117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423eac0628a3d1958801750063036f7264010118746578742f706c61696e3b636861727365743d7574662d3800397b2270223a226272632d3230222c226f70223a227472616e73666572222c227469636b223a224d585243222c22616d74223a2233353030227d68",
 "c0117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423e"
 ],
this is the witness data how do I look for "ord" finger print
Gencehan ARPAÇAY
CC BY-SA 4.0
2023-06-07T14:41:00.930Z
Look for ASCII "ord" (hex 6f7264) at the appropriate offset in the second witness component. It is described in [the documentation](https://docs.ordinals.com/inscriptions.html)
RedGrittyBrick
CC BY-SA 4.0
2023-06-07T12:51:11.260Z
2023-07-23T09:57:38.253Z
2023-07-23T09:57:38.253Z
RedGrittyBrick
<p>I want to get the mempool data and find out which tranactions are ordinal inscription transaction. So if I want to find the mempool that will be confirmed and find how many ordinal inscription transactions are there what shell I check. Is there a way to do this using bitcoin-cli?</p>
<p>Initially I thought first getting the bestblock by</p>
<pre><code>    # Get the blockhash of the best block, but not right for now
    cmd = ['bitcoin-cli', 'getbestblockhash'] # Shall get the last nconfirmed block
    result = subprocess.run(cmd, capture_output=True, text=True)
    best_block_hash = result.stdout.strip()
    # Get transaction IDs from of the block
    cmd = ['bitcoin-cli', 'getblock', best_block_hash]
    result = subprocess.run(cmd, capture_output=True, text=True)
    mempool_txids = json.loads(result.stdout)
</code></pre>
<p>Assuming I have the txids of the last memblock how can I understand if the transaction is a ordinal inscription transaction?</p>

<mempool><ordinals>
How can we check if a transaction is an ordinal transaction in the mempool?
Gencehan ARPAÇAY
# How can we check if a transaction is an ordinal transaction in the mempool?

(Asked by: username_0 on 2023-06-07)

I want to get the mempool data and find out which tranactions are ordinal inscription transaction. So if I want to find the mempool that will be confirmed and find how many ordinal inscription transactions are there what shell I check. Is there a way to do this using bitcoin-cli?

Initially I thought first getting the bestblock by

```
    # Get the blockhash of the best block, but not right for now
    cmd = ['bitcoin-cli', 'getbestblockhash'] # Shall get the last nconfirmed block
    result = subprocess.run(cmd, capture_output=True, text=True)
    best_block_hash = result.stdout.strip()
    # Get transaction IDs from of the block
    cmd = ['bitcoin-cli', 'getblock', best_block_hash]
    result = subprocess.run(cmd, capture_output=True, text=True)
    mempool_txids = json.loads(result.stdout)

```

Assuming I have the txids of the last memblock how can I understand if the transaction is a ordinal inscription transaction?

**Tags:** mempool, ordinals


---

## 1 answers

### Answer by username_1 on 2023-06-07. Score: 1 | Accepted answer

Since Bitcoin core is unaware of Ordinals, I guess you'd have ask it for the raw tx data and parse the witness data looking for the "ord" fingerprint, following Casey Rodarmor's specification. You might also want to check the Inscription MIME type etc to distinguish BRC-20 from other inscription types.

---

Look for ASCII "ord" (hex 6f7264) at the appropriate offset in the second† witness component. It is described in [the documentation](https://docs.ordinals.com/inscriptions.html)

See [How to differentiate between BTC transactions and BRC20 transactions on a blockchain?](https://bitcoin.stackexchange.com/q/118988/13866)

†strictly penultimate IIRC.

> **Comments:**
> **username_0**: "txinwitness": ["4491854e7bd95a6cb10955829e37b899bdb3682950922d4cfe7aa14f38e0e7976a6786ee6bf4cb4a07dc7672e4955180f9425081d11f2fd03387de7ea344ecce",        "20117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423eac0628a3d1958801750063036f7264010118746578742f706c61696e3b636861727365743d7574662d3800397b2270223a226272632d3230222c226f70223a227472616e73666572222c227469636b223a224d585243222c22616d74223a2233353030227d68",  "c0117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423e"  ], this is the witness data how do I look for "ord" finger print  
> **username_1**: Look for ASCII "ord" (hex 6f7264) at the appropriate offset in the second witness component. It is described in [the documentation](https://docs.ordinals.com/inscriptions.html)  

---

