diff --git a/demos/taco-nft-demo/tsconfig.json b/demos/taco-nft-demo/tsconfig.json
index 6b7fb0d09..53ac5617c 100644
--- a/demos/taco-nft-demo/tsconfig.json
+++ b/demos/taco-nft-demo/tsconfig.json
@@ -6,11 +6,11 @@
"noEmit": true,
"resolveJsonModule": true,
"esModuleInterop": true,
- "skipLibCheck": true
+ "skipLibCheck": true,
},
"references": [
{
- "path": "../../packages/taco/tsconfig.es.json"
- }
- ]
+ "path": "../../packages/taco/tsconfig.es.json",
+ },
+ ],
}
diff --git a/demos/taco-nft-demo/webpack.config.js b/demos/taco-nft-demo/webpack.config.js
index 11c98381e..9bbd7185b 100644
--- a/demos/taco-nft-demo/webpack.config.js
+++ b/demos/taco-nft-demo/webpack.config.js
@@ -33,8 +33,8 @@ module.exports = {
DEFAULT_RITUAL_ID: JSON.stringify(process.env.DEFAULT_RITUAL_ID),
DEFAULT_DOMAIN: JSON.stringify(process.env.DEFAULT_DOMAIN),
},
- }
- })
+ },
+ }),
].filter(Boolean),
module: {
rules: [
diff --git a/examples/pre/nextjs/src/app/page.tsx b/examples/pre/nextjs/src/app/page.tsx
index 431db626e..6ca463030 100644
--- a/examples/pre/nextjs/src/app/page.tsx
+++ b/examples/pre/nextjs/src/app/page.tsx
@@ -10,7 +10,7 @@ import {
toHexString,
} from '@nucypher/pre';
import { ethers } from 'ethers';
-import { hexlify } from "ethers/lib/utils";
+import { hexlify } from 'ethers/lib/utils';
import { useEffect, useState } from 'react';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
diff --git a/examples/pre/nextjs/tsconfig.json b/examples/pre/nextjs/tsconfig.json
index e59724b28..4b8fa2e46 100644
--- a/examples/pre/nextjs/tsconfig.json
+++ b/examples/pre/nextjs/tsconfig.json
@@ -15,13 +15,13 @@
"incremental": true,
"plugins": [
{
- "name": "next"
- }
+ "name": "next",
+ },
],
"paths": {
- "@/*": ["./src/*"]
- }
+ "@/*": ["./src/*"],
+ },
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
- "exclude": ["node_modules"]
+ "exclude": ["node_modules"],
}
diff --git a/examples/pre/nodejs/tsconfig.json b/examples/pre/nodejs/tsconfig.json
index 08684819c..d956c8f11 100644
--- a/examples/pre/nodejs/tsconfig.json
+++ b/examples/pre/nodejs/tsconfig.json
@@ -4,11 +4,11 @@
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
- "noEmit": true
+ "noEmit": true,
},
"references": [
{
- "path": "../../../packages/pre/tsconfig.cjs.json"
- }
- ]
+ "path": "../../../packages/pre/tsconfig.cjs.json",
+ },
+ ],
}
diff --git a/examples/pre/react/src/App.tsx b/examples/pre/react/src/App.tsx
index dbc9faeb6..0afa5e7fe 100644
--- a/examples/pre/react/src/App.tsx
+++ b/examples/pre/react/src/App.tsx
@@ -9,7 +9,7 @@ import {
toHexString,
} from '@nucypher/pre';
import { ethers } from 'ethers';
-import { hexlify } from "ethers/lib/utils";
+import { hexlify } from 'ethers/lib/utils';
import { useEffect, useState } from 'react';
function App() {
diff --git a/examples/pre/react/tsconfig.json b/examples/pre/react/tsconfig.json
index 9d379a3c4..aca306ec8 100644
--- a/examples/pre/react/tsconfig.json
+++ b/examples/pre/react/tsconfig.json
@@ -14,7 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
- "jsx": "react-jsx"
+ "jsx": "react-jsx",
},
- "include": ["src"]
+ "include": ["src"],
}
diff --git a/examples/pre/webpack-5/tsconfig.json b/examples/pre/webpack-5/tsconfig.json
index e0e8b8a09..e6944705f 100644
--- a/examples/pre/webpack-5/tsconfig.json
+++ b/examples/pre/webpack-5/tsconfig.json
@@ -4,11 +4,11 @@
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
- "noEmit": true
+ "noEmit": true,
},
"references": [
{
- "path": "../../../packages/pre/tsconfig.es.json"
- }
- ]
+ "path": "../../../packages/pre/tsconfig.es.json",
+ },
+ ],
}
diff --git a/examples/taco/nextjs/src/app/layout.tsx b/examples/taco/nextjs/src/app/layout.tsx
index a048075ad..f00aeecb5 100644
--- a/examples/taco/nextjs/src/app/layout.tsx
+++ b/examples/taco/nextjs/src/app/layout.tsx
@@ -1,6 +1,6 @@
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
-import '../../styles/global.css'
+import '../../styles/global.css';
const inter = Inter({ subsets: ['latin'] });
diff --git a/examples/taco/nextjs/src/app/page.tsx b/examples/taco/nextjs/src/app/page.tsx
index 2fe2a84bf..fd5771efe 100644
--- a/examples/taco/nextjs/src/app/page.tsx
+++ b/examples/taco/nextjs/src/app/page.tsx
@@ -1,14 +1,12 @@
'use client';
-import {fromHexString} from "@nucypher/shared";
-import {conditions, domains, fromBytes, toHexString} from '@nucypher/taco';
-import {ethers} from 'ethers';
-import {hexlify} from 'ethers/lib/utils';
-import {useEffect, useState} from 'react';
+import { fromHexString } from '@nucypher/shared';
+import { conditions, domains, fromBytes, toHexString } from '@nucypher/taco';
+import { ethers } from 'ethers';
+import { hexlify } from 'ethers/lib/utils';
+import { useEffect, useState } from 'react';
import useTaco from '../hooks/useTaco';
-
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
declare const window: any;
@@ -19,12 +17,10 @@ function App() {
const [provider, setProvider] = useState<
ethers.providers.Web3Provider | undefined
>();
- const [message, setMessage] = useState('this is a secret')
- const [encrypting, setEncrypting] = useState(false)
- const [encryptedText, setEncryptedText] = useState
(
- '',
- );
- const [decrypting, setDecrypting] = useState(false)
+ const [message, setMessage] = useState('this is a secret');
+ const [encrypting, setEncrypting] = useState(false);
+ const [encryptedText, setEncryptedText] = useState('');
+ const [decrypting, setDecrypting] = useState(false);
const [decryptedMessage, setDecryptedMessage] = useState(
'',
);
@@ -87,18 +83,18 @@ function App() {
signer,
);
if (encryptedBytes) {
- setEncryptedText(toHexString(encryptedBytes))
+ setEncryptedText(toHexString(encryptedBytes));
}
} catch (e) {
- console.log(e)
+ console.log(e);
}
- setEncrypting(false)
- }
+ setEncrypting(false);
+ };
const decryptMessage = async () => {
- if(!encryptedText || !provider) return
+ if (!encryptedText || !provider) return;
try {
- setDecrypting(true)
+ setDecrypting(true);
const signer = provider.getSigner();
console.log('Decrypting message...');
@@ -110,15 +106,32 @@ function App() {
setDecryptedMessage(fromBytes(decryptedMessage));
}
} catch (e) {
- console.log(e)
+ console.log(e);
}
- setDecrypting(false)
+ setDecrypting(false);
};
return (
-
Secret message: setMessage(e.target.value)} onClick={encryptMessage}/> {encrypting && 'Encrypting...'}
- Encrypted message: setEncryptedText(e.target.value)} /> {decrypting && 'Decrypting...'}
+
+ Secret message:{' '}
+ setMessage(e.target.value)}
+ onClick={encryptMessage}
+ />{' '}
+ {' '}
+ {encrypting && 'Encrypting...'}
+
+
+ Encrypted message:{' '}
+ setEncryptedText(e.target.value)}
+ />{' '}
+ {' '}
+ {decrypting && 'Decrypting...'}
+
{decryptedMessage && Decrypted message: {decryptedMessage}
}
);
diff --git a/examples/taco/nextjs/tsconfig.build.json b/examples/taco/nextjs/tsconfig.build.json
index 22ff2bd0b..beb822b78 100644
--- a/examples/taco/nextjs/tsconfig.build.json
+++ b/examples/taco/nextjs/tsconfig.build.json
@@ -9,6 +9,9 @@
"references": [
{
"path": "../../../packages/taco/tsconfig.es.json"
+ },
+ {
+ "path": "../../../packages/taco-auth/tsconfig.es.json"
}
]
}
diff --git a/examples/taco/nextjs/tsconfig.json b/examples/taco/nextjs/tsconfig.json
index e59724b28..4b8fa2e46 100644
--- a/examples/taco/nextjs/tsconfig.json
+++ b/examples/taco/nextjs/tsconfig.json
@@ -15,13 +15,13 @@
"incremental": true,
"plugins": [
{
- "name": "next"
- }
+ "name": "next",
+ },
],
"paths": {
- "@/*": ["./src/*"]
- }
+ "@/*": ["./src/*"],
+ },
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
- "exclude": ["node_modules"]
+ "exclude": ["node_modules"],
}
diff --git a/examples/taco/nodejs/tsconfig.json b/examples/taco/nodejs/tsconfig.json
index aeb9f0525..50ed3c7ac 100644
--- a/examples/taco/nodejs/tsconfig.json
+++ b/examples/taco/nodejs/tsconfig.json
@@ -4,11 +4,11 @@
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
- "noEmit": true
+ "noEmit": true,
},
"references": [
{
- "path": "../../../packages/taco/tsconfig.cjs.json"
- }
- ]
+ "path": "../../../packages/taco/tsconfig.cjs.json",
+ },
+ ],
}
diff --git a/examples/taco/react/src/App.tsx b/examples/taco/react/src/App.tsx
index 6050685b5..481b856fd 100644
--- a/examples/taco/react/src/App.tsx
+++ b/examples/taco/react/src/App.tsx
@@ -1,8 +1,8 @@
-import {fromHexString} from "@nucypher/shared";
-import {conditions, domains, fromBytes, toHexString} from '@nucypher/taco';
-import {ethers} from 'ethers';
-import {hexlify} from 'ethers/lib/utils';
-import {useEffect, useState} from 'react';
+import { fromHexString } from '@nucypher/shared';
+import { conditions, domains, fromBytes, toHexString } from '@nucypher/taco';
+import { ethers } from 'ethers';
+import { hexlify } from 'ethers/lib/utils';
+import { useEffect, useState } from 'react';
import useTaco from './hooks/useTaco';
@@ -16,12 +16,10 @@ function App() {
const [provider, setProvider] = useState<
ethers.providers.Web3Provider | undefined
>();
- const [message, setMessage] = useState('this is a secret')
- const [encrypting, setEncrypting] = useState(false)
- const [encryptedText, setEncryptedText] = useState(
- '',
- );
- const [decrypting, setDecrypting] = useState(false)
+ const [message, setMessage] = useState('this is a secret');
+ const [encrypting, setEncrypting] = useState(false);
+ const [encryptedText, setEncryptedText] = useState('');
+ const [decrypting, setDecrypting] = useState(false);
const [decryptedMessage, setDecryptedMessage] = useState(
'',
);
@@ -84,13 +82,13 @@ function App() {
signer,
);
if (encryptedBytes) {
- setEncryptedText(toHexString(encryptedBytes))
+ setEncryptedText(toHexString(encryptedBytes));
}
} catch (e) {
- console.log(e)
+ console.log(e);
}
- setEncrypting(false)
- }
+ setEncrypting(false);
+ };
const decryptMessage = async () => {
if (!encryptedText || !provider) {
@@ -109,15 +107,32 @@ function App() {
setDecryptedMessage(fromBytes(decryptedMessage));
}
} catch (e) {
- console.log(e)
+ console.log(e);
}
- setDecrypting(false)
+ setDecrypting(false);
};
return (
-
Secret message: setMessage(e.target.value)} onClick={encryptMessage}/> {encrypting && 'Encrypting...'}
- Encrypted message: setEncryptedText(e.target.value)} /> {decrypting && 'Decrypting...'}
+
+ Secret message:{' '}
+ setMessage(e.target.value)}
+ onClick={encryptMessage}
+ />{' '}
+ {' '}
+ {encrypting && 'Encrypting...'}
+
+
+ Encrypted message:{' '}
+ setEncryptedText(e.target.value)}
+ />{' '}
+ {' '}
+ {decrypting && 'Decrypting...'}
+
{decryptedMessage && Decrypted message: {decryptedMessage}
}
);
diff --git a/examples/taco/react/src/index.tsx b/examples/taco/react/src/index.tsx
index 253d3f9b3..3f83eeaea 100644
--- a/examples/taco/react/src/index.tsx
+++ b/examples/taco/react/src/index.tsx
@@ -1,8 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
-import './index.css'
import App from './App';
+import './index.css';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement,
diff --git a/examples/taco/react/tsconfig.json b/examples/taco/react/tsconfig.json
index 9d379a3c4..aca306ec8 100644
--- a/examples/taco/react/tsconfig.json
+++ b/examples/taco/react/tsconfig.json
@@ -14,7 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
- "jsx": "react-jsx"
+ "jsx": "react-jsx",
},
- "include": ["src"]
+ "include": ["src"],
}
diff --git a/examples/taco/webpack-5/src/index.html b/examples/taco/webpack-5/src/index.html
index ad1f3fd35..6aaef3537 100644
--- a/examples/taco/webpack-5/src/index.html
+++ b/examples/taco/webpack-5/src/index.html
@@ -8,7 +8,8 @@
+ javascript in your browser.
Check console for results