Printing a different QR code on every wine label presents an interesting logistical (printing) challenge.
NFT QR code
Each wine bottle should be labeled with a unique QR code. The QR code is essentially an encoded URL in the following format:
NFT.OpenVino.org/TOKENID.serialnumber.uniqueID
For example:
HTTPS://OpenVino.org/MTB18.00075.ABCD1234
The example QR code represents the 75th bottle of wine backed by the MTB18 token and validated by a unique code ABCD1234.
The reason for including the unique code is to reduce the possibility of someone guessing the URL of a particular bottle and fraudulently retrieving the QR code. However, even if someone were to do this, their user registration on “You Drink It, You Know It”, complete with selfie, would reveal their identity.
QR creation workflow
When a token is minted (include in the minting workflow?), we need to generate a complete listing of QR codes that will be potentially used on bottles.
This can be done by simply creating a table with the following fields:
Field | Description |
---|---|
TOKEN_ID: | A unique identifier in the database, representing a singular QR URL, regardless or the token name or serial number |
TOKEN_NAME: | The name of the token. For example, MTB18 |
TOKEN_SERIAL: | The serial representing the bottle number for the token. This is a number between 1 and the total number of minted tokens. For example, there were 16384 MTB18 tokens minted. Therefore, for MTB18, there would be a total of 16384 token serial numbers. |
URL_DOMAIN: | The base URL_DOMAIN is: or Both domains point to the same IP address(es). The second, three-letter TLD is meant to shorten the overall QR-code URL. A shorter URL results in a less complex QR code, and therefore can be printed at a smaller size. |
UNIQUE_ID | A random unique number. |
QR_URL: | The QR_URL is a concatenation of: URL_DOMAIN + TOKEN_NAME + TOKEN_SERIAL + UNIQUE_ID |
PRINT_DATE | The date the label was printed (future use) |
LABEL_DATE | The date the label was applied to the bottle (future use) |
For example:
ALTER TABLE your_table ADD COLUMN new_column TEXT; ALTER TABLE your_table ADD COLUMN fourth_column TEXT; ALTER TABLE your_table ADD COLUMN fifth_column TEXT; UPDATE your_table SET new_column = CONCAT(token_name, '.', LPAD(token_id::text, 5, '0')), fourth_column = CONCAT(new_column, '.', SUBSTRING(gen_random_uuid()::text, 1, 5)), fifth_column = CONCAT('https://ó.ar/', fourth_column);
Printing QR codes
Printing is currently done using the software Bartender.
At the time of printing, Bartender is capable of creating individual QR codes on-the-fly, reading the URL data from the table above.
Table Access
It is imperative that access to the database table containing the QR codes (and UNIQUE_ID’s) be limited only to two programs:
Label printing software (like Bartender)
The YDIYOI app
Print Registration
In future releases, the printing date (as reported by the label printing software) could be registered, as well as the label application date (as reported by the label application machine).