# PoC-Doc-Delivery This project contains all the functions needed to retrieve the parameters required to perform a proof of concept. This repository also contains all the data included in the paper and any additional data required in the `PoC_Execution` folder: - The Ethereum Yellow Paper in PDF format (`paper.pdf`), which is the message to be signed. - The JavaScript script to generate all the data values needed to perform the PoC (`getDeliveryData.js`). - The notification data (`idData`) contained in the script, including @A, @B, @SC, tm, and td. - @A and @B ECC keys in the script. - The data values presented in the paper in their respective file: `id`, `f(C)`. - The ECIES output parameters in their respective files: `k`, `IV`, and `HMAC`. - Additional files, such as the encrypted file (`C.pdf`) and the decrypted file (`decrypted.pdf`). In addition, this repository contains the `PoC_Transaction_Data` folder which includes several scripts to retrieve the transaction data from the Sepolia testnet. ## Prerequisites - Node.js >=16 ## Installation 1. Go to the `PoC_Execution` folder and run `npm install` to install the required dependencies. 2. In the `PoC_Transaction_Data` folder, run `npm install` to install its dependencies. ## How to Use 1. Move to the `PoC_Execution` folder. 2. Open the `parameters.js` and set up the notification data (`idData`) and the @A, @B ECC keys. 3. Save the changes. 4. Run `node getDeliveryData.js` to execute the script and retrieve the data. Once the functions of the smart contract have been executed, the transaction data of each function can be recovered by following these steps: 1. Navigate to the `PoC_Transaction_Data` folder. 2. Open `parameter.js` and set the transaction hashes relative to the `accept` and `publish` functions. There are several scripts to choose from, each displaying different transaction data: - `functionInputs&Logs.js`: Displays the parsed inputs and logs of the `accept` and `publish` functions. - `transactionReceipt.js`: Shows the transaction receipts of the `accept` and `publish` functions. - `transactionReceiptLogs.js`: Shows the transaction receipt logs of the `accept` and `publish` functions. - `transactionResponse.js`: Displays the transaction response of the `accept` and `publish` functions. To run a particular script, simply run `node `, where `` is one of the previous scripts to retrieve the desired transaction data (e.g. `node transactionReceipt.js`).