Build a web application
Using a template
fhevmjs
is working out of the box and we recommend you to use it. We also provide three GitHub templates to start your project with everything set.
React + TypeScript
VueJS + TypeScript
NextJS + Typescript
Using directly the library
First, you need to install the library.
Once the WASM is loaded, you can now create an instance. An instance receives an object containing:
chainId
(optional): the chainId of the networknetwork
(optional): the Eip1193 object provided bywindow.ethereum
(used to fetch the public key and/or chain id)networkUrl
(optional): the URL of the network (used to fetch the public key and/or chain id)publicKey
(optional): if the public key has been fetched separately (cache), you can provide itgatewayUrl
(optional): the URL of the gateway to retrieve a reencryptioncoprocessorUrl
(optional): the URL of the coprocessor
Last updated