Run make help
Specify a subcommand:
test run tests
lint run linter
docker build docker image
tools-golangci-lint install golangci-lint
tools-swagger install swagger tool
tools-mockgen install mockgen tool
generate run all file generation for the project
swagger generate swagger documentation
go-generate run go generate
Running this locally requires the following services to be running:
- identity-api
- token-exchange-api
- device-definition-api
- clickhouse connection
- s3 connection
- Check Existing VCs for NFT:
- Query to determine if there is already a valid VC for the requesting NFT.
- If a valid VC exists return a success response with the VC query.
- Retrieve Device(s) from Identity API:
- Call the
identity-api
to get the device(s) (aftermarket and/or synthetic) associated with the NFT. - Ensure the devices are correctly paired with the NFT.
- Call the
-
Retrieve Fingerprint Messages:
- Obtain the latest fingerprint messages for the paired device(s) of the NFT.
-
No Fingerprint Messages:
- If there are no fingerprint messages for the paired device(s), return an error.
- Ensure VIN Consistency:
- Use Latest Message as Source of Truth:
- If the VINs from the paired devices do not match, use the VIN from the latest fingerprint message as the source of truth.
- Use Latest Message as Source of Truth:
- Decode and Validate VIN:
- Decode the VIN from the latest fingerprint message.
- Ensure the VIN decodes to the same manufacturer, model, and year as per vehicle record in identity-api.
- Generate a new VC for the tokenId and VIN
- Store the VC in s3
- Return a query to be run on telemetry-api for VC retrieval