TradeTrust is a groundbreaking platform designed to enhance trust and security within the realm of international trade. Leveraging TradeTrust, we aim to bring transparency and reliability to trade documents. In our comprehensive guide, available at "Unveiling MLETR’s Potential in International Trade with TradeTrust-XDC Network Partnership", we provide detailed insights into how TradeTrust seamlessly integrates with the XDC Network. To create a demo file, follow these steps:
Clone the "open-attestation-cli" Repository and Install Dependencies:
Begin by cloning the "open-attestation-cli" repository and installing the necessary dependencies using the following command:
npm i
Initiate Wallet Creation:
To create verifiable documents, start by initiating wallet creation with this command:
open-attestation wallet create --output-file wallet.json
Note: Ensure that you add funds to the displayed wallet address.
Deploy the Document Store:
For XDC Mainnet:
open-attestation deploy document-store "My first document store" --network xdc --encrypted-wallet-path wallet.json
For XDC Apothem Network:
open-attestation deploy document-store "My first document store" --network xdcapothem --encrypted-wallet-path wallet.json
Create DNS TXT Records:
For Mainnet:
open-attestation dns txt-record create --address <document store address> --network-id 50
For XDC Apothem Network:
open-attestation dns txt-record create --address <document store address> --network-id 51
Retrieve DNS TXT Records:
For Mainnet:
open-attestation dns txt-record get --location <DNS location> --networkId 50
For XDC Apothem Network:
open-attestation dns txt-record get --location <DNS location> --networkId 51
Creating Raw Document:
Create a folder named "raw-documents" and place a file inside it named "cert.json" with the following content:
{
"$template": {
"name": "main",
"type": "EMBEDDED_RENDERER",
"url": "https://tutorial-renderer.openattestation.com"
},
"recipient": {
"name": "John"
},
"issuers": [
{
"name": "Alice",
"documentStore": "<documentStore address>",
"identityProof": {
"type": "DNS-TXT",
"location": "<DNS location>"
}
}
]
}
Wrap Documents:
open-attestation wrap ./raw-documents --output-dir ./wrapped-documents
Issue Documents:
For Mainnet:
open-attestation document-store issue --network xdc --encrypted-wallet-path wallet.json --address <document store address> --hash <merkle root hash>
For XDC Apothem Network:
open-attestation document-store issue --network xdcapothem --encrypted-wallet-path wallet.json --address <document store address> --hash <merkle root hash>
Once you have successfully created a Demo Verifiable document, you can easily verify it on the TradeTrust Verification platform by connecting to the XDC network. Discover the transformative potential of TradeTrust and the XDC Network in revolutionizing international trade documentation!
For XDC Apothem Network Verification:
https://dev.tradetrust.io/verify
For XDC Mainnet Verification:
https://www.tradetrust.io/verify
If you encounter any issues during the creation of your demo file, please feel free to leave a comment below.
Discussion (2)
Hi Vin, while deploying my first document store I am getting error that Wei is not specified while I have XDC token in my wallet
Getting the same error, were you able to fix it ?