The listener observes if the mint function of a smart contract is triggered. If so, it forwards a JSON to a WebSocket server that notifies the subscribed clients and relays the JSON.
- If
res[0].metadata.tokenData.verifiablePresentation
exists the ContractListener component signed claims and stored them in the fieldverifiablePresentation
. - The
verifiablePresentation
is a JSON object that contains the signed claims and is sent to the catalogue as it is.
- If
claimComplianceProviderResponses
exists the ContractListener component collected allclaimComplianceProviderResponse
fields from all associated assets and stored them in the json arrayclaimComplianceProviderResponses
. - Each array item is decoded and parsed into json.
- This json array represents the response from the Claim Compliance Provider's
send-claims
endpoint. - Each contained Verifiable Presentation which Verifiable Credential is not issued by
did:web:compliance.lab.gaia-x.eu*
is sent to the catalogue as it is.
Ensure that ./contractConfig.js has the actual addresses and that the right address is in the destination of the ./taquito/listener.js or if you are using docker look out that the correct environment variable is set.
First, make sure all dependencies are installed:
npm install
Run the server locally:
npm run serve
You can easily create your own account and change it in the config file.
When originating new contracts, make sure to update the new addresses in ./contractConfig.js.
Make sure to update the .env
file with the correct catalogue URL and credentials:
keycloak_user_username=<your user name>
keycloak_user_password=<your password>
client_secret=<your client secret>