Files
Goa-gel-fullstack/Documentation/developers/blockchain-apis.md
Mahi 435889ee79 docs: Rebuild documentation as enterprise-grade TLAS platform
- Migrate from custom HTTP server to VitePress framework
- Rename project to Tokenized License Approval System (TLAS)
- Add comprehensive documentation for all stakeholders:
  - Business: Executive summary, value proposition, governance
  - Operations: Infrastructure, installation, monitoring, backup
  - Departments: User guide, workflows, verification, issuance
  - Developers: API reference, authentication, webhooks, SDKs
  - Compliance: OWASP, DPDP Act, IT Act, audit framework
- Add modern theme with dark mode and full-text search
- Update Dockerfile for VitePress build process

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 00:05:20 -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.tlas.gov.in/tx/{transactionHash}
```