Files
Goa-gel-fullstack/Documentation/developers/blockchain-apis.md
Mahi 6ec8d3236d feat: Rebrand to License Authority with Govt of Goa branding
- Replace TLAS with License Authority throughout documentation
- Add Government of Goa emblem/logo (Ashoka Chakra style)
- Update frontend branding to match documentation
- Add configurable Swagger API link via VITE_API_BASE_URL env var
- Fix Docker build for VitePress (git dependency, .dockerignore)
- Fix helmet security headers for HTTP deployments
- Add CORS support for VM deployment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 00:46:25 -04:00

84 lines
1.6 KiB
Markdown

# Blockchain APIs
## Certificate Verification
### Verify by Token ID
```http
GET /blockchain/verify/{tokenId}
```
**Response**
```json
{
"valid": true,
"token": {
"id": "0x1234567890abcdef",
"licenseNumber": "GOA/TRADE/2026/00001",
"holder": "ABC Enterprises",
"issuedAt": "2026-02-09T10:00:00Z",
"validUntil": "2027-02-08T23:59:59Z",
"status": "ACTIVE"
},
"blockchain": {
"contractAddress": "0xContract...",
"transactionHash": "0xTx...",
"blockNumber": 12345,
"timestamp": "2026-02-09T10:00:00Z"
}
}
```
### Verify by License Number
```http
GET /blockchain/verify?licenseNumber=GOA/TRADE/2026/00001
```
## Transaction History
### Get Token History
```http
GET /blockchain/tokens/{tokenId}/history
```
**Response**
```json
{
"tokenId": "0x1234...",
"events": [
{
"event": "MINTED",
"timestamp": "2026-02-09T10:00:00Z",
"transactionHash": "0xMint...",
"data": { "to": "0xHolder..." }
},
{
"event": "RENEWED",
"timestamp": "2027-02-01T10:00:00Z",
"transactionHash": "0xRenew...",
"data": { "newExpiry": "2028-02-08" }
}
]
}
```
## Smart Contract ABI
```solidity
interface ILicenseNFT {
function mint(address to, string licenseNumber, bytes32 documentHash) returns (uint256);
function verify(uint256 tokenId) returns (bool valid, LicenseData data);
function revoke(uint256 tokenId, string reason);
function renew(uint256 tokenId, uint256 newExpiry);
}
```
## Block Explorer
View transactions on the block explorer:
```
https://explorer.license.gov.in/tx/{transactionHash}
```