This directory contains JSON-LD schema definitions for the Finternet protocol, following JSON-LD best practices with a layered architecture pattern.
The schema follows a core-extension pattern:
schema/
├── core/ # Core schema domain
│ └── v1/ # Version 1 of core schema
│ ├── context.jsonld # Core JSON-LD context mappings
│ ├── vocab.jsonld # RDF vocabulary definitions
│ ├── core.yaml # OpenAPI 3.1 schema definitions
│ └── README.md # Core schema documentation
│
├── account/ # Account domain schema
│ ├── v1/ # Version 1 of account schema
│ │ ├── context.jsonld # Account-specific context (imports core)
│ │ ├── vocab.jsonld # Account vocabulary definitions
│ │ ├── attributes.yaml # OpenAPI schema with x-jsonld annotations
│ │ └── README.md # Account schema documentation
│ │
│ ├── account.jsonld # Example account instance
│ └── account.schema.json # JSON Schema validator (references v1/)
│
├── token/ # Token domain schema (UNITS)
│ ├── v1/ # Version 1 of token schema
│ │ ├── context.jsonld # Token-specific context
│ │ ├── vocab.jsonld # Token vocabulary definitions
│ │ ├── attributes.yaml # OpenAPI schema with x-jsonld annotations
│ │ └── README.md # Token schema documentation
│ │
│ ├── token.jsonld # Example token instance
│ └── token.schema.json # JSON Schema validator
│
├── credential/ # Credential domain schema (extends Token + W3C VC)
│ ├── v1/ # Version 1 of credential schema
│ │ ├── context.jsonld # Credential context (imports W3C VC + token)
│ │ ├── vocab.jsonld # Credential vocabulary definitions
│ │ ├── attributes.yaml # OpenAPI schema with W3C VC types
│ │ └── README.md # Credential schema documentation
│ │
│ ├── credential.jsonld # Example credential token instance
│ └── credential.schema.json # JSON Schema validator
│
└── transaction/ # Transaction domain schema
├── v1/ # Version 1 of transaction schema
│ ├── context.jsonld # Transaction-specific context
│ ├── vocab.jsonld # Transaction vocabulary definitions
│ ├── attributes.yaml # OpenAPI schema
│ └── README.md # Transaction schema documentation
│
└── *.jsonld # Example transaction instances
@context definitionsrdfs:Class with rdfs:subClassOf schema:Enumerationfin:PERSONAL is of type fin:EntityType)@graph for semantic definitionsx-jsonld annotations$ref to yaml definitionsadditionalProperties judiciouslyflags object for extensible custom attributesProvides lean, reusable primitives for all Finternet schemas:
identifierValue - Local part (before @)identifierDomain - Domain part (after @)@id, @typename, descriptionprimaryAddress (Identifier type)labels (maps to schema:additionalProperty for key-value metadata)created, modifiedversion, statusDesign Philosophy: Core contains only truly generic primitives reusable across all entity types (Account, Token, ACL, etc.). Domain-specific types remain in their respective schemas.
Implements the Universal Token Specification (UNITS) for representing all types of financial assets as tokens.
UNITS-FT - Fungible tokens (stablecoins, securities)UNITS-NFT - Non-fungible tokens (unique assets)UNITS-SFT - Semi-fungible tokens (hybrid)The token schema defines comprehensive types for financial asset management:
TokenMetadata - Immutable token identity and configurationTokenState - Current state, supply, ownership, locksClaim - W3C Verifiable Credential structureFungibility - fungible, nonFungible, semiFungibleLifecycleStatus - active, frozen, redeemed, burned, expiredValuationType - fixed, pegged, market{
"@context": "https://finternet-io.github.io/specs/schemas/token/v1/context.jsonld",
"@type": "FinancialProduct",
"id": "urn:uuid:...",
"metadata": {
"tokenStandard": "UNITS-FT",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"fungibility": "fungible",
"valuationType": "fixed"
},
"data": {
"reserveAccount": "did:web:circle.com:accounts:reserve-001",
"jurisdiction": "US"
},
"claims": [
{
"@type": "VerifiableCredential",
"issuer": "did:web:auditor.example",
"credentialSubject": {
"id": "urn:uuid:...",
"reserveRatio": "100%"
}
}
],
"identities": [
{
"id": "did:web:circle.com",
"type": "issuer"
},
{
"id": "did:web:alice.example",
"type": "owner"
}
],
"state": {
"status": "active",
"supply": {
"totalSupply": "10000000000000",
"circulatingSupply": "8500000000000"
}
}
}
Implements a two-tier transaction architecture for tracking and recording token operations.
stateBefore and stateAfter for each token transactionTransactionLog:
ExecutionStatus - submitted, pending, executing, completed, failed, rolled_backProofProfile - zk-snark, zk-stark, merkle, tee-attestation, signature-bundleLedgerAnchor - External blockchain referenceExecutionTimestamps - Lifecycle timestampsTokenTransaction:
OperationType - mint, burn, transfer, freeze, unfreeze, lock, unlock, redeem, update, addClaim, revokeClaimParticipant - Transaction participants with rolesStateReference - State commitment + optional snapshotAmountTransferred - Quantity affectedAuditEvent (Admin-Only):
AuditEventType - MetadataUpdated, DataCorrected, ClaimAttached, ClaimRevoked, StateOverride, PermissionChangedChangeDetails - Array of field-level changesApproval - Multi-party approval recordsAtomic Swap Example:
{
"@context": "https://finternet-io.github.io/specs/schemas/transaction/v1/context.jsonld",
"@type": "TransactionLog",
"txId": "urn:uuid:tx-002",
"initiator": "did:web:alice.example",
"tokenTransactions": [
{
"tokenTxId": "urn:uuid:tokentx-002",
"tokenId": "usdc",
"operation": "burn"
},
{
"tokenTxId": "urn:uuid:tokentx-003",
"tokenId": "usdt",
"operation": "mint"
}
],
"status": "completed",
"proofId": "urn:uuid:proof-001"
}
Extends the Token schema to support W3C Verifiable Credentials as tokenized assets. Used to issue identity verification results from KYC providers.
@context with W3C credentials contextidentityVerification - Full identity check (document + biometric)documentVerification - Document-only verificationbiometricVerification - Liveness and face matchingkycVerification - Comprehensive KYCaddressVerification - Address proofageVerification - Age verification (privacy-preserving)basic - Self-attestationstandard - Document OCR and validationenhanced - Liveness + face matchingpremium - Government DB checks + manual reviewCredentialToken - UNITS token wrapping verifiable credential(s)CredentialMetadata - Extended metadata with credential type, level, providerVerifiableCredential - W3C VC embedded in claims arrayVerificationProvider - Third-party provider metadataDocumentVerification - Document verification resultsBiometricVerification - Biometric verification resultsIdentityEvidence - W3C VC Evidence extension{
"@context": "https://finternet-io.github.io/specs/schemas/credential/v1/context.jsonld",
"@type": "CredentialToken",
"id": "urn:uuid:...",
"metadata": {
"tokenStandard": "UNITS-CREDENTIAL",
"name": "KYC Verification - PAN",
"credentialType": "kycVerification",
"verificationLevel": "enhanced",
"provider": {
"providerName": "Signzy",
"journeyId": "PJGR095SLR"
}
},
"claims": [
{
"@context": ["https://www.w3.org/2018/credentials/v1", "..."],
"type": ["VerifiableCredential", "KYCCredential"],
"issuer": "did:web:finternet.io",
"issuanceDate": "2025-11-25T17:58:21Z",
"credentialSubject": {
"id": "did:web:user.example",
"fullName": "John Doe"
},
"evidence": [
{
"type": ["IdentityEvidence"],
"documentVerification": { "documentType": "pan", "documentValid": true },
"biometricVerification": { "livenessVerified": true }
}
]
}
],
"identities": [
{ "id": "did:web:finternet.io", "type": "issuer" },
{ "id": "did:web:user.example", "type": "subject" }
],
"state": {
"status": "active",
"effectiveFrom": "2025-11-25T17:58:21Z"
}
}
Extends core Entity to represent user and organizational accounts:
primaryAddress using core Identifier type (e.g., {identifierValue: "alice", identifierDomain: "finternet"})EntityType enumeration (PERSONAL/BUSINESS)AccountStatus enumeration (ACTIVE/SUSPENDED)ContactMethod type with ContactMethodType enum (EMAIL/MOBILE)Flags type with messaging permissions, UI preferences, and notification settingsIdentifier typecontrollers array for delegated controlThe account schema defines its own types that are specific to account management:
EntityType - PERSONAL or BUSINESS classificationAccountStatus - ACTIVE or SUSPENDED statusContactMethodType - EMAIL, MOBILEContactMethod - Structured contact with verificationFlags - Account preferences and feature flags{
"@context": "https://finternet-io.github.io/specs/schemas/account/v1/context.jsonld",
"@type": "Account",
"@id": "urn:uuid:...",
"did": "did:key:...",
"primaryAddress": {
"identifierValue": "alice",
"identifierDomain": "finternet"
},
"entityType": "PERSONAL",
"status": "ACTIVE",
"contactMethods": [
{
"type": "EMAIL",
"value": "alice@example.com",
"verified": true
}
]
}
To create a new domain schema:
schema/v1/)context.jsonld - Import core context, add domain termsvocab.jsonld - Define domain classes and propertiesattributes.yaml - OpenAPI schema with validationREADME.md - Documentation$ref to core enumerations and types| Prefix | Namespace | Purpose |
|---|---|---|
finternet |
https://finternet-io.github.io/specs/schemas/core/v1# |
Core Finternet terms |
finternet |
https://finternet-io.github.io/specs/schemas/account/v1# |
Account-specific terms |
finternet |
https://finternet-io.github.io/specs/schemas/token/v1# |
Token-specific terms |
finternet |
https://finternet-io.github.io/specs/schemas/credential/v1# |
Credential-specific terms |
vc |
https://www.w3.org/2018/credentials# |
W3C Verifiable Credentials |
schema |
https://schema.org/ |
Schema.org vocabulary |
didCore |
https://www.w3.org/ns/did/v1# |
W3C Decentralized Identifiers |
sec |
https://w3id.org/security# |
W3C Security vocabulary |
rdf |
http://www.w3.org/1999/02/22-rdf-syntax-ns# |
RDF vocabulary |
rdfs |
http://www.w3.org/2000/01/rdf-schema# |
RDF Schema |
xsd |
http://www.w3.org/2001/XMLSchema# |
XML Schema datatypes |
# Validate an account instance against the schema
ajv validate -s account/account.schema.json -d account/account.jsonld
# Expand JSON-LD to see full URIs
jsonld expand account/account.jsonld
# Compact with custom context
jsonld compact -c account/v1/context.jsonld account/account.jsonld
# Convert to N-Triples
jsonld format -q account/account.jsonld
# Convert to Turtle
riot --output=turtle account/account.jsonld
rdfs:comment for each enum valueurn:uuid: for entity identifiers@type and @id in all instancesSee LICENSE file in repository root.