mirror of
https://github.com/Discreetly/frontend.git
synced 2026-01-08 20:38:04 -05:00
limiting utils.ts size for cloudflare
This commit is contained in:
8
src/app.d.ts
vendored
8
src/app.d.ts
vendored
@@ -1,7 +1,13 @@
|
||||
// See https://kit.svelte.dev/docs/types#app
|
||||
// for information about these interfaces
|
||||
declare global {
|
||||
namespace App {}
|
||||
namespace App {
|
||||
interface Platform {
|
||||
env: { COUNTER: DurableObjectNamespace };
|
||||
context: { waitUntil(promise: Promise<any>): void };
|
||||
caches: CacheStorage & { default: Cache };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
||||
6
src/lib/prover.ts
Normal file
6
src/lib/prover.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { RLNProver } from 'rlnjs';
|
||||
|
||||
const wasmPath = '/rln/circuit.wasm';
|
||||
const zkeyPath = '/rln/final.zkey';
|
||||
const prover: RLNProver = new RLNProver(wasmPath, zkeyPath);
|
||||
export default prover;
|
||||
@@ -1,14 +1,11 @@
|
||||
import type { Identity } from '@semaphore-protocol/identity';
|
||||
import type { MessageI, RoomI, ServerI } from 'discreetly-interfaces';
|
||||
import { randomBigInt, genId, str2BigInt } from 'discreetly-interfaces';
|
||||
import { RLNProver, type RLNFullProof, type MerkleProof } from 'rlnjs';
|
||||
import { poseidon1 } from 'poseidon-lite/poseidon1';
|
||||
import { type RLNFullProof, type MerkleProof } from 'rlnjs';
|
||||
import { Group } from '@semaphore-protocol/group';
|
||||
import { poseidon1 } from 'poseidon-lite/poseidon1';
|
||||
import { poseidon2 } from 'poseidon-lite/poseidon2';
|
||||
|
||||
const wasmPath = '/rln/circuit.wasm';
|
||||
const zkeyPath = '/rln/final.zkey';
|
||||
const prover: RLNProver = new RLNProver(wasmPath, zkeyPath);
|
||||
import prover from './prover';
|
||||
|
||||
interface proofInputsI {
|
||||
rlnIdentifier: bigint;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import adapter from '@sveltejs/adapter-cloudflare';
|
||||
|
||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
@@ -19,9 +20,6 @@ const config = {
|
||||
}
|
||||
})
|
||||
},
|
||||
build: {
|
||||
sourcemap: true // Config vite to generate sourcemap when bundling.
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user