From 7a7a8ce270cc3722a45b60ff13b138b90803d5ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:42:03 +0000 Subject: [PATCH] Deploy to GitHub pages --- .nojekyll | 0 CNAME | 1 + assets/highlight.css | 127 ++ assets/main.js | 59 + assets/navigation.js | 1 + assets/search.js | 1 + assets/style.css | 1394 +++++++++++++++++ classes/_zk_kit_imt.IMT.html | 87 + classes/_zk_kit_imt.LeanIMT.html | 74 + classes/_zk_kit_smt.SMT.html | 95 ++ functions/_zk_kit_groth16.buildBn128.html | 4 + functions/_zk_kit_groth16.prove.html | 6 + functions/_zk_kit_groth16.verify.html | 5 + ...ytower.LazyTowerHashChainProofBuilder.html | 12 + .../_zk_kit_poseidon_proof.generate.html | 14 + functions/_zk_kit_poseidon_proof.verify.html | 4 + functions/_zk_kit_smt.checkHex.html | 4 + .../_zk_kit_smt.getFirstCommonElements.html | 5 + ..._kit_smt.getIndexOfLastNonZeroElement.html | 5 + functions/_zk_kit_smt.hexToBin.html | 4 + functions/_zk_kit_smt.keyToPath.html | 5 + index.html | 287 ++++ .../_zk_kit_groth16.CircuitSignals.html | 1 + interfaces/_zk_kit_groth16.Groth16Proof.html | 6 + interfaces/_zk_kit_smt.EntryResponse.html | 4 + interfaces/_zk_kit_smt.MerkleProof.html | 6 + modules/_zk_kit_circuits.html | 51 + modules/_zk_kit_groth16.html | 88 ++ modules/_zk_kit_imt.html | 72 + modules/_zk_kit_lazytower.html | 67 + modules/_zk_kit_poseidon_proof.html | 99 ++ modules/_zk_kit_smt.html | 106 ++ types/_zk_kit_groth16.NumericString.html | 1 + types/_zk_kit_groth16.PublicSignals.html | 1 + types/_zk_kit_groth16.SignalValueType.html | 1 + types/_zk_kit_groth16.ZKArtifact.html | 1 + types/_zk_kit_imt.IMTHashFunction.html | 3 + types/_zk_kit_imt.IMTMerkleProof.html | 9 + types/_zk_kit_imt.IMTNode.html | 2 + types/_zk_kit_imt.LeanIMTHashFunction.html | 3 + types/_zk_kit_imt.LeanIMTMerkleProof.html | 9 + ...kit_lazytower.LazyTowerHashChainProof.html | 1 + types/_zk_kit_poseidon_proof.PackedProof.html | 1 + .../_zk_kit_poseidon_proof.PoseidonProof.html | 1 + ..._zk_kit_poseidon_proof.SnarkArtifacts.html | 1 + types/_zk_kit_smt.ChildNodes.html | 1 + types/_zk_kit_smt.Entry.html | 1 + types/_zk_kit_smt.EntryMark.html | 1 + types/_zk_kit_smt.HashFunction.html | 1 + types/_zk_kit_smt.Key.html | 1 + types/_zk_kit_smt.Node.html | 1 + types/_zk_kit_smt.Siblings.html | 1 + types/_zk_kit_smt.Value.html | 1 + 53 files changed, 2736 insertions(+) create mode 100644 .nojekyll create mode 100644 CNAME create mode 100644 assets/highlight.css create mode 100644 assets/main.js create mode 100644 assets/navigation.js create mode 100644 assets/search.js create mode 100644 assets/style.css create mode 100644 classes/_zk_kit_imt.IMT.html create mode 100644 classes/_zk_kit_imt.LeanIMT.html create mode 100644 classes/_zk_kit_smt.SMT.html create mode 100644 functions/_zk_kit_groth16.buildBn128.html create mode 100644 functions/_zk_kit_groth16.prove.html create mode 100644 functions/_zk_kit_groth16.verify.html create mode 100644 functions/_zk_kit_lazytower.LazyTowerHashChainProofBuilder.html create mode 100644 functions/_zk_kit_poseidon_proof.generate.html create mode 100644 functions/_zk_kit_poseidon_proof.verify.html create mode 100644 functions/_zk_kit_smt.checkHex.html create mode 100644 functions/_zk_kit_smt.getFirstCommonElements.html create mode 100644 functions/_zk_kit_smt.getIndexOfLastNonZeroElement.html create mode 100644 functions/_zk_kit_smt.hexToBin.html create mode 100644 functions/_zk_kit_smt.keyToPath.html create mode 100644 index.html create mode 100644 interfaces/_zk_kit_groth16.CircuitSignals.html create mode 100644 interfaces/_zk_kit_groth16.Groth16Proof.html create mode 100644 interfaces/_zk_kit_smt.EntryResponse.html create mode 100644 interfaces/_zk_kit_smt.MerkleProof.html create mode 100644 modules/_zk_kit_circuits.html create mode 100644 modules/_zk_kit_groth16.html create mode 100644 modules/_zk_kit_imt.html create mode 100644 modules/_zk_kit_lazytower.html create mode 100644 modules/_zk_kit_poseidon_proof.html create mode 100644 modules/_zk_kit_smt.html create mode 100644 types/_zk_kit_groth16.NumericString.html create mode 100644 types/_zk_kit_groth16.PublicSignals.html create mode 100644 types/_zk_kit_groth16.SignalValueType.html create mode 100644 types/_zk_kit_groth16.ZKArtifact.html create mode 100644 types/_zk_kit_imt.IMTHashFunction.html create mode 100644 types/_zk_kit_imt.IMTMerkleProof.html create mode 100644 types/_zk_kit_imt.IMTNode.html create mode 100644 types/_zk_kit_imt.LeanIMTHashFunction.html create mode 100644 types/_zk_kit_imt.LeanIMTMerkleProof.html create mode 100644 types/_zk_kit_lazytower.LazyTowerHashChainProof.html create mode 100644 types/_zk_kit_poseidon_proof.PackedProof.html create mode 100644 types/_zk_kit_poseidon_proof.PoseidonProof.html create mode 100644 types/_zk_kit_poseidon_proof.SnarkArtifacts.html create mode 100644 types/_zk_kit_smt.ChildNodes.html create mode 100644 types/_zk_kit_smt.Entry.html create mode 100644 types/_zk_kit_smt.EntryMark.html create mode 100644 types/_zk_kit_smt.HashFunction.html create mode 100644 types/_zk_kit_smt.Key.html create mode 100644 types/_zk_kit_smt.Node.html create mode 100644 types/_zk_kit_smt.Siblings.html create mode 100644 types/_zk_kit_smt.Value.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..92ad0ab8e --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +zkkit.pse.dev \ No newline at end of file diff --git a/assets/highlight.css b/assets/highlight.css new file mode 100644 index 000000000..e5be58cff --- /dev/null +++ b/assets/highlight.css @@ -0,0 +1,127 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #0000FF; + --dark-hl-3: #569CD6; + --light-hl-4: #008000; + --dark-hl-4: #6A9955; + --light-hl-5: #AF00DB; + --dark-hl-5: #C586C0; + --light-hl-6: #001080; + --dark-hl-6: #9CDCFE; + --light-hl-7: #0070C1; + --dark-hl-7: #4FC1FF; + --light-hl-8: #098658; + --dark-hl-8: #B5CEA8; + --light-hl-9: #800000; + --dark-hl-9: #808080; + --light-hl-10: #800000; + --dark-hl-10: #569CD6; + --light-hl-11: #000000FF; + --dark-hl-11: #D4D4D4; + --light-hl-12: #E50000; + --dark-hl-12: #9CDCFE; + --light-hl-13: #0000FF; + --dark-hl-13: #CE9178; + --light-hl-14: #267F99; + --dark-hl-14: #4EC9B0; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +.hl-13 { color: var(--hl-13); } +.hl-14 { color: var(--hl-14); } +pre, code { background: var(--code-background); } diff --git a/assets/main.js b/assets/main.js new file mode 100644 index 000000000..d0aa8d5f9 --- /dev/null +++ b/assets/main.js @@ -0,0 +1,59 @@ +"use strict"; +"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var Z=class extends C{constructor(n){super(n);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/assets/navigation.js b/assets/navigation.js new file mode 100644 index 000000000..8d312f1f0 --- /dev/null +++ b/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6WWUW/aMBCA/0ue6bpWK9t42kDtWhUYGmgPrSrkJgexktiR43TA1P8+GxLiGMc22rO/+86+2Hd5/htw2PBgEHzbJRcJ5pchZmGJeRH0ghzxWKxkNCpTKC6Xu2QpiGVNfIh5lgoswSQKBtfvvRPXmlEeX/W7VRWgmXpBGOM0YkCCwfNROjqkneM1QamyPUw4sBUKDdp2iJblpq/s+MchYsYoXXmp1QCbeFpmwHA45wyTdWPm29wgbcGa9ePXz1c3apFn5WsqWL0cZnMLdpkP2G+UlrAQNpdbw132p8fvjGNRVe4SN6TL+VqK+zIkV9dfGueqJCHHlJx6G7rt7X9SlDmjb+Bj24MW0Zv4pKutj+lAnqheDC8LZ7z7VYlFrxf1MFk0kjBFRaFJBNAWiZIpmxkDIk5HBdk8YvkeFfFdVZiua1HtSEVd90LgE2BJCtrDNooV0sM7pVHny6iEEnGZqvL4nt+Ae2bwrMMpbfabLmWKdltO/wDrvppHxOuCjgW9kLQ87yhGmFj338g7Ap2lMocNZb9QT3X6hJ2pK4fX485pATii5CJvn1YvZs0tc8PhzBWdoTCByFpFzapEOCdSFXmWXo1xDiaCWFLPhM6Zp2VoB7lSrIEAQ9za+bUEdch/zQDNecYoKGyjoPAcBXNbG5eSub2F3xLOtr+gyMWZlNoZfqCkrEXb/p6MTatD2t2yWsqRPL3szJ33R8oaynVh9mexqfaAl2UiLqrTJCGXzWeaSOE5Y+QRrKcUyy6DbWJKhc+4nGPxH0vW1m9XMy7X/o/VJtoDLksYQ5jcw8b2uKWs5ixdYg38DrOCj2iWUXKbQgZEbXNmsTnKnuaBRLD5uRqjgk8peQJGqziPZJ2xlpQxbBZ0iIlLX3MWVQJivM6kxOE6goYu+vIPQqUbQfgOAAA=" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js new file mode 100644 index 000000000..8f840b0da --- /dev/null +++ b/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA+VdbY/bNhL+L85XxzX1rny6a9pei6Zp0AT90CBYeG3trrBe2ZC1m+4G+e9HUpI1Q81I1Eu2wB1QYOtohvNwnuGQHFHSl0V++HxavPr4ZXGbZrvFK2e5yDZ3yeLV4l9Pty9v0+K7bZpv79PitFgu7vO9vHB32N3vk9N3F0+3F1LgohZY3RR3eym13W9Op0Q2ulh8XfLtXueH4kYEbLPV9e5W/eDc7usSxvv0OtvsG7RpViT51WZLtIw1CEPLxXGTJ1lBoKYx/Ke8+i4/HK5sEED5sfbF2vHOALb3+UMyyvKLWtXKPtLnwBzTi804LJXmrFAuR0O5nBvKdjSU7bxQpMxhe9iPhNNoT4LkrONQ+E2CeHt/l+Tp9n2Rp9n1GVrxeCRQIdnRI9gA8O7+ci/bNBIJDQDJzgWgbO7Pzf4++SCt9kAwpOcC8dev/86LVAZD0WO/ERxrOmhC8vI+3e++z4QTna1e3WfbIj1kbcuN8AyWZTiD1Mkb1XIz2HuQgXv1aGGwFBxNa2viTe8aRs1JV17rnHClq8/t/fLbh3M7lTBqR163A60ANSZ80UDeSn8U+f22OORWpl5ghV6zSpFLjhebPC0e7cyeZRuLxWn3Mj29PObpw6ZIxtjfJcfixtJ+LTun/ZvNydZ8JTqn9eywS06W5mvZOe0/JfnBGsBZeBoCJ3CE12AYEIDt+BtlcUDItSNulMV9snmwdfNZdqJNuf4o7CxWkhPtDQklIpIsba69JjVv80QGHd6GdOdNpDDJ9i7ZJ0ViG0SV7CSL8l+Sv3+37GkjPNHmKckto+gsO8ni/XG3sfXrWXaSxXLhMSCKsMLg2ResLd4km6xvfVHJPNcaA5obvM6o+zN6rkXWx863fSj651wMY+y828YxeB5CQOznol7LFvMRMj1gTuq13TsvIcvWc1Ov3VP61J1XkN1KepRdmF2ukyzJrWYpZN5Um4xDjiV766XwZJs2MxayO2TW6rXdO3MZpq1nLyvLv22y7kUtYb3SmYzAYg5F1gfMoz2WbedSZH7ofEphwEUdefVnOXf8VBUbmMpONTdDyTGzbOD7blMbv7go+FoWZ/HFWctqNYH61umF35L8dm/kHhISEHweH5gGB7oAdoyZ5+WcNbDTFYZVpTkUyKrqQgeeX1SCGw+qVp8Z2XFT3Mim023C1YF7sOEGZkaH1guDYA3Z19rjOaWX+zS7HukqoD0dFzHi38rFajcyJTFmjJvGqjRsmWgJ6WdINJzVIdmG6mevV+wSb1v4+XwyJQETnWQGS9qT8LrBrFLrhEc01J+OxwOzniIG4+pJdz24hm6XZk17PdgGpT4bfO2bPvvN02Nx+Jw0NQ7z1s9ZovvEhTmqpdYHpaWywOubTZp1De3GBqNnN8qbzowa63YobId9b2vsWY2bdL+TjXGBMwjmCrY2EXBPvO/S6+RU/H71g/47D/p2m9+2D2mR3M0CvGro26LdJw/J/k2SXRc387jbaPDboleZ940yOAt02Noz4H6YD/TDN0dcHI4/HD5ncw7MVpOz9wAciWB0vlfHPMDM1T4q0Wu2auIbTS8TAb3okZlrIqrb63EzE1yb3e55O7wqLT5Lp4mw/McJV/2v/veleGZHaN8zgaBPXT2zK2qb/7/BoD1Qh4P73OFQ+r9rKwvuZjyPQ2xvifwvB0Xlgzos/OcOi5qDrp3n8XBK0t0he3lEG0Nz+1mLXRyZfWDHed3N9jbZde07jcaBgt2KwOhDB5RKcAgYqDIRzoBNcC8K2/0vBoMb6t5CTkS2OrcyHmDPgjq73+/TqxSsPUdChQ19M7THKUF3vmNhdbdxAsrT9jA5KFd1I3OibJ3Czzb5bX20ndtNGYixzj82mgkYI4ez4QSG08+b091P6T55twHHdkYiXBmNTYDbE4lPt8njbKiNxmZFDbbI9fGXjoWGgbnWmBqMA55cMBAMeYCBn2lbC4tTx3MMpwHPMbzvOGeo2nlve8bwNOmMITQ16Hxhpchu19Lrt/d3l0nOH3NCppH8kJN9PTikcP74mwx0OxhQfEYUnQctEYARZyx7bHcfr0TGx5ys7LGed50uRMatbpX1WFPn2NEd906LQHpaj9GZK1ix6jRvU2jqt/U2+fzWnmGsMGOvt5v99n4vdf+wJtxUmRPNTbK9fbfJ5a8iydHTjN2QKL05cVk8IYEBDXhCosd2zxMSyKzlExJWFn/f7wYEaEtnRu9fJ5aRWQpO6nt6egMPNHSaO8vO2Nc8KfI0eUh+VBOaZQI2VGZE03MCFsGwPP3aY9Hm5CsyO+TUK2EbvI5B+++P5HSUq6nOtyKoZpDwmAVfe7Uz3OSLpEU5123cOQbG3abY3qTZ9Y8j4Zj6M8FqHZmxR2R9VqYLDAwS6kAaA2fwcbSpAdI6MNQOjyojpNmNHDZFsuNcYXEkbVCwtKDxoTInxETvTG7S43B8ULU/dCzAoBW1LQzrxbUFANth1AJBDqJpNJnVs9fqPBJebuDSimqqERoznkyTOG7b1vT12QyhrSxjTMnMYdDiKLGyOfwM8WnseVnSnG2N0VTu6PmvSRej8uoc7u04Gq6s2J8L7zbzvvugqF7LVCJzmNNvhOmwpa+PChMPb+9+BgeZ28VAZaoWm2hN7gZ+SvNT8fpwd3fIftwnd1Lx1GObVpqO5Jfy3uebzal4e8j+SvJD1XY/HlZ1Iqqb5O8Ph+/TrAdBLTbR2m3y+OGAaue0ubPcAHufltUB+Vdf1AbipJLEq4Wzclex1LlKk/1O6n8socgWJbeqlU/VtT8TVTlVEqXId+vF8uN66TirIBZLsXTdlRu5nz4tP9aqWkL/g5YXUN6h5AWSd+Qvd+kFqyBAUg6ScuUvj5BykZQnf/mElIekfPkrIKR8JBXIXyEhFSCpUP6KCKkQSUXyV0xIRUhK8vNRrAmxGDtY+VsIQk4YTChHC4cSxBQI5WtBkSAwC0K5W1A8CEyEUB4XFBUCcyGU04VkQ6w838OSmA/1vkMQiCEZWZgcoVgQFD0C8yMUESJeutFq7fhYEnMkFBcORZLALDmKC4diycEsOYoLx6E84BgjRZHhuKQk5slRbDgUTw7myVFsOBRPDubJUWQ4JE8O5slRHDghKYnpcRQJTrR0xSoUhnXMj3ql2UeHGkEOpsdRJLhr0jjmx1UsuIKSdDFBrmLBdajgcDFBrs5lJEGukc4UDa5HtokZchUPrk9KYopcxYNLJTYXM+QGbLS7mCE3ZGPTxQy5ERubLqbIjdlIcjFF3pqNJA9T5Ak2kjxMkacpovK6hxnyNENU7vCMOUcTRMWmh/nxfDaOPEyQF7Bx5GGCPMWCR6UjD/PjRWzAeZgfL2YDzsP8+IoEj0pxPqbHVxx4ztLxV2tfYElMj69I8KiZyMf0+C7fJObHVyx4HuVM31gXKBY8Khn6mB9fkeCRSwhMj89nOB/z4ysSPD2peSLCkpgfX5HgUYHpY3oCTQ8VmAGmJ+DpCTA9gSLBp8ItwPQEPD0BpifQazYqiALMTuCzPAbGyi1gvR5gfoKQ9XqA+QkiuPrwyXVtgIkKFB0+FcsBJipcs84KMVOhosOn5vUQExVqoqhQDjFRoWLDp0I5xDyFmicqcYaYp1CR4ZNrYkxTqLjwqfgMjTW2oiKgoi7EJIWKgICKpRBTE8a8xzE3kSIgIGfACHMT8aMowuREioKACowIkxPxoyjC7EQeO7dEmJ7I59vE/ETlgluEEqW3lP9JlTiKloG/dNzVOsLjJcKcRZozKq4iY2ukOaPiKsKcRTxnEeYs1pxRERhjymLFS0BFYIwZizVjPhUFMaYsVryE5CYOMxYrWkIqVmNMWMwTFmPCYr1lpfZ7MSYnVhSEVADGmJxYURBS+SY2tq5670ou6mJz94oKCqFP7uPWxk52rfgIqXAqL0FRvZml93JrYzu71mxRwVdegqKar4jcqK6NPe1a8RJScVVegqKKmYjcT66NzeyaX0yU16CsoieiawTGhnYdsxmuvAZkdYEhoisKZu1B0RKRNQWz+qCLDBFZVTDrD7rMQO/vhFmC0JUGeocnzCqErjVEZL3CLEPoGkNEhqJZftBVhogML7MAocsMEVmqMCsQutBAL+WFUYQQutZAL+aFUYcQutoQkVHrmPUiRUu8pps1KNMVh5imwahGCF10oNdjwihICF12iMlYNCoSQtcdOLgGZ7rywME1SNPFh5iumxmk6eoDM3iNyoTQ9QfGC0ZtQugKRExX5AzS3A7SXLPO5/LZzihQCF2GiMmxY1QohMvPZcIoUghdiojJcWZUKYSuRcTkODPKFMLl91nCKFQIXY6IyTFpVCqErkfE5NgxShVCFyTkBEfKGpTpmoSc4UhZgzJdlpAzHClrVmd1eXZNRm5VtdC3ER6SvEh25RvC1A2B+ibll8VFdY/BO980+7KQe/lXX74uF3IDrv8G1e+g+i03M+XfuPwbVdej6rpcf5Z/q+tx9VuFhvyfr83NCvVLga5fHt/gcdYNHhFzatVbT4GaaNScNadWnmsGWqDzTtUZGXCMdnUwGai7QN2p1CNOvX69NdD3gL7L6OkDuo1OACBHFR9qmmeVs+RzC3gEGlETP6Pc4sYHeD1G6zK9zuoz9I2qXKM1FtdcX6tHnUFvgYcjp0vrsvxuRqMqgHMFZ/B8+rc8mgI85EIPCU5d3du9UbeAG02ZRBpNj/Ot1jzWZ3zNQRlB7ILrt37tTYvbGPWbR35+ZU6j6gPVkNWsPnlVfyKmUYejgVOGz3YArqDPomogBXVws43pY8nVQ3sABsggTpWJBB8B5aefgBMabS7E64PJwCZIP249KkW3/oEgL/Ih8VzWbGe/AHS5SroulxPqR0fBKIsa9ZiL2FLtcLWrX4cCXAZQhxxbSXlCCQQqzPR1+lTLuWrO6GzoTp9AAvklgvnFq9vgWNdt5OfTsYAAGIkONwaaJ9EAAjB4Ym4SqBXbQQvwexxqfSIcYA1gsAS80pU6A6L+/ZAl54MjYPStIRMe3+lCKxyu9ptTkR0yPaHV5z5gcwI2x9FYfa6n5QngRs4P+k3UwHeAM48bc+bUH0Ki19xIU1pX58NnIHbhOHVZm8nfxeEyzbB34NzLUq0/VAS0YHhzCxSpw+H1ACU+N8Kl/p0+39jmBKR2nyNUqmf6MBnQA7B9Lh+VsjCdALAB59sqFFEcAM+61WrOq5ekfDvlK75BM6CzbpWWPG50lep3+h3doN9gQHksXafyfZFgQMNFEk+zfu0acBdIAyEXT7cJzr0wdbhc56RScThu8Fyjdh0ggDm/quNMzeczgXqjzMWhUj1/IRNMcsBsh6Y5cqBP2Y7it0QC3wKjAZfU4bO7aFoFqSzqMn3CkEOYXNacl8541ZjfqreUtIatD5gKuOHHtHNZv3gM9AdwF3LOMGPaA07wq3k54NKtUm6lAw+4w+/QzAzmXRDj7Aa00mPzJpglApaJsg0md/ogFwRc7qw/pQGiHcRtvSZidxP6nYb7+p2GwDZoJORGav3wQnuBBudxx60XaFxegg8ZgEZgtnC4qGF8F8Mx73AcmrNODIc8u51vr73hKmjNjVfwNhMwMkCYxFxyysrvdZ6qb3vCjAq0GeWjfm1Py0EBiPGI66nK4Gn9InYQ20DX57pbfo0WGAQ6vMolSmcg/nmVLaIChC2nUiXctkuAvYiLt7aWb+bq5SLmRmvz9VcQdECfV8NbTQETPTc8j/orq8R2W8DhyWWG+nHK1uCO4IpScJDNsogDtMpEILNSXTWsfgfnjXtYpwwuqlXz+/KFpiBpQfa5INOaD0gNMBBygVa9OwcEJxx73OKpeWQIjB4QZn5VsgjOHT5vQOtaAFsWLIl9UM8jmFUggap0rP4TrkQAXOzey1xwwNXgmrWk3tSyad4JBPRBJMZcHMuV5O7wOSPKBwHgIOTGe/1ALugp3ClWs5NXMSHY0vFD+WQIGLhwILBFk/q9L4Ad6LRqlxF3q7d3/SABuFXMeHXJii1jq5cEXaVyujRW5iGIl5gbAUQVGgwcdoJWauY8G6EExGqiOg2guh4a1Z8qawQVg9E5i3BueDoHI6IFrTdY1eSR9CBQjslI/LSUk9UxkelACn389PXrfwH2HpkmRoAAAA=="; \ No newline at end of file diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 000000000..07a385b73 --- /dev/null +++ b/assets/style.css @@ -0,0 +1,1394 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.5rem); +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: inline-flex; + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 1.75rem - 0.5rem); +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/classes/_zk_kit_imt.IMT.html b/classes/_zk_kit_imt.IMT.html new file mode 100644 index 000000000..4bdb03b83 --- /dev/null +++ b/classes/_zk_kit_imt.IMT.html @@ -0,0 +1,87 @@ +IMT | ZK-kit

An IMT (aka Incremental Merkle Tree) is a type of data structure used in cryptography and +computer science for efficiently verifying the integrity of a large set of data, +especially in situations where new data is added over time. It is based on the concept +of a Merkle tree, and its key feature is its ability to efficiently update the tree +when new data is added or existing data is modified. +In this implementation, the tree is constructed using a fixed IMT#depth +value, and a list of IMT#zeroes (one for each level) is used to compute the +hash of a node when not all of its children are defined. The number of children for each +node can also be specified with the IMT#arity parameter.

+

Constructors

  • It initializes the tree with an hash function, the depth, the zero value to use for zeroes +and the arity (i.e. the number of children for each node). It also takes an optional parameter +to initialize the tree with a list of leaves.

    +

    Parameters

    • hash: IMTHashFunction

      The hash function used to create nodes.

      +
    • depth: number

      The tree depth.

      +
    • zeroValue: any

      The zero value used to create zeroes.

      +
    • arity: number = 2

      The number of children for each node.

      +
    • leaves: any[] = []

      The list of initial leaves.

      +

    Returns IMT

Properties

_arity: number

The number of children per node.

+
_depth: number

The depth of the tree, which is the number of edges from the node to the +tree's root node.

+

The hash function used to compute the tree nodes.

+
_nodes: any[][]

The matrix where all the tree nodes are stored. The first index indicates +the level of the tree, while the second index represents the node's +position within that specific level.

+
_zeroes: any[]

A list of zero values calculated during the initialization of the tree. +The list contains one value for each level of the tree, and the value for +a given level is equal to the hash of the previous level's value. +The first value is the zero hash provided by the user. +These values are used to calculate the hash of a node in case some of its +children are missing.

+

Accessors

  • get arity(): number
  • The number of children per node.

    +

    Returns number

    The number of children per node.

    +
  • get depth(): number
  • The depth of the tree, which equals the number of levels - 1.

    +

    Returns number

    The depth of the tree.

    +
  • get leaves(): any[]
  • The leaves of the tree. They can be retrieved from the first +level of the tree using IMT#_nodes. The returned +value is a copy of the array and not the original object.

    +

    Returns any[]

    The list of tree leaves.

    +
  • get root(): any
  • The root of the tree. This value doesn't need to be stored as +it is always the first and unique element of the last level of the tree. +Its value can be retrieved in IMT#_nodes.

    +

    Returns any

    The root hash of the tree.

    +
  • get zeroes(): any[]
  • The list of zero values calculated during the initialization of the tree.

    +

    Returns any[]

    The list of pre-computed zeroes.

    +

Methods

  • It creates a IMTMerkleProof for a leaf of the tree. +That proof can be verified by this tree using the same hash function.

    +

    Parameters

    • index: number

      The index of the leaf for which a Merkle proof will be generated.

      +

    Returns IMTMerkleProof

    The Merkle proof of the leaf.

    +
  • It deletes a leaf from the tree. It does not remove the leaf from +the data structure, but rather it sets the leaf to be deleted to the zero value.

    +

    Parameters

    • index: number

      The index of the leaf to be deleted.

      +

    Returns void

  • It returns the index of a leaf. If the leaf does not exist it returns -1.

    +

    Parameters

    • leaf: any

      A leaf of the tree.

      +

    Returns number

    The index of the leaf.

    +
  • The leaves are inserted incrementally. If 'i' is the index of the last +leaf, the new one will be inserted at position 'i + 1'. Every time a +new leaf is inserted, the nodes that separate the new leaf from the root +of the tree are created or updated if they already exist, from bottom to top. +When a node has only one child (the left one), its value is the hash of that +node and the zero value of that level. Otherwise, the hash of the children +is calculated.

    +

    Parameters

    • leaf: any

      The new leaf to be inserted in the tree.

      +

    Returns void

  • It updates a leaf in the tree. It's very similar to the IMT#insert function.

    +

    Parameters

    • index: number

      The index of the leaf to be updated.

      +
    • newLeaf: any

      The new leaf to be inserted.

      +

    Returns void

  • It verifies a IMTMerkleProof to confirm that a leaf indeed +belongs to the tree.

    +

    Parameters

    Returns boolean

    True if the leaf is part of the tree, and false otherwise.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_zk_kit_imt.LeanIMT.html b/classes/_zk_kit_imt.LeanIMT.html new file mode 100644 index 000000000..66f91db1a --- /dev/null +++ b/classes/_zk_kit_imt.LeanIMT.html @@ -0,0 +1,74 @@ +LeanIMT | ZK-kit

Class LeanIMT<N>

The LeanIMT is an optimized binary version of the IMT. +This implementation exclusively supports binary trees, eliminates the use of +zeroes, and the tree's LeanIMT#depth is dynamic. When a node doesn't have the right child, +instead of using a zero hash as in the IMT, the node's value becomes that +of its left child. Furthermore, rather than utilizing a static tree depth, +it is updated based on the number of LeanIMT#leaves in the tree. This approach +results in the calculation of significantly fewer hashes, making the tree more efficient.

+

Type Parameters

  • N = bigint

Constructors

Properties

Accessors

Methods

Constructors

  • It initializes the tree with a given hash function and an optional list of leaves.

    +

    Type Parameters

    • N = bigint

    Parameters

    • hash: LeanIMTHashFunction<N>

      The hash function used to create nodes.

      +
    • leaves: N[] = []

      The list of leaves.

      +

    Returns LeanIMT<N>

Properties

The hash function used to compute the tree nodes.

+
_nodes: N[][]

The matrix where all the tree nodes are stored. The first index indicates +the level of the tree, while the second index represents the node's +position within that specific level. The last level will always contain +a list with a single element, which is the root. +Most of the attributes of this class are getters which can retrieve +their values from this matrix.

+

Accessors

  • get depth(): number
  • The depth of the tree, which equals the number of levels - 1.

    +

    Returns number

    The depth of the tree.

    +
  • get leaves(): N[]
  • The leaves of the tree. They can be retrieved from the first +level of the tree using LeanIMT#_nodes. The returned +value is a copy of the array and not the original object.

    +

    Returns N[]

    The list of tree leaves.

    +
  • get root(): N
  • The root of the tree. This value doesn't need to be stored as +it is always the first and unique element of the last level of the tree. +Its value can be retrieved in LeanIMT#_nodes.

    +

    Returns N

    The root hash of the tree.

    +
  • get size(): number
  • The size of the tree, which the number of its leaves. +It's the length of the first level's list.

    +

    Returns number

    The number of leaves of the tree.

    +

Methods

  • It returns true if the leaf exists, and false otherwise

    +

    Parameters

    • leaf: N

      A leaf of the tree.

      +

    Returns boolean

    True if the tree has the leaf, and false otherwise.

    +
  • It returns the index of a leaf. If the leaf does not exist it returns -1.

    +

    Parameters

    • leaf: N

      A leaf of the tree.

      +

    Returns number

    The index of the leaf.

    +
  • The leaves are inserted incrementally. If 'i' is the index of the last +leaf, the new one will be inserted at position 'i + 1'. Every time a +new leaf is inserted, the nodes that separate the new leaf from the root +of the tree are created or updated if they already exist, from bottom to top. +When a node has only one child (the left one), its value takes on the value +of the child. Otherwise, the hash of the children is calculated.

    +

    Parameters

    • leaf: N

      The new leaf to be inserted in the tree.

      +

    Returns void

  • This function is useful when you want to insert N leaves all at once. +It is more efficient than using the LeanIMT#insert method N times because it +significantly reduces the number of cases where a node has only one +child, which is a common occurrence in gradual insertion.

    +

    Parameters

    • leaves: N[]

      The list of leaves to be inserted.

      +

    Returns void

  • It updates a leaf in the tree. It's very similar to the LeanIMT#insert function.

    +

    Parameters

    • index: number

      The index of the leaf to be updated.

      +
    • newLeaf: N

      The new leaf to be inserted.

      +

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_zk_kit_smt.SMT.html b/classes/_zk_kit_smt.SMT.html new file mode 100644 index 000000000..42a426c4b --- /dev/null +++ b/classes/_zk_kit_smt.SMT.html @@ -0,0 +1,95 @@ +SMT | ZK-kit

SparseMerkleTree class provides all the functions to create a sparse Merkle tree +and to take advantage of its features: SMT.add, SMT.get, +SMT.update, SMT.delete, SMT.createProof, +SMT.verifyProof. +To better understand the code below it may be useful to describe the terminology used:

+
    +
  • nodes: every node in the tree is the hash of the two child nodes (H(x, y));
  • +
  • root node: the root node is the top hash and since it represents the whole data +structure it can be used to certify its integrity;
  • +
  • leaf nodes: every leaf node is the hash of a key/value pair and an additional +value to mark the node as leaf node (H(x, y, 1));
  • +
  • entry: a tree entry is a key/value pair used to create the leaf nodes;
  • +
  • zero nodes: a zero node is an hash of zeros and in this implementation H(0,0) = 0;
  • +
  • siblings: the children of a parent node are siblings;
  • +
  • path: every entry key is a number < 2^256 that can be converted in a binary number, +and this binary number is the path used to place the entry in the tree (1 or 0 define the +child node to choose);
  • +
  • matching node: when an entry is not found and the path leads to another existing entry, +this entry is a matching entry and it has some of the first bits in common with the entry not found;
  • +
  • depth: the depth of a node is the length of the path to its root.
  • +
+

Constructors

  • Initializes the SparseMerkleTree attributes.

    +

    Parameters

    • hash: HashFunction

      Hash function used to hash the child nodes.

      +
    • bigNumbers: boolean = false

      BigInt type enabling.

      +

    Returns SMT

Properties

bigNumbers: boolean
entryMark: Node
nodes: Map<Node, ChildNodes>
root: Node
zeroNode: Node

Methods

  • Adds a new entry in the tree. It retrieves a matching entry +or a zero node with a top-down approach and then it updates all the +hashes of the nodes in the path of the new entry with a bottom-up approach.

    +

    Parameters

    • key: Node

      The key of the new entry.

      +
    • value: Node

      The value of the new entry.

      +

    Returns void

  • Adds new nodes in the tree with a bottom-up approach until it reaches the root node.

    +

    Parameters

    • node: Node

      The node to start from.

      +
    • path: number[]

      The path of the key.

      +
    • siblings: Siblings

      The siblings of the path.

      +
    • i: number = ...

      The index to start from.

      +

    Returns Node

    The root node.

    +
  • Calculates nodes with a bottom-up approach until it reaches the root node.

    +

    Parameters

    • node: Node

      The node to start from.

      +
    • path: number[]

      The path of the key.

      +
    • siblings: Siblings

      The siblings of the path.

      +

    Returns Node

    The root node.

    +
  • Checks the parameter type.

    +

    Parameters

    • parameter: Node

      The parameter to check.

      +

    Returns void

  • Creates a proof to prove the membership or the non-membership +of a tree entry.

    +

    Parameters

    • key: Node

      A key of an existing or a non-existing entry.

      +

    Returns MerkleProof

    The membership or the non-membership proof.

    +
  • Deletes an entry in the tree. Also in this case all the hashes of +the nodes in the path of the entry are updated with a bottom-up approach.

    +

    Parameters

    • key: Node

      The key of the entry.

      +

    Returns void

  • Deletes nodes in the tree with a bottom-up approach until it reaches the root node.

    +

    Parameters

    • node: Node

      The node to start from.

      +
    • path: number[]

      The path of the key.

      +
    • siblings: Siblings

      The siblings of the path.

      +

    Returns void

  • Gets a key and if the key exists in the tree the function returns the +value, otherwise it returns 'undefined'.

    +

    Parameters

    • key: Node

      A key of a tree entry.

      +

    Returns undefined | Node

    A value of a tree entry or 'undefined'.

    +
  • Checks if a node is a leaf node.

    +

    Parameters

    • node: Node

      A node of the tree.

      +

    Returns boolean

    True if the node is a leaf, false otherwise.

    +
  • Searches for an entry in the tree. If the key passed as parameter exists in +the tree, the function returns the entry, otherwise it returns the entry +with only the key, and when there is another existing entry +in the same path it returns also this entry as 'matching entry'. +In any case the function returns the siblings of the path.

    +

    Parameters

    • key: Node

      The key of the entry to search for.

      +

    Returns EntryResponse

    The entry response.

    +
  • Updates a value of an entry in the tree. Also in this case +all the hashes of the nodes in the path of the entry are updated +with a bottom-up approach.

    +

    Parameters

    • key: Node

      The key of the entry.

      +
    • value: Node

      The value of the entry.

      +

    Returns void

  • Verifies a membership or a non-membership proof.

    +

    Parameters

    Returns boolean

    True if the proof is valid, false otherwise.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_groth16.buildBn128.html b/functions/_zk_kit_groth16.buildBn128.html new file mode 100644 index 000000000..88e6d839d --- /dev/null +++ b/functions/_zk_kit_groth16.buildBn128.html @@ -0,0 +1,4 @@ +buildBn128 | ZK-kit
  • Builds and returns a BN 128 curve. If the curve has been cached, +it returns the cached curve.

    +

    Returns Promise<any>

    BN 128 ffjavascript curve.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_groth16.prove.html b/functions/_zk_kit_groth16.prove.html new file mode 100644 index 000000000..4d4efc197 --- /dev/null +++ b/functions/_zk_kit_groth16.prove.html @@ -0,0 +1,6 @@ +prove | ZK-kit
  • Creates a Groth16 proof composed of public signals and zero-knowledge parameters.

    +

    Parameters

    Returns Promise<{
        proof: Groth16Proof;
        publicSignals: PublicSignals;
    }>

    A proof containing public signals and zero-knowledge parameters.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_groth16.verify.html b/functions/_zk_kit_groth16.verify.html new file mode 100644 index 000000000..d1d890221 --- /dev/null +++ b/functions/_zk_kit_groth16.verify.html @@ -0,0 +1,5 @@ +verify | ZK-kit
  • Verifies if a Groth16 proof is valid or not.

    +

    Parameters

    • verificationKey: any

      The verification key used to verify the proof.

      +
    • proof: {
          proof: Groth16Proof;
          publicSignals: PublicSignals;
      }

      The proof containing public signals and zero-knowledge parameters.

      +

    Returns Promise<boolean>

    True if the proof is valid, and false otherwise.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_lazytower.LazyTowerHashChainProofBuilder.html b/functions/_zk_kit_lazytower.LazyTowerHashChainProofBuilder.html new file mode 100644 index 000000000..89c985370 --- /dev/null +++ b/functions/_zk_kit_lazytower.LazyTowerHashChainProofBuilder.html @@ -0,0 +1,12 @@ +LazyTowerHashChainProofBuilder | ZK-kit

Function LazyTowerHashChainProofBuilder

  • LazyTowerHashChainProofBuilder is a TypeScript implementation of LazyTower to generate proofs of membership.

    +

    Parameters

    • H: number

      Height of tower of the proving circuit. It can be less than the H in the contract.

      +
    • W: number

      Width of tower.

      +
    • hash: ((a, b) => bigint) = defaultHash

      A hash function which supports 2 input values.

      +
        • (a, b): bigint
        • Parameters

          • a: bigint
          • b: bigint

          Returns bigint

    Returns {
        add: ((item) => void);
        build: ((idx) => LazyTowerHashChainProof);
        indexOf: ((item) => number);
    }

    • add: ((item) => void)
        • (item): void
        • Adds a new item in the LazyTower.

          +

          Parameters

          • item: bigint

            Item to be added.

            +

          Returns void

    • build: ((idx) => LazyTowerHashChainProof)
    • indexOf: ((item) => number)
        • (item): number
        • Returns the index of a item. If the item does not exist it returns -1.

          +

          Parameters

          • item: bigint

            Added item.

            +

          Returns number

          Index of the item.

          +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_poseidon_proof.generate.html b/functions/_zk_kit_poseidon_proof.generate.html new file mode 100644 index 000000000..030c94466 --- /dev/null +++ b/functions/_zk_kit_poseidon_proof.generate.html @@ -0,0 +1,14 @@ +generate | ZK-kit
  • Creates a zero-knowledge proof to prove that you have the pre-image of a hash, +without disclosing the actual preimage itself. +The use of a scope parameter along with a nullifier helps ensure the uniqueness +and non-reusability of the proofs, enhancing security in applications like +blockchain transactions or private data verification. +If, for example, this package were used with Semaphore to demonstrate possession +of a Semaphore identity of a group of voters, the scope could be the poll's ID.

    +

    Parameters

    • preimage: number | bigint | BytesLike | Hexable

      The preimage of the hash.

      +
    • scope: number | bigint | BytesLike | Hexable

      A public value used to contextualize the cryptographic proof +and calculate the nullifier.

      +
    • Optional snarkArtifacts: SnarkArtifacts

      The Snark artifacts (wasm and zkey files) generated in +a trusted setup of the circuit are necessary to generate valid proofs

      +

    Returns Promise<PoseidonProof>

    The Poseidon zero-knowledge proof.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_poseidon_proof.verify.html b/functions/_zk_kit_poseidon_proof.verify.html new file mode 100644 index 000000000..32d8e9370 --- /dev/null +++ b/functions/_zk_kit_poseidon_proof.verify.html @@ -0,0 +1,4 @@ +verify | ZK-kit
  • Verifies that a Poseidon proof is valid.

    +

    Parameters

    Returns Promise<boolean>

    True if the proof is valid, false otherwise.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_smt.checkHex.html b/functions/_zk_kit_smt.checkHex.html new file mode 100644 index 000000000..d129a2f42 --- /dev/null +++ b/functions/_zk_kit_smt.checkHex.html @@ -0,0 +1,4 @@ +checkHex | ZK-kit

Function checkHex

  • Checks if a number is a hexadecimal number.

    +

    Parameters

    • n: string

      A hexadecimal number.

      +

    Returns boolean

    True if the number is a hexadecimal, false otherwise.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_smt.getFirstCommonElements.html b/functions/_zk_kit_smt.getFirstCommonElements.html new file mode 100644 index 000000000..129c1a2a4 --- /dev/null +++ b/functions/_zk_kit_smt.getFirstCommonElements.html @@ -0,0 +1,5 @@ +getFirstCommonElements | ZK-kit

Function getFirstCommonElements

  • Returns the first common elements of two arrays.

    +

    Parameters

    • array1: any[]

      The first array.

      +
    • array2: any[]

      The second array.

      +

    Returns any[]

    The array of the first common elements.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_smt.getIndexOfLastNonZeroElement.html b/functions/_zk_kit_smt.getIndexOfLastNonZeroElement.html new file mode 100644 index 000000000..d40fd36e6 --- /dev/null +++ b/functions/_zk_kit_smt.getIndexOfLastNonZeroElement.html @@ -0,0 +1,5 @@ +getIndexOfLastNonZeroElement | ZK-kit

Function getIndexOfLastNonZeroElement

  • Returns the index of the last non-zero element of an array. +If there are only zero elements the function returns -1.

    +

    Parameters

    • array: any[]

      An array of hexadecimal or big numbers.

      +

    Returns number

    The index of the last non-zero element.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_smt.hexToBin.html b/functions/_zk_kit_smt.hexToBin.html new file mode 100644 index 000000000..e1a7fe9f1 --- /dev/null +++ b/functions/_zk_kit_smt.hexToBin.html @@ -0,0 +1,4 @@ +hexToBin | ZK-kit

Function hexToBin

  • Converts a hexadecimal number to a binary number.

    +

    Parameters

    • n: string

      A hexadecimal number.

      +

    Returns string

    The relative binary number.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_zk_kit_smt.keyToPath.html b/functions/_zk_kit_smt.keyToPath.html new file mode 100644 index 000000000..7d7a35416 --- /dev/null +++ b/functions/_zk_kit_smt.keyToPath.html @@ -0,0 +1,5 @@ +keyToPath | ZK-kit

Function keyToPath

  • Returns the binary representation of a key. For each key it is possibile +to obtain an array of 256 padded bits.

    +

    Parameters

    • key: string | bigint

      The key of a tree entry.

      +

    Returns number[]

    The relative array of bits.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000..14a357930 --- /dev/null +++ b/index.html @@ -0,0 +1,287 @@ +ZK-kit

ZK-kit

+

+ 🧰 ZK-kit +

+

A monorepo of reusable JS libraries for zero-knowledge technologies.

+

+ +

+ + + + + Github license + + + GitHub Workflow test + + + Coveralls + + + Linter eslint + + + Code style prettier + +

+ + + + + + + + + +
ZK-kit is a set of NPM modules (algorithms or utility functions) that can be reused in different projects and zero-knowledge protocols, making it easier for developers to access ready-to-use and tested libraries for common tasks.
+

Yarn workspaces: minimal monorepo package management (yarn, yarn build, yarn docs)
Conventional Commits: human and machine readable meaning to commit messages (yarn commit)
Jest: tests and test coverage for all libraries (yarn test:libraries)
Mocha: tests for circuits and contracts (yarn test:circuits, yarn test:contracts)
ESLint, Prettier: code quality and formatting (yarn prettier & yarn lint)
Typedocs: documentation generator for TypeScript (yarn docs)
Benny: simple benchmarking framework for JavaScript/TypeScript (yarn benchmarks)
Github actions: software workflows for automatic testing, documentation deploy and code quality checks

+

📦 Packages

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageVersionDownloadsSize
+ + @zk-kit/circuits + + + + + NPM version + + + + + Downloads + +
+ + @zk-kit/imt + + + (docs) + + + + + NPM version + + + + + Downloads + + + + + npm bundle size (scoped) + +
+ + @zk-kit/imt.sol + + + + + NPM version + + + + + Downloads + +
+ + @zk-kit/smt + + + (docs) + + + + + NPM version + + + + + Downloads + + + + + npm bundle size (scoped) + +
+ + @zk-kit/poseidon-proof + + + (docs) + + + + + NPM version + + + + + Downloads + + + + + npm bundle size (scoped) + +
+ + @zk-kit/groth16 + + + + + NPM version + + + + + Downloads + + + + + npm bundle size (scoped) + +
+ + @zk-kit/rollup-plugin-rust + + + + + NPM version + + + + + Downloads + + + + + npm bundle size (scoped) + +
+ +

👥 Ways to contribute

+

🛠 Install

Clone this repository:

+
git clone https://github.com/privacy-scaling-explorations/zk-kit.git
+
+

and install the dependencies:

+
cd zk-kit && yarn
+
+

📜 Usage

Code quality and formatting

Run ESLint to analyze the code and catch bugs:

+
yarn lint
+
+

Run Prettier to check formatting rules:

+
yarn prettier
+
+

or to automatically format the code:

+
yarn prettier:write
+
+

Conventional commits

Semaphore uses conventional commits. A command line utility to commit using the correct syntax can be used by running:

+
yarn commit
+
+

It will also automatically check that the modified files comply with ESLint and Prettier rules.

+

Testing

Test the code:

+
yarn test
+
+

Build

Build all the packages and compile contracts:

+
yarn build
+
+

A dist folder will be created inside each JavaScript package.

+

Documentation

Generate a documentation website for each package:

+
yarn docs
+
+

The output will be placed on the docs folder.

+

❓ FAQ

I have a library that could be reused in other projects. How can I integrate it on ZK-kit?

ZK-kit provides a set of pre-configured development tools. All you have to deal with is your own code, testing and documentation. To create a package follow these steps:

+
    +
  1. Fork this repository and clone it (or simply clone it directly if you are a collaborator),
  2. +
  3. Copy one of our current libraries and update the README.md and package.json files with your package name:
  4. +
+
cd zk-kit
cp -r packages/smt packages/my-package
cd packages/my-package && rm -fr node_modules dist
grep -r -l "smt" . | xargs sed -i 's/smt/my-package/'
# Update the remaining description/usage sections, and write your code in the src & tests folders! +
+
    +
  1. Create an issue for your package and open a PR.
  2. +
+

How can I create benchmarks for my library?

You can see some examples in the benchmarks folder. All you have to do is create a file that exports a function to run your benchmark in that folder, and add that function to the index.ts file. The yarn benchmarks command can be run with no parameters (it will run all the benchmarks), or you can specify the name of your benchmark file to run just that. When you run the command it will create a benchmarks/results folder with your results.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_zk_kit_groth16.CircuitSignals.html b/interfaces/_zk_kit_groth16.CircuitSignals.html new file mode 100644 index 000000000..161f22515 --- /dev/null +++ b/interfaces/_zk_kit_groth16.CircuitSignals.html @@ -0,0 +1 @@ +CircuitSignals | ZK-kit

Interface CircuitSignals

interface CircuitSignals {
    [signal: string]: SignalValueType;
}

Indexable

[signal: string]: SignalValueType

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_zk_kit_groth16.Groth16Proof.html b/interfaces/_zk_kit_groth16.Groth16Proof.html new file mode 100644 index 000000000..4eee057dd --- /dev/null +++ b/interfaces/_zk_kit_groth16.Groth16Proof.html @@ -0,0 +1,6 @@ +Groth16Proof | ZK-kit

Interface Groth16Proof

interface Groth16Proof {
    curve: string;
    pi_a: string[];
    pi_b: string[][];
    pi_c: string[];
    protocol: string;
}

Properties

Properties

curve: string
pi_a: string[]
pi_b: string[][]
pi_c: string[]
protocol: string

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_zk_kit_smt.EntryResponse.html b/interfaces/_zk_kit_smt.EntryResponse.html new file mode 100644 index 000000000..e882bec7e --- /dev/null +++ b/interfaces/_zk_kit_smt.EntryResponse.html @@ -0,0 +1,4 @@ +EntryResponse | ZK-kit

Interface EntryResponse

interface EntryResponse {
    entry: Entry | Node[];
    matchingEntry?: Entry | Node[];
    siblings: Siblings;
}

Hierarchy

Properties

entry: Entry | Node[]
matchingEntry?: Entry | Node[]
siblings: Siblings

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_zk_kit_smt.MerkleProof.html b/interfaces/_zk_kit_smt.MerkleProof.html new file mode 100644 index 000000000..50c370b48 --- /dev/null +++ b/interfaces/_zk_kit_smt.MerkleProof.html @@ -0,0 +1,6 @@ +MerkleProof | ZK-kit

Interface MerkleProof

interface MerkleProof {
    entry: Entry | Node[];
    matchingEntry?: Entry | Node[];
    membership: boolean;
    root: Node;
    siblings: Siblings;
}

Hierarchy

Properties

entry: Entry | Node[]
matchingEntry?: Entry | Node[]
membership: boolean
root: Node
siblings: Siblings

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/_zk_kit_circuits.html b/modules/_zk_kit_circuits.html new file mode 100644 index 000000000..0e0ff7e98 --- /dev/null +++ b/modules/_zk_kit_circuits.html @@ -0,0 +1,51 @@ +@zk-kit/circuits | ZK-kit

Module @zk-kit/circuits

+

+ ZK-kit circuits +

+

A comprehensive library of general-purpose zero-knowledge circuits.

+

+ +

+ + + + + Github license + + + NPM version + + + Downloads + +

+ + + + + + + + + +
This package offers a collection of reusable circuits designed for integration into other projects or protocols, promoting code modularization within the zero-knowledge ecosystem.
+

Circuits

    +
  • Circom:
      +
    • PoseidonProof: It proves the possession of a Poseidon pre-image without revealing the pre-image itself.
    • +
    • BinaryMerkleRoot: It calculates the root of a binary Merkle tree using a provided proof-of-membership.
    • +
    +
  • +
+

🛠 Install

npm or yarn

Install the @zk-kit/circuits package with npm:

+
npm i @zk-kit/circuits --save
+
+

or yarn:

+
yarn add @zk-kit/circuits
+
+

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/_zk_kit_groth16.html b/modules/_zk_kit_groth16.html new file mode 100644 index 000000000..e7870f35e --- /dev/null +++ b/modules/_zk_kit_groth16.html @@ -0,0 +1,88 @@ +@zk-kit/groth16 | ZK-kit

Module @zk-kit/groth16

+

+ SnarkJS Groth16 +

+

A snippet of SnarkJS code for verifying and generating Groth16 proofs only.

+

+ +

+ + + + + NPM license + + + NPM version + + + Downloads + + + npm bundle size (scoped) + + + Linter eslint + + + Code style prettier + +

+ + + + + + + + + +
This package contains SnarkJS functions for generating and verifying zero knowledge proofs with Groth16 specifically. In addition to the original code it also uses the cached bn128 curve if it already exists, making verification and generation of consecutive proofs faster.
+

Some advantages of using this package instead of snarkjs directly are:

+
    +
  • It only includes code to verify and generate Groth16 proofs, making your final bundle lighter.
  • +
  • It doesn't call the ffjavascript buildBn128 function if a bn128 cached curve already exists, making verification and generation of consecutive proofs much faster (e.g. verification seems to be ~9 times faster after the first one).
  • +
  • It includes TS types.
  • +
  • It provides an ESM bundle that is compatible with browsers. So there is no need to add any polyfill or additional configuration.
  • +
+

🛠 Install

npm or yarn

Install the @zk-kit/groth16 package and its peer dependencies with npm:

+
npm i @zk-kit/groth16
+
+

or yarn:

+
yarn add @zk-kit/groth16
+
+

📜 Usage

# prove(input: CircuitSignals, wasmFile: ZKArtifact, zkeyFile: ZKArtifact): Promise<_{ +proof: Groth16Proof +publicSignals: PublicSignals +}_>

+
import { prove } from "@zk-kit/groth16"

const input = {
message: 12,
scope: 122
}

const proof = await prove(input, "./circuit.zkey", "./circuit.wasm")

console.log(proof)
/*
{
proof: {
pi_a: [
'8259885706934172848141475422209230656096448508815982888010519325096632035723',
'3142099172052192611205205328157407975469005554072266974009053708782134081166',
'1'
],
pi_b: [ [Array], [Array], [Array] ],
pi_c: [
'13863804425308906943736719856399634046638544298517159271373916818387594277305',
'21340646707244019956779928177502771923632450548108204371058275686712196195969',
'1'
],
protocol: 'groth16',
curve: 'bn128'
},
publicSignals: [
'527758365153958423212195330785598453331596731388181860789801455413116800554',
'19104626566001952573667666924569656871967113105870778077087237826253896482830',
'122'
]
}
*/ +
+

# verify(verificationKey: any, proof: { +proof: Groth16Proof +publicSignals: PublicSignals +}): Promise<_boolean_>

+
import { verify } from "@zk-kit/groth16"
import verificationKey from "./circuit.json"

const response = await verify(verificationKey, proof)

console.log(response) // true +
+

# buildBn128(): Promise<_any_>

+
import { buildBn128 } from "@zk-kit/groth16"

const curve = await buildBn128() // WasmField1
// https://github.com/iden3/ffjavascript/blob/master/src/wasm_field1.js +
+

Index

Interfaces

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/_zk_kit_imt.html b/modules/_zk_kit_imt.html new file mode 100644 index 000000000..567bf2610 --- /dev/null +++ b/modules/_zk_kit_imt.html @@ -0,0 +1,72 @@ +@zk-kit/imt | ZK-kit

Module @zk-kit/imt

+

+ Incremental Merkle Trees +

+

Incremental Merkle tree implementations in TypeScript.

+

+ +

+ + + + + Github license + + + NPM version + + + Downloads + + + npm bundle size (scoped) + + + Linter eslint + + + Code style prettier + +

+ + + +
+

[!WARNING]
If you are looking for the first version of this package, please visit this link.

+
+
+

🛠 Install

npm or yarn

Install the @zk-kit/imt package with npm:

+
npm i @zk-kit/imt --save
+
+

or yarn:

+
yarn add @zk-kit/imt
+
+

CDN

You can also load it using a script tag using unpkg:

+
<script src="https://unpkg.com/@zk-kit/imt"></script>
+
+

or JSDelivr:

+
<script src="https://cdn.jsdelivr.net/npm/@zk-kit/imt"></script>
+
+

📜 Usage

This package currently provides two implementations of incremental Merkle trees: IMT and LeanIMT. The former supports several degrees (i.e. arity), while the latter is a binary tree optimization. More information on their properties can be found in the ZK-Kit documentation.

+

IMT (doc)

import { IMT } from "@zk-kit/imt"
import { poseidon2 } from "poseidon-lite"

const depth = 16
const zeroValue = 0
const arity = 2 // Binary tree.

const tree = new IMT(poseidon2, depth, zeroValue, arity)

tree.insert(1)
tree.insert(3)

tree.root
tree.zeroes
tree.arity // 2
tree.depth // 1
tree.leaves // [1, 3]

tree.indexOf(3) // 1

tree.update(1, 2) // tree1.leaves -> [1, 2]

tree.delete(1) // tree1.leaves -> [1, 0]

const proof = tree.createProof(1)

tree.verifyProof(proof) // true

// You can also initialize a tree with a list of leaves.
new IMT(poseidon2, depth, zeroValue, arity, [1, 2, 3]) +
+

LeanIMT (doc)

import { LeanIMT } from "@zk-kit/imt"
import { poseidon2 } from "poseidon-lite"

const hash = (a, b) => poseidon2([a, b])

const tree = new LeanIMT(hash)

tree.insert(1n)
tree.insert(3n)

tree.root
tree.depth // 1
tree.size // 2
tree.leaves // [1n, 3n]

tree.indexOf(3n) // 1
tree.has(4n) // false

tree.update(1, 2n) // tree1.leaves -> [1n, 2n]

const proof = tree.generateProof(1)

tree.verifyProof(proof) // true

// You can initialize a tree with a list of leaves.
new LeanIMT(hash, [1n, 2n, 3n])

// LeanIMT is strictly typed. Default type for nodes is 'bigint',
// but you can set your own type.
new LeanIMT<number>((a, b) => a + b) +
+

Index

Classes

Type Aliases

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/_zk_kit_lazytower.html b/modules/_zk_kit_lazytower.html new file mode 100644 index 000000000..3bd1861d9 --- /dev/null +++ b/modules/_zk_kit_lazytower.html @@ -0,0 +1,67 @@ +@zk-kit/lazytower | ZK-kit

Module @zk-kit/lazytower

+

+ LazyTower +

+

LazyTower implementation in TypeScript.

+

+ +

+ + + + + Github license + + + NPM version + + + Downloads + + + npm bundle size (scoped) + + + Linter eslint + + + Code style prettier + +

+ + + +
+

❗ WARNING

This library has not been audited.

+

🛠 Install

npm or yarn

Install the @zk-kit/lazytower package with npm:

+
npm i @zk-kit/lazytower --save
+
+

or yarn:

+
yarn add @zk-kit/lazytower
+
+

CDN

You can also load it using a script tag using unpkg:

+
<script src="https://unpkg.com/@zk-kit/lazytower/"></script>
+
+

or JSDelivr:

+
<script src="https://cdn.jsdelivr.net/npm/@zk-kit/lazytower/"></script>
+
+

📜 Usage

import { LazyTowerHashChainProofBuilder } from "@zk-kit/lazytower"
import { poseidon } from "circomlibjs" // v0.0.8

const H = 10
const W = 4
const pb = LazyTowerHashChainProofBuilder(H, W, poseidon)
for (let i = BigInt(0); i < 150; i += BigInt(1)) {
pb.add(i)
}
const index = pb.indexOf(BigInt(42))
const proof = pb.build(index)
console.log(proof) +
+

Contacts

Developers

+

Index

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/_zk_kit_poseidon_proof.html b/modules/_zk_kit_poseidon_proof.html new file mode 100644 index 000000000..577d22b0e --- /dev/null +++ b/modules/_zk_kit_poseidon_proof.html @@ -0,0 +1,99 @@ +@zk-kit/poseidon-proof | ZK-kit

Module @zk-kit/poseidon-proof

+

+ Poseidon proof +

+

A library to generate and verify Poseidon proofs.

+

+ +

+ + + + + NPM license + + + NPM version + + + Downloads + + + npm bundle size (scoped) + + + Linter eslint + + + Code style prettier + +

+ + + + + + + + + +
This zero-knowledge library facilitates the demonstration of having a Poseidon hash pre-image while keeping the pre-image value confidential. Additionally, it offers a mechanism to prevent the same proof from being reused. The circuit that forms the foundation of this library is accessible via this link.
+

Originally developed for integration with Semaphore V4, this library also functions effectively as a standalone tool. Notable use cases in connection with Semaphore can be:

+
    +
  • allowing a Semaphore user to prove that they possess the secret value associated with the identity commitment of their Semaphore identity,
  • +
  • unmasking the identity of zero-knowledge proofs earlier created using Semaphore.
  • +
+

The Snark artifacts (.wasm and .zkey files) can be specified or not in the generate function parameters and can possibly be downloaded using the following URLs:

+

https://github.com/privacy-scaling-explorations/zk-kit/blob/ee457299d36d2601e5bf520237977a9f16b1b599/packages/poseidon-proof/src/config.ts#L5-L8

+
+

[!WARNING]
The Snark artifacts currently used to generate zero-knowledge proofs are the result of an unsecure trusted setup, and the library has not yet been audited. Therefore, it is advised not to use it in production.

+
+

🛠 Install

npm or yarn

Install the @zk-kit/poseidon-proof package:

+
npm i @zk-kit/poseidon-proof
+
+

or yarn:

+
yarn add @zk-kit/poseidon-proof
+
+

📜 Usage

# generate( +message: BigNumberish, +scope: BigNumberish, +snarkArtifacts?: SnarkArtifacts +): Promise<_PoseidonProof_>

+
import { generate } from "@zk-kit/poseidon-proof"

const scope = 1
const message = 2

const fullProof = await generate(message, scope)

// If not specified, the Snark artifacts are downloaded automatically.
// You can also specify them.
const fullProof2 = await generate(message, scope, {
zkeyFilePath: "./poseidon-proof.zkey",
wasmFilePath: "./poseidon-proof.wasm"
})

console.log(fullProof)
/*
{
scope: '1',
hash: '8645981980787649023086883978738420856660271013038108762834452721572614684349',
nullifier: '7853200120776062878684798364095072458815029376092732009249414926327459813530',
proof: [
'8439157877715136449451128027974582198942685548176158240742469858289217640295',
'7742778415084033741154475792823260193410560424636243716622958831215275441500',
'19005176609208302398813682947612978224483117018101271134113308439452561466691',
'6209272538382784759793219866517186573065390524051102537220446165983489601194',
'12222537243697573476419214640884921904066033266502734603198915705889607365883',
'20066191345466355816238393590466176790809335456890624395337970890893401456064',
'4851746896803117511000878727783002155680855098198108089136166702412365578625',
'18391775232946751568173446051923718267369779168471637305003186214102154164036'
]
}
*/ +
+

# verify(poseidonProof: PoseidonProof): Promise<_boolean_>

+
import { verify } from "@zk-kit/poseidon-proof"

const response = await verify(fullProof)

console.log(response) // true or false

// Eventually you may want to check the nullifier. +
+

📈 Benchmarks

Benchmarks were run on an Intel Core i7-1165G7, 16 GB RAM machine, after initializing the BN128 curve with @zk-kit/groth16-buildBn128 (~230ms).

+ + + + + + + + + + + + + +
Generate proofVerify proofConstraints
80ms10ms141
+
import { generate, verify } from "@zk-kit/poseidon-proof"
import { buildBn128 } from "@zk-kit/groth16"

await buildBn128()

console.time("generate")

const proof = await generate(1, 2)

console.timeEnd("generate")

console.time("verify")

console.log(await verify(proof))

console.timeEnd("verify") +
+

Index

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/_zk_kit_smt.html b/modules/_zk_kit_smt.html new file mode 100644 index 000000000..aec1bcf47 --- /dev/null +++ b/modules/_zk_kit_smt.html @@ -0,0 +1,106 @@ +@zk-kit/smt | ZK-kit

Module @zk-kit/smt

+

+ Sparse Merkle tree +

+

Sparse Merkle tree implementation in TypeScript.

+

+ +

+ + + + + Github license + + + NPM version + + + Downloads + + + npm bundle size (scoped) + + + Linter eslint + + + Code style prettier + +

+ + + +

A sparse Merkle tree is a data structure useful for storing a key/value map where every leaf node of the tree contains the cryptographic hash of a key/value pair and every non leaf node contains the concatenated hashes of its child nodes. Sparse Merkle trees provides a secure and efficient verification of large data sets and they are often used in peer-to-peer technologies. This implementation is an optimized version of the traditional sparse Merkle tree and it is based on the concepts expressed in the papers and resources below.

+

References

    +
  1. Rasmus Dahlberg, Tobias Pulls and Roel Peeters. Efficient Sparse Merkle Trees: Caching Strategies and Secure (Non-)Membership Proofs. Cryptology ePrint Archive: Report 2016/683, 2016. https://eprint.iacr.org/2016/683.
  2. +
  3. Faraz Haider. Compact sparse merkle trees. Cryptology ePrint Archive: Report 2018/955, 2018. https://eprint.iacr.org/2018/955.
  4. +
  5. Jordi Baylina and Marta Bellés. Sparse Merkle Trees. https://docs.iden3.io/publications/pdfs/Merkle-Tree.pdf.
  6. +
  7. Vitalik Buterin Fichter. Optimizing sparse Merkle trees. https://ethresear.ch/t/optimizing-sparse-merkle-trees/3751.
  8. +
+
+

Install

npm or yarn

You can install @zk-kit/smt package with npm:

+
npm i @zk-kit/smt --save
+
+

or yarn:

+
yarn add @zk-kit/smt
+
+

CDN

You can also load it using a script tag using unpkg:

+
<script src="https://unpkg.com/@zk-kit/smt"></script>
+
+

or JSDelivr:

+
<script src="https://cdn.jsdelivr.net/npm/@zk-kit/smt"></script>
+
+

📜 Usage

# new SMT(hash: HashFunction, bigNumbers?: boolean): SMT

+
import { SMT } from "@zk-kit/smt"
import sha256 from "crypto-js/sha256"
import { poseidon } from "circomlibjs"

// Hexadecimal hashes.
const hash = (childNodes: ChildNodes) => sha256(childNodes.join("")).toString()
const tree = new SMT(hash)

// Big number hashes.
const hash2 = (childNodes: ChildNodes) => poseidon(childNodes)
const tree2 = new SMT(hash2, true)

console.log(tree.root) // 0
console.log(tree2.root) // 0n +
+

# add(key: string | number, value: string | number): void

+
tree.add("2b", "44") // Hexadecimal key/value.
tree.add("16", "78")
tree.add("d", "e7")
tree.add("10", "141")
tree.add("20", "340")

console.log(tree.root) // 31ee2a59741c9c32a32d8c7fafe461cca1ccaf5986c2d592586e3e6482a48645 +
+

# get(key: string | number): undefined | string

+
const value = tree.get("16")

console.log(value) // 78 +
+

# update(key: string | number, value: string | number): void

+
tree.update("16", "79")

const value = tree.get("16")

console.log(value) // 79 +
+

# delete(key: string | number): void

+
tree.delete("16")

const value = tree.get("16")

console.log(value) // undefined +
+

# createProof(key: string | number): Proof

+
const membershipProof = tree.createProof("2b")
const nonMembershipProof = tree.createProof("16") // This key has been deleted.

console.log(membershipProof)
/*
{
entry: [ '2b', '44', '1' ],
matchingEntry: undefined,
siblings: [
'006a0ab15a212e0e0126b81e056b11576628b1ad80792403dbb3a90be2e71d64',
'f786ce5a843614d7da216d95c0087c1eb29244927feeeeeb658aa60cf124cd5e'
],
root: 'c3c023c84afc0a7bab1dbebcef5f7beaf3d6af4af98e8f481620dec052be7d0d',
membership: true
}
*/

console.log(nonMembershipProof)
/*
{
entry: [ '16' ],
matchingEntry: undefined,
siblings: [
'960f23d9fbb44241be53efb7c4d69ac129bb1cb9482dcb6789d3cc7e6de2de2b',
'2a1aef839e68d1bdf43c1b3b1ed9ef16c27162e8a175898c9ac64a679b0fc825'
],
root: 'c3c023c84afc0a7bab1dbebcef5f7beaf3d6af4af98e8f481620dec052be7d0d',
membership: false
}
*/ +
+

# verifyProof(proof: Proof): boolean

+
console.log(tree.verifyProof(membershipProof)) // true
console.log(tree.verifyProof(nonMembershipProof)) // true +
+

Contacts

Developers

+

Index

Classes

SMT +

Interfaces

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_groth16.NumericString.html b/types/_zk_kit_groth16.NumericString.html new file mode 100644 index 000000000..b3985e0e3 --- /dev/null +++ b/types/_zk_kit_groth16.NumericString.html @@ -0,0 +1 @@ +NumericString | ZK-kit

Type alias NumericString

NumericString: `${number}` | string

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_groth16.PublicSignals.html b/types/_zk_kit_groth16.PublicSignals.html new file mode 100644 index 000000000..c2c0e7175 --- /dev/null +++ b/types/_zk_kit_groth16.PublicSignals.html @@ -0,0 +1 @@ +PublicSignals | ZK-kit

Type alias PublicSignals

PublicSignals: NumericString[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_groth16.SignalValueType.html b/types/_zk_kit_groth16.SignalValueType.html new file mode 100644 index 000000000..37b2a94ac --- /dev/null +++ b/types/_zk_kit_groth16.SignalValueType.html @@ -0,0 +1 @@ +SignalValueType | ZK-kit

Type alias SignalValueType

SignalValueType: NumericString | number | bigint | SignalValueType[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_groth16.ZKArtifact.html b/types/_zk_kit_groth16.ZKArtifact.html new file mode 100644 index 000000000..05366efe5 --- /dev/null +++ b/types/_zk_kit_groth16.ZKArtifact.html @@ -0,0 +1 @@ +ZKArtifact | ZK-kit

Type alias ZKArtifact

ZKArtifact: string | Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_imt.IMTHashFunction.html b/types/_zk_kit_imt.IMTHashFunction.html new file mode 100644 index 000000000..fdfb8e73d --- /dev/null +++ b/types/_zk_kit_imt.IMTHashFunction.html @@ -0,0 +1,3 @@ +IMTHashFunction | ZK-kit

Type alias IMTHashFunction

IMTHashFunction: ((values) => IMTNode)

Type declaration

    • (values): IMTNode
    • The hash function is used to compute the nodes of the tree. +In a binary Merkle tree, each node is the hash of its two children.

      +

      Parameters

      Returns IMTNode

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_imt.IMTMerkleProof.html b/types/_zk_kit_imt.IMTMerkleProof.html new file mode 100644 index 000000000..002a975a8 --- /dev/null +++ b/types/_zk_kit_imt.IMTMerkleProof.html @@ -0,0 +1,9 @@ +IMTMerkleProof | ZK-kit

Type alias IMTMerkleProof

IMTMerkleProof: {
    leaf: any;
    leafIndex: number;
    pathIndices: number[];
    root: any;
    siblings: any[];
}

The Merkle Proof contains the necessary parameters to enable the +verifier to be certain that a leaf belongs to the tree. Given the value +of the leaf and its index, it is possible to traverse the tree by +recalculating the hashes up to the root and using the node siblings. +If the calculated root matches the root in the proof, then the leaf +belongs to the tree. It's important to note that the function used +to generate the proof and the one used to verify it must use the +same hash function.

+

Type declaration

  • leaf: any
  • leafIndex: number
  • pathIndices: number[]
  • root: any
  • siblings: any[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_imt.IMTNode.html b/types/_zk_kit_imt.IMTNode.html new file mode 100644 index 000000000..9809d589a --- /dev/null +++ b/types/_zk_kit_imt.IMTNode.html @@ -0,0 +1,2 @@ +IMTNode | ZK-kit

Type alias IMTNode

IMTNode: any

It represents a node of the tree, which can be any value.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_imt.LeanIMTHashFunction.html b/types/_zk_kit_imt.LeanIMTHashFunction.html new file mode 100644 index 000000000..fdcdadf40 --- /dev/null +++ b/types/_zk_kit_imt.LeanIMTHashFunction.html @@ -0,0 +1,3 @@ +LeanIMTHashFunction | ZK-kit

Type alias LeanIMTHashFunction<N>

LeanIMTHashFunction<N>: ((a, b) => N)

Type Parameters

  • N = bigint

Type declaration

    • (a, b): N
    • The hash function is used to compute the nodes of the tree. +In a binary Merkle tree, each node is the hash of its two children.

      +

      Parameters

      • a: N
      • b: N

      Returns N

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_imt.LeanIMTMerkleProof.html b/types/_zk_kit_imt.LeanIMTMerkleProof.html new file mode 100644 index 000000000..f31dd8d42 --- /dev/null +++ b/types/_zk_kit_imt.LeanIMTMerkleProof.html @@ -0,0 +1,9 @@ +LeanIMTMerkleProof | ZK-kit

Type alias LeanIMTMerkleProof<N>

LeanIMTMerkleProof<N>: {
    index: number;
    leaf: N;
    root: N;
    siblings: N[];
}

The Merkle Proof contains the necessary parameters to enable the +verifier to be certain that a leaf belongs to the tree. Given the value +of the leaf and its index, it is possible to traverse the tree by +recalculating the hashes up to the root and using the node siblings. +If the calculated root matches the root in the proof, then the leaf +belongs to the tree. It's important to note that the function used +to generate the proof and the one used to verify it must use the +same hash function.

+

Type Parameters

  • N = bigint

Type declaration

  • index: number
  • leaf: N
  • root: N
  • siblings: N[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_lazytower.LazyTowerHashChainProof.html b/types/_zk_kit_lazytower.LazyTowerHashChainProof.html new file mode 100644 index 000000000..a0d00356c --- /dev/null +++ b/types/_zk_kit_lazytower.LazyTowerHashChainProof.html @@ -0,0 +1 @@ +LazyTowerHashChainProof | ZK-kit

Type alias LazyTowerHashChainProof

LazyTowerHashChainProof: {
    childrens: bigint[][];
    digestOfDigests: bigint;
    item: bigint;
    levelLengths: bigint;
    rootLevel: bigint[];
    rootLv: number;
    topDownDigests: bigint[];
}

Type declaration

  • childrens: bigint[][]
  • digestOfDigests: bigint
  • item: bigint
  • levelLengths: bigint
  • rootLevel: bigint[]
  • rootLv: number
  • topDownDigests: bigint[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_poseidon_proof.PackedProof.html b/types/_zk_kit_poseidon_proof.PackedProof.html new file mode 100644 index 000000000..54ddb3beb --- /dev/null +++ b/types/_zk_kit_poseidon_proof.PackedProof.html @@ -0,0 +1 @@ +PackedProof | ZK-kit

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_poseidon_proof.PoseidonProof.html b/types/_zk_kit_poseidon_proof.PoseidonProof.html new file mode 100644 index 000000000..ef8a1c854 --- /dev/null +++ b/types/_zk_kit_poseidon_proof.PoseidonProof.html @@ -0,0 +1 @@ +PoseidonProof | ZK-kit
PoseidonProof: {
    digest: NumericString;
    nullifier: NumericString;
    proof: PackedProof;
    scope: NumericString;
}

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_poseidon_proof.SnarkArtifacts.html b/types/_zk_kit_poseidon_proof.SnarkArtifacts.html new file mode 100644 index 000000000..bbd5e0b2c --- /dev/null +++ b/types/_zk_kit_poseidon_proof.SnarkArtifacts.html @@ -0,0 +1 @@ +SnarkArtifacts | ZK-kit
SnarkArtifacts: {
    wasmFilePath: string;
    zkeyFilePath: string;
}

Type declaration

  • wasmFilePath: string
  • zkeyFilePath: string

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.ChildNodes.html b/types/_zk_kit_smt.ChildNodes.html new file mode 100644 index 000000000..d89ad4b8d --- /dev/null +++ b/types/_zk_kit_smt.ChildNodes.html @@ -0,0 +1 @@ +ChildNodes | ZK-kit

Type alias ChildNodes

ChildNodes: Node[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.Entry.html b/types/_zk_kit_smt.Entry.html new file mode 100644 index 000000000..721fa374f --- /dev/null +++ b/types/_zk_kit_smt.Entry.html @@ -0,0 +1 @@ +Entry | ZK-kit

Type alias Entry

Entry: [Key, Value, EntryMark]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.EntryMark.html b/types/_zk_kit_smt.EntryMark.html new file mode 100644 index 000000000..dc30cbffc --- /dev/null +++ b/types/_zk_kit_smt.EntryMark.html @@ -0,0 +1 @@ +EntryMark | ZK-kit

Type alias EntryMark

EntryMark: Node

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.HashFunction.html b/types/_zk_kit_smt.HashFunction.html new file mode 100644 index 000000000..d432f5128 --- /dev/null +++ b/types/_zk_kit_smt.HashFunction.html @@ -0,0 +1 @@ +HashFunction | ZK-kit

Type alias HashFunction

HashFunction: ((childNodes) => Node)

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.Key.html b/types/_zk_kit_smt.Key.html new file mode 100644 index 000000000..1cf1fae79 --- /dev/null +++ b/types/_zk_kit_smt.Key.html @@ -0,0 +1 @@ +Key | ZK-kit

Type alias Key

Key: Node

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.Node.html b/types/_zk_kit_smt.Node.html new file mode 100644 index 000000000..508909eb9 --- /dev/null +++ b/types/_zk_kit_smt.Node.html @@ -0,0 +1 @@ +Node | ZK-kit

Type alias Node

Node: string | bigint

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.Siblings.html b/types/_zk_kit_smt.Siblings.html new file mode 100644 index 000000000..6cab1a58c --- /dev/null +++ b/types/_zk_kit_smt.Siblings.html @@ -0,0 +1 @@ +Siblings | ZK-kit

Type alias Siblings

Siblings: Node[]

Generated using TypeDoc

\ No newline at end of file diff --git a/types/_zk_kit_smt.Value.html b/types/_zk_kit_smt.Value.html new file mode 100644 index 000000000..e624e5ccb --- /dev/null +++ b/types/_zk_kit_smt.Value.html @@ -0,0 +1 @@ +Value | ZK-kit

Type alias Value

Value: Node

Generated using TypeDoc

\ No newline at end of file