diff --git a/404.html b/404.html index 775c5e36..b9c81871 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | Fhenix - + diff --git a/assets/js/5555e52f.a92b7cdf.js b/assets/js/5555e52f.66a15ecf.js similarity index 81% rename from assets/js/5555e52f.a92b7cdf.js rename to assets/js/5555e52f.66a15ecf.js index 956a4f78..c819ef6b 100644 --- a/assets/js/5555e52f.a92b7cdf.js +++ b/assets/js/5555e52f.66a15ecf.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[8709],{6203:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>l,frontMatter:()=>c,metadata:()=>o,toc:()=>p});var i=t(4848),r=t(8453);const c={sidebar_position:2},s="Encryption",o={id:"devdocs/FhenixJS/Encryption",title:"Encryption",description:"fhenix.js provides an easy-to-use function to encrypt your inputs before sending them to the Fhenix blockchain.",source:"@site/docs/devdocs/FhenixJS/Encryption.md",sourceDirName:"devdocs/FhenixJS",slug:"/devdocs/FhenixJS/Encryption",permalink:"/docs/devdocs/FhenixJS/Encryption",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/FhenixJS/Encryption.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"Installation & Basics",permalink:"/docs/devdocs/FhenixJS/Fhenix-JS"},next:{title:"(Un)Sealing",permalink:"/docs/devdocs/FhenixJS/Decryption"}},d={},p=[];function a(e){const n={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"encryption",children:"Encryption"}),"\n",(0,i.jsx)(n.p,{children:"fhenix.js provides an easy-to-use function to encrypt your inputs before sending them to the Fhenix blockchain."}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"Encryption in Fhenix is done using the global chain key. This key is loaded when you create a fhenix.js client automatically"})}),"\n",(0,i.jsxs)(n.p,{children:["When we perform encryption, we specify the type of ",(0,i.jsx)(n.code,{children:"euint"})," (Encrypted Integer) we want to create. This should match the expected type in the Solidity contract we are working with."]}),"\n",(0,i.jsx)(n.p,{children:"First, initialize the library:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-Typescript",children:"import { FhenixClient } from 'fhenixjs';\nimport { BrowserProvider } from \"ethers\";\n\nconst provider = new BrowserProvider(window.ethereum);\n\nconst client = new FhenixClient({provider});\n"})}),"\n",(0,i.jsx)(n.p,{children:"Then, you can use the created client to encrypt"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-Typescript",children:"\nimport { FhenixClient, EncryptedType, EncryptedUint8 } from 'fhenixjs';\n\nlet result: EncryptedUint8 = await client.encrypt(number, EncryptionTypes.uint8);\nlet result: EncryptedUint16 = await client.encrypt(number, EncryptionTypes.uint16);\nlet result: EncryptedUint32 = await client.encrypt(number, EncryptionTypes.uint32);\nlet result: EncryptedUint64 = await client.encrypt(number, EncryptionTypes.uint64);\nlet result: EncryptedUint128 = await client.encrypt(number, EncryptionTypes.uint128);\nlet result: EncryptedUint256 = await client.encrypt(number, EncryptionTypes.uint256);\nlet result: EncryptedAddress = await client.encrypt(address, EncryptionTypes.address);\n\n"})}),"\n",(0,i.jsx)(n.p,{children:"Or, we can use the lower-level type specific functions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",children:"const resultUint8 = await client.encrypt_uint8(number);\nconst resultUint16 = await client.encrypt_uint16(number);\nconst resultUint32 = await client.encrypt_uint32(number);\nconst resultUint64 = await client.encrypt_uint64(number);\nconst resultUint128 = await client.encrypt_uint128(number);\nconst resultUint256 = await client.encrypt_uint256(number);\nconst resultAddress = await client.encrypt_address(address);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The returned types from the encrypt function will be of the type ",(0,i.jsx)(n.code,{children:"EncryptedUint8"}),", ",(0,i.jsx)(n.code,{children:"EncryptedUint16"})," or ",(0,i.jsx)(n.code,{children:"EncryptedUint32"})," (or 64/128/256 etc.) depending on the type you specified."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"EncryptedUint"})," types sound scary, but are actually pretty simple. It's just a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"export interface EncryptedNumber {\n data: Uint8Array;\n}\n\nexport interface EncryptedUint8 extends EncryptedNumber {}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["These types exist in order to enable type checking when interacting with Solidity contracts, and to make it easier to work with encrypted data.\nHowever, feel free to use the ",(0,i.jsx)(n.code,{children:"data"})," field directly if you prefer."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>o});var i=t(6540);const r={},c=i.createContext(r);function s(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[8709],{6203:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>l,frontMatter:()=>c,metadata:()=>o,toc:()=>p});var i=t(4848),r=t(8453);const c={sidebar_position:2},s="Encryption",o={id:"devdocs/FhenixJS/Encryption",title:"Encryption",description:"fhenix.js provides an easy-to-use function to encrypt your inputs before sending them to the Fhenix blockchain.",source:"@site/docs/devdocs/FhenixJS/Encryption.md",sourceDirName:"devdocs/FhenixJS",slug:"/devdocs/FhenixJS/Encryption",permalink:"/docs/devdocs/FhenixJS/Encryption",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/FhenixJS/Encryption.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"Installation & Basics",permalink:"/docs/devdocs/FhenixJS/Fhenix-JS"},next:{title:"(Un)Sealing",permalink:"/docs/devdocs/FhenixJS/Decryption"}},d={},p=[];function a(e){const n={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"encryption",children:"Encryption"}),"\n",(0,i.jsx)(n.p,{children:"fhenix.js provides an easy-to-use function to encrypt your inputs before sending them to the Fhenix blockchain."}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"Encryption in Fhenix is done using the global chain key. This key is loaded when you create a fhenix.js client automatically"})}),"\n",(0,i.jsxs)(n.p,{children:["When we perform encryption, we specify the type of ",(0,i.jsx)(n.code,{children:"euint"})," (Encrypted Integer) we want to create. This should match the expected type in the Solidity contract we are working with."]}),"\n",(0,i.jsx)(n.p,{children:"First, initialize the library:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-Typescript",children:"import { FhenixClient } from 'fhenixjs';\nimport { BrowserProvider } from \"ethers\";\n\nconst provider = new BrowserProvider(window.ethereum);\n\nconst client = new FhenixClient({provider});\n"})}),"\n",(0,i.jsx)(n.p,{children:"Then, you can use the created client to encrypt"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-Typescript",children:"\nimport { FhenixClient, EncryptedType, EncryptedUint8 } from 'fhenixjs';\n\nlet result: EncryptedUint8 = await client.encrypt(number, EncryptionTypes.uint8);\nlet result: EncryptedUint16 = await client.encrypt(number, EncryptionTypes.uint16);\nlet result: EncryptedUint32 = await client.encrypt(number, EncryptionTypes.uint32);\nlet result: EncryptedUint64 = await client.encrypt(number, EncryptionTypes.uint64);\nlet result: EncryptedUint128 = await client.encrypt(number, EncryptionTypes.uint128);\nlet result: EncryptedUint256 = await client.encrypt(number, EncryptionTypes.uint256);\nlet result: EncryptedAddress = await client.encrypt(address, EncryptionTypes.address);\n\n"})}),"\n",(0,i.jsx)(n.p,{children:"Or, we can use the lower-level type specific functions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",children:"const resultUint8 = await client.encrypt_uint8(number);\nconst resultUint16 = await client.encrypt_uint16(number);\nconst resultUint32 = await client.encrypt_uint32(number);\nconst resultUint64 = await client.encrypt_uint64(number);\nconst resultUint128 = await client.encrypt_uint128(number);\nconst resultUint256 = await client.encrypt_uint256(number);\nconst resultAddress = await client.encrypt_address(address);\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The returned types from the encrypt function will be of the type ",(0,i.jsx)(n.code,{children:"EncryptedUint8"}),", ",(0,i.jsx)(n.code,{children:"EncryptedUint16"})," or ",(0,i.jsx)(n.code,{children:"EncryptedUint32"})," (or 64/128/256 etc.) depending on the type you specified."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"EncryptedUint"})," types sound scary, but are actually pretty simple. It's just a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"export interface EncryptedNumber {\n data: Uint8Array;\n securityZone: number; // defaults to 0\n}\n\nexport interface EncryptedUint8 extends EncryptedNumber {}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["These types exist in order to enable type checking when interacting with Solidity contracts, and to make it easier to work with encrypted data.\nHowever, feel free to use the ",(0,i.jsx)(n.code,{children:"data"})," field directly if you prefer."]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>o});var i=t(6540);const r={},c=i.createContext(r);function s(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/65be5726.0719a8e3.js b/assets/js/65be5726.5cd4f877.js similarity index 54% rename from assets/js/65be5726.0719a8e3.js rename to assets/js/65be5726.5cd4f877.js index 42836fb9..31b54fa5 100644 --- a/assets/js/65be5726.0719a8e3.js +++ b/assets/js/65be5726.5cd4f877.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[7499],{42:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>j,frontMatter:()=>l,metadata:()=>d,toc:()=>x});var r=n(4848),s=n(8453);const l={sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},i="Supported Types and Operations",d={id:"devdocs/Writing Smart Contracts/Types-and-Operators",title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations",source:"@site/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Types-and-Operators",permalink:"/docs/devdocs/Writing Smart Contracts/Types-and-Operators",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",tags:[],version:"current",sidebarPosition:100,frontMatter:{sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},sidebar:"docsSidebar",previous:{title:"\ud83e\udeb5 Console.log",permalink:"/docs/devdocs/Writing Smart Contracts/Debug-Logging"},next:{title:"\ud83d\udcaf Useful Tips",permalink:"/docs/devdocs/Writing Smart Contracts/Useful-Tips"}},c={},x=[{value:"Types",id:"types",level:2},{value:"Operations",id:"operations",level:2},{value:"Using Direct Function Calls",id:"using-direct-function-calls",level:3},{value:"Using Library Bindings",id:"using-library-bindings",level:3},{value:"Utilizing Operator Overloading",id:"utilizing-operator-overloading",level:3},{value:"Comparisons",id:"comparisons",level:2},{value:"Supported Operations",id:"supported-operations",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"supported-types-and-operations",children:"Supported Types and Operations"}),"\n",(0,r.jsx)(t.p,{children:"The library exposes utility functions for FHE operations. The goal of the library is to provide a seamless developer experience for writing smart contracts that can operate on confidential data."}),"\n",(0,r.jsx)(t.h2,{id:"types",children:"Types"}),"\n",(0,r.jsx)(t.p,{children:"The library provides a type system that is checked both at compile time and at run time. The structure and operations related to these types are described in this sections."}),"\n",(0,r.jsxs)(t.p,{children:["We currently support encrypted integers of bit length up to 256 bits and special types such as ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:['The encrypted integers behave as much as possible as Solidity\'s integer types. However, behaviour such as "revert on overflow" is not supported as this would leak some information of the encrypted integers. Therefore, arithmetic on ',(0,r.jsx)(t.code,{children:"euint"})," types is ",(0,r.jsx)(t.a,{href:"https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic",children:"unchecked"}),", i.e. there is wrap-around on overlow."]}),"\n",(0,r.jsxs)(t.p,{children:["In the back-end, encrypted integers are FHE ciphertexts. The library abstracts away the ciphertexts and presents pointers to ciphertexts, or ciphertext handles, to the smart contract developer. The ",(0,r.jsx)(t.code,{children:"euint"}),", ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"})," types are ",(0,r.jsx)(t.em,{children:"wrappers"})," over these handles."]}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colspan:"2",children:" Supported types "})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ebool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Compute"})]})]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEbool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Input"})]})]})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"operations",children:"Operations"}),"\n",(0,r.jsx)(t.p,{children:"There are three ways to perform operations with FHE.sol:"}),"\n",(0,r.jsx)(t.h3,{id:"using-direct-function-calls",children:"Using Direct Function Calls"}),"\n",(0,r.jsx)(t.p,{children:"Direct function calls are the most straightforward way to perform operations with FHE.sol. For example, if you want to add two encrypted 8-bit integers (euint8), you can do so as follows:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = FHE.add(lhs, rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"Here, lhs and rhs are your euint8 variables, and result will store the outcome of the addition."}),"\n",(0,r.jsx)(t.h3,{id:"using-library-bindings",children:"Using Library Bindings"}),"\n",(0,r.jsx)(t.p,{children:"FHE.sol also provides library bindings, allowing for a more natural syntax. To use this, you first need to include the library for your specific data type. For euint8, the usage would look like this:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs.add(rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"In this example, lhs.add(rhs) performs the addition, using the library function implicitly."}),"\n",(0,r.jsx)(t.h3,{id:"utilizing-operator-overloading",children:"Utilizing Operator Overloading"}),"\n",(0,r.jsxs)(t.p,{children:["For an even more intuitive approach, FHE.sol supports operator overloading. This means you can use standard arithmetic operators like ",(0,r.jsx)(t.code,{children:"+"}),", ",(0,r.jsx)(t.code,{children:"-"}),", ",(0,r.jsx)(t.code,{children:"*"}),", etc., directly on encrypted types. Here's how you can use it for adding two ",(0,r.jsx)(t.code,{children:"euint8"})," values:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs + rhs;\n"})}),"\n",(0,r.jsx)(t.p,{children:"With operator overloading, lhs + rhs performs the addition seamlessly."}),"\n",(0,r.jsx)(t.h2,{id:"comparisons",children:"Comparisons"}),"\n",(0,r.jsxs)(t.p,{children:["Unlike other operations in FHE.sol, comparison operations do not support their respective operators (e.g. ",(0,r.jsx)(t.code,{children:">"}),", ",(0,r.jsx)(t.code,{children:"<"})," etc.).\nThis is because solidity expects these operators to return a boolean value, which is not possible with FHE.\nIntuitively, this is because returning a boolean value would leak information about the encrypted data."]}),"\n",(0,r.jsxs)(t.p,{children:["Instead, comparison operations are implemented as functions that return an ",(0,r.jsx)(t.code,{children:"ebool"})," type."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"ebool"})," type is not a real boolean type. It is implemented as a ",(0,r.jsx)(t.code,{children:"euint8"})]})}),"\n",(0,r.jsx)(t.h2,{id:"supported-operations",children:"Supported Operations"}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["A documented documentation of each and every function in FHE.sol (including inputs and outputs) can be found in ",(0,r.jsx)(t.a,{href:"/docs/devdocs/Solidity%20API/FHE",children:"FHE.sol"})]})}),"\n",(0,r.jsx)(t.p,{children:"All operations supported by FHE.sol are listed in the table below. For performance reasons, not all operations are supported for all types."}),"\n",(0,r.jsx)(t.p,{children:"Please refer to the table below for a comprehensive list of supported operations. This list will evolve as the network matures."}),"\n",(0,r.jsx)(t.p,{children:"Note that all functions are supported in both direct function calls and library bindings. However, operator overloading is only supported for the operations listed in the table (solidity please support operator overloading for boolean return types!)."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"FHE.sol function"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"Operator"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint8"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint16"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint32"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint64"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint128"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint256"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"ebool"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"eaddress"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Addition"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"add"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"+"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Subtraction"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sub"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"-"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Multiplication"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"mul"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"*"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise And"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"and"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"&"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Or"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"or"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"|"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Xor"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"xor"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"^"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Division"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"div"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"/"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Remainder"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rem"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"%"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Right"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shr"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Left"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shl"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eq"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ne"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Min"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"min"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Max"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"max"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"not"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"select"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Require"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"req"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Decrypt"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"decrypt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Seal Output"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sealOutput"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]})]})]}),"\n",(0,r.jsx)(t.admonition,{title:"Caveat",type:"danger",children:(0,r.jsxs)(t.p,{children:["At the moment it is not possible to do ",(0,r.jsx)(t.code,{children:"ebool result = (lhs == rhs)"})," and others that return a boolean result. This is because FHE.sol expects a ",(0,r.jsx)(t.code,{children:"ebool"}),", while Solidity only allows overloading to return a regular boolean.\nInstead, we recommend ",(0,r.jsx)(t.code,{children:"ebool result = lhs.eq(rhs)"}),"."]})}),"\n",(0,r.jsx)(t.admonition,{type:"danger",children:(0,r.jsxs)(t.p,{children:["Using require and decrypt in a TX is dangerous as it can break the confidentiality of the data. Please refer to ",(0,r.jsx)(t.a,{href:"/docs/devdocs/Writing%20Smart%20Contracts/Useful-Tips",children:"Useful-Tips"})," to read some more"]})}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Division and Remainder by ",(0,r.jsx)(t.code,{children:"0"})," will output with an encrypted representation of the maximal value of the uint that is used (Ex. encrypted 255 for euint8)"]})})]})}function j(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>d});var r=n(6540);const s={},l=r.createContext(s);function i(e){const t=r.useContext(l);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[7499],{42:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>j,frontMatter:()=>l,metadata:()=>d,toc:()=>x});var r=n(4848),s=n(8453);const l={sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},i="Supported Types and Operations",d={id:"devdocs/Writing Smart Contracts/Types-and-Operators",title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations",source:"@site/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",sourceDirName:"devdocs/Writing Smart Contracts",slug:"/devdocs/Writing Smart Contracts/Types-and-Operators",permalink:"/docs/devdocs/Writing Smart Contracts/Types-and-Operators",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Writing Smart Contracts/Types-and-Operators.md",tags:[],version:"current",sidebarPosition:100,frontMatter:{sidebar_position:100,title:"\ud83e\uddd1\u200d\u2695\ufe0f Types and Operations",description:"List of supported types and different operations"},sidebar:"docsSidebar",previous:{title:"\ud83e\udeb5 Console.log",permalink:"/docs/devdocs/Writing Smart Contracts/Debug-Logging"},next:{title:"\ud83d\udcaf Useful Tips",permalink:"/docs/devdocs/Writing Smart Contracts/Useful-Tips"}},c={},x=[{value:"Types",id:"types",level:2},{value:"Operations",id:"operations",level:2},{value:"Using Direct Function Calls",id:"using-direct-function-calls",level:3},{value:"Using Library Bindings",id:"using-library-bindings",level:3},{value:"Utilizing Operator Overloading",id:"utilizing-operator-overloading",level:3},{value:"Comparisons",id:"comparisons",level:2},{value:"Supported Operations",id:"supported-operations",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"supported-types-and-operations",children:"Supported Types and Operations"}),"\n",(0,r.jsx)(t.p,{children:"The library exposes utility functions for FHE operations. The goal of the library is to provide a seamless developer experience for writing smart contracts that can operate on confidential data."}),"\n",(0,r.jsx)(t.h2,{id:"types",children:"Types"}),"\n",(0,r.jsx)(t.p,{children:"The library provides a type system that is checked both at compile time and at run time. The structure and operations related to these types are described in this sections."}),"\n",(0,r.jsxs)(t.p,{children:["We currently support encrypted integers of bit length up to 256 bits and special types such as ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:['The encrypted integers behave as much as possible as Solidity\'s integer types. However, behaviour such as "revert on overflow" is not supported as this would leak some information of the encrypted integers. Therefore, arithmetic on ',(0,r.jsx)(t.code,{children:"euint"})," types is ",(0,r.jsx)(t.a,{href:"https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic",children:"unchecked"}),", i.e. there is wrap-around on overlow."]}),"\n",(0,r.jsxs)(t.p,{children:["In the back-end, encrypted integers are FHE ciphertexts. The library abstracts away the ciphertexts and presents pointers to ciphertexts, or ciphertext handles, to the smart contract developer. The ",(0,r.jsx)(t.code,{children:"euint"}),", ",(0,r.jsx)(t.code,{children:"ebool"})," and ",(0,r.jsx)(t.code,{children:"eaddress"})," types are ",(0,r.jsx)(t.em,{children:"wrappers"})," over these handles."]}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colspan:"2",children:" Supported types "})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"euint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ebool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Compute"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Compute"})]})]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"name"}),(0,r.jsx)(t.th,{children:"Bit Size"}),(0,r.jsx)(t.th,{children:"Usage"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint8"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint16"})}),(0,r.jsx)(t.td,{children:"16"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint32"})}),(0,r.jsx)(t.td,{children:"32"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint64"})}),(0,r.jsx)(t.td,{children:"64"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint128"})}),(0,r.jsx)(t.td,{children:"128"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEuint256"})}),(0,r.jsx)(t.td,{children:"256"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEbool"})}),(0,r.jsx)(t.td,{children:"8"}),(0,r.jsx)(t.td,{children:"Input"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"inEaddress"})}),(0,r.jsx)(t.td,{children:"160"}),(0,r.jsx)(t.td,{children:"Input"})]})]})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"operations",children:"Operations"}),"\n",(0,r.jsx)(t.p,{children:"There are three ways to perform operations with FHE.sol:"}),"\n",(0,r.jsx)(t.h3,{id:"using-direct-function-calls",children:"Using Direct Function Calls"}),"\n",(0,r.jsx)(t.p,{children:"Direct function calls are the most straightforward way to perform operations with FHE.sol. For example, if you want to add two encrypted 8-bit integers (euint8), you can do so as follows:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = FHE.add(lhs, rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"Here, lhs and rhs are your euint8 variables, and result will store the outcome of the addition."}),"\n",(0,r.jsx)(t.h3,{id:"using-library-bindings",children:"Using Library Bindings"}),"\n",(0,r.jsx)(t.p,{children:"FHE.sol also provides library bindings, allowing for a more natural syntax. To use this, you first need to include the library for your specific data type. For euint8, the usage would look like this:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs.add(rhs);\n"})}),"\n",(0,r.jsx)(t.p,{children:"In this example, lhs.add(rhs) performs the addition, using the library function implicitly."}),"\n",(0,r.jsx)(t.h3,{id:"utilizing-operator-overloading",children:"Utilizing Operator Overloading"}),"\n",(0,r.jsxs)(t.p,{children:["For an even more intuitive approach, FHE.sol supports operator overloading. This means you can use standard arithmetic operators like ",(0,r.jsx)(t.code,{children:"+"}),", ",(0,r.jsx)(t.code,{children:"-"}),", ",(0,r.jsx)(t.code,{children:"*"}),", etc., directly on encrypted types. Here's how you can use it for adding two ",(0,r.jsx)(t.code,{children:"euint8"})," values:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-javascript",children:"euint8 result = lhs + rhs;\n"})}),"\n",(0,r.jsx)(t.p,{children:"With operator overloading, lhs + rhs performs the addition seamlessly."}),"\n",(0,r.jsx)(t.h2,{id:"comparisons",children:"Comparisons"}),"\n",(0,r.jsxs)(t.p,{children:["Unlike other operations in FHE.sol, comparison operations do not support their respective operators (e.g. ",(0,r.jsx)(t.code,{children:">"}),", ",(0,r.jsx)(t.code,{children:"<"})," etc.).\nThis is because solidity expects these operators to return a boolean value, which is not possible with FHE.\nIntuitively, this is because returning a boolean value would leak information about the encrypted data."]}),"\n",(0,r.jsxs)(t.p,{children:["Instead, comparison operations are implemented as functions that return an ",(0,r.jsx)(t.code,{children:"ebool"})," type."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"ebool"})," type is not a real boolean type. It is implemented as a ",(0,r.jsx)(t.code,{children:"euint8"})]})}),"\n",(0,r.jsx)(t.h2,{id:"supported-operations",children:"Supported Operations"}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["A documentation of every function in FHE.sol (including inputs and outputs) can be found in ",(0,r.jsx)(t.a,{href:"/docs/devdocs/Solidity%20API/FHE",children:"FHE.sol"})]})}),"\n",(0,r.jsx)(t.p,{children:"All operations supported by FHE.sol are listed in the table below. For performance reasons, not all operations are supported for all types."}),"\n",(0,r.jsx)(t.p,{children:"Please refer to the table below for a comprehensive list of supported operations. This list will evolve as the network matures."}),"\n",(0,r.jsx)(t.p,{children:"Note that all functions are supported in both direct function calls and library bindings. However, operator overloading is only supported for the operations listed in the table (solidity please support operator overloading for boolean return types!)."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"FHE.sol function"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"Operator"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint8"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint16"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint32"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint64"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint128"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"euint256"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"ebool"}),(0,r.jsx)(t.th,{style:{textAlign:"center"},children:"eaddress"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Addition"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"add"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"+"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Subtraction"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sub"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"-"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Multiplication"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"mul"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"*"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise And"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"and"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"&"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Or"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"or"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"|"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Bitwise Xor"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"xor"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"^"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Division"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"div"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"/"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Remainder"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rem"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)(t.code,{children:"%"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Right"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shr"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Shift Left"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"shl"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"eq"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ne"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Greater than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"gt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than or equal"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lte"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Less than"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"lt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Min"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"min"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Max"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"max"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Not"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"not"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("r",{children:"\u2718"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"select"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Require"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"req"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Decrypt"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"decrypt"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Seal Output"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"sealOutput"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:"n/a"}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})}),(0,r.jsx)(t.td,{style:{textAlign:"center"},children:(0,r.jsx)("g",{children:"\u2714"})})]})]})]}),"\n",(0,r.jsx)(t.admonition,{title:"Caveat",type:"danger",children:(0,r.jsxs)(t.p,{children:["At the moment it is not possible to do ",(0,r.jsx)(t.code,{children:"ebool result = (lhs == rhs)"})," and others that return a boolean result. This is because FHE.sol expects a ",(0,r.jsx)(t.code,{children:"ebool"}),", while Solidity only allows overloading to return a regular boolean.\nInstead, we recommend ",(0,r.jsx)(t.code,{children:"ebool result = lhs.eq(rhs)"}),"."]})}),"\n",(0,r.jsx)(t.admonition,{type:"danger",children:(0,r.jsxs)(t.p,{children:["Using require and decrypt in a TX is dangerous as it can break the confidentiality of the data. Please refer to ",(0,r.jsx)(t.a,{href:"/docs/devdocs/Writing%20Smart%20Contracts/Useful-Tips",children:"Useful-Tips"})," to read some more"]})}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Division and Remainder by ",(0,r.jsx)(t.code,{children:"0"})," will output with an encrypted representation of the maximal value of the uint that is used (Ex. encrypted 255 for euint8)"]})})]})}function j(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>d});var r=n(6540);const s={},l=r.createContext(s);function i(e){const t=r.useContext(l);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/951026e7.2aba2dc8.js b/assets/js/951026e7.e9dae8aa.js similarity index 59% rename from assets/js/951026e7.2aba2dc8.js rename to assets/js/951026e7.e9dae8aa.js index c628a954..90706209 100644 --- a/assets/js/951026e7.2aba2dc8.js +++ b/assets/js/951026e7.e9dae8aa.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[8114],{3646:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=s(4848),a=s(8453);const o={sidebar_position:1,title:"Templates"},r=void 0,i={id:"devdocs/Examples and References/Templates",title:"Templates",description:"We compiled a list of a few templates that you can use as a reference to build your own dApp.",source:"@site/docs/devdocs/Examples and References/Templates.md",sourceDirName:"devdocs/Examples and References",slug:"/devdocs/Examples and References/Templates",permalink:"/docs/devdocs/Examples and References/Templates",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Examples and References/Templates.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Templates"},sidebar:"docsSidebar",previous:{title:"Catching Errors",permalink:"/docs/devdocs/FhenixJS/Catching Errors"},next:{title:"Examples & fheDapps",permalink:"/docs/devdocs/Examples and References/Examples-fheDapps"}},c={},d=[{value:"Hardhat + React",id:"hardhat--react",level:3},{value:"Nuxt 3 + Fhenixjs + Ethers.js + Bootstrap Starter",id:"nuxt-3--fhenixjs--ethersjs--bootstrap-starter",level:3}];function p(e){const t={a:"a",h3:"h3",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"We compiled a list of a few templates that you can use as a reference to build your own dApp."}),"\n",(0,n.jsx)(t.h3,{id:"hardhat--react",children:"Hardhat + React"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/FhenixProtocol/fhenix-hardhat-example",children:"https://github.com/FhenixProtocol/fhenix-hardhat-example"})}),"\n",(0,n.jsx)(t.p,{children:"Has a basic contract, some tasks and a simple frontend (TODO: copy over from playground)."}),"\n",(0,n.jsx)(t.h3,{id:"nuxt-3--fhenixjs--ethersjs--bootstrap-starter",children:"Nuxt 3 + Fhenixjs + Ethers.js + Bootstrap Starter"}),"\n",(0,n.jsx)(t.p,{children:"With this template you can easily start developing your Fhenix front-end app using Nuxt 3 (vue3)."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/FhenixProtocol/fhenix-nuxt3-template",children:"https://github.com/FhenixProtocol/fhenix-nuxt3-template"})})]})}function l(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>i});var n=s(6540);const a={},o=n.createContext(a);function r(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[8114],{3646:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var n=s(4848),a=s(8453);const o={sidebar_position:1,title:"Templates"},r=void 0,i={id:"devdocs/Examples and References/Templates",title:"Templates",description:"We compiled a list of a few templates that you can use as a reference to build your own dApp.",source:"@site/docs/devdocs/Examples and References/Templates.md",sourceDirName:"devdocs/Examples and References",slug:"/devdocs/Examples and References/Templates",permalink:"/docs/devdocs/Examples and References/Templates",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Examples and References/Templates.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Templates"},sidebar:"docsSidebar",previous:{title:"Catching Errors",permalink:"/docs/devdocs/FhenixJS/Catching Errors"},next:{title:"Examples & fheDapps",permalink:"/docs/devdocs/Examples and References/Examples-fheDapps"}},c={},d=[{value:"Hardhat + React",id:"hardhat--react",level:3},{value:"Nuxt 3 + Fhenixjs + Ethers.js + Bootstrap Starter",id:"nuxt-3--fhenixjs--ethersjs--bootstrap-starter",level:3}];function l(e){const t={a:"a",h3:"h3",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"We compiled a list of a few templates that you can use as a reference to build your own dApp."}),"\n",(0,n.jsx)(t.h3,{id:"hardhat--react",children:"Hardhat + React"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/FhenixProtocol/fhenix-hardhat-example",children:"https://github.com/FhenixProtocol/fhenix-hardhat-example"})}),"\n",(0,n.jsx)(t.p,{children:"Has a basic contract, some tasks and a simple frontend."}),"\n",(0,n.jsx)(t.h3,{id:"nuxt-3--fhenixjs--ethersjs--bootstrap-starter",children:"Nuxt 3 + Fhenixjs + Ethers.js + Bootstrap Starter"}),"\n",(0,n.jsx)(t.p,{children:"With this template you can easily start developing your Fhenix front-end app using Nuxt 3 (vue3)."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/FhenixProtocol/fhenix-nuxt3-template",children:"https://github.com/FhenixProtocol/fhenix-nuxt3-template"})})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>i});var n=s(6540);const a={},o=n.createContext(a);function r(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/978597a0.5cf12fb7.js b/assets/js/978597a0.5cf12fb7.js deleted file mode 100644 index 3e95b647..00000000 --- a/assets/js/978597a0.5cf12fb7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[8097],{2558:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var i=n(4848),s=n(8453);const r={},o="\ud83d\udcdc Permits & Access Control",a={id:"devdocs/Encryption and Privacy/Permits-Access-Control",title:"\ud83d\udcdc Permits & Access Control",description:"In a Fully Homomorphic Encryption (FHE) framework, all data stored in a contract's storage is encrypted. Access control involves granting selective access to data by authorized parties while restricting access to unauthorized users.",source:"@site/docs/devdocs/Encryption and Privacy/Permits-Access-Control.md",sourceDirName:"devdocs/Encryption and Privacy",slug:"/devdocs/Encryption and Privacy/Permits-Access-Control",permalink:"/docs/devdocs/Encryption and Privacy/Permits-Access-Control",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Encryption and Privacy/Permits-Access-Control.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Examples & fheDapps",permalink:"/docs/devdocs/Examples and References/Examples-fheDapps"},next:{title:"\ud83e\udd2b Development Tips \u2013 Ensuring Privacy",permalink:"/docs/devdocs/Encryption and Privacy/Privacy-Web3"}},c={},d=[{value:"Permits and Access Control",id:"permits-and-access-control",level:2},{value:"What is a Permit?",id:"what-is-a-permit",level:4},{value:"How to Generate a Permit",id:"how-to-generate-a-permit",level:4},{value:"What is a Permission?",id:"what-is-a-permission",level:4},{value:"How to Generate a Permission",id:"how-to-generate-a-permission",level:4},{value:"Using a Permission",id:"using-a-permission",level:4}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"-permits--access-control",children:"\ud83d\udcdc Permits & Access Control"}),"\n",(0,i.jsx)(t.p,{children:"In a Fully Homomorphic Encryption (FHE) framework, all data stored in a contract's storage is encrypted. Access control involves granting selective access to data by authorized parties while restricting access to unauthorized users."}),"\n",(0,i.jsxs)(t.p,{children:["Solidity contracts generally expose their data using ",(0,i.jsx)(t.code,{children:"view"})," functions. However, permissioned data is a challenge, since Solidity ",(0,i.jsx)(t.code,{children:"view"})," functions do not come with any in-built mechanism to allow the contract to verify cryptographically that callers are who they say they are (for transactions, this is done by verifying the signature on the data).\nFhenix handles this issue by implementing a ",(0,i.jsx)(t.code,{children:"seal"})," function, which seals the data in a manner that only the intended recipient can decrypt and view (Fhenix uses the ",(0,i.jsx)(t.code,{children:"decrypt"})," function for less sensitive data). This approach ensures that encrypted data remains confidential and only accessible to authorized users."]}),"\n",(0,i.jsx)(t.h2,{id:"permits-and-access-control",children:"Permits and Access Control"}),"\n",(0,i.jsx)(t.p,{children:"Fhenix Solidity libraries (specifically, fhenix.js) are equipped with an in-built access control scheme.\nThis access control scheme enables contracts to perform a basic check of account ownership by adding authentication and authorization features to specific view functions.\n(An added benefit of the Fhenix Solidity libraries is that developers save coding effort each time a project has cryptographic access control requirements.)"}),"\n",(0,i.jsx)(t.h4,{id:"what-is-a-permit",children:"What is a Permit?"}),"\n",(0,i.jsx)(t.p,{children:"A permit is a mechanism that allows the contract to verify cryptographically the identity of callers, ensuring that they are who they claim to be."}),"\n",(0,i.jsx)(t.p,{children:"In Fhenix, a permit is a signed message that contains the caller's public key, which the contract can use to verify the caller. The permit is a signed JSON object that follows the EIP-712 standard.\nThe permit contains the necessary information, including a public key, which allows data re-sealing in a smart contract environment.\nThe inclusion of this public key into the permit enables a secure process of data re-sealing within a smart contract after the JSON object is signed by the user."}),"\n",(0,i.jsx)(t.h4,{id:"how-to-generate-a-permit",children:"How to Generate a Permit"}),"\n",(0,i.jsxs)(t.p,{children:["Permits are generated using the ",(0,i.jsx)(t.code,{children:"getPermit"})," method in ",(0,i.jsx)(t.code,{children:"fhenix.js"}),". This method requires the following parameters:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"contractAddress"})," (required, string): The address of the contract."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"provider"})," (required): An ",(0,i.jsx)(t.code,{children:"ethers"})," (or compatible) object that can sign EIP-712 formatted data. (Note that if you want to unseal data using your wallet's encryption key you can't use \"JsonRpcProvider\")"]}),"\n"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"const permit = await getPermit(contractAddress);\n"})}),"\n",(0,i.jsx)(t.h4,{id:"what-is-a-permission",children:"What is a Permission?"}),"\n",(0,i.jsxs)(t.p,{children:["In Fhenix, a permission is that part of a permit that supplies proof that callers are who they say they are.\nA permission contains the signature and corresponding public key.\nIn order to see how to verify a permission in a Solidity contract, please refer to our ",(0,i.jsx)(t.a,{href:"/docs/devdocs/Solidity%20API/Permissioned",children:"Permissioned"}),"."]}),"\n",(0,i.jsx)(t.h4,{id:"how-to-generate-a-permission",children:"How to Generate a Permission"}),"\n",(0,i.jsx)(t.p,{children:"The following is the syntax for generating a permission:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"const permission = client.extractPermitPermissions(permit);\n"})}),"\n",(0,i.jsx)(t.h4,{id:"using-a-permission",children:"Using a Permission"}),"\n",(0,i.jsxs)(t.p,{children:["Once generated, the permission can be used and sent to the contract. It can also be used to unseal the output of the ",(0,i.jsx)(t.code,{children:"sealoutput"})," function, assuming it was sealed using that same permission."]}),"\n",(0,i.jsx)(t.p,{children:"The following code snippet shows how to implement the added cryptographic functionality of Fhenix (specifically, permits and permissions) on Ethereum using the Fhenix library."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:'import { BrowserProvider } from "ethers";\nimport { FhenixClient, getPermit } from "fhenixjs";\n\nconst provider = new BrowserProvider(window.ethereum);\nconst client = new FhenixClient({ provider });\nconst permit = await getPermit(contractAddress, provider);\nconst permission = client.extractPemitPermissions(permit);\nclient.storePermit(permit); // Stores a permit for a specific contract address.\nconst response = await contract.connect(owner).getValue(permission); // Calling "getValue" which is a view function in "contract"\nconst plaintext = await client.unseal(contractAddress, response);\n'})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var i=n(6540);const s={},r=i.createContext(s);function o(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/978597a0.e5150935.js b/assets/js/978597a0.e5150935.js new file mode 100644 index 00000000..fdc07d16 --- /dev/null +++ b/assets/js/978597a0.e5150935.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[8097],{2558:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var i=t(4848),s=t(8453);const r={},a="\ud83d\udcdc Permits & Access Control",o={id:"devdocs/Encryption and Privacy/Permits-Access-Control",title:"\ud83d\udcdc Permits & Access Control",description:"In a Fully Homomorphic Encryption (FHE) framework, all data stored in a contract's storage is encrypted. Access control involves granting selective access to data by authorized parties while restricting access to unauthorized users.",source:"@site/docs/devdocs/Encryption and Privacy/Permits-Access-Control.md",sourceDirName:"devdocs/Encryption and Privacy",slug:"/devdocs/Encryption and Privacy/Permits-Access-Control",permalink:"/docs/devdocs/Encryption and Privacy/Permits-Access-Control",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/Encryption and Privacy/Permits-Access-Control.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Examples & fheDapps",permalink:"/docs/devdocs/Examples and References/Examples-fheDapps"},next:{title:"\ud83e\udd2b Development Tips \u2013 Ensuring Privacy",permalink:"/docs/devdocs/Encryption and Privacy/Privacy-Web3"}},c={},d=[{value:"Permits and Access Control",id:"permits-and-access-control",level:2},{value:"What is a Permit?",id:"what-is-a-permit",level:4},{value:"How to Generate a Permit",id:"how-to-generate-a-permit",level:4},{value:"What is a Permission?",id:"what-is-a-permission",level:4},{value:"How to Generate a Permission",id:"how-to-generate-a-permission",level:4},{value:"Using a Permission",id:"using-a-permission",level:4}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-permits--access-control",children:"\ud83d\udcdc Permits & Access Control"}),"\n",(0,i.jsx)(n.p,{children:"In a Fully Homomorphic Encryption (FHE) framework, all data stored in a contract's storage is encrypted. Access control involves granting selective access to data by authorized parties while restricting access to unauthorized users."}),"\n",(0,i.jsxs)(n.p,{children:["Solidity contracts generally expose their data using ",(0,i.jsx)(n.code,{children:"view"})," functions. However, permissioned data is a challenge, since Solidity ",(0,i.jsx)(n.code,{children:"view"})," functions do not come with any in-built mechanism to allow the contract to verify cryptographically that callers are who they say they are (for transactions, this is done by verifying the signature on the data).\nFhenix handles this issue by implementing a ",(0,i.jsx)(n.code,{children:"seal"})," function, which seals the data in a manner that only the intended recipient can decrypt and view (Fhenix uses the ",(0,i.jsx)(n.code,{children:"decrypt"})," function for less sensitive data). This approach ensures that encrypted data remains confidential and only accessible to authorized users."]}),"\n",(0,i.jsx)(n.h2,{id:"permits-and-access-control",children:"Permits and Access Control"}),"\n",(0,i.jsx)(n.p,{children:"Fhenix Solidity libraries (specifically, fhenix.js) are equipped with an in-built access control scheme.\nThis access control scheme enables contracts to perform a basic check of account ownership by adding authentication and authorization features to specific view functions.\n(An added benefit of the Fhenix Solidity libraries is that developers save coding effort each time a project has cryptographic access control requirements.)"}),"\n",(0,i.jsx)(n.h4,{id:"what-is-a-permit",children:"What is a Permit?"}),"\n",(0,i.jsx)(n.p,{children:"A permit is a mechanism that allows the contract to verify cryptographically the identity of callers, ensuring that they are who they claim to be."}),"\n",(0,i.jsx)(n.p,{children:"In Fhenix, a permit is a signed message that contains the caller's public key, which the contract can use to verify the caller. The permit is a signed JSON object that follows the EIP-712 standard.\nThe permit contains the necessary information, including a public key, which allows data re-sealing in a smart contract environment.\nThe inclusion of this public key into the permit enables a secure process of data re-sealing within a smart contract after the JSON object is signed by the user."}),"\n",(0,i.jsx)(n.h4,{id:"how-to-generate-a-permit",children:"How to Generate a Permit"}),"\n",(0,i.jsxs)(n.p,{children:["Permits are generated using the ",(0,i.jsx)(n.code,{children:"generatePermit"})," method in ",(0,i.jsx)(n.code,{children:"fhenix.js"}),". This method receives the following parameters:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"contractAddress"})," (required, string): The address of the contract."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"provider"})," (optional): An ",(0,i.jsx)(n.code,{children:"ethers"})," (or compatible) object that can sign EIP-712 formatted data. (Note that if you want to unseal data using your wallet's encryption key you can't use \"JsonRpcProvider\")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"signer"})," (optional): Another ",(0,i.jsx)(n.code,{children:"ethers"})," (or compatible) signer if you want to use a different signer than the one in the provider (chain-id requests are still made via the provider)"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",children:"const permit = await generatePermit(contractAddress);\n\n// passing a custom signer\nlet permit = await fhenixjs.generatePermit(\n contractAddress,\n undefined, // use the internal provider\n signer, // created from, e.g. `ethers.getSigners()[0]`\n);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"what-is-a-permission",children:"What is a Permission?"}),"\n",(0,i.jsxs)(n.p,{children:["In Fhenix, a permission is that part of a permit that supplies proof that callers are who they say they are.\nA permission contains the signature and corresponding public key.\nIn order to see how to verify a permission in a Solidity contract, please refer to our ",(0,i.jsx)(n.a,{href:"/docs/devdocs/Solidity%20API/Permissioned",children:"Permissioned"}),"."]}),"\n",(0,i.jsx)(n.h4,{id:"how-to-generate-a-permission",children:"How to Generate a Permission"}),"\n",(0,i.jsx)(n.p,{children:"The following is the syntax for generating a permission:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",children:"const permission = client.extractPermitPermissions(permit);\n"})}),"\n",(0,i.jsx)(n.h4,{id:"using-a-permission",children:"Using a Permission"}),"\n",(0,i.jsxs)(n.p,{children:["Once generated, the permission can be used and sent to the contract. It can also be used to unseal the output of the ",(0,i.jsx)(n.code,{children:"sealoutput"})," function, assuming it was sealed using that same permission."]}),"\n",(0,i.jsx)(n.p,{children:"The following code snippet shows how to implement the added cryptographic functionality of Fhenix (specifically, permits and permissions) on Ethereum using the Fhenix library."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",children:'import { BrowserProvider } from "ethers";\nimport { FhenixClient, getPermit } from "fhenixjs";\n\nconst provider = new BrowserProvider(window.ethereum);\nconst client = new FhenixClient({ provider });\nconst permit = await generatePermit(contractAddress, provider);\nconst permission = client.extractPemitPermissions(permit);\nconst response = await contract.connect(owner).getValue(permission); // Calling "getValue" which is a view function in "contract"\nconst plaintext = await client.unseal(contractAddress, response);\n'})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(6540);const s={},r=i.createContext(s);function a(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e4d6daf3.36eb822a.js b/assets/js/e4d6daf3.61e32cb2.js similarity index 56% rename from assets/js/e4d6daf3.36eb822a.js rename to assets/js/e4d6daf3.61e32cb2.js index 36711265..71450e09 100644 --- a/assets/js/e4d6daf3.36eb822a.js +++ b/assets/js/e4d6daf3.61e32cb2.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[2214],{6983:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var i=n(4848),r=n(8453);const s={sidebar_position:3,title:"(Un)Sealing"},a=void 0,o={id:"devdocs/FhenixJS/Decryption",title:"(Un)Sealing",description:"When an app wants to read some piece of encrypted data from a Fhenix smart contract, that data must be converted from its encrypted form on chain to an encryption that the app or user can read.",source:"@site/docs/devdocs/FhenixJS/Decryption.md",sourceDirName:"devdocs/FhenixJS",slug:"/devdocs/FhenixJS/Decryption",permalink:"/docs/devdocs/FhenixJS/Decryption",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/FhenixJS/Decryption.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"(Un)Sealing"},sidebar:"docsSidebar",previous:{title:"Encryption",permalink:"/docs/devdocs/FhenixJS/Encryption"},next:{title:"Permits",permalink:"/docs/devdocs/FhenixJS/Permits"}},c={},d=[{value:"Encrypted Values & Permits",id:"encrypted-values--permits",level:3},{value:"1. Creating a Permit",id:"1-creating-a-permit",level:4},{value:"2. Querying the Contract",id:"2-querying-the-contract",level:4},{value:"3. Unsealing the Data",id:"3-unsealing-the-data",level:4},{value:"Putting it all Together",id:"putting-it-all-together",level:4}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"When an app wants to read some piece of encrypted data from a Fhenix smart contract, that data must be converted from its encrypted form on chain to an encryption that the app or user can read."}),"\n",(0,i.jsxs)(t.p,{children:["The process of taking an FHE-encrypted ciphertext and converting it to standard encryption is called ",(0,i.jsx)(t.strong,{children:"sealing."})]}),"\n",(0,i.jsxs)(t.p,{children:["The data is returned to the user using ",(0,i.jsx)(t.a,{href:"https://bitbeans.gitbooks.io/libsodium-net/content/public-key_cryptography/sealed_boxes.html",children:"sealed box encryption "}),"from NaCL. The gist of it is that the user provides a public key to the contract during a view function call, which the contract then uses to encrypt the data in such a way that only the owner of the private key associated with the provided public key can decrypt and read the data."]}),"\n",(0,i.jsx)(t.admonition,{title:"Don't Want to Seal?",type:"tip",children:(0,i.jsxs)(t.p,{children:["Fhenix supports standard decryption as well. Mostly suited for public data, an unsealed plaintext value can be returned from a contract.\nYou can read more about how to do this ",(0,i.jsx)(t.a,{href:"/docs/devdocs/Writing%20Smart%20Contracts/Returning-Data",children:"here"}),"."]})}),"\n",(0,i.jsx)(t.h3,{id:"encrypted-values--permits",children:"Encrypted Values & Permits"}),"\n",(0,i.jsx)(t.p,{children:"When reading encrypted values we can do one of two things:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Receiving it as bytes calldata: 0x04000...."}),"\n",(0,i.jsx)(t.li,{children:'RECOMMENDED: Receiving it as inEuint*: ["0x04000"]'}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"The main difference with inEuint* is that you can be explicit with what is the exact parameter that you are looking for."}),"\n",(0,i.jsxs)(t.p,{children:["A ",(0,i.jsx)(t.code,{children:"Permit"})," is a data structure that helps contracts know who is trying to call a specific function."]}),"\n",(0,i.jsxs)(t.p,{children:["The fhenix.js Javascript library includes methods to support creating parameters for values that require ",(0,i.jsx)(t.a,{href:"/docs/devdocs/Encryption%20and%20Privacy/Permits-Access-Control",children:"Permits & Access Control"}),". These methods can help creating ephemeral transaction keys, which are used by the smart contract to create a secure encryption channel to the caller.\nSimilarly to decryption, this usage can be implemented by any compliant library, but we include direct support in fhenix.js. "]}),"\n",(0,i.jsx)(t.p,{children:"This is done in 3 steps: generating a permit, querying the contract and unsealing the data."}),"\n",(0,i.jsx)(t.h4,{id:"1-creating-a-permit",children:"1. Creating a Permit"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"import { FhenixClient, getPermit } from 'fhenixjs';\n\nconst provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');\nconst client = new FhenixClient({ provider });\n\n\nconst permit = await getPermit(contractAddress, provider);\nclient.storePermit(permit);\n"})}),"\n",(0,i.jsx)(t.admonition,{title:"Did you know?",type:"tip",children:(0,i.jsxs)(t.p,{children:["When you create a permit it gets stored in ",(0,i.jsx)(t.code,{children:"localstorage"}),". This makes permits easily reusable and transferable"]})}),"\n",(0,i.jsx)(t.h4,{id:"2-querying-the-contract",children:"2. Querying the Contract"}),"\n",(0,i.jsx)(t.p,{children:"We recommend that contracts implement the Permit/Permission interfaces (though this is not strictly required).\nIn this case, we can easily inject our permit into the function call."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"const permission = client.extractPermitPermission(permit);\nconst response = await contract.balanceOf(permission);\n"})}),"\n",(0,i.jsx)(t.h4,{id:"3-unsealing-the-data",children:"3. Unsealing the Data"}),"\n",(0,i.jsxs)(t.p,{children:["Now that we have the response data, we can use the ",(0,i.jsx)(t.code,{children:"unseal"})," function to decipher the data"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"client.unseal(contractAddress, response)\n"})}),"\n",(0,i.jsx)(t.p,{children:"We have to provide the contract address so the fhenix client knows which permit to use for the unsealing function."}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsx)(t.p,{children:"Permits are currently limited to support a single contract"})}),"\n",(0,i.jsx)(t.h4,{id:"putting-it-all-together",children:"Putting it all Together"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",children:"import { FhenixClient, getPermit } from 'fhenixjs';\nimport { JsonRpcProvider } from 'ethers';\n\nconst provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');\nconst client = new FhenixClient({provider});\n\nconst permit = await getPermit(contractAddress, provider);\nclient.storePermit(permit);\n\nconst permission = client.extractPermitPermission(permit);\nconst response = await contract.balanceOf(permission);\n\nconst plaintext = client.unseal(contractAddress, response);\n\nconsole.log(`My Balance: ${plaintext}`)\n"})}),"\n",(0,i.jsx)(t.admonition,{title:"Did you know?",type:"tip",children:(0,i.jsxs)(t.p,{children:["You have tools that can ease the process of interacting with the contract and decrypting values. If you want to use them please refer to\n",(0,i.jsx)(t.a,{href:"../Tools%20and%20Utilities/Fhenix-Encryption-UI",children:"Tools and Utilities"})]})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var i=n(6540);const r={},s=i.createContext(r);function a(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkfhenix_docs=self.webpackChunkfhenix_docs||[]).push([[2214],{6983:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var i=n(4848),r=n(8453);const a={sidebar_position:3,title:"(Un)Sealing"},s=void 0,o={id:"devdocs/FhenixJS/Decryption",title:"(Un)Sealing",description:"When an app wants to read some piece of encrypted data from a Fhenix smart contract, that data must be converted from its encrypted form on chain to an encryption that the app or user can read.",source:"@site/docs/devdocs/FhenixJS/Decryption.md",sourceDirName:"devdocs/FhenixJS",slug:"/devdocs/FhenixJS/Decryption",permalink:"/docs/devdocs/FhenixJS/Decryption",draft:!1,unlisted:!1,editUrl:"https://github.com/fhenixprotocol/fhenix-docs/tree/main/docs/devdocs/FhenixJS/Decryption.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"(Un)Sealing"},sidebar:"docsSidebar",previous:{title:"Encryption",permalink:"/docs/devdocs/FhenixJS/Encryption"},next:{title:"Permits",permalink:"/docs/devdocs/FhenixJS/Permits"}},c={},d=[{value:"Encrypted Values & Permits",id:"encrypted-values--permits",level:3},{value:"1. Creating a Permit",id:"1-creating-a-permit",level:4},{value:"2. Querying the Contract",id:"2-querying-the-contract",level:4},{value:"3. Unsealing the Data",id:"3-unsealing-the-data",level:4},{value:"Putting it all Together",id:"putting-it-all-together",level:4}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"When an app wants to read some piece of encrypted data from a Fhenix smart contract, that data must be converted from its encrypted form on chain to an encryption that the app or user can read."}),"\n",(0,i.jsxs)(t.p,{children:["The process of taking an FHE-encrypted ciphertext and converting it to standard encryption is called ",(0,i.jsx)(t.strong,{children:"sealing."})]}),"\n",(0,i.jsxs)(t.p,{children:["The data is returned to the user using ",(0,i.jsx)(t.a,{href:"https://bitbeans.gitbooks.io/libsodium-net/content/public-key_cryptography/sealed_boxes.html",children:"sealed box encryption "}),"from NaCL. The gist of it is that the user provides a public key to the contract during a view function call, which the contract then uses to encrypt the data in such a way that only the owner of the private key associated with the provided public key can decrypt and read the data."]}),"\n",(0,i.jsx)(t.admonition,{title:"Don't Want to Seal?",type:"tip",children:(0,i.jsxs)(t.p,{children:["Fhenix supports standard decryption as well. Mostly suited for public data, an unsealed plaintext value can be returned from a contract.\nYou can read more about how to do this ",(0,i.jsx)(t.a,{href:"/docs/devdocs/Writing%20Smart%20Contracts/Returning-Data",children:"here"}),"."]})}),"\n",(0,i.jsx)(t.h3,{id:"encrypted-values--permits",children:"Encrypted Values & Permits"}),"\n",(0,i.jsx)(t.p,{children:"When reading encrypted values we can do one of two things:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Receiving it as bytes calldata: 0x04000...."}),"\n",(0,i.jsx)(t.li,{children:'RECOMMENDED: Receiving it as inEuint*: ["0x04000"]'}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"The main difference with inEuint* is that you can be explicit with what is the exact parameter that you are looking for."}),"\n",(0,i.jsxs)(t.p,{children:["A ",(0,i.jsx)(t.code,{children:"Permit"})," is a data structure that helps contracts know who is trying to call a specific function."]}),"\n",(0,i.jsxs)(t.p,{children:["The fhenix.js Javascript library includes methods to support creating parameters for values that require ",(0,i.jsx)(t.a,{href:"/docs/devdocs/Encryption%20and%20Privacy/Permits-Access-Control",children:"Permits & Access Control"}),". These methods can help creating ephemeral transaction keys, which are used by the smart contract to create a secure encryption channel to the caller.\nSimilarly to decryption, this usage can be implemented by any compliant library, but we include direct support in fhenix.js. "]}),"\n",(0,i.jsx)(t.p,{children:"This is done in 3 steps: generating a permit, querying the contract and unsealing the data."}),"\n",(0,i.jsx)(t.h4,{id:"1-creating-a-permit",children:"1. Creating a Permit"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"import { FhenixClient, generatePermit } from 'fhenixjs';\n\nconst provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');\nconst client = new FhenixClient({ provider });\n\nconst permit = await generatePermit(contractAddress, provider);\n"})}),"\n",(0,i.jsx)(t.admonition,{title:"Did you know?",type:"tip",children:(0,i.jsxs)(t.p,{children:["When you create a permit it gets stored in ",(0,i.jsx)(t.code,{children:"localstorage"}),". This makes permits easily reusable and transferable"]})}),"\n",(0,i.jsx)(t.h4,{id:"2-querying-the-contract",children:"2. Querying the Contract"}),"\n",(0,i.jsx)(t.p,{children:"We recommend that contracts implement the Permit/Permission interfaces (though this is not strictly required).\nIn this case, we can easily inject our permit into the function call."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"const permission = client.extractPermitPermission(permit);\nconst response = await contract.balanceOf(permission);\n"})}),"\n",(0,i.jsx)(t.h4,{id:"3-unsealing-the-data",children:"3. Unsealing the Data"}),"\n",(0,i.jsxs)(t.p,{children:["Now that we have the response data, we can use the ",(0,i.jsx)(t.code,{children:"unseal"})," function to decipher the data"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-javascript",children:"client.unseal(contractAddress, response)\n"})}),"\n",(0,i.jsx)(t.p,{children:"We have to provide the contract address so the fhenix client knows which permit to use for the unsealing function."}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsx)(t.p,{children:"Permits are currently limited to support a single contract"})}),"\n",(0,i.jsx)(t.h4,{id:"putting-it-all-together",children:"Putting it all Together"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",children:"import { FhenixClient, generatePermit } from 'fhenixjs';\nimport { JsonRpcProvider } from 'ethers';\n\nconst provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');\nconst client = new FhenixClient({provider});\n\nconst permit = await generatePermit(contractAddress, provider);\nconst permission = client.extractPermitPermission(permit);\n\nconst response = await contract.balanceOf(permission);\nconst plaintext = client.unseal(contractAddress, response);\n\nconsole.log(`My Balance: ${plaintext}`)\n"})}),"\n",(0,i.jsx)(t.admonition,{title:"Did you know?",type:"tip",children:(0,i.jsxs)(t.p,{children:["You have tools that can ease the process of interacting with the contract and decrypting values. If you want to use them please refer to\n",(0,i.jsx)(t.a,{href:"../Tools%20and%20Utilities/Fhenix-Encryption-UI",children:"Tools and Utilities"})]})})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>o});var i=n(6540);const r={},a=i.createContext(r);function s(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.4689e569.js b/assets/js/runtime~main.68d74858.js similarity index 94% rename from assets/js/runtime~main.4689e569.js rename to assets/js/runtime~main.68d74858.js index 50868037..2d1368b9 100644 --- a/assets/js/runtime~main.4689e569.js +++ b/assets/js/runtime~main.68d74858.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,d,f,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={exports:{}};return b[e].call(c.exports,c,c.exports,r),c.exports}r.m=b,e=[],r.O=(a,c,d,f)=>{if(!c){var b=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(f,b),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>"assets/js/"+({42:"7c00667b",169:"6ebc6907",609:"d9ab9a35",643:"ccba1d6d",644:"50376bd6",685:"2fc3947b",849:"0058b4c6",957:"c141421f",1232:"1fe64db5",1235:"a7456010",1434:"7ec24e7b",1512:"00afa580",1588:"57ea0922",1875:"a739edad",2005:"5cc6e2f6",2138:"1a4e3797",2142:"8dfb72aa",2192:"44625589",2214:"e4d6daf3",2388:"6aab3ca4",2485:"f2e2dc26",2518:"7b18d337",2576:"f4b774c8",3046:"a7e0b53d",3164:"fc128ddc",3215:"41a4e207",3307:"a74d882b",3370:"9cc604ee",3376:"3847f788",3416:"14662712",3912:"24da45cd",3915:"6c36c959",4055:"34645dc1",4134:"393be207",4552:"c35c524d",4583:"1df93b7f",4605:"bc265f2d",5343:"c9623b07",5430:"69eebc34",5742:"aba21aa0",5877:"3cdf1dab",5901:"41f39c68",5978:"4f2033fe",6061:"1f391b9e",6492:"c7c98221",6509:"52b9fcd1",6717:"09235513",6782:"3a1f197c",6969:"14eb3368",7064:"42246441",7073:"d947cca9",7098:"a7bd4aaa",7146:"5502e32c",7336:"4091a161",7456:"6deb773c",7499:"65be5726",7775:"0ba8c2c3",7946:"1059f392",8097:"978597a0",8114:"951026e7",8223:"fe47fcd9",8375:"597dd8b5",8401:"17896441",8543:"2b1dc6dd",8709:"5555e52f",9048:"a94703ab",9070:"3d6c9eb5",9647:"5e95c892",9731:"e11920bd",9861:"4f7734c6",9922:"2b741ebd"}[e]||e)+"."+{42:"964f5d59",169:"737bc36c",416:"b4fc881a",609:"4e389ea8",643:"525a05d0",644:"e6cf6771",685:"de863ff0",849:"a41d78c7",957:"ba74c4db",1232:"b5685135",1235:"e494e8e1",1434:"f737e776",1512:"f7f91c97",1588:"bfa20b5d",1875:"30e374c4",2005:"66e0d66f",2138:"9416fdf7",2142:"c1702da9",2192:"9300893f",2214:"36eb822a",2237:"c2740f3d",2388:"d794b6f2",2485:"fc2e5cb3",2490:"edd93e89",2518:"52a3bb28",2576:"6dbffe05",3046:"e4080f1d",3164:"3f1c88fe",3215:"9f5a2ed3",3307:"00a0be80",3370:"2d9e0a62",3376:"10c593ac",3416:"f765f7d0",3912:"6069f782",3915:"c6a5c43c",4055:"dc515f97",4134:"d7fb7c7e",4552:"6ec6c64b",4583:"80ad2fb1",4605:"a4cfad58",5343:"234c248f",5430:"73347917",5742:"77409faf",5877:"c6c125dd",5901:"80cdb652",5978:"b6f1a37e",6061:"b8a13666",6492:"ae0ce65d",6509:"46c2fd69",6717:"0dbb6c36",6782:"f1e9b79b",6969:"7d928f65",7064:"5ecc9a35",7073:"c5741845",7098:"fa18e033",7146:"ef010b84",7336:"7fbfdb6c",7456:"3275a2e6",7499:"0719a8e3",7775:"3531da4d",7946:"7b2d9830",8097:"5cf12fb7",8114:"2aba2dc8",8223:"4a6631ac",8375:"ef2711b2",8401:"2e155ba7",8543:"4ee77c8a",8709:"a92b7cdf",8913:"f5ec71cd",9048:"c72de6cb",9070:"5e0095c7",9412:"b062857e",9462:"f0f17b38",9647:"150cca41",9731:"ac41e7ab",9861:"887c039b",9922:"bccf929a"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="fhenix-docs:",r.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var f=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={14662712:"3416",17896441:"8401",42246441:"7064",44625589:"2192","7c00667b":"42","6ebc6907":"169",d9ab9a35:"609",ccba1d6d:"643","50376bd6":"644","2fc3947b":"685","0058b4c6":"849",c141421f:"957","1fe64db5":"1232",a7456010:"1235","7ec24e7b":"1434","00afa580":"1512","57ea0922":"1588",a739edad:"1875","5cc6e2f6":"2005","1a4e3797":"2138","8dfb72aa":"2142",e4d6daf3:"2214","6aab3ca4":"2388",f2e2dc26:"2485","7b18d337":"2518",f4b774c8:"2576",a7e0b53d:"3046",fc128ddc:"3164","41a4e207":"3215",a74d882b:"3307","9cc604ee":"3370","3847f788":"3376","24da45cd":"3912","6c36c959":"3915","34645dc1":"4055","393be207":"4134",c35c524d:"4552","1df93b7f":"4583",bc265f2d:"4605",c9623b07:"5343","69eebc34":"5430",aba21aa0:"5742","3cdf1dab":"5877","41f39c68":"5901","4f2033fe":"5978","1f391b9e":"6061",c7c98221:"6492","52b9fcd1":"6509","09235513":"6717","3a1f197c":"6782","14eb3368":"6969",d947cca9:"7073",a7bd4aaa:"7098","5502e32c":"7146","4091a161":"7336","6deb773c":"7456","65be5726":"7499","0ba8c2c3":"7775","1059f392":"7946","978597a0":"8097","951026e7":"8114",fe47fcd9:"8223","597dd8b5":"8375","2b1dc6dd":"8543","5555e52f":"8709",a94703ab:"9048","3d6c9eb5":"9070","5e95c892":"9647",e11920bd:"9731","4f7734c6":"9861","2b741ebd":"9922"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var b=r.p+r.u(a),t=new Error;r.l(b,(c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",t.name="ChunkLoadError",t.type=f,t.request=b,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,b=c[0],t=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(c);n{"use strict";var e,a,c,d,f,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={exports:{}};return b[e].call(c.exports,c,c.exports,r),c.exports}r.m=b,e=[],r.O=(a,c,d,f)=>{if(!c){var b=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(f,b),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>"assets/js/"+({42:"7c00667b",169:"6ebc6907",609:"d9ab9a35",643:"ccba1d6d",644:"50376bd6",685:"2fc3947b",849:"0058b4c6",957:"c141421f",1232:"1fe64db5",1235:"a7456010",1434:"7ec24e7b",1512:"00afa580",1588:"57ea0922",1875:"a739edad",2005:"5cc6e2f6",2138:"1a4e3797",2142:"8dfb72aa",2192:"44625589",2214:"e4d6daf3",2388:"6aab3ca4",2485:"f2e2dc26",2518:"7b18d337",2576:"f4b774c8",3046:"a7e0b53d",3164:"fc128ddc",3215:"41a4e207",3307:"a74d882b",3370:"9cc604ee",3376:"3847f788",3416:"14662712",3912:"24da45cd",3915:"6c36c959",4055:"34645dc1",4134:"393be207",4552:"c35c524d",4583:"1df93b7f",4605:"bc265f2d",5343:"c9623b07",5430:"69eebc34",5742:"aba21aa0",5877:"3cdf1dab",5901:"41f39c68",5978:"4f2033fe",6061:"1f391b9e",6492:"c7c98221",6509:"52b9fcd1",6717:"09235513",6782:"3a1f197c",6969:"14eb3368",7064:"42246441",7073:"d947cca9",7098:"a7bd4aaa",7146:"5502e32c",7336:"4091a161",7456:"6deb773c",7499:"65be5726",7775:"0ba8c2c3",7946:"1059f392",8097:"978597a0",8114:"951026e7",8223:"fe47fcd9",8375:"597dd8b5",8401:"17896441",8543:"2b1dc6dd",8709:"5555e52f",9048:"a94703ab",9070:"3d6c9eb5",9647:"5e95c892",9731:"e11920bd",9861:"4f7734c6",9922:"2b741ebd"}[e]||e)+"."+{42:"964f5d59",169:"737bc36c",416:"b4fc881a",609:"4e389ea8",643:"525a05d0",644:"e6cf6771",685:"de863ff0",849:"a41d78c7",957:"ba74c4db",1232:"b5685135",1235:"e494e8e1",1434:"f737e776",1512:"f7f91c97",1588:"bfa20b5d",1875:"30e374c4",2005:"66e0d66f",2138:"9416fdf7",2142:"c1702da9",2192:"9300893f",2214:"61e32cb2",2237:"c2740f3d",2388:"d794b6f2",2485:"fc2e5cb3",2490:"edd93e89",2518:"52a3bb28",2576:"6dbffe05",3046:"e4080f1d",3164:"3f1c88fe",3215:"9f5a2ed3",3307:"00a0be80",3370:"2d9e0a62",3376:"10c593ac",3416:"f765f7d0",3912:"6069f782",3915:"c6a5c43c",4055:"dc515f97",4134:"d7fb7c7e",4552:"6ec6c64b",4583:"80ad2fb1",4605:"a4cfad58",5343:"234c248f",5430:"73347917",5742:"77409faf",5877:"c6c125dd",5901:"80cdb652",5978:"b6f1a37e",6061:"b8a13666",6492:"ae0ce65d",6509:"46c2fd69",6717:"0dbb6c36",6782:"f1e9b79b",6969:"7d928f65",7064:"5ecc9a35",7073:"c5741845",7098:"fa18e033",7146:"ef010b84",7336:"7fbfdb6c",7456:"3275a2e6",7499:"5cd4f877",7775:"3531da4d",7946:"7b2d9830",8097:"e5150935",8114:"e9dae8aa",8223:"4a6631ac",8375:"ef2711b2",8401:"2e155ba7",8543:"4ee77c8a",8709:"66a15ecf",8913:"f5ec71cd",9048:"c72de6cb",9070:"5e0095c7",9412:"b062857e",9462:"f0f17b38",9647:"150cca41",9731:"ac41e7ab",9861:"887c039b",9922:"bccf929a"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="fhenix-docs:",r.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var f=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach((e=>e(c))),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={14662712:"3416",17896441:"8401",42246441:"7064",44625589:"2192","7c00667b":"42","6ebc6907":"169",d9ab9a35:"609",ccba1d6d:"643","50376bd6":"644","2fc3947b":"685","0058b4c6":"849",c141421f:"957","1fe64db5":"1232",a7456010:"1235","7ec24e7b":"1434","00afa580":"1512","57ea0922":"1588",a739edad:"1875","5cc6e2f6":"2005","1a4e3797":"2138","8dfb72aa":"2142",e4d6daf3:"2214","6aab3ca4":"2388",f2e2dc26:"2485","7b18d337":"2518",f4b774c8:"2576",a7e0b53d:"3046",fc128ddc:"3164","41a4e207":"3215",a74d882b:"3307","9cc604ee":"3370","3847f788":"3376","24da45cd":"3912","6c36c959":"3915","34645dc1":"4055","393be207":"4134",c35c524d:"4552","1df93b7f":"4583",bc265f2d:"4605",c9623b07:"5343","69eebc34":"5430",aba21aa0:"5742","3cdf1dab":"5877","41f39c68":"5901","4f2033fe":"5978","1f391b9e":"6061",c7c98221:"6492","52b9fcd1":"6509","09235513":"6717","3a1f197c":"6782","14eb3368":"6969",d947cca9:"7073",a7bd4aaa:"7098","5502e32c":"7146","4091a161":"7336","6deb773c":"7456","65be5726":"7499","0ba8c2c3":"7775","1059f392":"7946","978597a0":"8097","951026e7":"8114",fe47fcd9:"8223","597dd8b5":"8375","2b1dc6dd":"8543","5555e52f":"8709",a94703ab:"9048","3d6c9eb5":"9070","5e95c892":"9647",e11920bd:"9731","4f7734c6":"9861","2b741ebd":"9922"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var b=r.p+r.u(a),t=new Error;r.l(b,(c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",t.name="ChunkLoadError",t.type=f,t.request=b,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,b=c[0],t=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(c);n Details | Fhenix - + diff --git a/docs/category/fhe-contracts.html b/docs/category/fhe-contracts.html index eab288a1..841dcd4c 100644 --- a/docs/category/fhe-contracts.html +++ b/docs/category/fhe-contracts.html @@ -4,7 +4,7 @@ FHE Contracts | Fhenix - + diff --git a/docs/category/fhenix-helium-testnet.html b/docs/category/fhenix-helium-testnet.html index f8758ada..20ce3dbd 100644 --- a/docs/category/fhenix-helium-testnet.html +++ b/docs/category/fhenix-helium-testnet.html @@ -4,7 +4,7 @@ Fhenix Helium Testnet | Fhenix - + diff --git a/docs/category/fhenixjs.html b/docs/category/fhenixjs.html index 5c36247e..af6e3de3 100644 --- a/docs/category/fhenixjs.html +++ b/docs/category/fhenixjs.html @@ -4,7 +4,7 @@ Fhenix.JS | Fhenix - + diff --git a/docs/category/shielded-erc20-token.html b/docs/category/shielded-erc20-token.html index 4282a0c1..39e10bc7 100644 --- a/docs/category/shielded-erc20-token.html +++ b/docs/category/shielded-erc20-token.html @@ -4,7 +4,7 @@ Shielded ERC20 Token | Fhenix - + diff --git a/docs/category/tutorials.html b/docs/category/tutorials.html index 16c0eb56..431a0bc8 100644 --- a/docs/category/tutorials.html +++ b/docs/category/tutorials.html @@ -4,7 +4,7 @@ Tutorials | Fhenix - + diff --git a/docs/devdocs/Encryption and Privacy/Permits-Access-Control.html b/docs/devdocs/Encryption and Privacy/Permits-Access-Control.html index bbdf46c9..86c1dd0b 100644 --- a/docs/devdocs/Encryption and Privacy/Permits-Access-Control.html +++ b/docs/devdocs/Encryption and Privacy/Permits-Access-Control.html @@ -4,7 +4,7 @@ 📜 Permits & Access Control | Fhenix - + @@ -22,12 +22,13 @@

What is a P The permit contains the necessary information, including a public key, which allows data re-sealing in a smart contract environment. The inclusion of this public key into the permit enables a secure process of data re-sealing within a smart contract after the JSON object is signed by the user.

How to Generate a Permit

-

Permits are generated using the getPermit method in fhenix.js. This method requires the following parameters:

+

Permits are generated using the generatePermit method in fhenix.js. This method receives the following parameters:

  • contractAddress (required, string): The address of the contract.
  • -
  • provider (required): An ethers (or compatible) object that can sign EIP-712 formatted data. (Note that if you want to unseal data using your wallet's encryption key you can't use "JsonRpcProvider")
  • +
  • provider (optional): An ethers (or compatible) object that can sign EIP-712 formatted data. (Note that if you want to unseal data using your wallet's encryption key you can't use "JsonRpcProvider")
  • +
  • signer (optional): Another ethers (or compatible) signer if you want to use a different signer than the one in the provider (chain-id requests are still made via the provider)
-
const permit = await getPermit(contractAddress);
+
const permit = await generatePermit(contractAddress);

// passing a custom signer
let permit = await fhenixjs.generatePermit(
contractAddress,
undefined, // use the internal provider
signer, // created from, e.g. `ethers.getSigners()[0]`
);

What is a Permission?

In Fhenix, a permission is that part of a permit that supplies proof that callers are who they say they are. A permission contains the signature and corresponding public key. @@ -38,6 +39,6 @@

Using a Permission

Once generated, the permission can be used and sent to the contract. It can also be used to unseal the output of the sealoutput function, assuming it was sealed using that same permission.

The following code snippet shows how to implement the added cryptographic functionality of Fhenix (specifically, permits and permissions) on Ethereum using the Fhenix library.

-
import { BrowserProvider } from "ethers";
import { FhenixClient, getPermit } from "fhenixjs";

const provider = new BrowserProvider(window.ethereum);
const client = new FhenixClient({ provider });
const permit = await getPermit(contractAddress, provider);
const permission = client.extractPemitPermissions(permit);
client.storePermit(permit); // Stores a permit for a specific contract address.
const response = await contract.connect(owner).getValue(permission); // Calling "getValue" which is a view function in "contract"
const plaintext = await client.unseal(contractAddress, response);
+
import { BrowserProvider } from "ethers";
import { FhenixClient, getPermit } from "fhenixjs";

const provider = new BrowserProvider(window.ethereum);
const client = new FhenixClient({ provider });
const permit = await generatePermit(contractAddress, provider);
const permission = client.extractPemitPermissions(permit);
const response = await contract.connect(owner).getValue(permission); // Calling "getValue" which is a view function in "contract"
const plaintext = await client.unseal(contractAddress, response);
\ No newline at end of file diff --git a/docs/devdocs/Encryption and Privacy/Privacy-Web3.html b/docs/devdocs/Encryption and Privacy/Privacy-Web3.html index 7a66bca1..c07785f8 100644 --- a/docs/devdocs/Encryption and Privacy/Privacy-Web3.html +++ b/docs/devdocs/Encryption and Privacy/Privacy-Web3.html @@ -4,7 +4,7 @@ 🤫 Development Tips – Ensuring Privacy | Fhenix - + diff --git a/docs/devdocs/Examples and References/Examples-fheDapps.html b/docs/devdocs/Examples and References/Examples-fheDapps.html index 6f13661f..a10d3f71 100644 --- a/docs/devdocs/Examples and References/Examples-fheDapps.html +++ b/docs/devdocs/Examples and References/Examples-fheDapps.html @@ -4,7 +4,7 @@ Examples & fheDapps | Fhenix - + diff --git a/docs/devdocs/Examples and References/Templates.html b/docs/devdocs/Examples and References/Templates.html index b9777ed1..2a5ba2e1 100644 --- a/docs/devdocs/Examples and References/Templates.html +++ b/docs/devdocs/Examples and References/Templates.html @@ -4,14 +4,14 @@ Templates | Fhenix - +

Templates

We compiled a list of a few templates that you can use as a reference to build your own dApp.

Hardhat + React

https://github.com/FhenixProtocol/fhenix-hardhat-example

-

Has a basic contract, some tasks and a simple frontend (TODO: copy over from playground).

+

Has a basic contract, some tasks and a simple frontend.

Nuxt 3 + Fhenixjs + Ethers.js + Bootstrap Starter

With this template you can easily start developing your Fhenix front-end app using Nuxt 3 (vue3).

https://github.com/FhenixProtocol/fhenix-nuxt3-template

diff --git a/docs/devdocs/Fhenix Testnet/Connecting-To.html b/docs/devdocs/Fhenix Testnet/Connecting-To.html index 347a811c..ed8519c3 100644 --- a/docs/devdocs/Fhenix Testnet/Connecting-To.html +++ b/docs/devdocs/Fhenix Testnet/Connecting-To.html @@ -4,7 +4,7 @@ 🔗 Connecting to Fhenix Helium Testnet | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/Details/Architecture.html b/docs/devdocs/Fhenix Testnet/Details/Architecture.html index a85f9389..af280c7b 100644 --- a/docs/devdocs/Fhenix Testnet/Details/Architecture.html +++ b/docs/devdocs/Fhenix Testnet/Details/Architecture.html @@ -4,7 +4,7 @@ 📐 Fhenix Architecture | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/Details/Changelog.html b/docs/devdocs/Fhenix Testnet/Details/Changelog.html index f8c8b3a6..624b238f 100644 --- a/docs/devdocs/Fhenix Testnet/Details/Changelog.html +++ b/docs/devdocs/Fhenix Testnet/Details/Changelog.html @@ -4,7 +4,7 @@ 🆕 Changelog | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html b/docs/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html index fe7d91c8..8d883db8 100644 --- a/docs/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html +++ b/docs/devdocs/Fhenix Testnet/Details/Fhenix-Differences.html @@ -4,7 +4,7 @@ 🔀 Fhenix Differences For Developers | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/Details/Limitations.html b/docs/devdocs/Fhenix Testnet/Details/Limitations.html index 49569508..73999e11 100644 --- a/docs/devdocs/Fhenix Testnet/Details/Limitations.html +++ b/docs/devdocs/Fhenix Testnet/Details/Limitations.html @@ -4,7 +4,7 @@ 🛑 Limitations | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/FHE-Overview.html b/docs/devdocs/Fhenix Testnet/FHE-Overview.html index d84b4081..8d66cbd0 100644 --- a/docs/devdocs/Fhenix Testnet/FHE-Overview.html +++ b/docs/devdocs/Fhenix Testnet/FHE-Overview.html @@ -4,7 +4,7 @@ 🧮 FHE Schemes Overview | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/Fhenix-T-FHE.html b/docs/devdocs/Fhenix Testnet/Fhenix-T-FHE.html index d7171803..5907cec7 100644 --- a/docs/devdocs/Fhenix Testnet/Fhenix-T-FHE.html +++ b/docs/devdocs/Fhenix Testnet/Fhenix-T-FHE.html @@ -4,7 +4,7 @@ ✨ Fhenix & FHE | Fhenix - + diff --git a/docs/devdocs/Fhenix Testnet/Integration.html b/docs/devdocs/Fhenix Testnet/Integration.html index 96710dbd..f7f35bcc 100644 --- a/docs/devdocs/Fhenix Testnet/Integration.html +++ b/docs/devdocs/Fhenix Testnet/Integration.html @@ -4,7 +4,7 @@ 🤲 3rd party Integrations | Fhenix - + diff --git a/docs/devdocs/FhenixJS/Catching Errors.html b/docs/devdocs/FhenixJS/Catching Errors.html index 3141b75b..e0613a17 100644 --- a/docs/devdocs/FhenixJS/Catching Errors.html +++ b/docs/devdocs/FhenixJS/Catching Errors.html @@ -4,7 +4,7 @@ Catching Errors | Fhenix - + diff --git a/docs/devdocs/FhenixJS/Decryption.html b/docs/devdocs/FhenixJS/Decryption.html index 204a1a10..33bad364 100644 --- a/docs/devdocs/FhenixJS/Decryption.html +++ b/docs/devdocs/FhenixJS/Decryption.html @@ -4,7 +4,7 @@ (Un)Sealing | Fhenix - + @@ -25,7 +25,7 @@

En Similarly to decryption, this usage can be implemented by any compliant library, but we include direct support in fhenix.js.

This is done in 3 steps: generating a permit, querying the contract and unsealing the data.

1. Creating a Permit

-
import { FhenixClient, getPermit } from 'fhenixjs';

const provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');
const client = new FhenixClient({ provider });


const permit = await getPermit(contractAddress, provider);
client.storePermit(permit);
+
import { FhenixClient, generatePermit } from 'fhenixjs';

const provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');
const client = new FhenixClient({ provider });

const permit = await generatePermit(contractAddress, provider);
Did you know?

When you create a permit it gets stored in localstorage. This makes permits easily reusable and transferable

2. Querying the Contract

We recommend that contracts implement the Permit/Permission interfaces (though this is not strictly required). @@ -37,7 +37,7 @@

3. Unse

We have to provide the contract address so the fhenix client knows which permit to use for the unsealing function.

note

Permits are currently limited to support a single contract

Putting it all Together

-
import { FhenixClient, getPermit } from 'fhenixjs';
import { JsonRpcProvider } from 'ethers';

const provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');
const client = new FhenixClient({provider});

const permit = await getPermit(contractAddress, provider);
client.storePermit(permit);

const permission = client.extractPermitPermission(permit);
const response = await contract.balanceOf(permission);

const plaintext = client.unseal(contractAddress, response);

console.log(`My Balance: ${plaintext}`)
+
import { FhenixClient, generatePermit } from 'fhenixjs';
import { JsonRpcProvider } from 'ethers';

const provider = new ethers.JsonRpcProvider('https://api.helium.fhenix.zone/');
const client = new FhenixClient({provider});

const permit = await generatePermit(contractAddress, provider);
const permission = client.extractPermitPermission(permit);

const response = await contract.balanceOf(permission);
const plaintext = client.unseal(contractAddress, response);

console.log(`My Balance: ${plaintext}`)
Did you know?

You have tools that can ease the process of interacting with the contract and decrypting values. If you want to use them please refer to Tools and Utilities

diff --git a/docs/devdocs/FhenixJS/Encryption.html b/docs/devdocs/FhenixJS/Encryption.html index a1d0fbc7..62a403a6 100644 --- a/docs/devdocs/FhenixJS/Encryption.html +++ b/docs/devdocs/FhenixJS/Encryption.html @@ -4,7 +4,7 @@ Encryption | Fhenix - + @@ -20,7 +20,7 @@
const resultUint8 = await client.encrypt_uint8(number);
const resultUint16 = await client.encrypt_uint16(number);
const resultUint32 = await client.encrypt_uint32(number);
const resultUint64 = await client.encrypt_uint64(number);
const resultUint128 = await client.encrypt_uint128(number);
const resultUint256 = await client.encrypt_uint256(number);
const resultAddress = await client.encrypt_address(address);

The returned types from the encrypt function will be of the type EncryptedUint8, EncryptedUint16 or EncryptedUint32 (or 64/128/256 etc.) depending on the type you specified.

The EncryptedUint types sound scary, but are actually pretty simple. It's just a

-
export interface EncryptedNumber {
data: Uint8Array;
}

export interface EncryptedUint8 extends EncryptedNumber {}
+
export interface EncryptedNumber {
data: Uint8Array;
securityZone: number; // defaults to 0
}

export interface EncryptedUint8 extends EncryptedNumber {}

These types exist in order to enable type checking when interacting with Solidity contracts, and to make it easier to work with encrypted data. However, feel free to use the data field directly if you prefer.

diff --git a/docs/devdocs/FhenixJS/Fhenix-JS.html b/docs/devdocs/FhenixJS/Fhenix-JS.html index e6bf3856..f74875d9 100644 --- a/docs/devdocs/FhenixJS/Fhenix-JS.html +++ b/docs/devdocs/FhenixJS/Fhenix-JS.html @@ -4,7 +4,7 @@ Installation & Basics | Fhenix - + diff --git a/docs/devdocs/FhenixJS/Network Keys.html b/docs/devdocs/FhenixJS/Network Keys.html index 83031ac8..ed8e8c85 100644 --- a/docs/devdocs/FhenixJS/Network Keys.html +++ b/docs/devdocs/FhenixJS/Network Keys.html @@ -4,7 +4,7 @@ Network Keys | Fhenix - + diff --git a/docs/devdocs/FhenixJS/Permits.html b/docs/devdocs/FhenixJS/Permits.html index 307c8e96..297dbcdd 100644 --- a/docs/devdocs/FhenixJS/Permits.html +++ b/docs/devdocs/FhenixJS/Permits.html @@ -4,7 +4,7 @@ Permits | Fhenix - + diff --git a/docs/devdocs/FhenixJS/Sending-a-Transaction.html b/docs/devdocs/FhenixJS/Sending-a-Transaction.html index fee074c6..20707133 100644 --- a/docs/devdocs/FhenixJS/Sending-a-Transaction.html +++ b/docs/devdocs/FhenixJS/Sending-a-Transaction.html @@ -4,7 +4,7 @@ End-to-End Example | Fhenix - + diff --git a/docs/devdocs/Setting Up Your Environment/Foundry.html b/docs/devdocs/Setting Up Your Environment/Foundry.html index 96954962..7a8a9b31 100644 --- a/docs/devdocs/Setting Up Your Environment/Foundry.html +++ b/docs/devdocs/Setting Up Your Environment/Foundry.html @@ -4,7 +4,7 @@ 🛠️ Foundry | Fhenix - + diff --git a/docs/devdocs/Setting Up Your Environment/Gitpod.html b/docs/devdocs/Setting Up Your Environment/Gitpod.html index 8a24e532..28ebe861 100644 --- a/docs/devdocs/Setting Up Your Environment/Gitpod.html +++ b/docs/devdocs/Setting Up Your Environment/Gitpod.html @@ -4,7 +4,7 @@ ☁️ Gitpod | Fhenix - + diff --git a/docs/devdocs/Setting Up Your Environment/Hardhat.html b/docs/devdocs/Setting Up Your Environment/Hardhat.html index 7f2cb97c..1a56b6ac 100644 --- a/docs/devdocs/Setting Up Your Environment/Hardhat.html +++ b/docs/devdocs/Setting Up Your Environment/Hardhat.html @@ -4,7 +4,7 @@ 👷 Hardhat | Fhenix - + diff --git a/docs/devdocs/Setting Up Your Environment/Remix.html b/docs/devdocs/Setting Up Your Environment/Remix.html index 4f8ee9a9..41e586f4 100644 --- a/docs/devdocs/Setting Up Your Environment/Remix.html +++ b/docs/devdocs/Setting Up Your Environment/Remix.html @@ -4,7 +4,7 @@ 🎧 Remix | Fhenix - + diff --git a/docs/devdocs/Setting Up Your Environment/intro.html b/docs/devdocs/Setting Up Your Environment/intro.html index 6b974fe9..26bd74cc 100644 --- a/docs/devdocs/Setting Up Your Environment/intro.html +++ b/docs/devdocs/Setting Up Your Environment/intro.html @@ -4,7 +4,7 @@ Overview | Fhenix - + diff --git a/docs/devdocs/Solidity API/Experimental/FHERC20.html b/docs/devdocs/Solidity API/Experimental/FHERC20.html index 02bc8965..5450af2f 100644 --- a/docs/devdocs/Solidity API/Experimental/FHERC20.html +++ b/docs/devdocs/Solidity API/Experimental/FHERC20.html @@ -4,7 +4,7 @@ FHERC20 | Fhenix - + diff --git a/docs/devdocs/Solidity API/Experimental/IFHERC20.html b/docs/devdocs/Solidity API/Experimental/IFHERC20.html index 23de4070..54b4b909 100644 --- a/docs/devdocs/Solidity API/Experimental/IFHERC20.html +++ b/docs/devdocs/Solidity API/Experimental/IFHERC20.html @@ -4,7 +4,7 @@ IFHERC20 | Fhenix - + diff --git a/docs/devdocs/Solidity API/FHE.html b/docs/devdocs/Solidity API/FHE.html index 2d703fa4..0310af37 100644 --- a/docs/devdocs/Solidity API/FHE.html +++ b/docs/devdocs/Solidity API/FHE.html @@ -4,7 +4,7 @@ FHE.sol | Fhenix - + diff --git a/docs/devdocs/Solidity API/Permissioned.html b/docs/devdocs/Solidity API/Permissioned.html index bd5a8433..3969a1d0 100644 --- a/docs/devdocs/Solidity API/Permissioned.html +++ b/docs/devdocs/Solidity API/Permissioned.html @@ -4,7 +4,7 @@ Permissioned.Sol | Fhenix - + diff --git a/docs/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html b/docs/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html index 14608b1e..938bf302 100644 --- a/docs/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html +++ b/docs/devdocs/Tools and Utilities/Fhenix-Encryption-UI.html @@ -4,7 +4,7 @@ 🔐 Fhenix Encryption UI | Fhenix - + diff --git a/docs/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html b/docs/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html index 64d64bed..ba8de37b 100644 --- a/docs/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html +++ b/docs/devdocs/Tools and Utilities/Fhenix-Hardhat-Plugin.html @@ -4,7 +4,7 @@ 👷 Fhenix Hardhat Plugin | Fhenix - + diff --git a/docs/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html b/docs/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html index 5403f98f..08ec54e5 100644 --- a/docs/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html +++ b/docs/devdocs/Tools and Utilities/Fhenix-Remix-Plugin.html @@ -4,7 +4,7 @@ 🎧 Fhenix Remix Plugin | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/Adding View Functions.html b/docs/devdocs/Tutorials/Basic/Adding View Functions.html index f748785c..c5991f17 100644 --- a/docs/devdocs/Tutorials/Basic/Adding View Functions.html +++ b/docs/devdocs/Tutorials/Basic/Adding View Functions.html @@ -4,7 +4,7 @@ Adding View Functions | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/Deploying.html b/docs/devdocs/Tutorials/Basic/Deploying.html index 1993c5a3..c737a8f8 100644 --- a/docs/devdocs/Tutorials/Basic/Deploying.html +++ b/docs/devdocs/Tutorials/Basic/Deploying.html @@ -4,7 +4,7 @@ Deploying | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/Exploring the Template.html b/docs/devdocs/Tutorials/Basic/Exploring the Template.html index 1ef9ff8e..4723e525 100644 --- a/docs/devdocs/Tutorials/Basic/Exploring the Template.html +++ b/docs/devdocs/Tutorials/Basic/Exploring the Template.html @@ -4,7 +4,7 @@ Exploring the Template | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/Setting Up.html b/docs/devdocs/Tutorials/Basic/Setting Up.html index 5fc6682c..7cbba2b0 100644 --- a/docs/devdocs/Tutorials/Basic/Setting Up.html +++ b/docs/devdocs/Tutorials/Basic/Setting Up.html @@ -4,7 +4,7 @@ Setting Up | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/Testing.html b/docs/devdocs/Tutorials/Basic/Testing.html index 501d8f5a..02febb57 100644 --- a/docs/devdocs/Tutorials/Basic/Testing.html +++ b/docs/devdocs/Tutorials/Basic/Testing.html @@ -4,7 +4,7 @@ Testing on Fhenix | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/Writing-The-Contract.html b/docs/devdocs/Tutorials/Basic/Writing-The-Contract.html index 08cab989..8cab6ace 100644 --- a/docs/devdocs/Tutorials/Basic/Writing-The-Contract.html +++ b/docs/devdocs/Tutorials/Basic/Writing-The-Contract.html @@ -4,7 +4,7 @@ Writing the Contract | Fhenix - + diff --git a/docs/devdocs/Tutorials/Basic/intro.html b/docs/devdocs/Tutorials/Basic/intro.html index fdfe72ef..5ebf0b42 100644 --- a/docs/devdocs/Tutorials/Basic/intro.html +++ b/docs/devdocs/Tutorials/Basic/intro.html @@ -4,7 +4,7 @@ Overview | Fhenix - + diff --git a/docs/devdocs/Tutorials/Your-First-FHE-Contract.html b/docs/devdocs/Tutorials/Your-First-FHE-Contract.html index afbde4e2..0f3c87a7 100644 --- a/docs/devdocs/Tutorials/Your-First-FHE-Contract.html +++ b/docs/devdocs/Tutorials/Your-First-FHE-Contract.html @@ -4,7 +4,7 @@ Your First FHE Contract | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Converting-between-Types.html b/docs/devdocs/Writing Smart Contracts/Converting-between-Types.html index 2f100d78..35841ec2 100644 --- a/docs/devdocs/Writing Smart Contracts/Converting-between-Types.html +++ b/docs/devdocs/Writing Smart Contracts/Converting-between-Types.html @@ -4,7 +4,7 @@ 🧙 Type Conversions | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Debug-Logging.html b/docs/devdocs/Writing Smart Contracts/Debug-Logging.html index b448f1f3..37496961 100644 --- a/docs/devdocs/Writing Smart Contracts/Debug-Logging.html +++ b/docs/devdocs/Writing Smart Contracts/Debug-Logging.html @@ -4,7 +4,7 @@ 🪵 Console.log | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/FHE-sol.html b/docs/devdocs/Writing Smart Contracts/FHE-sol.html index 06ebd6c3..4e42dffa 100644 --- a/docs/devdocs/Writing Smart Contracts/FHE-sol.html +++ b/docs/devdocs/Writing Smart Contracts/FHE-sol.html @@ -4,7 +4,7 @@ 🐤 Getting Started | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html b/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html index 0e37bd18..c9855057 100644 --- a/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html +++ b/docs/devdocs/Writing Smart Contracts/Gas-and-Benchmarks.html @@ -4,7 +4,7 @@ 🔥 Gas and Benchmarks | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Permissions.html b/docs/devdocs/Writing Smart Contracts/Permissions.html index 4e6e7c22..597026c6 100644 --- a/docs/devdocs/Writing Smart Contracts/Permissions.html +++ b/docs/devdocs/Writing Smart Contracts/Permissions.html @@ -4,7 +4,7 @@ 🕵️ Permissions | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Requires.html b/docs/devdocs/Writing Smart Contracts/Requires.html index 5c843c28..107fb5e1 100644 --- a/docs/devdocs/Writing Smart Contracts/Requires.html +++ b/docs/devdocs/Writing Smart Contracts/Requires.html @@ -4,7 +4,7 @@ 🚦Require Statements | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Returning-Data.html b/docs/devdocs/Writing Smart Contracts/Returning-Data.html index 9f82c54b..0c3e7aea 100644 --- a/docs/devdocs/Writing Smart Contracts/Returning-Data.html +++ b/docs/devdocs/Writing Smart Contracts/Returning-Data.html @@ -4,7 +4,7 @@ 👈 Outputs | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Select.html b/docs/devdocs/Writing Smart Contracts/Select.html index 20241307..c5345d20 100644 --- a/docs/devdocs/Writing Smart Contracts/Select.html +++ b/docs/devdocs/Writing Smart Contracts/Select.html @@ -4,7 +4,7 @@ 🌴 Select vs If...else | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/Types-and-Operators.html b/docs/devdocs/Writing Smart Contracts/Types-and-Operators.html index 8a623314..b0c96151 100644 --- a/docs/devdocs/Writing Smart Contracts/Types-and-Operators.html +++ b/docs/devdocs/Writing Smart Contracts/Types-and-Operators.html @@ -4,7 +4,7 @@ 🧑‍⚕️ Types and Operations | Fhenix - + @@ -37,7 +37,7 @@

ComparisonsInstead, comparison operations are implemented as functions that return an ebool type.

tip

The ebool type is not a real boolean type. It is implemented as a euint8

Supported Operations

-
tip

A documented documentation of each and every function in FHE.sol (including inputs and outputs) can be found in FHE.sol

+
tip

A documentation of every function in FHE.sol (including inputs and outputs) can be found in FHE.sol

All operations supported by FHE.sol are listed in the table below. For performance reasons, not all operations are supported for all types.

Please refer to the table below for a comprehensive list of supported operations. This list will evolve as the network matures.

Note that all functions are supported in both direct function calls and library bindings. However, operator overloading is only supported for the operations listed in the table (solidity please support operator overloading for boolean return types!).

diff --git a/docs/devdocs/Writing Smart Contracts/Useful-Tips.html b/docs/devdocs/Writing Smart Contracts/Useful-Tips.html index 4c50c7ca..14c8de36 100644 --- a/docs/devdocs/Writing Smart Contracts/Useful-Tips.html +++ b/docs/devdocs/Writing Smart Contracts/Useful-Tips.html @@ -4,7 +4,7 @@ 💯 Useful Tips | Fhenix - + diff --git a/docs/devdocs/Writing Smart Contracts/User-Inputs.html b/docs/devdocs/Writing Smart Contracts/User-Inputs.html index 522a7b94..ba9d5e64 100644 --- a/docs/devdocs/Writing Smart Contracts/User-Inputs.html +++ b/docs/devdocs/Writing Smart Contracts/User-Inputs.html @@ -4,7 +4,7 @@ 👉 Inputs | Fhenix - + diff --git a/docs/devdocs/intro.html b/docs/devdocs/intro.html index 3ee264ec..35b52c4c 100644 --- a/docs/devdocs/intro.html +++ b/docs/devdocs/intro.html @@ -4,7 +4,7 @@ Overview | Fhenix - + diff --git a/getting-started.html b/getting-started.html index 492d55e5..b7706bbe 100644 --- a/getting-started.html +++ b/getting-started.html @@ -4,7 +4,7 @@ Fhenix | Fhenix - + diff --git a/index.html b/index.html index 6ca98f40..55e5ab14 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Fhenix | Fhenix - + diff --git a/markdown-page.html b/markdown-page.html index 412192a6..6511b8b1 100644 --- a/markdown-page.html +++ b/markdown-page.html @@ -4,7 +4,7 @@ Markdown page example | Fhenix - + diff --git a/search.html b/search.html index 9fa1cacf..12b0637d 100644 --- a/search.html +++ b/search.html @@ -4,7 +4,7 @@ Search the documentation | Fhenix - +