Inventory vectors are a collection of inventory items, the ones that are described to be either of type block, transaction or error. Inventory items of type transaction and block are references to actual block or tx messages being available for retrieval.
As such they are used in two places in the protocol:
- The
inv message to communicate the availability of the respective full message
- The
getdata message to ask for the full message
The inventory item is implicitly limited to 32 bytes in payload (hash) and a 4 byte type. Currently they are not used besides the original two hash types, but there were a few ideas flying around about getting inner Merkle-Tree nodes as a support for SPV clients to query the current state of the system.
Basically you can use anything you want in there, as long as you manage to stay inside the 32 byte + 4 byte limit, but preferably you'd keep the semantics of the hash + type being a reference to a retrievable item on the sender side.