ERC-6239: Semantic Soulbound Tokens
ERC-6239 layers RDF-style semantic triples (subject, predicate, object) on top of soulbound NFTs. Each soulbound credential carries machine-readable claims like (this NFT) (issued-by) (university X), (this NFT) (certifies) (skill Y), (this NFT) (expires-on) (date). Indexers, credential aggregators, and verification tools query the triples uniformly without per-issuer integration.
Used by:
- Education credentials — degrees / certificates with structured issuer, course, grade fields.
- Professional licences — bar admissions, medical licences with jurisdiction, scope, renewal-date fields.
- DAO membership badges — role, joined-at, contributions tagged with structured predicates.
- Vouching networks —
(A) (vouches-for) (B) (in-context) (C).
Required Interface
solidity
interface IERC6239 {
function rdfOf(uint256 tokenId) external view returns (string memory);
function addClaim(uint256 tokenId, string calldata predicate, string calldata object) external;
}The rdfOf returns a Turtle / N-Triples encoded string with all the claims for the token; addClaim (issuer-only) appends a new predicate→object pair. Pairs with ERC-5192 / ERC-5484 for the soulbound-transfer-restriction half.
Neo Equivalent: NEP-11 Soulbound + RDF Triple Storage
csharp
public static void AddClaim(ByteString tokenId, string predicate, string objectVal)
{
if (!Runtime.CheckWitness(GetIssuer())) throw new Exception("NEP11:NotIssuer");
var existing = GetClaims(tokenId);
var triple = new Map<string, object> { ["p"] = predicate, ["o"] = objectVal };
var updated = new object[existing.Length + 1];
for (var i = 0; i < existing.Length; i++) updated[i] = existing[i];
updated[existing.Length] = triple;
Storage.Put(Storage.CurrentContext, ClaimsKey(tokenId), StdLib.Serialize(updated));
}
public static string RdfOf(ByteString tokenId)
{
var claims = GetClaims(tokenId);
var sb = "<urn:nep11:" + Runtime.ExecutingScriptHash.ToString() + ":" + tokenId + ">";
for (var i = 0; i < claims.Length; i++)
{
var t = (Map<string, object>)claims[i];
sb = sb + " <" + (string)t["p"] + "> \"" + (string)t["o"] + "\" .";
}
return sb;
}| ERC-6239 (Ethereum) | Neo Equivalent | Notes |
|---|---|---|
rdfOf(tokenId) | RdfOf(tokenId) returning Turtle string | Direct port |
addClaim(tokenId, predicate, object) | AddClaim(...) issuer-witness-checked | |
| Append-only claims | Storage append (no remove) | Credentials don't unmake |
Subject = urn:erc6239:contract:tokenId | urn:nep11:contract:tokenId | Stable URI |
