Created
February 22, 2021 22:00
-
-
Save christroutner/c7623a1daa4e7eb88d1bbcf504011b27 to your computer and use it in GitHub Desktop.
Find NFT Group (parent) given a TXID of an NFT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id": "60272eed863a80b749b905e7", | |
"tokenDetails": { | |
"tokenIdHex": "eeddccc4d716f04157ea132ac93a48040fea34a6b57f3d8f0cccb7d1a731ab2b", | |
"nftGroupIdHex": "a9a2458a0f9f0761d5b8725c256f2e7fa35b9de4dec6f47b46e9f20d92d0e395" | |
}, | |
"graphTxn": { | |
"txid": "eeddccc4d716f04157ea132ac93a48040fea34a6b57f3d8f0cccb7d1a731ab2b", | |
"details": { | |
"decimals": 0, | |
"tokenIdHex": "eeddccc4d716f04157ea132ac93a48040fea34a6b57f3d8f0cccb7d1a731ab2b", | |
"timestamp": null, | |
"timestamp_unix": null, | |
"transactionType": "GENESIS", | |
"versionType": 65, | |
"documentUri": "https://FullStack.cash", | |
"documentSha256Hex": null, | |
"symbol": "NFT004", | |
"name": "NFT Child", | |
"batonVout": null, | |
"containsBaton": false, | |
"genesisOrMintQuantity": "1", | |
"sendOutputs": null | |
}, | |
"outputs": { | |
"slpAmount": "1", | |
"address": "simpleledger:qrm0c67wwqh0w7wjxua2gdt2xggnm90xwsr5k22euj", | |
"vout": 1, | |
"bchSatoshis": 546, | |
"spendTxid": null, | |
"status": "UNSPENT", | |
"invalidReason": null | |
}, | |
"inputs": [ | |
], | |
"_blockHash": "AAAAAAAAAAABNg/kJin0E26a3sU1RrJ43g5+94ju0yg=", | |
"_pruneHeight": null | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"v": 3, | |
"q": { | |
"db": ["g"], | |
"aggregate": [ | |
{ | |
"$match": { | |
"tokenDetails.tokenIdHex": { | |
"$in": [ | |
"eeddccc4d716f04157ea132ac93a48040fea34a6b57f3d8f0cccb7d1a731ab2b" | |
] | |
} | |
} | |
}, | |
{ "$unwind": "$graphTxn.outputs" }, | |
{ | |
"$match": { | |
"graphTxn.outputs.status": "UNSPENT", | |
"graphTxn.outputs.slpAmount": { | |
"$gt": 0 | |
} | |
} | |
} | |
], | |
"limit": 100, | |
"skip": 0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment