Discover Packages
github.com/DIMO-Network/attestation-api
module
Version:
v0.0.17
Opens a new window with list of versions in this module.
Published: Feb 6, 2025
License: Apache-2.0
Opens a new window with license information.
README
README
¶
attestation-api
License
Apache 2.0
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
Devlopment
Running this locally requires the following services to be running:
VIN VC Eligibility Logic
1. Check if there is Currently a Valid VC for the NFT
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.
2. Get the Paired Device(s) for the NFT
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.
4. Get the Latest Fingerprint Messages for the Paired Device(s)
5. Validate VIN for Each Paired Device Matches
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.
6. Validate VIN Decodes Correctly
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.
7. Generate New VC
Generate a new VC for the tokenId and VIN
Store the VC in s3
8. Return VC Query
Return a query to be run on telemetry-api for VC retrieval
Expand ▾
Collapse ▴
Directories
¶
cmd
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
internal
Package identity provides functionality to interact with the identity GraphQL API.
attestation/vinvc
Package vinvc provides the controller for handling VIN VC-related requests.
Package vinvc provides the controller for handling VIN VC-related requests.
pkg
verifiable
Package verifiable provides functionality managing verifiable credentials.
Package verifiable provides functionality managing verifiable credentials.
Click to show internal directories.
Click to hide internal directories.