Skip to main content

Working with Nested Triples

Coming soon! This tutorial will show how to create complex, multi-layered claims.

Nested triples allow you to make statements about statements, creating powerful recursive knowledge structures.

What You'll Learn​

This tutorial will cover:

  • Creating triples as atoms
  • Building complex conditional logic
  • Implementing recursive relationships
  • Querying nested structures
  • Real-world use cases (meta-claims, conditional predictions, hierarchical data)

In the Meantime​

See these resources to learn about nested triples:

Simple Example​

// Create a base triple
const baseTriple = await multivault.createTriple({
subjectId: aliceAtomId,
predicateId: knowsPredicateId,
objectId: bobAtomId
})

// Create an atom from this triple
const tripleAtomId = await multivault.createAtom({
atomUri: {
type: 'triple',
value: baseTriple.tripleId
}
})

// Now make a claim about the claim
// "Charlie verified that Alice knows Bob"
const metaTriple = await multivault.createTriple({
subjectId: charlieAtomId,
predicateId: verifiedPredicateId,
objectId: tripleAtomId
})

Get Notified​

Want to be notified when this tutorial is ready? Join our Discord or follow us on Twitter.