Skip to content

Identifying RelayX NFTs

RelayX NFTs are Run “jigs”. Many collections, NPG among them, minted every card from one class, with the picture encrypted and no number in the metadata. To show a holder “NPG #0417” the wallet needs a map from each jig to its card. There are four ways to build one, from best to worst.

If the token states its number or name, use it. The early NPG collections (one class per girl, e.g. KAZUYO, AIKA) work this way and aren’t encrypted.

RelayX encrypted pictures with a per-collection reveal key: 32 hex characters shown to the creator when the collection was made. The image output is OP_FALSE OP_RETURN with these pushes:

"UNIV" · CBOR {cty, proto: "relay.encrypted-nft"} · CBOR bytes(ciphertext) · f6 · COSE [{iv, alg: "A128GCM", tag}, null]
  • key: the reveal key as 16 bytes
  • cipher: AES-128-GCM, with iv and tag from the COSE header
  • extra authenticated data: CBOR(["enc", <the header map, byte for byte>, ""]) = 83 63 'enc' <map> 60
  • ciphertext: the contents of the CBOR byte string (strip 5a + 4-byte length)
  • the plaintext is itself a CBOR byte string holding the image

Every NPG card has its number printed on it, so after decrypting, read the number or match the image to the release files. This is how NPG Series 1 was mapped.

AES-GCM doesn’t change length, so each encrypted picture is exactly as long as the file that was minted, plus 5 bytes. If the creator kept the release files, match lengths. No key is needed, and the length is near the start of the output, so even truncated transaction dumps work. This mapped 3,028 of the 3,333 NPG Series 2 jigs.

A mint spends the class and puts it back, so the class’s spend chain lists every mint in order. Run outputs start right after the Run OP_RETURN output: image at o0, Run at o1, class back at o2, new jig at o3. Some mints use a bare 6a OP_RETURN, so accept both forms. Fill the gaps between length matches by order, and watch for skipped and repeated mints.

collection class origin jigs map
Series 2 393b1c2a…5be8e_o2 3,333 (3,328 cards; 5 minted twice; 6 never minted) s2/v2/jig-to-card.json
Series 1 6a7a4b75…5c4c_o2 25 (13 girls) s1/v1/jig-to-card.json

Keys are origin locations (the mint output). For a jig you hold, follow its location back to its origin first.

{ "class": "393b1c2a…_o2", "jigs": { "<origin txid>_o3": { "i": 9, "n": 9, "method": "size" } } }

method is size, order-between-anchors, duplicate-mint or decrypted+printed-number.

  • ✓ NPG Series 2: all 3,333 jigs mapped to card numbers
  • ✓ NPG Series 1: all 25 jigs mapped (decrypted with the reveal key)
  • ◻ Showing your NPG characters in bWalletX (read-only)
  • ◻ Maps for other collections

For holders: Recover RelayX collections shows how to find these NFTs in bWalletX.