1"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[5425],{4137:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>u});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){i(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function s(e,t){if(null==e)return{};var a,n,i=function(e,t){if(null==e)return{};var a,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(a),h=i,u=d["".concat(c,".").concat(h)]||d[h]||m[h]||o;return a?n.createElement(u,r(r({ref:t},p),{},{components:a})):n.createElement(u,r({ref:t},p))}));function u(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=a.length,r=new Array(o);r[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:i,r[1]=s;for(var l=2;l<o;l++)r[l]=a[l];return n.createElement.apply(null,r)}return n.createElement.apply(null,a)}h.displayName="MDXCreateElement"},7906:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var n=a(7462),i=(a(7294),a(4137));const o={sidebar_position:7},r="Composability",s={unversionedId:"core--concepts/composability",id:"core--concepts/composability",title:"Composability",description:"Composability in the blockchain world is akin to building with LEGO bricks. Each piece, or in this case, each attestation, can stand alone, but when combined, they form a more complex and intricate structure. Let's dive into how this works with attestations.",source:"@site/docs/core--concepts/composability.md",sourceDirName:"core--concepts",slug:"/core--concepts/composability",permalink:"/docs/core--concepts/composability",draft:!1,editUrl:"https://github.com/ethereum-attestation-service/eas-docs-site/blob/main/docs/core--concepts/composability.md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"Privacy",permalink:"/docs/core--concepts/privacy"},next:{title:"Resolver Contracts",permalink:"/docs/core--concepts/resolver-contracts"}},c={},l=[{value:"What is Composability?",id:"what-is-composability",level:2},{value:"Referenced Attestations: The Key",id:"referenced-attestations-the-key",level:2},{value:"Example: Decentralized Social Media",id:"example-decentralized-social-media",level:2},{value:"Building with Composability in Mind",id:"building-with-composability-in-mind",level:2},{value:"Wrapping Up",id:"wrapping-up",level:2}],p={toc:l},d="wrapper";
1function m(e){let{components:t,...o}=e;return(0,i.kt)(d,(0,n.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"composability"},"Composability"),(0,i.kt)("p",null,"Composability in the blockchain world is akin to building with LEGO bricks. Each piece, or in this case, each attestation, can stand alone, but when combined, they form a more complex and intricate structure. Let's dive into how this works with attestations."),(0,i.kt)("h2",{id:"what-is-composability"},"What is Composability?"),(0,i.kt)("p",null,"Composability is the art and science of assembling smaller components to create a more complex system. In the context of blockchain and attestations, it's about ensuring that individual attestations, or data points, can be seamlessly combined or referenced to form a cohesive narrative or dataset. This modular approach not only enhances the flexibility of data structures but also ensures that data remains interconnected, traceable, and verifiable."),(0,i.kt)("h2",{id:"referenced-attestations-the-key"},"Referenced Attestations: The Key"),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"refUID")," (referenced attestation unique identifier) feature in attestations is the core building block of composability. It allows an attestation to reference another, weaving a tapestry of interconnected attestations. This interconnectedness ensures that each attestation can either add depth, context, or validation to another."),(0,i.kt)("h2",{id:"example-decentralized-social-media"},"Example: Decentralized Social Media"),(0,i.kt)("p",null,"Imagine a decentralized social media platform. You post a message, and that action creates an attestation. When someone comments or likes your post, they're not just interacting with a UI; they're creating a new attestation that references your original one via its ",(0,i.kt)("inlineCode",{parentName:"p"},"UID"),". "),(0,i.kt)("p",null,"Here's an example social media post on Sepolia from ",(0,i.kt)("inlineCode",{parentName:"p"},"timbeiko.eth"),' saying "GM!". Notice that there are two likes and a reply?\n',(0,i.kt)("img",{alt:"Sample Post",src:a(8807).Z,width:"629",height:"313"})),(0,i.kt)("admonition",{title:"These are just attestations! ",type:"info"}),(0,i.kt)("p",null,"Each post, each reply, and each like are just attestations referencing each other. Here is that same post on Sepolia with the onchain attestation record. Notice the ",(0,i.kt)("inlineCode",{parentName:"p"},"uid")," of the Onchain attestation record? That is being used as a reference for the additional attestations made for liking and replying. At the bottom of the image you will see a new schema being used for ",(0,i.kt)("inlineCode",{parentName:"p"},"Like an Entity")," and the same schema of ",(0,i.kt)("inlineCode",{parentName:"p"},"Post")," being used."),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sepolia.easscan.org/attestation/view/0x36e12bac4f9de35e831757dcdfbbd7301cbedd521eb11b83332cb439ed4da31b"},(0,i.kt)("strong",{parentName:"a"},"See this Attestation on Sepolia"))),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Sample RefUID",src:a(3090).Z,width:"1400",height:"1146"})),(0,i.kt)("h2",{id:"building-with-composability-in-mind"},"Building with Composability in Mind"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Think Modular:")," Design each schema to be self-contained but ready to connect with others."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Use refUID Effectively:")," It's a simple tool, but it's the bridge between attestations."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Keep Users Informed:")," Make sure users understand how their data is being used and connected.")),(0,i.kt)("h2",{id:"wrapping-up"},"Wrapping Up"),(0,i.kt)("p",null,"Composability is about seeing the potential in simple components and understanding how they can come together to create something more significant. With attestations, this means a more flexible, modular, scalable, and transparent system."))}m.isMDXComponent=!0},8807:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/sample-post-0211beeb5e8af64128071f547092a769.png"},3090:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/sample-refUID-4e108dfa2a73899624c9d8bcd4e47e21.png"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.