-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
🎄 Add Mina MerkleTree service
1 parent
af0c37f
commit 40118c0
Showing
24 changed files
with
356 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.DS_Store | ||
*.lock | ||
.wrangler | ||
*lock* | ||
*.vars | ||
/build | ||
/node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
include edevlet/test/Makefile | ||
|
||
build/edevlet/nkoParser.js: edevlet/nkoParser.js edevlet/pdfjs.d.js \ | ||
lib/crosschain/*.d.js \ | ||
lib/did/*.d.js \ | ||
lib/ethereum/*.d.js \ | ||
lib/node/error.d.js lib/node/error.js \ | ||
lib/node/nvi.d.js | ||
$(lib)/crosschain/*.d.js \ | ||
$(lib)/did/*.d.js \ | ||
$(lib)/ethereum/*.d.js \ | ||
$(lib)/node/error.d.js $(lib)/node/error.js \ | ||
$(lib)/node/nvi.d.js | ||
mkdir -p $(dir $@) | ||
yarn google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
bun google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
--jscomp_error=unusedLocalVariables \ | ||
--jscomp_error=strictCheckTypes \ | ||
--jscomp_warning=reportUnknownTypes \ | ||
|
@@ -19,41 +19,41 @@ build/edevlet/nkoParser.js: edevlet/nkoParser.js edevlet/pdfjs.d.js \ | |
--entry_point $< \ | ||
--js $^ \ | ||
--js_output_file $@ | ||
yarn uglifyjs $@ -m -c toplevel,unsafe,drop_console -o $@ | ||
bun uglifyjs $@ -m -c toplevel,unsafe,drop_console -o $@ | ||
wc $@ | ||
|
||
build/edevlet/pdfjs.js: edevlet/pdfjs.js \ | ||
edevlet/pdf.js/src/pdf.js \ | ||
edevlet/pdf.js/src/shared/*.js edevlet/pdf.js/src/display/*.js \ | ||
edevlet/pdf.js/src/core/*.js edevlet/pdf.js/src/core/xfa/*.js | ||
mkdir -p $(dir $@) | ||
yarn google-closure-compiler -W VERBOSE -O SIMPLE \ | ||
bun google-closure-compiler -W VERBOSE -O SIMPLE \ | ||
--language_in ECMASCRIPT_NEXT \ | ||
--module_resolution NODE \ | ||
--assume_function_wrapper \ | ||
--dependency_mode PRUNE \ | ||
--entry_point $< \ | ||
--js $^ \ | ||
--js_output_file [email protected] | ||
yarn uglifyjs [email protected] -m -c toplevel,unsafe,drop_console -o [email protected] | ||
bun uglifyjs [email protected] -m -c toplevel,unsafe,drop_console -o [email protected] | ||
printf "'use strict';(()=>{" | cat - [email protected] > $@ | ||
printf "})();" >> $@ | ||
wc $@ | ||
|
||
build/oauth2Worker.js: edevlet/oauth2Worker.js edevlet/oauth2Worker.d.js \ | ||
edevlet/validation.js \ | ||
lib/api/oauth2.d.js \ | ||
lib/cloudflare/types.d.js lib/cloudflare/moduleWorker.d.js \ | ||
lib/crosschain/*.js \ | ||
lib/crypto/sha3.js \ | ||
lib/crypto/modular.js lib/crypto/secp256k1.js \ | ||
lib/did/*.d.js lib/did/section.js lib/did/decryptedSections.js \ | ||
lib/ethereum/*.d.js lib/ethereum/evm.js \ | ||
lib/node/error.d.js lib/node/error.js lib/node/nvi.d.js \ | ||
lib/util/çevir.js \ | ||
$(lib)/api/oauth2.d.js \ | ||
$(lib)/cloudflare/types.d.js $(lib)/cloudflare/moduleWorker.d.js \ | ||
$(lib)/crosschain/*.js \ | ||
$(lib)/crypto/sha3.js \ | ||
$(lib)/crypto/modular.js $(lib)/crypto/secp256k1.js \ | ||
$(lib)/did/*.d.js $(lib)/did/section.js $(lib)/did/decryptedSections.js \ | ||
$(lib)/ethereum/*.d.js $(lib)/ethereum/evm.js \ | ||
$(lib)/node/error.d.js $(lib)/node/error.js $(lib)/node/nvi.d.js \ | ||
$(lib)/util/çevir.js \ | ||
build/BEARER_TOKEN | ||
mkdir -p $(dir $@) | ||
yarn google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
bun google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
--define "BEARER_TOKEN\$$\$$module\$$edevlet\$$oauth2Worker=$(shell cat build/BEARER_TOKEN)" \ | ||
--define "CF_ACCOUNT_NAME\$$\$$module\$$edevlet\$$oauth2Worker=$(CF_ACCOUNT_NAME)" \ | ||
--define "WORKER_NAME\$$\$$module\$$edevlet\$$oauth2Worker=$(WORKER_NAME)" \ | ||
|
@@ -66,25 +66,25 @@ build/oauth2Worker.js: edevlet/oauth2Worker.js edevlet/oauth2Worker.d.js \ | |
--entry_point $< \ | ||
--js $(filter %.js, $^) \ | ||
--js_output_file $@ | ||
yarn uglifyjs $@ -m -c toplevel,unsafe,drop_console -o $@ | ||
bun uglifyjs $@ -m -c toplevel,unsafe,drop_console -o $@ | ||
sed -i.bak 's/globalThis.OAuth2Worker=/export default/g' $@ | ||
wc $@ | ||
|
||
build/nkoWorker.js: edevlet/nkoWorker.js \ | ||
edevlet/nko.d.js edevlet/nko.js edevlet/validation.js \ | ||
edevlet/nkoParser.js edevlet/pdfjs.d.js \ | ||
lib/cloudflare/types.d.js lib/cloudflare/moduleWorker.d.js \ | ||
lib/crosschain/*.js \ | ||
lib/crypto/sha3.js \ | ||
lib/crypto/modular.js lib/crypto/secp256k1.js \ | ||
lib/did/*.d.js lib/did/section.js lib/did/decryptedSections.js \ | ||
lib/ethereum/*.d.js lib/ethereum/evm.js \ | ||
lib/node/error.d.js lib/node/error.js lib/node/nvi.d.js \ | ||
lib/util/çevir.js \ | ||
$(lib)/cloudflare/types.d.js $(lib)/cloudflare/moduleWorker.d.js \ | ||
$(lib)/crosschain/*.js \ | ||
$(lib)/crypto/sha3.js \ | ||
$(lib)/crypto/modular.js $(lib)/crypto/secp256k1.js \ | ||
$(lib)/did/*.d.js $(lib)/did/section.js $(lib)/did/decryptedSections.js \ | ||
$(lib)/ethereum/*.d.js $(lib)/ethereum/evm.js \ | ||
$(lib)/node/error.d.js $(lib)/node/error.js $(lib)/node/nvi.d.js \ | ||
$(lib)/util/çevir.js \ | ||
build/edevlet/pdfjs.js \ | ||
build/BEARER_TOKEN | ||
mkdir -p $(dir $@) | ||
yarn google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
bun google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
--define "BEARER_TOKEN\$$\$$module\$$edevlet\$$nkoWorker=$(shell cat build/BEARER_TOKEN)" \ | ||
--define "CF_ACCOUNT_NAME\$$\$$module\$$edevlet\$$nkoWorker=$(CF_ACCOUNT_NAME)" \ | ||
--define "WORKER_NAME\$$\$$module\$$edevlet\$$nkoWorker=$(WORKER_NAME)" \ | ||
|
@@ -97,7 +97,7 @@ build/nkoWorker.js: edevlet/nkoWorker.js \ | |
--entry_point $< \ | ||
--js $(filter-out build/edevlet/pdfjs.js, $(filter %.js, $^)) \ | ||
--js_output_file $@.tmp | ||
yarn uglifyjs [email protected] -m -c toplevel,unsafe,drop_console -o [email protected] | ||
bun uglifyjs [email protected] -m -c toplevel,unsafe,drop_console -o [email protected] | ||
sed -i.bak 's/globalThis.NkoWorker=/export default/g' [email protected] | ||
cat build/edevlet/pdfjs.js [email protected] > $@ | ||
wc $@ | ||
|
@@ -106,7 +106,7 @@ build/nkoWorker.deployment: build/nkoWorker.js edevlet/nkoWorker.toml \ | |
signerNode/signerNode.config \ | ||
build/exposureReportWorker.deployment \ | ||
build/humanIDWorker.deployment | ||
yarn wrangler deploy $< --name $(WORKER_NAME)-nko-worker \ | ||
bun wrangler deploy $< --name $(WORKER_NAME)-nko-worker \ | ||
--compatibility-date $(shell date -v -1d +%Y-%m-%d) \ | ||
--config edevlet/nkoWorker.toml | ||
touch $@ | ||
|
@@ -115,7 +115,7 @@ build/oauth2Worker.deployment: build/oauth2Worker.js edevlet/nkoWorker.toml \ | |
signerNode/signerNode.config \ | ||
build/exposureReportWorker.deployment \ | ||
build/humanIDWorker.deployment | ||
yarn wrangler deploy $< --name $(WORKER_NAME)-oauth2-worker \ | ||
bun wrangler deploy $< --name $(WORKER_NAME)-oauth2-worker \ | ||
--compatibility-date $(shell date -v -1d +%Y-%m-%d) \ | ||
--config edevlet/oauth2Worker.toml | ||
touch $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ logpush = false | |
|
||
[vars] | ||
KIMLIKDAO_POW_THRESHOLD = "20000" | ||
|
||
[placement] | ||
mode = "smart" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ logpush = false | |
|
||
[vars] | ||
KIMLIKDAO_POW_THRESHOLD = "20000" | ||
|
||
[placement] | ||
mode = "smart" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import ipfs from '/lib/node/ipfs'; | ||
import ipfs from '@kimlikdao/lib/node/ipfs'; | ||
|
||
/** | ||
* @param {!Request} req | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
build/mina/mina.js: mina/mina.js mina/mina.d.js \ | ||
mina/MerkleTree.js \ | ||
$(lib)/cloudflare/moduleWorker.d.js \ | ||
$(lib)/cloudflare/durableObject.d.js \ | ||
$(lib)/cloudflare/types.d.js \ | ||
$(lib)/crypto/poseidon.js \ | ||
$(lib)/crypto/modular.js \ | ||
$(lib)/mina/merkleTree.d.js $(lib)/mina/mina.d.js \ | ||
$(lib)/util/hex.js | ||
mkdir -p $(dir $@) | ||
mkdir -p build/input/mina && cp -rf mina/* build/input/mina/ | ||
mkdir -p build/input/node_modules/@kimlikdao | ||
ln -sfn ../../../../$(lib) build/input/node_modules/@kimlikdao/lib | ||
sed -i.bak '/cloudflare:workers/d' build/input/mina/MerkleTree.js | ||
echo 'globalThis["MinaWorker"] = MinaWorker;\nglobalThis["MerkleTree"] = MerkleTree;' >> build/input/mina/mina.js | ||
cd build/input; bun google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \ | ||
--jscomp_error=checkTypes \ | ||
--jscomp_error=strictCheckTypes \ | ||
--jscomp_error=unusedLocalVariables \ | ||
--jscomp_error=reportUnknownTypes \ | ||
--emit_use_strict \ | ||
--language_in ECMASCRIPT_NEXT \ | ||
--module_resolution NODE \ | ||
--assume_function_wrapper \ | ||
--dependency_mode PRUNE \ | ||
--entry_point mina/mina.js \ | ||
--js $^ \ | ||
--js_output_file ../../$@ | ||
rm -rf build/input/mina | ||
bun uglifyjs $@ -m -c toplevel,unsafe,drop_console -o $@ | ||
bun $(lib)/birimler/bigintCompressor.js $@ | ||
wc $@ | ||
|
||
build/mina.deployment: build/mina/mina.js mina/prod.toml | ||
bun wrangler deploy $< --compatibility-date $(shell date -v -1d +%Y-%m-%d) \ | ||
--config mina/prod.toml |
Oops, something went wrong.