diff --git a/.gitignore b/.gitignore index 0a6fee1..4bb6a53 100644 --- a/.gitignore +++ b/.gitignore @@ -129,3 +129,4 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* +.vercel diff --git a/.vscode/config.json b/.vscode/config.json new file mode 100644 index 0000000..fae8e3d --- /dev/null +++ b/.vscode/config.json @@ -0,0 +1,4 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true +} diff --git a/README.md b/README.md index 1c3e09b..28f6329 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Core libraries: - [React](https://react.dev) - Library for rendering UI and controlling basic state - [Vite](https://vitejs.dev) - Build library for client UIs +- [Openzeppelin](https://docs.openzeppelin.com/contracts/4.x/) - Library for writing secure and audited smart contracts +- [EAS](https://attest.sh) - Contracts for making attestations and verifying claims +- [Envio](https://envio.dev) - Indexer for querying and indexing blockchain data +- [Foundry](https://book.getfoundry.sh/getting-started/installation) - Library for compiling and deploying smart contracts ## Contributing @@ -48,7 +52,6 @@ If you would like to contribute here are the following steps: - Once done open a [PR](<[https://github.com/wefa-labs/wefa/pulls](https://github.com/Oba-One/web3-starter-kit/pulls)>) to merge into the development branch of the starter kit repo - Once approved make sure your branch is up to date with main and complete the merge. - ### test -```forge test --fork-url https://base-sepolia-rpc.publicnode.com -vvvv``` +`forge test --fork-url https://base-sepolia-rpc.publicnode.com -vvvv` diff --git a/package.json b/package.json index d3db60b..90747f9 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,15 @@ "deploy:arbitrum": "pnpm --filter 'contracts' run deploy:arbitrum --network arbitrum" }, "dependencies": { + "@ethereum-attestation-service/eas-sdk": "^2.5.0", "dotenv": "16.4.5", "ethers": "^6.13.2", "viem": "^2.19.6" }, "devDependencies": { + "@types/node": "22.5.1", "concurrently": "8.2.2", "prettier": "^3.3.3", - "typescript": "^5.5.4", "wait-port": "1.1.0" }, "engines": { diff --git a/packages/app/index.html b/packages/app/index.html deleted file mode 100644 index 7af9a51..0000000 --- a/packages/app/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - Camp Green App - - -
- - - diff --git a/packages/app/package.json b/packages/app/package.json deleted file mode 100644 index bc82b7b..0000000 --- a/packages/app/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "app", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" - }, - "dependencies": { - "@ethereum-attestation-service/eas-sdk": "2.5.0", - "@hookform/resolvers": "^3.3.4", - "@privy-io/react-auth": "1.77.0", - "@xstate/react": "3.2.2", - "graphql": "16.9.0", - "lucide-react": "^0.424.0", - "permissionless": "0.1.44", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-dropzone": "14.2.3", - "react-hook-form": "^7.51.0", - "react-hot-toast": "2.4.1", - "react-router-dom": "6.22.2", - "tailwindcss-animate": "^1.0.7", - "xstate": "4.38.2", - "zod": "^3.22.4" - }, - "devDependencies": { - "@types/node": "22.1.0", - "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^8.0.1", - "@typescript-eslint/parser": "^8.0.1", - "@vitejs/plugin-react": "^4.3.1", - "autoprefixer": "10.4.20", - "eslint": "^9.8.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.9", - "postcss": "8.4.41", - "preline": "2.4.1", - "tailwindcss": "3.4.1", - "vite": "^5.4.0", - "vite-plugin-mkcert": "1.17.5", - "vite-plugin-pwa": "0.20.1", - "vite-plugin-svgr": "4.2.0" - } -} diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx deleted file mode 100644 index d72d662..0000000 --- a/packages/app/src/App.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { Toaster } from "react-hot-toast"; - -import { useWeb3 } from "@/hooks/providers/web3"; -import { usePWA, InstallState } from "@/hooks/providers/pwa"; -import { CampaignsProvider } from "@/hooks/campaign/useCampaigns"; -import { ContributionsProvider } from "@/hooks/work/useContributions"; - -import Views from "@/views"; -import { Login } from "@/views/Login"; - -import { Appbar } from "@/components/Layout/AppBar"; -import { CircleLoader } from "@/components/Loader/Circle"; -import { OnlyMobile } from "@/components/Layout/OnlyMobile"; - -function App() { - const web3Props = useWeb3(); - const { installState } = usePWA(); - const isLoggedIn = !!web3Props.address; - - const Onboard: Record = { - idle: ( -
- -
- ), - installed: !isLoggedIn ? ( - <> - - - - ) : ( - - ), - prompt: null, - unsupported: , - }; - - return ( - - - {Onboard[installState]} - - - - ); -} - -export default App; diff --git a/packages/app/src/components/Actions.tsx b/packages/app/src/components/Actions.tsx deleted file mode 100644 index bbef1c5..0000000 --- a/packages/app/src/components/Actions.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Web3Props } from "../../hooks/providers/web3"; - -import { Button } from "../../../../client/src/components/Button"; - -interface ProfileActionsProps extends Web3Props {} - -export const ProfileActions: React.FC = ({ - error, - address, - logout, - login, -}) => { - return ( -
-
- ); -}; diff --git a/packages/app/src/components/Info.tsx b/packages/app/src/components/Info.tsx deleted file mode 100644 index ec6c36b..0000000 --- a/packages/app/src/components/Info.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { SpringValue, a } from "@react-spring/web"; - -interface ProfileInfoProps { - username?: string | null; - avatar?: string; - avatarSpring: { - opacity: SpringValue; - transform: SpringValue; - }; -} - -export const ProfileInfo: React.FC = ({ - avatar, - avatarSpring, - username, -}) => { - return ( - -
- profile avatar -
-
{username}
-
- ); -}; diff --git a/packages/app/src/constants.ts b/packages/app/src/constants.ts new file mode 100644 index 0000000..918da13 --- /dev/null +++ b/packages/app/src/constants.ts @@ -0,0 +1,6 @@ +export const WORK_SCHEMA_UID = + "0x9341009d07b8de3eb72b96ac42246c549f3e32636cb31a75961fbee6db44a0eb"; +export const WORK_APPROVAL_SCHEMA_UID = + "0x019249c30ec1d02ae41abb3fbbeeb56b9bbb2261cf94191fac73089308aa662a"; +export const GARDEN_ASSESSMENT_SCHEMA_UID = + "0x7433e24287be826b49e5eb28cd52192823e542521c94084a691e67e5cc7e8176"; diff --git a/packages/app/src/hooks/machine.ts b/packages/app/src/hooks/machine.ts deleted file mode 100644 index 4c58c3d..0000000 --- a/packages/app/src/hooks/machine.ts +++ /dev/null @@ -1,258 +0,0 @@ -import { createMachine, assign } from "xstate"; - -import { uploadMedia } from "@/modules/nftStorage"; - -export const EASContractAddress = "0xC2679fBD37d54388Ce493F1DB75320D236e1815e"; // Sepolia v0.26 - -export interface ContributionInfo { - value: number; - campaign: string; - title: string | null; - description: string | null; - media: { file: File; title: string; description: string } | null; - capitals: Capital[]; -} - -export interface ContributionContext { - info: ContributionInfo; - result: { - id: string | null; - }; - error: string | null; -} - -export const contributionMachine = createMachine( - { - id: "contribution", - description: - "Contribution machine for providing data of contribution for campaign.", - strict: true, - tsTypes: {} as import("./machine.typegen").Typegen0, - predictableActionArguments: true, - initial: "details", - schema: { - services: {} as { - mediaUploader: { - data: { - urls: string[]; - }; - }; - contributionAttester: { - data: { - id: string; - }; - }; - }, - context: { - info: { - value: 0, - campaign: "", - title: null, - description: null, - media: null, - capitals: [], - }, - result: { - id: null, - }, - error: null, - } as ContributionContext, - }, - states: { - idle: { - on: { - ATTEST_WORK: { - target: "details", - }, - }, - }, - details: { - on: { - NEXT: { - target: "campaign", - cond: "areDetailsValid", - actions: "saveDetails", - }, - CANCEL: { - target: "idle", - actions: "reset", - }, - }, - }, - // media: { - // on: { - // NEXT: { - // target: "campaign", - // cond: "isMediaValid", - // actions: "saveMedia", - // }, - // BACK: { - // target: "details", - // }, - // CANCEL: { - // target: "idle", - // actions: "reset", - // }, - // }, - // }, - campaign: { - on: { - NEXT: { - target: "review", - cond: "isCampaignValid", - actions: "saveCampaign", - }, - BACK: { - target: "details", - }, - CANCEL: { - target: "idle", - actions: "reset", - }, - }, - }, - review: { - on: { - ATTEST: { - target: "uploading_media", - }, - BACK: { - target: "campaign", - }, - CANCEL: { - target: "idle", - }, - }, - }, - uploading_media: { - invoke: { - id: "mediaUploader", - src: "mediaUploader", - onDone: { - target: "attesting_contribution", - }, - onError: { - target: "review", - actions: "error", - }, - }, - }, - attesting_contribution: { - invoke: { - id: "contributionAttester", - src: "contributionAttester", - onDone: { - target: "contribution_attested", - actions: "contributed", - }, - onError: { - target: "review", - actions: "error", - }, - }, - }, - contribution_attested: { - on: { - GO_HOME: { - target: "idle", - actions: ["goHome", "reset"], - }, - CONTRIBUTE_MORE: { - target: "details", - actions: "reset", - }, - }, - }, - }, - }, - { - delays: { - LIGHT_DELAY: (_context, _event) => { - return true; - }, - }, - guards: { - areDetailsValid: (_context, _event) => { - return true; - }, - isCampaignValid: (_context) => { - return true; - }, - }, - actions: { - saveDetails: assign((context, event) => { - console.log("saveDetails", context, event); - - return context; - }), - saveCampaign: assign((context, event) => { - console.log("saveCampaign", context, event); - - return context; - }), - contributed: assign((context, event) => { - console.log("contributed", context, event); - - return context; - }), - reset: assign((context, _event) => { - context.info.value = 0; - context.info.campaign = ""; - context.info.title = null; - context.info.description = null; - context.info.media = null; - context.info.capitals = []; - - context.result.id = null; - - context.error = null; - - return context; - }), - error: assign((context, event) => { - switch (event.type) { - case "error.platform.mediaUploader": - // context.image = null; - // context.element = null; - - // @ts-ignore - context.error = event.data.message; - break; - - case "error.platform.contributionAttester": - // @ts-ignore - context.error = event.data.message; - break; - - default: - break; - } - console.log("Error!", context, event); - - // toast.error(context.error || "Error with creature generator."); - - return context; - }), - }, - services: { - mediaUploader: async (context, _meta) => { - if (!context.info.media) { - return { - urls: [], - }; - } - - try { - const urls = await uploadMedia([context.info.media]); - - return { - urls, - }; - } catch (error) { - console.log("Media uploading failed!", error); - throw error; - } - }, - }, - } -); diff --git a/packages/app/src/hooks/machine.typegen.ts b/packages/app/src/hooks/machine.typegen.ts deleted file mode 100644 index a5db979..0000000 --- a/packages/app/src/hooks/machine.typegen.ts +++ /dev/null @@ -1,64 +0,0 @@ -// This file was automatically generated. Edits will be overwritten - -export interface Typegen0 { - "@@xstate/typegen": true; - internalEvents: { - "done.invoke.contributionAttester": { - type: "done.invoke.contributionAttester"; - data: unknown; - __tip: "See the XState TS docs to learn how to strongly type this."; - }; - "done.invoke.mediaUploader": { - type: "done.invoke.mediaUploader"; - data: unknown; - __tip: "See the XState TS docs to learn how to strongly type this."; - }; - "error.platform.contributionAttester": { - type: "error.platform.contributionAttester"; - data: unknown; - }; - "error.platform.mediaUploader": { - type: "error.platform.mediaUploader"; - data: unknown; - }; - "xstate.init": { type: "xstate.init" }; - }; - invokeSrcNameMap: { - contributionAttester: "done.invoke.contributionAttester"; - mediaUploader: "done.invoke.mediaUploader"; - }; - missingImplementations: { - actions: "goHome"; - delays: never; - guards: never; - services: "contributionAttester"; - }; - eventsCausingActions: { - contributed: "done.invoke.contributionAttester"; - error: - | "error.platform.contributionAttester" - | "error.platform.mediaUploader"; - goHome: "GO_HOME"; - reset: "CANCEL" | "CONTRIBUTE_MORE" | "GO_HOME"; - saveCampaign: "NEXT"; - saveDetails: "NEXT"; - }; - eventsCausingDelays: {}; - eventsCausingGuards: { - areDetailsValid: "NEXT"; - isCampaignValid: "NEXT"; - }; - eventsCausingServices: { - contributionAttester: "done.invoke.mediaUploader"; - mediaUploader: "ATTEST"; - }; - matchesStates: - | "attesting_contribution" - | "campaign" - | "contribution_attested" - | "details" - | "idle" - | "review" - | "uploading_media"; - tags: never; -} diff --git a/packages/app/src/hooks/useContribution.ts b/packages/app/src/hooks/useContribution.ts deleted file mode 100644 index adcea7c..0000000 --- a/packages/app/src/hooks/useContribution.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { useContributions } from "./useContributions"; - -export const EASContractAddress = "0xC2679fBD37d54388Ce493F1DB75320D236e1815e"; // Sepolia v0.26 - -interface ContributionDataProps extends Contribution {} - -export const useContribution = (id: string): ContributionDataProps => { - const { confirmationMap, contributionMap } = useContributions(); - - const confirmation = confirmationMap[id]; - const contribution = contributionMap[id]; - - console.log(contributionMap, confirmation); - - return { - ...contribution, - status: confirmation - ? confirmation.approval - ? "approved" - : "rejected" - : "pending", - }; -}; diff --git a/packages/app/src/hooks/useContributions.tsx b/packages/app/src/hooks/useContributions.tsx deleted file mode 100644 index 2709c7c..0000000 --- a/packages/app/src/hooks/useContributions.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { createContext, useContext } from "react"; -import { ApolloError, useQuery } from "@apollo/client"; - -import { useWeb3 } from "../providers/web3"; -import { - attestationClient, - userConfirmationsQuery, - userContributionsQuery, -} from "@/modules/apollo"; -import { mockContributions } from "@/lib/mockData"; - -export interface ContributionsDataProps { - address: string | null; - contributions: Contribution[]; - contributionMap: Record; - confirmationMap: Record; - contributionsError?: ApolloError; - confirmationsError?: ApolloError; -} - -const ContributionsContext = createContext(null); - -type Props = { - children: React.ReactNode; -}; - -export const ContributionsProvider = ({ children }: Props) => { - const currentValue = useContext(ContributionsContext); - - if (currentValue) - throw new Error("Contribution/Provider can only be used once"); - - const { address } = useWeb3(); - - const { data: contributionData } = useQuery(userContributionsQuery, { - client: attestationClient, - variables: { - where: { - attester: { - equals: address, - }, - }, - }, - }); - - const { data: confirmationData } = useQuery(userConfirmationsQuery, { - client: attestationClient, - variables: { - where: { - recipient: { - equals: address, - }, - }, - }, - }); - - const contributionMap: Record = {}; - const confirmationMap: Record = {}; - - console.log("confirmationData", confirmationData); - console.log("contributionData", contributionData); - - return ( - , contribution) => { - acc[contribution.id] = contribution; - return acc; - }, - {} - ), - confirmationMap, - }} - > - {children} - - ); -}; - -export const useContributions = () => { - const value = useContext(ContributionsContext); - if (!value) throw new Error("Must be used within a ContributionsProvider"); - return value; -}; diff --git a/packages/app/src/hooks/useMakeContribution.ts b/packages/app/src/hooks/useMakeContribution.ts deleted file mode 100644 index 5e34dc0..0000000 --- a/packages/app/src/hooks/useMakeContribution.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { useMachine } from "@xstate/react"; -import { useNavigate } from "react-router-dom"; -import { EAS, SchemaEncoder } from "@ethereum-attestation-service/eas-sdk"; - -import { EASContractAddress } from "@/lib/constants"; - -import { ContributionContext, contributionMachine } from "./machine"; - -export interface MakeContributionDataProps extends ContributionContext { - isIdle: boolean; - isDetails: boolean; - isCampaign: boolean; - isReview: boolean; - isUploading: boolean; - isAttesting: boolean; - isAttested: boolean; - contribute: () => void; - setDetails: (details: { title: string; description: string }) => void; - setCampaign: (campaign: string) => void; - attestContribution: () => void; - back: () => void; - cancel: () => void; - goHome: () => void; - contributeMore: () => void; -} - -export const useMakeContribution = (): MakeContributionDataProps => { - // const { getEthersProvider } = useWeb3(); - const navigate = useNavigate(); - - const [state, send] = useMachine(contributionMachine, { - actions: { - goHome: () => { - // Refetch contributions - navigate("home"); - }, - }, - services: { - contributionAttester: async (context, event) => { - console.log("Contribution attestation started!", context, event); - - const { campaign, title, description, capitals, value } = context.info; - const { data } = event; - - try { - // const signer = ethersProvider?.getSigner(); - - // if (!signer) { - // throw new Error("No signer found!"); - // } - - const eas = new EAS(EASContractAddress); - - // @ts-ignore - eas.connect(signer); - - // Initialize SchemaEncoder with the schema string - const schemaEncoder = new SchemaEncoder( - "uint256 value, address campaign, string title, string description, string[] media, string[] capitals" - ); - - const encodedData = schemaEncoder.encodeData([ - { name: "value", value: value, type: "uint256" }, - { name: "campaign", value: campaign, type: "address" }, - { name: "title", value: title ?? "", type: "string" }, - { - name: "description", - value: description ?? "", - type: "string", - }, - { name: "media", value: data.urls, type: "string[]" }, - { - name: "capitals", - value: capitals, - type: "string[]", - }, - ]); - - const schemaUID = ""; // TODO: Get the schema UID from the registry - - const tx = await eas.attest({ - schema: schemaUID, - data: { - recipient: "", - revocable: true, // Be aware that if your schema is not revocable, this MUST be false - data: encodedData, - }, - }); - - const newAttestationUID = await tx.wait(); - - console.log("New attestation UID:", newAttestationUID); - return { id: newAttestationUID }; - } catch (error) { - console.log("Contribution attestation failed!", error); - throw error; - } - }, - }, - }); - - function contribute() { - send("ATTEST_WORK"); - } - - function setDetails(details: { title: string; description: string }) { - if (state.matches("details")) { - send({ type: "NEXT", details }); - } - } - - function setCampaign(campaign: string) { - if (state.matches("campaign")) { - send({ type: "NEXT", campaign }); - } - } - - function back() { - if (state.matches("campaign") || state.matches("review")) { - send("BACK"); - } - } - - function cancel() { - if ( - state.matches("details") || - state.matches("campaign") || - state.matches("review") - ) { - send("CANCEL"); - } - } - - function attestContribution() { - if (state.matches("review")) { - send("ATTEST"); - } - } - - function goHome() { - if (state.matches("contribution_attested")) { - send("GO_HOME"); - } - } - - function contributeMore() { - if (state.matches("contribution_attested")) { - send("CONTRIBUTE_MORE"); - } - } - - return { - isIdle: state.matches("idle"), - isDetails: state.matches("details"), - isCampaign: state.matches("campaign"), - isReview: state.matches("review"), - isAttested: state.matches("contribution_attested"), - isAttesting: state.matches("attesting_contribution"), - isUploading: state.matches("uploading_media"), - ...state.context, - contribute, - setDetails, - setCampaign, - attestContribution, - back, - cancel, - goHome, - contributeMore, - }; -}; diff --git a/packages/app/src/hooks/useProfile.ts b/packages/app/src/hooks/useProfile.ts deleted file mode 100644 index 5636f9a..0000000 --- a/packages/app/src/hooks/useProfile.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { SpringValue, useSpring } from "@react-spring/web"; - -import { Web3Props, useWeb3 } from "../providers/web3"; - -export interface ProfileDataProps extends Web3Props { - name?: string | null; - avatar?: string | null; - avatarSpring: { - opacity: SpringValue; - transform: SpringValue; - }; -} - -export const useProfile = (): ProfileDataProps => { - const web3 = useWeb3(); - - const avatarSpring = useSpring({ - from: { opacity: 0, transform: "translate3d(0, -100%, 0)" }, - to: { opacity: 1, transform: "translate3d(0, 0%, 0)" }, - }); - - return { - name: web3.user?.email?.address, - avatar: web3.user?.farcaster?.pfp, - avatarSpring, - ...web3, - }; -}; diff --git a/packages/app/src/main.tsx b/packages/app/src/main.tsx deleted file mode 100644 index 9b485dd..0000000 --- a/packages/app/src/main.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import { ApolloProvider } from "@apollo/client"; -import { BrowserRouter } from "react-router-dom"; -import { arbitrum, arbitrumSepolia, foundry } from "viem/chains"; -import { PrivyProvider } from "@privy-io/react-auth"; - -import { contractClient } from "@/modules/apollo"; - -import { AppProvider } from "@/hooks/providers/app"; -import { Web3Provider } from "@/hooks/providers/web3"; - -import App from "@/App.tsx"; - -import "./index.css"; - -ReactDOM.createRoot(document.getElementById("root")!).render( - - - - - - - - - - - - - -); diff --git a/packages/app/src/types/greengoods.d.ts b/packages/app/src/types/greengoods.d.ts new file mode 100644 index 0000000..9f414c9 --- /dev/null +++ b/packages/app/src/types/greengoods.d.ts @@ -0,0 +1,5 @@ +declare interface Garden {} +declare interface GardenAssessment {} +declare interface Action {} +declare interface Work {} +declare interface WorkApproval {} diff --git a/packages/app/src/views/Contribute/index.tsx b/packages/app/src/views/Contribute/index.tsx deleted file mode 100644 index 706a077..0000000 --- a/packages/app/src/views/Contribute/index.tsx +++ /dev/null @@ -1,313 +0,0 @@ -import { z } from "zod"; -import React, { useState } from "react"; -import { useForm } from "react-hook-form"; -import { zodResolver } from "@hookform/resolvers/zod"; - -import { ContributeDataProps } from "@/hooks/views/useContribute"; - -import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, -} from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; -import { Button } from "@/components/ui/button"; -import { CircleLoader } from "@/components/Loader/Circle"; -import { MultiSelect } from "@/components/ui/multi-select"; - -interface ContributeProps extends ContributeDataProps {} - -const capitalOptions: Capital[] = [ - "Living", - "Social", - "Material", - "Cultural", - "Financial", - "Intellectual", - "Experiental", - "Spiritual", -]; - -const formSchema = z.object({ - title: z.string(), - description: z.string(), - details: z.string().url(), - capitals: z.array(z.string()), - value: z.number(), - image: z.instanceof(File), - campaign: z.string().optional(), -}); - -const Contribute: React.FC = ({ - isIdle, - isDetails, - isCampaign, - isReview, - isUploading, - isAttesting, - isAttested, - campaigns, - setDetails, - setCampaign, - attestContribution, - back, - cancel, - contributeMore, - goHome, - error, - info, -}) => { - console.log(info); - - const [preview, setPreview] = useState(null); - - const form = useForm>({ - resolver: zodResolver(formSchema), - defaultValues: { - title: info?.title || "", - description: info?.description || "", - capitals: [], - details: "", - campaign: info?.campaign || "", - value: info?.value || 0, - }, - }); - - async function handleImage(file: File | null) { - if (!file) { - return; - } - - const url = URL.createObjectURL(file); - - if (url) { - setPreview(url); - - const reader = new FileReader(); - reader.onloadend = () => { - const image = reader.result; - if (!image) { - console.log("No image"); - return; - } - }; - reader.readAsDataURL(file); - } - } - - function onSubmit(values: z.infer) { - if (isIdle) return; - if (isDetails) return setDetails(values); - if (isCampaign) return setCampaign(values.campaign ?? ""); - if (isReview) return attestContribution(); - if (isUploading) return; - if (isAttesting) return; - if (isAttested) return contributeMore(); - } - - return ( -
-
- -
- {isIdle ? null : isDetails ? ( -
- ( - - Username - - - - - This is your public display name. - - - - )} - /> - ( - - Username - - - - - This is your public display name. - - - - )} - /> - ( - - - - { - if (event.target.files) { - onChange(event.target.files[0]); - await handleImage(event.target.files[0]); - } - }} - // disabled={detecting} - /> - - - - This is your public display name. - {preview && ( -
- -
- )} -
- -
- )} - /> - ( - - Username - - ({ - label: capital, - value: capital, - }))} - selectAll={false} - selected={field.value} - /> - - - This is your public display name. - - - - )} - /> -
- ) : isCampaign ? ( -
-
    - {campaigns.map((campaign) => ( -
  • -
    {campaign.title}
    -
    {campaign.description}
    -
  • - ))} -
-
- ) : isReview ? ( -
-
Proof
- -
Title
-
Description
-
Capitals
-
Value
-
- ) : isUploading ? ( -
- -

Uploading Image

-
- ) : isAttesting ? ( -
- -

Attesting Contribution

-
- ) : isAttested ? ( -
-
Proof
- -
Title
-
Description
-
Value
-
- ) : null} -
-

{error}

-
- - -
-
- -
- ); -}; - -export default Contribute; diff --git a/packages/app/src/views/Home/Campaigns.tsx b/packages/app/src/views/Home/Campaigns.tsx deleted file mode 100644 index 2b41cad..0000000 --- a/packages/app/src/views/Home/Campaigns.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from "react"; -import { Outlet, useNavigate, useLocation } from "react-router-dom"; - -import { HomeDataProps } from "@/hooks/views/useHome"; - -interface CampaignsProps extends HomeDataProps {} - -const Campaigns: React.FC = ( - { - // address, - // confirmationMap, - // contributions, - } -) => { - const navigate = useNavigate(); - const location = useLocation(); - - function handleCardClick(id: string) { - navigate(`/campaigns/${id}`); - } - - return ( -
-
-

Campaigns

-
-
- {location.pathname === "/campaigns" ? ( -
    - {Array.from({ length: 5 }).map((_, index) => ( -
  • handleCardClick("")}> - {index} -
  • - ))} -
- ) : null} - -
- ); -}; - -export default Campaigns; diff --git a/packages/app/src/views/Home/Contributions.tsx b/packages/app/src/views/Home/Contributions.tsx deleted file mode 100644 index 4ad403c..0000000 --- a/packages/app/src/views/Home/Contributions.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from "react"; -import { Outlet, useNavigate, useLocation } from "react-router-dom"; - -import { HomeDataProps } from "@/hooks/views/useHome"; - -interface ContributionsProps extends HomeDataProps {} - -const Contributions: React.FC = ( - { - // address, - // confirmationMap, - // contributions, - } -) => { - const navigate = useNavigate(); - const location = useLocation(); - - function handleCardClick(id: string) { - navigate(`/contributions/${id}`); - } - - return ( -
-
-

Contributions

-
-
- {location.pathname === "/contributions" ? ( -
    - {Array.from({ length: 5 }).map((_, index) => ( -
  • handleCardClick("")}> - {index} -
  • - ))} -
- ) : null} - -
- ); -}; - -export default Contributions; diff --git a/packages/app/src/views/Home/index.tsx b/packages/app/src/views/Home/index.tsx deleted file mode 100644 index 5cf3027..0000000 --- a/packages/app/src/views/Home/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; - -import { HomeDataProps } from "@/hooks/views/useHome"; - -import { - Carousel, - CarouselContent, - CarouselItem, -} from "@/components/ui/carousel"; - -interface HomeProps extends HomeDataProps {} - -const Home: React.FC = ({}) => { - return ( -
-
-

Contributions

- - - {Array.from({ length: 5 }).map((_, index) => ( - -
{index}
-
- ))} -
-
-
-
-

Campaigns

- - - {Array.from({ length: 5 }).map((_, index) => ( - -
{index}
-
- ))} -
-
-
-
- ); -}; - -export default Home; diff --git a/packages/app/src/views/Login/index.tsx b/packages/app/src/views/Login/index.tsx deleted file mode 100644 index 3a717a2..0000000 --- a/packages/app/src/views/Login/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; - -import { Web3Props } from "../../hooks/providers/web3"; -import { Button } from "../../components/ui/button"; - -interface LoginProps extends Web3Props {} - -export const Login: React.FC = ({ error, login }) => { - return ( -
-
-
-
Welcome To
-

Camp Green

-
- Camp Green - -
-
- ); -}; diff --git a/packages/app/src/views/Profile/index.tsx b/packages/app/src/views/Profile/index.tsx index 83f9753..d91a5f6 100644 --- a/packages/app/src/views/Profile/index.tsx +++ b/packages/app/src/views/Profile/index.tsx @@ -1,9 +1,9 @@ import React from "react"; import { Web3Props } from "../../hooks/providers/web3"; -import { ProfileDataProps } from "../../hooks/useProfile"; +import { ProfileDataProps } from "../../../../client/src/views/Profile/useProfile"; -import { ProfileInfo } from "../../components/Info"; +import { ProfileInfo } from "../../../../client/src/views/Profile/Account"; import { ProfileActions } from "../../components/Profile/Actions"; interface ProfileProps extends ProfileDataProps, Web3Props {} diff --git a/packages/app/src/views/index.tsx b/packages/app/src/views/index.tsx deleted file mode 100644 index d98ac7c..0000000 --- a/packages/app/src/views/index.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { a, useTransition } from "@react-spring/web"; -import { Navigate, Route, Routes, useLocation } from "react-router-dom"; - -import { useHome } from "@/hooks/views/useHome"; -import { useProfile } from "@/hooks/useProfile"; -import { useContribute } from "@/hooks/views/useContribute"; - -import CampaignViewer from "@/components/Campaign/Viewer"; -import ContributionViewer from "@/components/Contriburion/Viewer"; - -import Home from "./Home"; -import Profile from "./Profile"; -import Contribute from "./Contribute"; -import Campaigns from "./Home/Campaigns"; -import Contributions from "./Home/Contributions"; - -export default function Views() { - const location = useLocation(); - const transitions = useTransition(location, { - from: { opacity: 0 }, - enter: { opacity: 1 }, - leave: { opacity: 0 }, - exitBeforeEnter: true, - config: { - tension: 300, - friction: 20, - clamp: true, - }, - }); - - const home = useHome(); - const contribute = useContribute(); - const profile = useProfile(); - - return transitions((style, location) => ( - - - } /> - }> - } /> - - }> - } /> - - } /> - } /> - } /> - - - )); -} diff --git a/packages/app/vite.config.ts b/packages/app/vite.config.ts deleted file mode 100644 index 53b1fc0..0000000 --- a/packages/app/vite.config.ts +++ /dev/null @@ -1,92 +0,0 @@ -import path from "path"; -import { defineConfig } from "vite"; -import svgr from "vite-plugin-svgr"; -import react from "@vitejs/plugin-react"; -import mkcert from "vite-plugin-mkcert"; -import { VitePWA } from "vite-plugin-pwa"; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - mkcert(), - react(), - svgr({ - svgrOptions: { - namedExport: "RC", - }, - }), - VitePWA({ - includeAssets: [ - "assets/favicon.ico", - "assets/logo-64.png", - "assets/logo-310.png", - "assets/world.png", - "assets/profile.png", - ], - injectRegister: "auto", - registerType: "autoUpdate", - devOptions: { - enabled: true, - }, - workbox: { - // globPatterns: ["**/*.{js,css,html,ico,png,svg}"], - }, - manifest: { - name: "Green Goods", - short_name: "Green Goods", - icons: [ - { - src: "assets/logo-64.png", - sizes: "64x64", - type: "image/png", - }, - { - src: "assets/logo-310.png", - sizes: "192X192", - type: "image/png", - }, - { - src: "assets/logo-310.png", - sizes: "512x512", - type: "image/png", - }, - ], - start_url: "/", - scope: "/", - display: "fullscreen", - orientation: "portrait-primary", - theme_color: "#fff", - background_color: "#000", - shortcuts: [ - { - name: "Profile", - description: "View your profile", - url: "/profile", - icons: [ - { - src: "assets/profile.png", - sizes: "64x64", - type: "image/png", - }, - ], - }, - ], - related_applications: [ - { - platform: "webapp", - url: "https://localhost:3001/manifest.webmanifest", - }, - ], - categories: [], - }, - }), - ], - resolve: { - alias: { - "@": path.resolve(__dirname, "./src"), - }, - }, - server: { - port: 3001, - }, -}); diff --git a/packages/client/.env.example b/packages/client/.env.example index 6cdcb1c..df05a03 100644 --- a/packages/client/.env.example +++ b/packages/client/.env.example @@ -4,5 +4,6 @@ VITE_PRIVY_APP_ID= VITE_PIMLICO_API_KEY= VITE_PINATA_API_KEY= +PINATA_API_KEY= PINATA_API_SECRET= -PINATA_API_JWT= \ No newline at end of file +PRIVY_APP_SECRET_ID= diff --git a/packages/client/api/users.ts b/packages/client/api/users.ts new file mode 100644 index 0000000..903e4bf --- /dev/null +++ b/packages/client/api/users.ts @@ -0,0 +1,31 @@ +import { PrivyClient } from "@privy-io/server-auth"; +import type { VercelRequest, VercelResponse } from "@vercel/node"; + +declare global { + namespace NodeJS { + interface ProcessEnv { + VITE_PRIVY_APP_ID?: string; + PINATA_API_KEY?: string; + PINATA_API_SECRET?: string; + PRIVY_APP_SECRET_ID?: string; + } + } +} + +export const config = { + // runtime: "nodejs", +}; + +const privy = new PrivyClient( + process.env.VITE_PRIVY_APP_ID!, + process.env.PRIVY_APP_SECRET_ID! +); + +export default async function handler( + _request: VercelRequest, + response: VercelResponse +) { + const users = await privy.getUsers(); + + response.status(200).json(users); +} diff --git a/packages/client/dev-dist/registerSW.js b/packages/client/dev-dist/registerSW.js new file mode 100644 index 0000000..1d5625f --- /dev/null +++ b/packages/client/dev-dist/registerSW.js @@ -0,0 +1 @@ +if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'classic' }) \ No newline at end of file diff --git a/packages/client/dev-dist/sw.js b/packages/client/dev-dist/sw.js new file mode 100644 index 0000000..01dd529 --- /dev/null +++ b/packages/client/dev-dist/sw.js @@ -0,0 +1,92 @@ +/** + * Copyright 2018 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// If the loader is already loaded, just stop. +if (!self.define) { + let registry = {}; + + // Used for `eval` and `importScripts` where we can't get script URL by other means. + // In both cases, it's safe to use a global var because those functions are synchronous. + let nextDefineUri; + + const singleRequire = (uri, parentUri) => { + uri = new URL(uri + ".js", parentUri).href; + return registry[uri] || ( + + new Promise(resolve => { + if ("document" in self) { + const script = document.createElement("script"); + script.src = uri; + script.onload = resolve; + document.head.appendChild(script); + } else { + nextDefineUri = uri; + importScripts(uri); + resolve(); + } + }) + + .then(() => { + let promise = registry[uri]; + if (!promise) { + throw new Error(`Module ${uri} didn’t register its module`); + } + return promise; + }) + ); + }; + + self.define = (depsNames, factory) => { + const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href; + if (registry[uri]) { + // Module is already loading or loaded. + return; + } + let exports = {}; + const require = depUri => singleRequire(depUri, uri); + const specialDeps = { + module: { uri }, + exports, + require + }; + registry[uri] = Promise.all(depsNames.map( + depName => specialDeps[depName] || require(depName) + )).then(deps => { + factory(...deps); + return exports; + }); + }; +} +define(['./workbox-c982e567'], (function (workbox) { 'use strict'; + + self.skipWaiting(); + workbox.clientsClaim(); + + /** + * The precacheAndRoute() method efficiently caches and responds to + * requests for URLs in the manifest. + * See https://goo.gl/S9QRab + */ + workbox.precacheAndRoute([{ + "url": "registerSW.js", + "revision": "3ca0b8505b4bec776b69afdba2768812" + }, { + "url": "index.html", + "revision": "0.9bt3crbamtg" + }], {}); + workbox.cleanupOutdatedCaches(); + workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { + allowlist: [/^\/$/] + })); + +})); diff --git a/packages/client/dev-dist/workbox-c982e567.js b/packages/client/dev-dist/workbox-c982e567.js new file mode 100644 index 0000000..077fa26 --- /dev/null +++ b/packages/client/dev-dist/workbox-c982e567.js @@ -0,0 +1,3391 @@ +define(['exports'], (function (exports) { 'use strict'; + + // @ts-ignore + try { + self['workbox:core:7.0.0'] && _(); + } catch (e) {} + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Claim any currently available clients once the service worker + * becomes active. This is normally used in conjunction with `skipWaiting()`. + * + * @memberof workbox-core + */ + function clientsClaim() { + self.addEventListener('activate', () => self.clients.claim()); + } + + /* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const logger = (() => { + // Don't overwrite this value if it's already set. + // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923 + if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) { + self.__WB_DISABLE_DEV_LOGS = false; + } + let inGroup = false; + const methodToColorMap = { + debug: `#7f8c8d`, + log: `#2ecc71`, + warn: `#f39c12`, + error: `#c0392b`, + groupCollapsed: `#3498db`, + groupEnd: null // No colored prefix on groupEnd + }; + const print = function (method, args) { + if (self.__WB_DISABLE_DEV_LOGS) { + return; + } + if (method === 'groupCollapsed') { + // Safari doesn't print all console.groupCollapsed() arguments: + // https://bugs.webkit.org/show_bug.cgi?id=182754 + if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + console[method](...args); + return; + } + } + const styles = [`background: ${methodToColorMap[method]}`, `border-radius: 0.5em`, `color: white`, `font-weight: bold`, `padding: 2px 0.5em`]; + // When in a group, the workbox prefix is not displayed. + const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; + console[method](...logPrefix, ...args); + if (method === 'groupCollapsed') { + inGroup = true; + } + if (method === 'groupEnd') { + inGroup = false; + } + }; + // eslint-disable-next-line @typescript-eslint/ban-types + const api = {}; + const loggerMethods = Object.keys(methodToColorMap); + for (const key of loggerMethods) { + const method = key; + api[method] = (...args) => { + print(method, args); + }; + } + return api; + })(); + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const messages = { + 'invalid-value': ({ + paramName, + validValueDescription, + value + }) => { + if (!paramName || !validValueDescription) { + throw new Error(`Unexpected input to 'invalid-value' error.`); + } + return `The '${paramName}' parameter was given a value with an ` + `unexpected value. ${validValueDescription} Received a value of ` + `${JSON.stringify(value)}.`; + }, + 'not-an-array': ({ + moduleName, + className, + funcName, + paramName + }) => { + if (!moduleName || !className || !funcName || !paramName) { + throw new Error(`Unexpected input to 'not-an-array' error.`); + } + return `The parameter '${paramName}' passed into ` + `'${moduleName}.${className}.${funcName}()' must be an array.`; + }, + 'incorrect-type': ({ + expectedType, + paramName, + moduleName, + className, + funcName + }) => { + if (!expectedType || !paramName || !moduleName || !funcName) { + throw new Error(`Unexpected input to 'incorrect-type' error.`); + } + const classNameStr = className ? `${className}.` : ''; + return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}` + `${funcName}()' must be of type ${expectedType}.`; + }, + 'incorrect-class': ({ + expectedClassName, + paramName, + moduleName, + className, + funcName, + isReturnValueProblem + }) => { + if (!expectedClassName || !moduleName || !funcName) { + throw new Error(`Unexpected input to 'incorrect-class' error.`); + } + const classNameStr = className ? `${className}.` : ''; + if (isReturnValueProblem) { + return `The return value from ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`; + } + return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`; + }, + 'missing-a-method': ({ + expectedMethod, + paramName, + moduleName, + className, + funcName + }) => { + if (!expectedMethod || !paramName || !moduleName || !className || !funcName) { + throw new Error(`Unexpected input to 'missing-a-method' error.`); + } + return `${moduleName}.${className}.${funcName}() expected the ` + `'${paramName}' parameter to expose a '${expectedMethod}' method.`; + }, + 'add-to-cache-list-unexpected-type': ({ + entry + }) => { + return `An unexpected entry was passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` + `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` + `strings with one or more characters, objects with a url property or ` + `Request objects.`; + }, + 'add-to-cache-list-conflicting-entries': ({ + firstEntry, + secondEntry + }) => { + if (!firstEntry || !secondEntry) { + throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`); + } + return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${firstEntry} but different revision details. Workbox is ` + `unable to cache and version the asset correctly. Please remove one ` + `of the entries.`; + }, + 'plugin-error-request-will-fetch': ({ + thrownErrorMessage + }) => { + if (!thrownErrorMessage) { + throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`); + } + return `An error was thrown by a plugins 'requestWillFetch()' method. ` + `The thrown error message was: '${thrownErrorMessage}'.`; + }, + 'invalid-cache-name': ({ + cacheNameId, + value + }) => { + if (!cacheNameId) { + throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`); + } + return `You must provide a name containing at least one character for ` + `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` + `'${JSON.stringify(value)}'`; + }, + 'unregister-route-but-not-found-with-method': ({ + method + }) => { + if (!method) { + throw new Error(`Unexpected input to ` + `'unregister-route-but-not-found-with-method' error.`); + } + return `The route you're trying to unregister was not previously ` + `registered for the method type '${method}'.`; + }, + 'unregister-route-route-not-registered': () => { + return `The route you're trying to unregister was not previously ` + `registered.`; + }, + 'queue-replay-failed': ({ + name + }) => { + return `Replaying the background sync queue '${name}' failed.`; + }, + 'duplicate-queue-name': ({ + name + }) => { + return `The Queue name '${name}' is already being used. ` + `All instances of backgroundSync.Queue must be given unique names.`; + }, + 'expired-test-without-max-age': ({ + methodName, + paramName + }) => { + return `The '${methodName}()' method can only be used when the ` + `'${paramName}' is used in the constructor.`; + }, + 'unsupported-route-type': ({ + moduleName, + className, + funcName, + paramName + }) => { + return `The supplied '${paramName}' parameter was an unsupported type. ` + `Please check the docs for ${moduleName}.${className}.${funcName} for ` + `valid input types.`; + }, + 'not-array-of-class': ({ + value, + expectedClass, + moduleName, + className, + funcName, + paramName + }) => { + return `The supplied '${paramName}' parameter must be an array of ` + `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` + `Please check the call to ${moduleName}.${className}.${funcName}() ` + `to fix the issue.`; + }, + 'max-entries-or-age-required': ({ + moduleName, + className, + funcName + }) => { + return `You must define either config.maxEntries or config.maxAgeSeconds` + `in ${moduleName}.${className}.${funcName}`; + }, + 'statuses-or-headers-required': ({ + moduleName, + className, + funcName + }) => { + return `You must define either config.statuses or config.headers` + `in ${moduleName}.${className}.${funcName}`; + }, + 'invalid-string': ({ + moduleName, + funcName, + paramName + }) => { + if (!paramName || !moduleName || !funcName) { + throw new Error(`Unexpected input to 'invalid-string' error.`); + } + return `When using strings, the '${paramName}' parameter must start with ` + `'http' (for cross-origin matches) or '/' (for same-origin matches). ` + `Please see the docs for ${moduleName}.${funcName}() for ` + `more info.`; + }, + 'channel-name-required': () => { + return `You must provide a channelName to construct a ` + `BroadcastCacheUpdate instance.`; + }, + 'invalid-responses-are-same-args': () => { + return `The arguments passed into responsesAreSame() appear to be ` + `invalid. Please ensure valid Responses are used.`; + }, + 'expire-custom-caches-only': () => { + return `You must provide a 'cacheName' property when using the ` + `expiration plugin with a runtime caching strategy.`; + }, + 'unit-must-be-bytes': ({ + normalizedRangeHeader + }) => { + if (!normalizedRangeHeader) { + throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`); + } + return `The 'unit' portion of the Range header must be set to 'bytes'. ` + `The Range header provided was "${normalizedRangeHeader}"`; + }, + 'single-range-only': ({ + normalizedRangeHeader + }) => { + if (!normalizedRangeHeader) { + throw new Error(`Unexpected input to 'single-range-only' error.`); + } + return `Multiple ranges are not supported. Please use a single start ` + `value, and optional end value. The Range header provided was ` + `"${normalizedRangeHeader}"`; + }, + 'invalid-range-values': ({ + normalizedRangeHeader + }) => { + if (!normalizedRangeHeader) { + throw new Error(`Unexpected input to 'invalid-range-values' error.`); + } + return `The Range header is missing both start and end values. At least ` + `one of those values is needed. The Range header provided was ` + `"${normalizedRangeHeader}"`; + }, + 'no-range-header': () => { + return `No Range header was found in the Request provided.`; + }, + 'range-not-satisfiable': ({ + size, + start, + end + }) => { + return `The start (${start}) and end (${end}) values in the Range are ` + `not satisfiable by the cached response, which is ${size} bytes.`; + }, + 'attempt-to-cache-non-get-request': ({ + url, + method + }) => { + return `Unable to cache '${url}' because it is a '${method}' request and ` + `only 'GET' requests can be cached.`; + }, + 'cache-put-with-no-response': ({ + url + }) => { + return `There was an attempt to cache '${url}' but the response was not ` + `defined.`; + }, + 'no-response': ({ + url, + error + }) => { + let message = `The strategy could not generate a response for '${url}'.`; + if (error) { + message += ` The underlying error is ${error}.`; + } + return message; + }, + 'bad-precaching-response': ({ + url, + status + }) => { + return `The precaching request for '${url}' failed` + (status ? ` with an HTTP status of ${status}.` : `.`); + }, + 'non-precached-url': ({ + url + }) => { + return `createHandlerBoundToURL('${url}') was called, but that URL is ` + `not precached. Please pass in a URL that is precached instead.`; + }, + 'add-to-cache-list-conflicting-integrities': ({ + url + }) => { + return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${url} with different integrity values. Please remove one of them.`; + }, + 'missing-precache-entry': ({ + cacheName, + url + }) => { + return `Unable to find a precached response in ${cacheName} for ${url}.`; + }, + 'cross-origin-copy-response': ({ + origin + }) => { + return `workbox-core.copyResponse() can only be used with same-origin ` + `responses. It was passed a response with origin ${origin}.`; + }, + 'opaque-streams-source': ({ + type + }) => { + const message = `One of the workbox-streams sources resulted in an ` + `'${type}' response.`; + if (type === 'opaqueredirect') { + return `${message} Please do not use a navigation request that results ` + `in a redirect as a source.`; + } + return `${message} Please ensure your sources are CORS-enabled.`; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const generatorFunction = (code, details = {}) => { + const message = messages[code]; + if (!message) { + throw new Error(`Unable to find message for code '${code}'.`); + } + return message(details); + }; + const messageGenerator = generatorFunction; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Workbox errors should be thrown with this class. + * This allows use to ensure the type easily in tests, + * helps developers identify errors from workbox + * easily and allows use to optimise error + * messages correctly. + * + * @private + */ + class WorkboxError extends Error { + /** + * + * @param {string} errorCode The error code that + * identifies this particular error. + * @param {Object=} details Any relevant arguments + * that will help developers identify issues should + * be added as a key on the context object. + */ + constructor(errorCode, details) { + const message = messageGenerator(errorCode, details); + super(message); + this.name = errorCode; + this.details = details; + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /* + * This method throws if the supplied value is not an array. + * The destructed values are required to produce a meaningful error for users. + * The destructed and restructured object is so it's clear what is + * needed. + */ + const isArray = (value, details) => { + if (!Array.isArray(value)) { + throw new WorkboxError('not-an-array', details); + } + }; + const hasMethod = (object, expectedMethod, details) => { + const type = typeof object[expectedMethod]; + if (type !== 'function') { + details['expectedMethod'] = expectedMethod; + throw new WorkboxError('missing-a-method', details); + } + }; + const isType = (object, expectedType, details) => { + if (typeof object !== expectedType) { + details['expectedType'] = expectedType; + throw new WorkboxError('incorrect-type', details); + } + }; + const isInstance = (object, + // Need the general type to do the check later. + // eslint-disable-next-line @typescript-eslint/ban-types + expectedClass, details) => { + if (!(object instanceof expectedClass)) { + details['expectedClassName'] = expectedClass.name; + throw new WorkboxError('incorrect-class', details); + } + }; + const isOneOf = (value, validValues, details) => { + if (!validValues.includes(value)) { + details['validValueDescription'] = `Valid values are ${JSON.stringify(validValues)}.`; + throw new WorkboxError('invalid-value', details); + } + }; + const isArrayOfClass = (value, + // Need general type to do check later. + expectedClass, + // eslint-disable-line + details) => { + const error = new WorkboxError('not-array-of-class', details); + if (!Array.isArray(value)) { + throw error; + } + for (const item of value) { + if (!(item instanceof expectedClass)) { + throw error; + } + } + }; + const finalAssertExports = { + hasMethod, + isArray, + isInstance, + isOneOf, + isType, + isArrayOfClass + }; + + // @ts-ignore + try { + self['workbox:routing:7.0.0'] && _(); + } catch (e) {} + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The default HTTP method, 'GET', used when there's no specific method + * configured for a route. + * + * @type {string} + * + * @private + */ + const defaultMethod = 'GET'; + /** + * The list of valid HTTP methods associated with requests that could be routed. + * + * @type {Array} + * + * @private + */ + const validMethods = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT']; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {function()|Object} handler Either a function, or an object with a + * 'handle' method. + * @return {Object} An object with a handle method. + * + * @private + */ + const normalizeHandler = handler => { + if (handler && typeof handler === 'object') { + { + finalAssertExports.hasMethod(handler, 'handle', { + moduleName: 'workbox-routing', + className: 'Route', + funcName: 'constructor', + paramName: 'handler' + }); + } + return handler; + } else { + { + finalAssertExports.isType(handler, 'function', { + moduleName: 'workbox-routing', + className: 'Route', + funcName: 'constructor', + paramName: 'handler' + }); + } + return { + handle: handler + }; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A `Route` consists of a pair of callback functions, "match" and "handler". + * The "match" callback determine if a route should be used to "handle" a + * request by returning a non-falsy value if it can. The "handler" callback + * is called when there is a match and should return a Promise that resolves + * to a `Response`. + * + * @memberof workbox-routing + */ + class Route { + /** + * Constructor for Route class. + * + * @param {workbox-routing~matchCallback} match + * A callback function that determines whether the route matches a given + * `fetch` event by returning a non-falsy value. + * @param {workbox-routing~handlerCallback} handler A callback + * function that returns a Promise resolving to a Response. + * @param {string} [method='GET'] The HTTP method to match the Route + * against. + */ + constructor(match, handler, method = defaultMethod) { + { + finalAssertExports.isType(match, 'function', { + moduleName: 'workbox-routing', + className: 'Route', + funcName: 'constructor', + paramName: 'match' + }); + if (method) { + finalAssertExports.isOneOf(method, validMethods, { + paramName: 'method' + }); + } + } + // These values are referenced directly by Router so cannot be + // altered by minificaton. + this.handler = normalizeHandler(handler); + this.match = match; + this.method = method; + } + /** + * + * @param {workbox-routing-handlerCallback} handler A callback + * function that returns a Promise resolving to a Response + */ + setCatchHandler(handler) { + this.catchHandler = normalizeHandler(handler); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * RegExpRoute makes it easy to create a regular expression based + * {@link workbox-routing.Route}. + * + * For same-origin requests the RegExp only needs to match part of the URL. For + * requests against third-party servers, you must define a RegExp that matches + * the start of the URL. + * + * @memberof workbox-routing + * @extends workbox-routing.Route + */ + class RegExpRoute extends Route { + /** + * If the regular expression contains + * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references}, + * the captured values will be passed to the + * {@link workbox-routing~handlerCallback} `params` + * argument. + * + * @param {RegExp} regExp The regular expression to match against URLs. + * @param {workbox-routing~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * @param {string} [method='GET'] The HTTP method to match the Route + * against. + */ + constructor(regExp, handler, method) { + { + finalAssertExports.isInstance(regExp, RegExp, { + moduleName: 'workbox-routing', + className: 'RegExpRoute', + funcName: 'constructor', + paramName: 'pattern' + }); + } + const match = ({ + url + }) => { + const result = regExp.exec(url.href); + // Return immediately if there's no match. + if (!result) { + return; + } + // Require that the match start at the first character in the URL string + // if it's a cross-origin request. + // See https://github.com/GoogleChrome/workbox/issues/281 for the context + // behind this behavior. + if (url.origin !== location.origin && result.index !== 0) { + { + logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` + `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` + `handle cross-origin requests if they match the entire URL.`); + } + return; + } + // If the route matches, but there aren't any capture groups defined, then + // this will return [], which is truthy and therefore sufficient to + // indicate a match. + // If there are capture groups, then it will return their values. + return result.slice(1); + }; + super(match, handler, method); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const getFriendlyURL = url => { + const urlObj = new URL(String(url), location.href); + // See https://github.com/GoogleChrome/workbox/issues/2323 + // We want to include everything, except for the origin if it's same-origin. + return urlObj.href.replace(new RegExp(`^${location.origin}`), ''); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The Router can be used to process a `FetchEvent` using one or more + * {@link workbox-routing.Route}, responding with a `Response` if + * a matching route exists. + * + * If no route matches a given a request, the Router will use a "default" + * handler if one is defined. + * + * Should the matching Route throw an error, the Router will use a "catch" + * handler if one is defined to gracefully deal with issues and respond with a + * Request. + * + * If a request matches multiple routes, the **earliest** registered route will + * be used to respond to the request. + * + * @memberof workbox-routing + */ + class Router { + /** + * Initializes a new Router. + */ + constructor() { + this._routes = new Map(); + this._defaultHandlerMap = new Map(); + } + /** + * @return {Map>} routes A `Map` of HTTP + * method name ('GET', etc.) to an array of all the corresponding `Route` + * instances that are registered. + */ + get routes() { + return this._routes; + } + /** + * Adds a fetch event listener to respond to events when a route matches + * the event's request. + */ + addFetchListener() { + // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 + self.addEventListener('fetch', event => { + const { + request + } = event; + const responsePromise = this.handleRequest({ + request, + event + }); + if (responsePromise) { + event.respondWith(responsePromise); + } + }); + } + /** + * Adds a message event listener for URLs to cache from the window. + * This is useful to cache resources loaded on the page prior to when the + * service worker started controlling it. + * + * The format of the message data sent from the window should be as follows. + * Where the `urlsToCache` array may consist of URL strings or an array of + * URL string + `requestInit` object (the same as you'd pass to `fetch()`). + * + * ``` + * { + * type: 'CACHE_URLS', + * payload: { + * urlsToCache: [ + * './script1.js', + * './script2.js', + * ['./script3.js', {mode: 'no-cors'}], + * ], + * }, + * } + * ``` + */ + addCacheListener() { + // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 + self.addEventListener('message', event => { + // event.data is type 'any' + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (event.data && event.data.type === 'CACHE_URLS') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const { + payload + } = event.data; + { + logger.debug(`Caching URLs from the window`, payload.urlsToCache); + } + const requestPromises = Promise.all(payload.urlsToCache.map(entry => { + if (typeof entry === 'string') { + entry = [entry]; + } + const request = new Request(...entry); + return this.handleRequest({ + request, + event + }); + // TODO(philipwalton): TypeScript errors without this typecast for + // some reason (probably a bug). The real type here should work but + // doesn't: `Array | undefined>`. + })); // TypeScript + event.waitUntil(requestPromises); + // If a MessageChannel was used, reply to the message on success. + if (event.ports && event.ports[0]) { + void requestPromises.then(() => event.ports[0].postMessage(true)); + } + } + }); + } + /** + * Apply the routing rules to a FetchEvent object to get a Response from an + * appropriate Route's handler. + * + * @param {Object} options + * @param {Request} options.request The request to handle. + * @param {ExtendableEvent} options.event The event that triggered the + * request. + * @return {Promise|undefined} A promise is returned if a + * registered route can handle the request. If there is no matching + * route and there's no `defaultHandler`, `undefined` is returned. + */ + handleRequest({ + request, + event + }) { + { + finalAssertExports.isInstance(request, Request, { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'handleRequest', + paramName: 'options.request' + }); + } + const url = new URL(request.url, location.href); + if (!url.protocol.startsWith('http')) { + { + logger.debug(`Workbox Router only supports URLs that start with 'http'.`); + } + return; + } + const sameOrigin = url.origin === location.origin; + const { + params, + route + } = this.findMatchingRoute({ + event, + request, + sameOrigin, + url + }); + let handler = route && route.handler; + const debugMessages = []; + { + if (handler) { + debugMessages.push([`Found a route to handle this request:`, route]); + if (params) { + debugMessages.push([`Passing the following params to the route's handler:`, params]); + } + } + } + // If we don't have a handler because there was no matching route, then + // fall back to defaultHandler if that's defined. + const method = request.method; + if (!handler && this._defaultHandlerMap.has(method)) { + { + debugMessages.push(`Failed to find a matching route. Falling ` + `back to the default handler for ${method}.`); + } + handler = this._defaultHandlerMap.get(method); + } + if (!handler) { + { + // No handler so Workbox will do nothing. If logs is set of debug + // i.e. verbose, we should print out this information. + logger.debug(`No route found for: ${getFriendlyURL(url)}`); + } + return; + } + { + // We have a handler, meaning Workbox is going to handle the route. + // print the routing details to the console. + logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`); + debugMessages.forEach(msg => { + if (Array.isArray(msg)) { + logger.log(...msg); + } else { + logger.log(msg); + } + }); + logger.groupEnd(); + } + // Wrap in try and catch in case the handle method throws a synchronous + // error. It should still callback to the catch handler. + let responsePromise; + try { + responsePromise = handler.handle({ + url, + request, + event, + params + }); + } catch (err) { + responsePromise = Promise.reject(err); + } + // Get route's catch handler, if it exists + const catchHandler = route && route.catchHandler; + if (responsePromise instanceof Promise && (this._catchHandler || catchHandler)) { + responsePromise = responsePromise.catch(async err => { + // If there's a route catch handler, process that first + if (catchHandler) { + { + // Still include URL here as it will be async from the console group + // and may not make sense without the URL + logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`); + logger.error(`Error thrown by:`, route); + logger.error(err); + logger.groupEnd(); + } + try { + return await catchHandler.handle({ + url, + request, + event, + params + }); + } catch (catchErr) { + if (catchErr instanceof Error) { + err = catchErr; + } + } + } + if (this._catchHandler) { + { + // Still include URL here as it will be async from the console group + // and may not make sense without the URL + logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`); + logger.error(`Error thrown by:`, route); + logger.error(err); + logger.groupEnd(); + } + return this._catchHandler.handle({ + url, + request, + event + }); + } + throw err; + }); + } + return responsePromise; + } + /** + * Checks a request and URL (and optionally an event) against the list of + * registered routes, and if there's a match, returns the corresponding + * route along with any params generated by the match. + * + * @param {Object} options + * @param {URL} options.url + * @param {boolean} options.sameOrigin The result of comparing `url.origin` + * against the current origin. + * @param {Request} options.request The request to match. + * @param {Event} options.event The corresponding event. + * @return {Object} An object with `route` and `params` properties. + * They are populated if a matching route was found or `undefined` + * otherwise. + */ + findMatchingRoute({ + url, + sameOrigin, + request, + event + }) { + const routes = this._routes.get(request.method) || []; + for (const route of routes) { + let params; + // route.match returns type any, not possible to change right now. + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const matchResult = route.match({ + url, + sameOrigin, + request, + event + }); + if (matchResult) { + { + // Warn developers that using an async matchCallback is almost always + // not the right thing to do. + if (matchResult instanceof Promise) { + logger.warn(`While routing ${getFriendlyURL(url)}, an async ` + `matchCallback function was used. Please convert the ` + `following route to use a synchronous matchCallback function:`, route); + } + } + // See https://github.com/GoogleChrome/workbox/issues/2079 + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + params = matchResult; + if (Array.isArray(params) && params.length === 0) { + // Instead of passing an empty array in as params, use undefined. + params = undefined; + } else if (matchResult.constructor === Object && + // eslint-disable-line + Object.keys(matchResult).length === 0) { + // Instead of passing an empty object in as params, use undefined. + params = undefined; + } else if (typeof matchResult === 'boolean') { + // For the boolean value true (rather than just something truth-y), + // don't set params. + // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353 + params = undefined; + } + // Return early if have a match. + return { + route, + params + }; + } + } + // If no match was found above, return and empty object. + return {}; + } + /** + * Define a default `handler` that's called when no routes explicitly + * match the incoming request. + * + * Each HTTP method ('GET', 'POST', etc.) gets its own default handler. + * + * Without a default handler, unmatched requests will go against the + * network as if there were no service worker present. + * + * @param {workbox-routing~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * @param {string} [method='GET'] The HTTP method to associate with this + * default handler. Each method has its own default. + */ + setDefaultHandler(handler, method = defaultMethod) { + this._defaultHandlerMap.set(method, normalizeHandler(handler)); + } + /** + * If a Route throws an error while handling a request, this `handler` + * will be called and given a chance to provide a response. + * + * @param {workbox-routing~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + */ + setCatchHandler(handler) { + this._catchHandler = normalizeHandler(handler); + } + /** + * Registers a route with the router. + * + * @param {workbox-routing.Route} route The route to register. + */ + registerRoute(route) { + { + finalAssertExports.isType(route, 'object', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route' + }); + finalAssertExports.hasMethod(route, 'match', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route' + }); + finalAssertExports.isType(route.handler, 'object', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route' + }); + finalAssertExports.hasMethod(route.handler, 'handle', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route.handler' + }); + finalAssertExports.isType(route.method, 'string', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route.method' + }); + } + if (!this._routes.has(route.method)) { + this._routes.set(route.method, []); + } + // Give precedence to all of the earlier routes by adding this additional + // route to the end of the array. + this._routes.get(route.method).push(route); + } + /** + * Unregisters a route with the router. + * + * @param {workbox-routing.Route} route The route to unregister. + */ + unregisterRoute(route) { + if (!this._routes.has(route.method)) { + throw new WorkboxError('unregister-route-but-not-found-with-method', { + method: route.method + }); + } + const routeIndex = this._routes.get(route.method).indexOf(route); + if (routeIndex > -1) { + this._routes.get(route.method).splice(routeIndex, 1); + } else { + throw new WorkboxError('unregister-route-route-not-registered'); + } + } + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let defaultRouter; + /** + * Creates a new, singleton Router instance if one does not exist. If one + * does already exist, that instance is returned. + * + * @private + * @return {Router} + */ + const getOrCreateDefaultRouter = () => { + if (!defaultRouter) { + defaultRouter = new Router(); + // The helpers that use the default Router assume these listeners exist. + defaultRouter.addFetchListener(); + defaultRouter.addCacheListener(); + } + return defaultRouter; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Easily register a RegExp, string, or function with a caching + * strategy to a singleton Router instance. + * + * This method will generate a Route for you if needed and + * call {@link workbox-routing.Router#registerRoute}. + * + * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture + * If the capture param is a `Route`, all other arguments will be ignored. + * @param {workbox-routing~handlerCallback} [handler] A callback + * function that returns a Promise resulting in a Response. This parameter + * is required if `capture` is not a `Route` object. + * @param {string} [method='GET'] The HTTP method to match the Route + * against. + * @return {workbox-routing.Route} The generated `Route`. + * + * @memberof workbox-routing + */ + function registerRoute(capture, handler, method) { + let route; + if (typeof capture === 'string') { + const captureUrl = new URL(capture, location.href); + { + if (!(capture.startsWith('/') || capture.startsWith('http'))) { + throw new WorkboxError('invalid-string', { + moduleName: 'workbox-routing', + funcName: 'registerRoute', + paramName: 'capture' + }); + } + // We want to check if Express-style wildcards are in the pathname only. + // TODO: Remove this log message in v4. + const valueToCheck = capture.startsWith('http') ? captureUrl.pathname : capture; + // See https://github.com/pillarjs/path-to-regexp#parameters + const wildcards = '[*:?+]'; + if (new RegExp(`${wildcards}`).exec(valueToCheck)) { + logger.debug(`The '$capture' parameter contains an Express-style wildcard ` + `character (${wildcards}). Strings are now always interpreted as ` + `exact matches; use a RegExp for partial or wildcard matches.`); + } + } + const matchCallback = ({ + url + }) => { + { + if (url.pathname === captureUrl.pathname && url.origin !== captureUrl.origin) { + logger.debug(`${capture} only partially matches the cross-origin URL ` + `${url.toString()}. This route will only handle cross-origin requests ` + `if they match the entire URL.`); + } + } + return url.href === captureUrl.href; + }; + // If `capture` is a string then `handler` and `method` must be present. + route = new Route(matchCallback, handler, method); + } else if (capture instanceof RegExp) { + // If `capture` is a `RegExp` then `handler` and `method` must be present. + route = new RegExpRoute(capture, handler, method); + } else if (typeof capture === 'function') { + // If `capture` is a function then `handler` and `method` must be present. + route = new Route(capture, handler, method); + } else if (capture instanceof Route) { + route = capture; + } else { + throw new WorkboxError('unsupported-route-type', { + moduleName: 'workbox-routing', + funcName: 'registerRoute', + paramName: 'capture' + }); + } + const defaultRouter = getOrCreateDefaultRouter(); + defaultRouter.registerRoute(route); + return route; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const _cacheNameDetails = { + googleAnalytics: 'googleAnalytics', + precache: 'precache-v2', + prefix: 'workbox', + runtime: 'runtime', + suffix: typeof registration !== 'undefined' ? registration.scope : '' + }; + const _createCacheName = cacheName => { + return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix].filter(value => value && value.length > 0).join('-'); + }; + const eachCacheNameDetail = fn => { + for (const key of Object.keys(_cacheNameDetails)) { + fn(key); + } + }; + const cacheNames = { + updateDetails: details => { + eachCacheNameDetail(key => { + if (typeof details[key] === 'string') { + _cacheNameDetails[key] = details[key]; + } + }); + }, + getGoogleAnalyticsName: userCacheName => { + return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics); + }, + getPrecacheName: userCacheName => { + return userCacheName || _createCacheName(_cacheNameDetails.precache); + }, + getPrefix: () => { + return _cacheNameDetails.prefix; + }, + getRuntimeName: userCacheName => { + return userCacheName || _createCacheName(_cacheNameDetails.runtime); + }, + getSuffix: () => { + return _cacheNameDetails.suffix; + } + }; + + /* + Copyright 2020 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A utility method that makes it easier to use `event.waitUntil` with + * async functions and return the result. + * + * @param {ExtendableEvent} event + * @param {Function} asyncFn + * @return {Function} + * @private + */ + function waitUntil(event, asyncFn) { + const returnPromise = asyncFn(); + event.waitUntil(returnPromise); + return returnPromise; + } + + // @ts-ignore + try { + self['workbox:precaching:7.0.0'] && _(); + } catch (e) {} + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + // Name of the search parameter used to store revision info. + const REVISION_SEARCH_PARAM = '__WB_REVISION__'; + /** + * Converts a manifest entry into a versioned URL suitable for precaching. + * + * @param {Object|string} entry + * @return {string} A URL with versioning info. + * + * @private + * @memberof workbox-precaching + */ + function createCacheKey(entry) { + if (!entry) { + throw new WorkboxError('add-to-cache-list-unexpected-type', { + entry + }); + } + // If a precache manifest entry is a string, it's assumed to be a versioned + // URL, like '/app.abcd1234.js'. Return as-is. + if (typeof entry === 'string') { + const urlObject = new URL(entry, location.href); + return { + cacheKey: urlObject.href, + url: urlObject.href + }; + } + const { + revision, + url + } = entry; + if (!url) { + throw new WorkboxError('add-to-cache-list-unexpected-type', { + entry + }); + } + // If there's just a URL and no revision, then it's also assumed to be a + // versioned URL. + if (!revision) { + const urlObject = new URL(url, location.href); + return { + cacheKey: urlObject.href, + url: urlObject.href + }; + } + // Otherwise, construct a properly versioned URL using the custom Workbox + // search parameter along with the revision info. + const cacheKeyURL = new URL(url, location.href); + const originalURL = new URL(url, location.href); + cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision); + return { + cacheKey: cacheKeyURL.href, + url: originalURL.href + }; + } + + /* + Copyright 2020 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A plugin, designed to be used with PrecacheController, to determine the + * of assets that were updated (or not updated) during the install event. + * + * @private + */ + class PrecacheInstallReportPlugin { + constructor() { + this.updatedURLs = []; + this.notUpdatedURLs = []; + this.handlerWillStart = async ({ + request, + state + }) => { + // TODO: `state` should never be undefined... + if (state) { + state.originalRequest = request; + } + }; + this.cachedResponseWillBeUsed = async ({ + event, + state, + cachedResponse + }) => { + if (event.type === 'install') { + if (state && state.originalRequest && state.originalRequest instanceof Request) { + // TODO: `state` should never be undefined... + const url = state.originalRequest.url; + if (cachedResponse) { + this.notUpdatedURLs.push(url); + } else { + this.updatedURLs.push(url); + } + } + } + return cachedResponse; + }; + } + } + + /* + Copyright 2020 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A plugin, designed to be used with PrecacheController, to translate URLs into + * the corresponding cache key, based on the current revision info. + * + * @private + */ + class PrecacheCacheKeyPlugin { + constructor({ + precacheController + }) { + this.cacheKeyWillBeUsed = async ({ + request, + params + }) => { + // Params is type any, can't change right now. + /* eslint-disable */ + const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) || this._precacheController.getCacheKeyForURL(request.url); + /* eslint-enable */ + return cacheKey ? new Request(cacheKey, { + headers: request.headers + }) : request; + }; + this._precacheController = precacheController; + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {string} groupTitle + * @param {Array} deletedURLs + * + * @private + */ + const logGroup = (groupTitle, deletedURLs) => { + logger.groupCollapsed(groupTitle); + for (const url of deletedURLs) { + logger.log(url); + } + logger.groupEnd(); + }; + /** + * @param {Array} deletedURLs + * + * @private + * @memberof workbox-precaching + */ + function printCleanupDetails(deletedURLs) { + const deletionCount = deletedURLs.length; + if (deletionCount > 0) { + logger.groupCollapsed(`During precaching cleanup, ` + `${deletionCount} cached ` + `request${deletionCount === 1 ? ' was' : 's were'} deleted.`); + logGroup('Deleted Cache Requests', deletedURLs); + logger.groupEnd(); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {string} groupTitle + * @param {Array} urls + * + * @private + */ + function _nestedGroup(groupTitle, urls) { + if (urls.length === 0) { + return; + } + logger.groupCollapsed(groupTitle); + for (const url of urls) { + logger.log(url); + } + logger.groupEnd(); + } + /** + * @param {Array} urlsToPrecache + * @param {Array} urlsAlreadyPrecached + * + * @private + * @memberof workbox-precaching + */ + function printInstallDetails(urlsToPrecache, urlsAlreadyPrecached) { + const precachedCount = urlsToPrecache.length; + const alreadyPrecachedCount = urlsAlreadyPrecached.length; + if (precachedCount || alreadyPrecachedCount) { + let message = `Precaching ${precachedCount} file${precachedCount === 1 ? '' : 's'}.`; + if (alreadyPrecachedCount > 0) { + message += ` ${alreadyPrecachedCount} ` + `file${alreadyPrecachedCount === 1 ? ' is' : 's are'} already cached.`; + } + logger.groupCollapsed(message); + _nestedGroup(`View newly precached URLs.`, urlsToPrecache); + _nestedGroup(`View previously precached URLs.`, urlsAlreadyPrecached); + logger.groupEnd(); + } + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let supportStatus; + /** + * A utility function that determines whether the current browser supports + * constructing a new `Response` from a `response.body` stream. + * + * @return {boolean} `true`, if the current browser can successfully + * construct a `Response` from a `response.body` stream, `false` otherwise. + * + * @private + */ + function canConstructResponseFromBodyStream() { + if (supportStatus === undefined) { + const testResponse = new Response(''); + if ('body' in testResponse) { + try { + new Response(testResponse.body); + supportStatus = true; + } catch (error) { + supportStatus = false; + } + } + supportStatus = false; + } + return supportStatus; + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Allows developers to copy a response and modify its `headers`, `status`, + * or `statusText` values (the values settable via a + * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax} + * object in the constructor). + * To modify these values, pass a function as the second argument. That + * function will be invoked with a single object with the response properties + * `{headers, status, statusText}`. The return value of this function will + * be used as the `ResponseInit` for the new `Response`. To change the values + * either modify the passed parameter(s) and return it, or return a totally + * new object. + * + * This method is intentionally limited to same-origin responses, regardless of + * whether CORS was used or not. + * + * @param {Response} response + * @param {Function} modifier + * @memberof workbox-core + */ + async function copyResponse(response, modifier) { + let origin = null; + // If response.url isn't set, assume it's cross-origin and keep origin null. + if (response.url) { + const responseURL = new URL(response.url); + origin = responseURL.origin; + } + if (origin !== self.location.origin) { + throw new WorkboxError('cross-origin-copy-response', { + origin + }); + } + const clonedResponse = response.clone(); + // Create a fresh `ResponseInit` object by cloning the headers. + const responseInit = { + headers: new Headers(clonedResponse.headers), + status: clonedResponse.status, + statusText: clonedResponse.statusText + }; + // Apply any user modifications. + const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit; + // Create the new response from the body stream and `ResponseInit` + // modifications. Note: not all browsers support the Response.body stream, + // so fall back to reading the entire body into memory as a blob. + const body = canConstructResponseFromBodyStream() ? clonedResponse.body : await clonedResponse.blob(); + return new Response(body, modifiedResponseInit); + } + + /* + Copyright 2020 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + function stripParams(fullURL, ignoreParams) { + const strippedURL = new URL(fullURL); + for (const param of ignoreParams) { + strippedURL.searchParams.delete(param); + } + return strippedURL.href; + } + /** + * Matches an item in the cache, ignoring specific URL params. This is similar + * to the `ignoreSearch` option, but it allows you to ignore just specific + * params (while continuing to match on the others). + * + * @private + * @param {Cache} cache + * @param {Request} request + * @param {Object} matchOptions + * @param {Array} ignoreParams + * @return {Promise} + */ + async function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) { + const strippedRequestURL = stripParams(request.url, ignoreParams); + // If the request doesn't include any ignored params, match as normal. + if (request.url === strippedRequestURL) { + return cache.match(request, matchOptions); + } + // Otherwise, match by comparing keys + const keysOptions = Object.assign(Object.assign({}, matchOptions), { + ignoreSearch: true + }); + const cacheKeys = await cache.keys(request, keysOptions); + for (const cacheKey of cacheKeys) { + const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams); + if (strippedRequestURL === strippedCacheKeyURL) { + return cache.match(cacheKey, matchOptions); + } + } + return; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The Deferred class composes Promises in a way that allows for them to be + * resolved or rejected from outside the constructor. In most cases promises + * should be used directly, but Deferreds can be necessary when the logic to + * resolve a promise must be separate. + * + * @private + */ + class Deferred { + /** + * Creates a promise and exposes its resolve and reject functions as methods. + */ + constructor() { + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + // Callbacks to be executed whenever there's a quota error. + // Can't change Function type right now. + // eslint-disable-next-line @typescript-eslint/ban-types + const quotaErrorCallbacks = new Set(); + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Runs all of the callback functions, one at a time sequentially, in the order + * in which they were registered. + * + * @memberof workbox-core + * @private + */ + async function executeQuotaErrorCallbacks() { + { + logger.log(`About to run ${quotaErrorCallbacks.size} ` + `callbacks to clean up caches.`); + } + for (const callback of quotaErrorCallbacks) { + await callback(); + { + logger.log(callback, 'is complete.'); + } + } + { + logger.log('Finished running callbacks.'); + } + } + + /* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Returns a promise that resolves and the passed number of milliseconds. + * This utility is an async/await-friendly version of `setTimeout`. + * + * @param {number} ms + * @return {Promise} + * @private + */ + function timeout(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } + + // @ts-ignore + try { + self['workbox:strategies:7.0.0'] && _(); + } catch (e) {} + + /* + Copyright 2020 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + function toRequest(input) { + return typeof input === 'string' ? new Request(input) : input; + } + /** + * A class created every time a Strategy instance instance calls + * {@link workbox-strategies.Strategy~handle} or + * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and + * cache actions around plugin callbacks and keeps track of when the strategy + * is "done" (i.e. all added `event.waitUntil()` promises have resolved). + * + * @memberof workbox-strategies + */ + class StrategyHandler { + /** + * Creates a new instance associated with the passed strategy and event + * that's handling the request. + * + * The constructor also initializes the state that will be passed to each of + * the plugins handling this request. + * + * @param {workbox-strategies.Strategy} strategy + * @param {Object} options + * @param {Request|string} options.request A request to run this strategy for. + * @param {ExtendableEvent} options.event The event associated with the + * request. + * @param {URL} [options.url] + * @param {*} [options.params] The return value from the + * {@link workbox-routing~matchCallback} (if applicable). + */ + constructor(strategy, options) { + this._cacheKeys = {}; + /** + * The request the strategy is performing (passed to the strategy's + * `handle()` or `handleAll()` method). + * @name request + * @instance + * @type {Request} + * @memberof workbox-strategies.StrategyHandler + */ + /** + * The event associated with this request. + * @name event + * @instance + * @type {ExtendableEvent} + * @memberof workbox-strategies.StrategyHandler + */ + /** + * A `URL` instance of `request.url` (if passed to the strategy's + * `handle()` or `handleAll()` method). + * Note: the `url` param will be present if the strategy was invoked + * from a workbox `Route` object. + * @name url + * @instance + * @type {URL|undefined} + * @memberof workbox-strategies.StrategyHandler + */ + /** + * A `param` value (if passed to the strategy's + * `handle()` or `handleAll()` method). + * Note: the `param` param will be present if the strategy was invoked + * from a workbox `Route` object and the + * {@link workbox-routing~matchCallback} returned + * a truthy value (it will be that value). + * @name params + * @instance + * @type {*|undefined} + * @memberof workbox-strategies.StrategyHandler + */ + { + finalAssertExports.isInstance(options.event, ExtendableEvent, { + moduleName: 'workbox-strategies', + className: 'StrategyHandler', + funcName: 'constructor', + paramName: 'options.event' + }); + } + Object.assign(this, options); + this.event = options.event; + this._strategy = strategy; + this._handlerDeferred = new Deferred(); + this._extendLifetimePromises = []; + // Copy the plugins list (since it's mutable on the strategy), + // so any mutations don't affect this handler instance. + this._plugins = [...strategy.plugins]; + this._pluginStateMap = new Map(); + for (const plugin of this._plugins) { + this._pluginStateMap.set(plugin, {}); + } + this.event.waitUntil(this._handlerDeferred.promise); + } + /** + * Fetches a given request (and invokes any applicable plugin callback + * methods) using the `fetchOptions` (for non-navigation requests) and + * `plugins` defined on the `Strategy` object. + * + * The following plugin lifecycle methods are invoked when using this method: + * - `requestWillFetch()` + * - `fetchDidSucceed()` + * - `fetchDidFail()` + * + * @param {Request|string} input The URL or request to fetch. + * @return {Promise} + */ + async fetch(input) { + const { + event + } = this; + let request = toRequest(input); + if (request.mode === 'navigate' && event instanceof FetchEvent && event.preloadResponse) { + const possiblePreloadResponse = await event.preloadResponse; + if (possiblePreloadResponse) { + { + logger.log(`Using a preloaded navigation response for ` + `'${getFriendlyURL(request.url)}'`); + } + return possiblePreloadResponse; + } + } + // If there is a fetchDidFail plugin, we need to save a clone of the + // original request before it's either modified by a requestWillFetch + // plugin or before the original request's body is consumed via fetch(). + const originalRequest = this.hasCallback('fetchDidFail') ? request.clone() : null; + try { + for (const cb of this.iterateCallbacks('requestWillFetch')) { + request = await cb({ + request: request.clone(), + event + }); + } + } catch (err) { + if (err instanceof Error) { + throw new WorkboxError('plugin-error-request-will-fetch', { + thrownErrorMessage: err.message + }); + } + } + // The request can be altered by plugins with `requestWillFetch` making + // the original request (most likely from a `fetch` event) different + // from the Request we make. Pass both to `fetchDidFail` to aid debugging. + const pluginFilteredRequest = request.clone(); + try { + let fetchResponse; + // See https://github.com/GoogleChrome/workbox/issues/1796 + fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions); + if ("development" !== 'production') { + logger.debug(`Network request for ` + `'${getFriendlyURL(request.url)}' returned a response with ` + `status '${fetchResponse.status}'.`); + } + for (const callback of this.iterateCallbacks('fetchDidSucceed')) { + fetchResponse = await callback({ + event, + request: pluginFilteredRequest, + response: fetchResponse + }); + } + return fetchResponse; + } catch (error) { + { + logger.log(`Network request for ` + `'${getFriendlyURL(request.url)}' threw an error.`, error); + } + // `originalRequest` will only exist if a `fetchDidFail` callback + // is being used (see above). + if (originalRequest) { + await this.runCallbacks('fetchDidFail', { + error: error, + event, + originalRequest: originalRequest.clone(), + request: pluginFilteredRequest.clone() + }); + } + throw error; + } + } + /** + * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on + * the response generated by `this.fetch()`. + * + * The call to `this.cachePut()` automatically invokes `this.waitUntil()`, + * so you do not have to manually call `waitUntil()` on the event. + * + * @param {Request|string} input The request or URL to fetch and cache. + * @return {Promise} + */ + async fetchAndCachePut(input) { + const response = await this.fetch(input); + const responseClone = response.clone(); + void this.waitUntil(this.cachePut(input, responseClone)); + return response; + } + /** + * Matches a request from the cache (and invokes any applicable plugin + * callback methods) using the `cacheName`, `matchOptions`, and `plugins` + * defined on the strategy object. + * + * The following plugin lifecycle methods are invoked when using this method: + * - cacheKeyWillByUsed() + * - cachedResponseWillByUsed() + * + * @param {Request|string} key The Request or URL to use as the cache key. + * @return {Promise} A matching response, if found. + */ + async cacheMatch(key) { + const request = toRequest(key); + let cachedResponse; + const { + cacheName, + matchOptions + } = this._strategy; + const effectiveRequest = await this.getCacheKey(request, 'read'); + const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { + cacheName + }); + cachedResponse = await caches.match(effectiveRequest, multiMatchOptions); + { + if (cachedResponse) { + logger.debug(`Found a cached response in '${cacheName}'.`); + } else { + logger.debug(`No cached response found in '${cacheName}'.`); + } + } + for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) { + cachedResponse = (await callback({ + cacheName, + matchOptions, + cachedResponse, + request: effectiveRequest, + event: this.event + })) || undefined; + } + return cachedResponse; + } + /** + * Puts a request/response pair in the cache (and invokes any applicable + * plugin callback methods) using the `cacheName` and `plugins` defined on + * the strategy object. + * + * The following plugin lifecycle methods are invoked when using this method: + * - cacheKeyWillByUsed() + * - cacheWillUpdate() + * - cacheDidUpdate() + * + * @param {Request|string} key The request or URL to use as the cache key. + * @param {Response} response The response to cache. + * @return {Promise} `false` if a cacheWillUpdate caused the response + * not be cached, and `true` otherwise. + */ + async cachePut(key, response) { + const request = toRequest(key); + // Run in the next task to avoid blocking other cache reads. + // https://github.com/w3c/ServiceWorker/issues/1397 + await timeout(0); + const effectiveRequest = await this.getCacheKey(request, 'write'); + { + if (effectiveRequest.method && effectiveRequest.method !== 'GET') { + throw new WorkboxError('attempt-to-cache-non-get-request', { + url: getFriendlyURL(effectiveRequest.url), + method: effectiveRequest.method + }); + } + // See https://github.com/GoogleChrome/workbox/issues/2818 + const vary = response.headers.get('Vary'); + if (vary) { + logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` + `has a 'Vary: ${vary}' header. ` + `Consider setting the {ignoreVary: true} option on your strategy ` + `to ensure cache matching and deletion works as expected.`); + } + } + if (!response) { + { + logger.error(`Cannot cache non-existent response for ` + `'${getFriendlyURL(effectiveRequest.url)}'.`); + } + throw new WorkboxError('cache-put-with-no-response', { + url: getFriendlyURL(effectiveRequest.url) + }); + } + const responseToCache = await this._ensureResponseSafeToCache(response); + if (!responseToCache) { + { + logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` + `will not be cached.`, responseToCache); + } + return false; + } + const { + cacheName, + matchOptions + } = this._strategy; + const cache = await self.caches.open(cacheName); + const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate'); + const oldResponse = hasCacheUpdateCallback ? await cacheMatchIgnoreParams( + // TODO(philipwalton): the `__WB_REVISION__` param is a precaching + // feature. Consider into ways to only add this behavior if using + // precaching. + cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions) : null; + { + logger.debug(`Updating the '${cacheName}' cache with a new Response ` + `for ${getFriendlyURL(effectiveRequest.url)}.`); + } + try { + await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache); + } catch (error) { + if (error instanceof Error) { + // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError + if (error.name === 'QuotaExceededError') { + await executeQuotaErrorCallbacks(); + } + throw error; + } + } + for (const callback of this.iterateCallbacks('cacheDidUpdate')) { + await callback({ + cacheName, + oldResponse, + newResponse: responseToCache.clone(), + request: effectiveRequest, + event: this.event + }); + } + return true; + } + /** + * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and + * executes any of those callbacks found in sequence. The final `Request` + * object returned by the last plugin is treated as the cache key for cache + * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have + * been registered, the passed request is returned unmodified + * + * @param {Request} request + * @param {string} mode + * @return {Promise} + */ + async getCacheKey(request, mode) { + const key = `${request.url} | ${mode}`; + if (!this._cacheKeys[key]) { + let effectiveRequest = request; + for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) { + effectiveRequest = toRequest(await callback({ + mode, + request: effectiveRequest, + event: this.event, + // params has a type any can't change right now. + params: this.params // eslint-disable-line + })); + } + this._cacheKeys[key] = effectiveRequest; + } + return this._cacheKeys[key]; + } + /** + * Returns true if the strategy has at least one plugin with the given + * callback. + * + * @param {string} name The name of the callback to check for. + * @return {boolean} + */ + hasCallback(name) { + for (const plugin of this._strategy.plugins) { + if (name in plugin) { + return true; + } + } + return false; + } + /** + * Runs all plugin callbacks matching the given name, in order, passing the + * given param object (merged ith the current plugin state) as the only + * argument. + * + * Note: since this method runs all plugins, it's not suitable for cases + * where the return value of a callback needs to be applied prior to calling + * the next callback. See + * {@link workbox-strategies.StrategyHandler#iterateCallbacks} + * below for how to handle that case. + * + * @param {string} name The name of the callback to run within each plugin. + * @param {Object} param The object to pass as the first (and only) param + * when executing each callback. This object will be merged with the + * current plugin state prior to callback execution. + */ + async runCallbacks(name, param) { + for (const callback of this.iterateCallbacks(name)) { + // TODO(philipwalton): not sure why `any` is needed. It seems like + // this should work with `as WorkboxPluginCallbackParam[C]`. + await callback(param); + } + } + /** + * Accepts a callback and returns an iterable of matching plugin callbacks, + * where each callback is wrapped with the current handler state (i.e. when + * you call each callback, whatever object parameter you pass it will + * be merged with the plugin's current state). + * + * @param {string} name The name fo the callback to run + * @return {Array} + */ + *iterateCallbacks(name) { + for (const plugin of this._strategy.plugins) { + if (typeof plugin[name] === 'function') { + const state = this._pluginStateMap.get(plugin); + const statefulCallback = param => { + const statefulParam = Object.assign(Object.assign({}, param), { + state + }); + // TODO(philipwalton): not sure why `any` is needed. It seems like + // this should work with `as WorkboxPluginCallbackParam[C]`. + return plugin[name](statefulParam); + }; + yield statefulCallback; + } + } + } + /** + * Adds a promise to the + * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises} + * of the event event associated with the request being handled (usually a + * `FetchEvent`). + * + * Note: you can await + * {@link workbox-strategies.StrategyHandler~doneWaiting} + * to know when all added promises have settled. + * + * @param {Promise} promise A promise to add to the extend lifetime promises + * of the event that triggered the request. + */ + waitUntil(promise) { + this._extendLifetimePromises.push(promise); + return promise; + } + /** + * Returns a promise that resolves once all promises passed to + * {@link workbox-strategies.StrategyHandler~waitUntil} + * have settled. + * + * Note: any work done after `doneWaiting()` settles should be manually + * passed to an event's `waitUntil()` method (not this handler's + * `waitUntil()` method), otherwise the service worker thread my be killed + * prior to your work completing. + */ + async doneWaiting() { + let promise; + while (promise = this._extendLifetimePromises.shift()) { + await promise; + } + } + /** + * Stops running the strategy and immediately resolves any pending + * `waitUntil()` promises. + */ + destroy() { + this._handlerDeferred.resolve(null); + } + /** + * This method will call cacheWillUpdate on the available plugins (or use + * status === 200) to determine if the Response is safe and valid to cache. + * + * @param {Request} options.request + * @param {Response} options.response + * @return {Promise} + * + * @private + */ + async _ensureResponseSafeToCache(response) { + let responseToCache = response; + let pluginsUsed = false; + for (const callback of this.iterateCallbacks('cacheWillUpdate')) { + responseToCache = (await callback({ + request: this.request, + response: responseToCache, + event: this.event + })) || undefined; + pluginsUsed = true; + if (!responseToCache) { + break; + } + } + if (!pluginsUsed) { + if (responseToCache && responseToCache.status !== 200) { + responseToCache = undefined; + } + { + if (responseToCache) { + if (responseToCache.status !== 200) { + if (responseToCache.status === 0) { + logger.warn(`The response for '${this.request.url}' ` + `is an opaque response. The caching strategy that you're ` + `using will not cache opaque responses by default.`); + } else { + logger.debug(`The response for '${this.request.url}' ` + `returned a status code of '${response.status}' and won't ` + `be cached as a result.`); + } + } + } + } + } + return responseToCache; + } + } + + /* + Copyright 2020 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * An abstract base class that all other strategy classes must extend from: + * + * @memberof workbox-strategies + */ + class Strategy { + /** + * Creates a new instance of the strategy and sets all documented option + * properties as public instance properties. + * + * Note: if a custom strategy class extends the base Strategy class and does + * not need more than these properties, it does not need to define its own + * constructor. + * + * @param {Object} [options] + * @param {string} [options.cacheName] Cache name to store and retrieve + * requests. Defaults to the cache names provided by + * {@link workbox-core.cacheNames}. + * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * to use in conjunction with this caching strategy. + * @param {Object} [options.fetchOptions] Values passed along to the + * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) + * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796) + * `fetch()` requests made by this strategy. + * @param {Object} [options.matchOptions] The + * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions} + * for any `cache.match()` or `cache.put()` calls made by this strategy. + */ + constructor(options = {}) { + /** + * Cache name to store and retrieve + * requests. Defaults to the cache names provided by + * {@link workbox-core.cacheNames}. + * + * @type {string} + */ + this.cacheName = cacheNames.getRuntimeName(options.cacheName); + /** + * The list + * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * used by this strategy. + * + * @type {Array} + */ + this.plugins = options.plugins || []; + /** + * Values passed along to the + * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters} + * of all fetch() requests made by this strategy. + * + * @type {Object} + */ + this.fetchOptions = options.fetchOptions; + /** + * The + * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions} + * for any `cache.match()` or `cache.put()` calls made by this strategy. + * + * @type {Object} + */ + this.matchOptions = options.matchOptions; + } + /** + * Perform a request strategy and returns a `Promise` that will resolve with + * a `Response`, invoking all relevant plugin callbacks. + * + * When a strategy instance is registered with a Workbox + * {@link workbox-routing.Route}, this method is automatically + * called when the route matches. + * + * Alternatively, this method can be used in a standalone `FetchEvent` + * listener by passing it to `event.respondWith()`. + * + * @param {FetchEvent|Object} options A `FetchEvent` or an object with the + * properties listed below. + * @param {Request|string} options.request A request to run this strategy for. + * @param {ExtendableEvent} options.event The event associated with the + * request. + * @param {URL} [options.url] + * @param {*} [options.params] + */ + handle(options) { + const [responseDone] = this.handleAll(options); + return responseDone; + } + /** + * Similar to {@link workbox-strategies.Strategy~handle}, but + * instead of just returning a `Promise` that resolves to a `Response` it + * it will return an tuple of `[response, done]` promises, where the former + * (`response`) is equivalent to what `handle()` returns, and the latter is a + * Promise that will resolve once any promises that were added to + * `event.waitUntil()` as part of performing the strategy have completed. + * + * You can await the `done` promise to ensure any extra work performed by + * the strategy (usually caching responses) completes successfully. + * + * @param {FetchEvent|Object} options A `FetchEvent` or an object with the + * properties listed below. + * @param {Request|string} options.request A request to run this strategy for. + * @param {ExtendableEvent} options.event The event associated with the + * request. + * @param {URL} [options.url] + * @param {*} [options.params] + * @return {Array} A tuple of [response, done] + * promises that can be used to determine when the response resolves as + * well as when the handler has completed all its work. + */ + handleAll(options) { + // Allow for flexible options to be passed. + if (options instanceof FetchEvent) { + options = { + event: options, + request: options.request + }; + } + const event = options.event; + const request = typeof options.request === 'string' ? new Request(options.request) : options.request; + const params = 'params' in options ? options.params : undefined; + const handler = new StrategyHandler(this, { + event, + request, + params + }); + const responseDone = this._getResponse(handler, request, event); + const handlerDone = this._awaitComplete(responseDone, handler, request, event); + // Return an array of promises, suitable for use with Promise.all(). + return [responseDone, handlerDone]; + } + async _getResponse(handler, request, event) { + await handler.runCallbacks('handlerWillStart', { + event, + request + }); + let response = undefined; + try { + response = await this._handle(request, handler); + // The "official" Strategy subclasses all throw this error automatically, + // but in case a third-party Strategy doesn't, ensure that we have a + // consistent failure when there's no response or an error response. + if (!response || response.type === 'error') { + throw new WorkboxError('no-response', { + url: request.url + }); + } + } catch (error) { + if (error instanceof Error) { + for (const callback of handler.iterateCallbacks('handlerDidError')) { + response = await callback({ + error, + event, + request + }); + if (response) { + break; + } + } + } + if (!response) { + throw error; + } else { + logger.log(`While responding to '${getFriendlyURL(request.url)}', ` + `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` + `a handlerDidError plugin.`); + } + } + for (const callback of handler.iterateCallbacks('handlerWillRespond')) { + response = await callback({ + event, + request, + response + }); + } + return response; + } + async _awaitComplete(responseDone, handler, request, event) { + let response; + let error; + try { + response = await responseDone; + } catch (error) { + // Ignore errors, as response errors should be caught via the `response` + // promise above. The `done` promise will only throw for errors in + // promises passed to `handler.waitUntil()`. + } + try { + await handler.runCallbacks('handlerDidRespond', { + event, + request, + response + }); + await handler.doneWaiting(); + } catch (waitUntilError) { + if (waitUntilError instanceof Error) { + error = waitUntilError; + } + } + await handler.runCallbacks('handlerDidComplete', { + event, + request, + response, + error: error + }); + handler.destroy(); + if (error) { + throw error; + } + } + } + /** + * Classes extending the `Strategy` based class should implement this method, + * and leverage the {@link workbox-strategies.StrategyHandler} + * arg to perform all fetching and cache logic, which will ensure all relevant + * cache, cache options, fetch options and plugins are used (per the current + * strategy instance). + * + * @name _handle + * @instance + * @abstract + * @function + * @param {Request} request + * @param {workbox-strategies.StrategyHandler} handler + * @return {Promise} + * + * @memberof workbox-strategies.Strategy + */ + + /* + Copyright 2020 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A {@link workbox-strategies.Strategy} implementation + * specifically designed to work with + * {@link workbox-precaching.PrecacheController} + * to both cache and fetch precached assets. + * + * Note: an instance of this class is created automatically when creating a + * `PrecacheController`; it's generally not necessary to create this yourself. + * + * @extends workbox-strategies.Strategy + * @memberof workbox-precaching + */ + class PrecacheStrategy extends Strategy { + /** + * + * @param {Object} [options] + * @param {string} [options.cacheName] Cache name to store and retrieve + * requests. Defaults to the cache names provided by + * {@link workbox-core.cacheNames}. + * @param {Array} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins} + * to use in conjunction with this caching strategy. + * @param {Object} [options.fetchOptions] Values passed along to the + * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init} + * of all fetch() requests made by this strategy. + * @param {Object} [options.matchOptions] The + * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions} + * for any `cache.match()` or `cache.put()` calls made by this strategy. + * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to + * get the response from the network if there's a precache miss. + */ + constructor(options = {}) { + options.cacheName = cacheNames.getPrecacheName(options.cacheName); + super(options); + this._fallbackToNetwork = options.fallbackToNetwork === false ? false : true; + // Redirected responses cannot be used to satisfy a navigation request, so + // any redirected response must be "copied" rather than cloned, so the new + // response doesn't contain the `redirected` flag. See: + // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1 + this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin); + } + /** + * @private + * @param {Request|string} request A request to run this strategy for. + * @param {workbox-strategies.StrategyHandler} handler The event that + * triggered the request. + * @return {Promise} + */ + async _handle(request, handler) { + const response = await handler.cacheMatch(request); + if (response) { + return response; + } + // If this is an `install` event for an entry that isn't already cached, + // then populate the cache. + if (handler.event && handler.event.type === 'install') { + return await this._handleInstall(request, handler); + } + // Getting here means something went wrong. An entry that should have been + // precached wasn't found in the cache. + return await this._handleFetch(request, handler); + } + async _handleFetch(request, handler) { + let response; + const params = handler.params || {}; + // Fall back to the network if we're configured to do so. + if (this._fallbackToNetwork) { + { + logger.warn(`The precached response for ` + `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` + `found. Falling back to the network.`); + } + const integrityInManifest = params.integrity; + const integrityInRequest = request.integrity; + const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest; + // Do not add integrity if the original request is no-cors + // See https://github.com/GoogleChrome/workbox/issues/3096 + response = await handler.fetch(new Request(request, { + integrity: request.mode !== 'no-cors' ? integrityInRequest || integrityInManifest : undefined + })); + // It's only "safe" to repair the cache if we're using SRI to guarantee + // that the response matches the precache manifest's expectations, + // and there's either a) no integrity property in the incoming request + // or b) there is an integrity, and it matches the precache manifest. + // See https://github.com/GoogleChrome/workbox/issues/2858 + // Also if the original request users no-cors we don't use integrity. + // See https://github.com/GoogleChrome/workbox/issues/3096 + if (integrityInManifest && noIntegrityConflict && request.mode !== 'no-cors') { + this._useDefaultCacheabilityPluginIfNeeded(); + const wasCached = await handler.cachePut(request, response.clone()); + { + if (wasCached) { + logger.log(`A response for ${getFriendlyURL(request.url)} ` + `was used to "repair" the precache.`); + } + } + } + } else { + // This shouldn't normally happen, but there are edge cases: + // https://github.com/GoogleChrome/workbox/issues/1441 + throw new WorkboxError('missing-precache-entry', { + cacheName: this.cacheName, + url: request.url + }); + } + { + const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read')); + // Workbox is going to handle the route. + // print the routing details to the console. + logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url)); + logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`); + logger.groupCollapsed(`View request details here.`); + logger.log(request); + logger.groupEnd(); + logger.groupCollapsed(`View response details here.`); + logger.log(response); + logger.groupEnd(); + logger.groupEnd(); + } + return response; + } + async _handleInstall(request, handler) { + this._useDefaultCacheabilityPluginIfNeeded(); + const response = await handler.fetch(request); + // Make sure we defer cachePut() until after we know the response + // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737 + const wasCached = await handler.cachePut(request, response.clone()); + if (!wasCached) { + // Throwing here will lead to the `install` handler failing, which + // we want to do if *any* of the responses aren't safe to cache. + throw new WorkboxError('bad-precaching-response', { + url: request.url, + status: response.status + }); + } + return response; + } + /** + * This method is complex, as there a number of things to account for: + * + * The `plugins` array can be set at construction, and/or it might be added to + * to at any time before the strategy is used. + * + * At the time the strategy is used (i.e. during an `install` event), there + * needs to be at least one plugin that implements `cacheWillUpdate` in the + * array, other than `copyRedirectedCacheableResponsesPlugin`. + * + * - If this method is called and there are no suitable `cacheWillUpdate` + * plugins, we need to add `defaultPrecacheCacheabilityPlugin`. + * + * - If this method is called and there is exactly one `cacheWillUpdate`, then + * we don't have to do anything (this might be a previously added + * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin). + * + * - If this method is called and there is more than one `cacheWillUpdate`, + * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so, + * we need to remove it. (This situation is unlikely, but it could happen if + * the strategy is used multiple times, the first without a `cacheWillUpdate`, + * and then later on after manually adding a custom `cacheWillUpdate`.) + * + * See https://github.com/GoogleChrome/workbox/issues/2737 for more context. + * + * @private + */ + _useDefaultCacheabilityPluginIfNeeded() { + let defaultPluginIndex = null; + let cacheWillUpdatePluginCount = 0; + for (const [index, plugin] of this.plugins.entries()) { + // Ignore the copy redirected plugin when determining what to do. + if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) { + continue; + } + // Save the default plugin's index, in case it needs to be removed. + if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) { + defaultPluginIndex = index; + } + if (plugin.cacheWillUpdate) { + cacheWillUpdatePluginCount++; + } + } + if (cacheWillUpdatePluginCount === 0) { + this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin); + } else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) { + // Only remove the default plugin; multiple custom plugins are allowed. + this.plugins.splice(defaultPluginIndex, 1); + } + // Nothing needs to be done if cacheWillUpdatePluginCount is 1 + } + } + PrecacheStrategy.defaultPrecacheCacheabilityPlugin = { + async cacheWillUpdate({ + response + }) { + if (!response || response.status >= 400) { + return null; + } + return response; + } + }; + PrecacheStrategy.copyRedirectedCacheableResponsesPlugin = { + async cacheWillUpdate({ + response + }) { + return response.redirected ? await copyResponse(response) : response; + } + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Performs efficient precaching of assets. + * + * @memberof workbox-precaching + */ + class PrecacheController { + /** + * Create a new PrecacheController. + * + * @param {Object} [options] + * @param {string} [options.cacheName] The cache to use for precaching. + * @param {string} [options.plugins] Plugins to use when precaching as well + * as responding to fetch events for precached assets. + * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to + * get the response from the network if there's a precache miss. + */ + constructor({ + cacheName, + plugins = [], + fallbackToNetwork = true + } = {}) { + this._urlsToCacheKeys = new Map(); + this._urlsToCacheModes = new Map(); + this._cacheKeysToIntegrities = new Map(); + this._strategy = new PrecacheStrategy({ + cacheName: cacheNames.getPrecacheName(cacheName), + plugins: [...plugins, new PrecacheCacheKeyPlugin({ + precacheController: this + })], + fallbackToNetwork + }); + // Bind the install and activate methods to the instance. + this.install = this.install.bind(this); + this.activate = this.activate.bind(this); + } + /** + * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and + * used to cache assets and respond to fetch events. + */ + get strategy() { + return this._strategy; + } + /** + * Adds items to the precache list, removing any duplicates and + * stores the files in the + * {@link workbox-core.cacheNames|"precache cache"} when the service + * worker installs. + * + * This method can be called multiple times. + * + * @param {Array} [entries=[]] Array of entries to precache. + */ + precache(entries) { + this.addToCacheList(entries); + if (!this._installAndActiveListenersAdded) { + self.addEventListener('install', this.install); + self.addEventListener('activate', this.activate); + this._installAndActiveListenersAdded = true; + } + } + /** + * This method will add items to the precache list, removing duplicates + * and ensuring the information is valid. + * + * @param {Array} entries + * Array of entries to precache. + */ + addToCacheList(entries) { + { + finalAssertExports.isArray(entries, { + moduleName: 'workbox-precaching', + className: 'PrecacheController', + funcName: 'addToCacheList', + paramName: 'entries' + }); + } + const urlsToWarnAbout = []; + for (const entry of entries) { + // See https://github.com/GoogleChrome/workbox/issues/2259 + if (typeof entry === 'string') { + urlsToWarnAbout.push(entry); + } else if (entry && entry.revision === undefined) { + urlsToWarnAbout.push(entry.url); + } + const { + cacheKey, + url + } = createCacheKey(entry); + const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default'; + if (this._urlsToCacheKeys.has(url) && this._urlsToCacheKeys.get(url) !== cacheKey) { + throw new WorkboxError('add-to-cache-list-conflicting-entries', { + firstEntry: this._urlsToCacheKeys.get(url), + secondEntry: cacheKey + }); + } + if (typeof entry !== 'string' && entry.integrity) { + if (this._cacheKeysToIntegrities.has(cacheKey) && this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) { + throw new WorkboxError('add-to-cache-list-conflicting-integrities', { + url + }); + } + this._cacheKeysToIntegrities.set(cacheKey, entry.integrity); + } + this._urlsToCacheKeys.set(url, cacheKey); + this._urlsToCacheModes.set(url, cacheMode); + if (urlsToWarnAbout.length > 0) { + const warningMessage = `Workbox is precaching URLs without revision ` + `info: ${urlsToWarnAbout.join(', ')}\nThis is generally NOT safe. ` + `Learn more at https://bit.ly/wb-precache`; + { + logger.warn(warningMessage); + } + } + } + } + /** + * Precaches new and updated assets. Call this method from the service worker + * install event. + * + * Note: this method calls `event.waitUntil()` for you, so you do not need + * to call it yourself in your event handlers. + * + * @param {ExtendableEvent} event + * @return {Promise} + */ + install(event) { + // waitUntil returns Promise + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return waitUntil(event, async () => { + const installReportPlugin = new PrecacheInstallReportPlugin(); + this.strategy.plugins.push(installReportPlugin); + // Cache entries one at a time. + // See https://github.com/GoogleChrome/workbox/issues/2528 + for (const [url, cacheKey] of this._urlsToCacheKeys) { + const integrity = this._cacheKeysToIntegrities.get(cacheKey); + const cacheMode = this._urlsToCacheModes.get(url); + const request = new Request(url, { + integrity, + cache: cacheMode, + credentials: 'same-origin' + }); + await Promise.all(this.strategy.handleAll({ + params: { + cacheKey + }, + request, + event + })); + } + const { + updatedURLs, + notUpdatedURLs + } = installReportPlugin; + { + printInstallDetails(updatedURLs, notUpdatedURLs); + } + return { + updatedURLs, + notUpdatedURLs + }; + }); + } + /** + * Deletes assets that are no longer present in the current precache manifest. + * Call this method from the service worker activate event. + * + * Note: this method calls `event.waitUntil()` for you, so you do not need + * to call it yourself in your event handlers. + * + * @param {ExtendableEvent} event + * @return {Promise} + */ + activate(event) { + // waitUntil returns Promise + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return waitUntil(event, async () => { + const cache = await self.caches.open(this.strategy.cacheName); + const currentlyCachedRequests = await cache.keys(); + const expectedCacheKeys = new Set(this._urlsToCacheKeys.values()); + const deletedURLs = []; + for (const request of currentlyCachedRequests) { + if (!expectedCacheKeys.has(request.url)) { + await cache.delete(request); + deletedURLs.push(request.url); + } + } + { + printCleanupDetails(deletedURLs); + } + return { + deletedURLs + }; + }); + } + /** + * Returns a mapping of a precached URL to the corresponding cache key, taking + * into account the revision information for the URL. + * + * @return {Map} A URL to cache key mapping. + */ + getURLsToCacheKeys() { + return this._urlsToCacheKeys; + } + /** + * Returns a list of all the URLs that have been precached by the current + * service worker. + * + * @return {Array} The precached URLs. + */ + getCachedURLs() { + return [...this._urlsToCacheKeys.keys()]; + } + /** + * Returns the cache key used for storing a given URL. If that URL is + * unversioned, like `/index.html', then the cache key will be the original + * URL with a search parameter appended to it. + * + * @param {string} url A URL whose cache key you want to look up. + * @return {string} The versioned URL that corresponds to a cache key + * for the original URL, or undefined if that URL isn't precached. + */ + getCacheKeyForURL(url) { + const urlObject = new URL(url, location.href); + return this._urlsToCacheKeys.get(urlObject.href); + } + /** + * @param {string} url A cache key whose SRI you want to look up. + * @return {string} The subresource integrity associated with the cache key, + * or undefined if it's not set. + */ + getIntegrityForCacheKey(cacheKey) { + return this._cacheKeysToIntegrities.get(cacheKey); + } + /** + * This acts as a drop-in replacement for + * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match) + * with the following differences: + * + * - It knows what the name of the precache is, and only checks in that cache. + * - It allows you to pass in an "original" URL without versioning parameters, + * and it will automatically look up the correct cache key for the currently + * active revision of that URL. + * + * E.g., `matchPrecache('index.html')` will find the correct precached + * response for the currently active service worker, even if the actual cache + * key is `'/index.html?__WB_REVISION__=1234abcd'`. + * + * @param {string|Request} request The key (without revisioning parameters) + * to look up in the precache. + * @return {Promise} + */ + async matchPrecache(request) { + const url = request instanceof Request ? request.url : request; + const cacheKey = this.getCacheKeyForURL(url); + if (cacheKey) { + const cache = await self.caches.open(this.strategy.cacheName); + return cache.match(cacheKey); + } + return undefined; + } + /** + * Returns a function that looks up `url` in the precache (taking into + * account revision information), and returns the corresponding `Response`. + * + * @param {string} url The precached URL which will be used to lookup the + * `Response`. + * @return {workbox-routing~handlerCallback} + */ + createHandlerBoundToURL(url) { + const cacheKey = this.getCacheKeyForURL(url); + if (!cacheKey) { + throw new WorkboxError('non-precached-url', { + url + }); + } + return options => { + options.request = new Request(url); + options.params = Object.assign({ + cacheKey + }, options.params); + return this.strategy.handle(options); + }; + } + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let precacheController; + /** + * @return {PrecacheController} + * @private + */ + const getOrCreatePrecacheController = () => { + if (!precacheController) { + precacheController = new PrecacheController(); + } + return precacheController; + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Removes any URL search parameters that should be ignored. + * + * @param {URL} urlObject The original URL. + * @param {Array} ignoreURLParametersMatching RegExps to test against + * each search parameter name. Matches mean that the search parameter should be + * ignored. + * @return {URL} The URL with any ignored search parameters removed. + * + * @private + * @memberof workbox-precaching + */ + function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) { + // Convert the iterable into an array at the start of the loop to make sure + // deletion doesn't mess up iteration. + for (const paramName of [...urlObject.searchParams.keys()]) { + if (ignoreURLParametersMatching.some(regExp => regExp.test(paramName))) { + urlObject.searchParams.delete(paramName); + } + } + return urlObject; + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Generator function that yields possible variations on the original URL to + * check, one at a time. + * + * @param {string} url + * @param {Object} options + * + * @private + * @memberof workbox-precaching + */ + function* generateURLVariations(url, { + ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], + directoryIndex = 'index.html', + cleanURLs = true, + urlManipulation + } = {}) { + const urlObject = new URL(url, location.href); + urlObject.hash = ''; + yield urlObject.href; + const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching); + yield urlWithoutIgnoredParams.href; + if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) { + const directoryURL = new URL(urlWithoutIgnoredParams.href); + directoryURL.pathname += directoryIndex; + yield directoryURL.href; + } + if (cleanURLs) { + const cleanURL = new URL(urlWithoutIgnoredParams.href); + cleanURL.pathname += '.html'; + yield cleanURL.href; + } + if (urlManipulation) { + const additionalURLs = urlManipulation({ + url: urlObject + }); + for (const urlToAttempt of additionalURLs) { + yield urlToAttempt.href; + } + } + } + + /* + Copyright 2020 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A subclass of {@link workbox-routing.Route} that takes a + * {@link workbox-precaching.PrecacheController} + * instance and uses it to match incoming requests and handle fetching + * responses from the precache. + * + * @memberof workbox-precaching + * @extends workbox-routing.Route + */ + class PrecacheRoute extends Route { + /** + * @param {PrecacheController} precacheController A `PrecacheController` + * instance used to both match requests and respond to fetch events. + * @param {Object} [options] Options to control how requests are matched + * against the list of precached URLs. + * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will + * check cache entries for a URLs ending with '/' to see if there is a hit when + * appending the `directoryIndex` value. + * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An + * array of regex's to remove search params when looking for a cache match. + * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will + * check the cache for the URL with a `.html` added to the end of the end. + * @param {workbox-precaching~urlManipulation} [options.urlManipulation] + * This is a function that should take a URL and return an array of + * alternative URLs that should be checked for precache matches. + */ + constructor(precacheController, options) { + const match = ({ + request + }) => { + const urlsToCacheKeys = precacheController.getURLsToCacheKeys(); + for (const possibleURL of generateURLVariations(request.url, options)) { + const cacheKey = urlsToCacheKeys.get(possibleURL); + if (cacheKey) { + const integrity = precacheController.getIntegrityForCacheKey(cacheKey); + return { + cacheKey, + integrity + }; + } + } + { + logger.debug(`Precaching did not find a match for ` + getFriendlyURL(request.url)); + } + return; + }; + super(match, precacheController.strategy); + } + } + + /* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Add a `fetch` listener to the service worker that will + * respond to + * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests} + * with precached assets. + * + * Requests for assets that aren't precached, the `FetchEvent` will not be + * responded to, allowing the event to fall through to other `fetch` event + * listeners. + * + * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute} + * options. + * + * @memberof workbox-precaching + */ + function addRoute(options) { + const precacheController = getOrCreatePrecacheController(); + const precacheRoute = new PrecacheRoute(precacheController, options); + registerRoute(precacheRoute); + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Adds items to the precache list, removing any duplicates and + * stores the files in the + * {@link workbox-core.cacheNames|"precache cache"} when the service + * worker installs. + * + * This method can be called multiple times. + * + * Please note: This method **will not** serve any of the cached files for you. + * It only precaches files. To respond to a network request you call + * {@link workbox-precaching.addRoute}. + * + * If you have a single array of files to precache, you can just call + * {@link workbox-precaching.precacheAndRoute}. + * + * @param {Array} [entries=[]] Array of entries to precache. + * + * @memberof workbox-precaching + */ + function precache(entries) { + const precacheController = getOrCreatePrecacheController(); + precacheController.precache(entries); + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This method will add entries to the precache list and add a route to + * respond to fetch events. + * + * This is a convenience method that will call + * {@link workbox-precaching.precache} and + * {@link workbox-precaching.addRoute} in a single call. + * + * @param {Array} entries Array of entries to precache. + * @param {Object} [options] See the + * {@link workbox-precaching.PrecacheRoute} options. + * + * @memberof workbox-precaching + */ + function precacheAndRoute(entries, options) { + precache(entries); + addRoute(options); + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const SUBSTRING_TO_FIND = '-precache-'; + /** + * Cleans up incompatible precaches that were created by older versions of + * Workbox, by a service worker registered under the current scope. + * + * This is meant to be called as part of the `activate` event. + * + * This should be safe to use as long as you don't include `substringToFind` + * (defaulting to `-precache-`) in your non-precache cache names. + * + * @param {string} currentPrecacheName The cache name currently in use for + * precaching. This cache won't be deleted. + * @param {string} [substringToFind='-precache-'] Cache names which include this + * substring will be deleted (excluding `currentPrecacheName`). + * @return {Array} A list of all the cache names that were deleted. + * + * @private + * @memberof workbox-precaching + */ + const deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => { + const cacheNames = await self.caches.keys(); + const cacheNamesToDelete = cacheNames.filter(cacheName => { + return cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName; + }); + await Promise.all(cacheNamesToDelete.map(cacheName => self.caches.delete(cacheName))); + return cacheNamesToDelete; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Adds an `activate` event listener which will clean up incompatible + * precaches that were created by older versions of Workbox. + * + * @memberof workbox-precaching + */ + function cleanupOutdatedCaches() { + // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 + self.addEventListener('activate', event => { + const cacheName = cacheNames.getPrecacheName(); + event.waitUntil(deleteOutdatedCaches(cacheName).then(cachesDeleted => { + { + if (cachesDeleted.length > 0) { + logger.log(`The following out-of-date precaches were cleaned up ` + `automatically:`, cachesDeleted); + } + } + })); + }); + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * NavigationRoute makes it easy to create a + * {@link workbox-routing.Route} that matches for browser + * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}. + * + * It will only match incoming Requests whose + * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode} + * is set to `navigate`. + * + * You can optionally only apply this route to a subset of navigation requests + * by using one or both of the `denylist` and `allowlist` parameters. + * + * @memberof workbox-routing + * @extends workbox-routing.Route + */ + class NavigationRoute extends Route { + /** + * If both `denylist` and `allowlist` are provided, the `denylist` will + * take precedence and the request will not match this route. + * + * The regular expressions in `allowlist` and `denylist` + * are matched against the concatenated + * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname} + * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search} + * portions of the requested URL. + * + * *Note*: These RegExps may be evaluated against every destination URL during + * a navigation. Avoid using + * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077), + * or else your users may see delays when navigating your site. + * + * @param {workbox-routing~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * @param {Object} options + * @param {Array} [options.denylist] If any of these patterns match, + * the route will not handle the request (even if a allowlist RegExp matches). + * @param {Array} [options.allowlist=[/./]] If any of these patterns + * match the URL's pathname and search parameter, the route will handle the + * request (assuming the denylist doesn't match). + */ + constructor(handler, { + allowlist = [/./], + denylist = [] + } = {}) { + { + finalAssertExports.isArrayOfClass(allowlist, RegExp, { + moduleName: 'workbox-routing', + className: 'NavigationRoute', + funcName: 'constructor', + paramName: 'options.allowlist' + }); + finalAssertExports.isArrayOfClass(denylist, RegExp, { + moduleName: 'workbox-routing', + className: 'NavigationRoute', + funcName: 'constructor', + paramName: 'options.denylist' + }); + } + super(options => this._match(options), handler); + this._allowlist = allowlist; + this._denylist = denylist; + } + /** + * Routes match handler. + * + * @param {Object} options + * @param {URL} options.url + * @param {Request} options.request + * @return {boolean} + * + * @private + */ + _match({ + url, + request + }) { + if (request && request.mode !== 'navigate') { + return false; + } + const pathnameAndSearch = url.pathname + url.search; + for (const regExp of this._denylist) { + if (regExp.test(pathnameAndSearch)) { + { + logger.log(`The navigation route ${pathnameAndSearch} is not ` + `being used, since the URL matches this denylist pattern: ` + `${regExp.toString()}`); + } + return false; + } + } + if (this._allowlist.some(regExp => regExp.test(pathnameAndSearch))) { + { + logger.debug(`The navigation route ${pathnameAndSearch} ` + `is being used.`); + } + return true; + } + { + logger.log(`The navigation route ${pathnameAndSearch} is not ` + `being used, since the URL being navigated to doesn't ` + `match the allowlist.`); + } + return false; + } + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Helper function that calls + * {@link PrecacheController#createHandlerBoundToURL} on the default + * {@link PrecacheController} instance. + * + * If you are creating your own {@link PrecacheController}, then call the + * {@link PrecacheController#createHandlerBoundToURL} on that instance, + * instead of using this function. + * + * @param {string} url The precached URL which will be used to lookup the + * `Response`. + * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the + * response from the network if there's a precache miss. + * @return {workbox-routing~handlerCallback} + * + * @memberof workbox-precaching + */ + function createHandlerBoundToURL(url) { + const precacheController = getOrCreatePrecacheController(); + return precacheController.createHandlerBoundToURL(url); + } + + exports.NavigationRoute = NavigationRoute; + exports.cleanupOutdatedCaches = cleanupOutdatedCaches; + exports.clientsClaim = clientsClaim; + exports.createHandlerBoundToURL = createHandlerBoundToURL; + exports.precacheAndRoute = precacheAndRoute; + exports.registerRoute = registerRoute; + +})); diff --git a/packages/client/eslint.config.js b/packages/client/eslint.config.js index 092408a..b28293c 100644 --- a/packages/client/eslint.config.js +++ b/packages/client/eslint.config.js @@ -1,28 +1,34 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import reactQuery from "@tanstack/eslint-plugin-query"; +import tseslint from "typescript-eslint"; export default tseslint.config( - { ignores: ['dist'] }, + { ignores: ["dist"] }, { - extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + ...tseslint.configs.recommended, + "plugin:@tanstack/eslint-plugin-query/recommended", + ], + files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, plugins: { - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, + "react-hooks": reactHooks, + "react-refresh": reactRefresh, + "@tanstack/query": reactQuery, }, rules: { ...reactHooks.configs.recommended.rules, - 'react-refresh/only-export-components': [ - 'warn', + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, - }, -) + } +); diff --git a/packages/client/graphql.config.yml b/packages/client/graphql.config.yml new file mode 100644 index 0000000..409f53a --- /dev/null +++ b/packages/client/graphql.config.yml @@ -0,0 +1,3 @@ +schema: + - https://sepolia.easscan.org/graphql +documents: '**/*.graphql' diff --git a/packages/client/index.html b/packages/client/index.html index 0c12346..3177631 100644 --- a/packages/client/index.html +++ b/packages/client/index.html @@ -2,12 +2,80 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Green Goods - -
+ +
diff --git a/packages/client/package.json b/packages/client/package.json index 1dbf11d..9142ca8 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -10,24 +10,41 @@ "preview": "vite preview" }, "dependencies": { + "@hookform/resolvers": "3.9.0", + "@phosphor-icons/react": "2.1.7", "@privy-io/react-auth": "^1.80.0", - "lucide-react": "0.436.0", + "@privy-io/server-auth": "1.11.1", + "@remixicon/react": "^4.2.0", + "@tanstack/react-query": "^5.52.2", + "@urql/core": "^5.0.4", + "@vercel/functions": "1.4.1", + "gql.tada": "^1.8.2", "permissionless": "^0.1.45", + "pinata": "^0.4.0", "react": "^18.3.1", + "react-device-frameset": "1.3.4", "react-dom": "^18.3.1", "react-hook-form": "^7.53.0", - "react-hot-toast": "2.4.1", - "react-router-dom": "6.26.1", - "xstate": "^5.17.4", + "react-hot-toast": "^2.4.1", + "react-intl": "6.6.8", + "react-router-dom": "^6.26.1", + "react-select": "5.8.0", + "react-tailwindcss-datepicker": "^1.7.2", "zod": "^3.23.8" }, "devDependencies": { + "@0no-co/graphqlsp": "^1.12.12", + "daisyui": "4.12.10", "@eslint/js": "^9.9.0", + "@tanstack/eslint-plugin-query": "5.52.0", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/typography": "0.5.15", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", + "@vercel/node": "3.2.10", "@vitejs/plugin-react": "^4.3.1", - "@xstate/react": "^4.1.1", "autoprefixer": "^10.4.20", + "dotenv-expand": "11.0.6", "eslint": "^9.9.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", @@ -35,10 +52,10 @@ "postcss": "^8.4.41", "tailwindcss": "^3.4.10", "tailwindcss-animate": "^1.0.7", + "typescript": "^5.5.4", "typescript-eslint": "^8.0.1", "vite": "^5.4.1", "vite-plugin-mkcert": "^1.17.5", - "vite-plugin-pwa": "^0.20.1", - "vite-plugin-svgr": "^4.2.0" + "vite-plugin-pwa": "^0.20.1" } } diff --git a/packages/client/public/apple-icon.png b/packages/client/public/apple-icon.png new file mode 100644 index 0000000..7196aa0 Binary files /dev/null and b/packages/client/public/apple-icon.png differ diff --git a/packages/client/public/favicon.ico b/packages/client/public/favicon.ico new file mode 100644 index 0000000..4a88d1b Binary files /dev/null and b/packages/client/public/favicon.ico differ diff --git a/packages/client/public/icon.png b/packages/client/public/icon.png new file mode 100644 index 0000000..42268d6 Binary files /dev/null and b/packages/client/public/icon.png differ diff --git a/packages/client/public/images/android-icon-144x144.png b/packages/client/public/images/android-icon-144x144.png new file mode 100644 index 0000000..53d9d1c Binary files /dev/null and b/packages/client/public/images/android-icon-144x144.png differ diff --git a/packages/client/public/images/android-icon-36x36.png b/packages/client/public/images/android-icon-36x36.png new file mode 100644 index 0000000..ebe6eea Binary files /dev/null and b/packages/client/public/images/android-icon-36x36.png differ diff --git a/packages/client/public/images/android-icon-48x48.png b/packages/client/public/images/android-icon-48x48.png new file mode 100644 index 0000000..a334cc5 Binary files /dev/null and b/packages/client/public/images/android-icon-48x48.png differ diff --git a/packages/client/public/images/android-icon-72x72.png b/packages/client/public/images/android-icon-72x72.png new file mode 100644 index 0000000..46f0a59 Binary files /dev/null and b/packages/client/public/images/android-icon-72x72.png differ diff --git a/packages/client/public/images/app-mock.png b/packages/client/public/images/app-mock.png new file mode 100644 index 0000000..0ff419d Binary files /dev/null and b/packages/client/public/images/app-mock.png differ diff --git a/packages/client/public/images/apple-icon-120x120.png b/packages/client/public/images/apple-icon-120x120.png new file mode 100644 index 0000000..dcf3c97 Binary files /dev/null and b/packages/client/public/images/apple-icon-120x120.png differ diff --git a/packages/client/public/images/apple-icon-144x144.png b/packages/client/public/images/apple-icon-144x144.png new file mode 100644 index 0000000..53d9d1c Binary files /dev/null and b/packages/client/public/images/apple-icon-144x144.png differ diff --git a/packages/client/public/images/apple-icon-57x57.png b/packages/client/public/images/apple-icon-57x57.png new file mode 100644 index 0000000..9c79ff6 Binary files /dev/null and b/packages/client/public/images/apple-icon-57x57.png differ diff --git a/packages/client/public/images/apple-icon-60x60.png b/packages/client/public/images/apple-icon-60x60.png new file mode 100644 index 0000000..a7539aa Binary files /dev/null and b/packages/client/public/images/apple-icon-60x60.png differ diff --git a/packages/client/public/images/apple-icon-72x72.png b/packages/client/public/images/apple-icon-72x72.png new file mode 100644 index 0000000..46f0a59 Binary files /dev/null and b/packages/client/public/images/apple-icon-72x72.png differ diff --git a/packages/client/public/images/avatar.png b/packages/client/public/images/avatar.png new file mode 100644 index 0000000..f15e8b3 Binary files /dev/null and b/packages/client/public/images/avatar.png differ diff --git a/packages/client/public/images/ms-icon-144x144.png b/packages/client/public/images/ms-icon-144x144.png new file mode 100644 index 0000000..53d9d1c Binary files /dev/null and b/packages/client/public/images/ms-icon-144x144.png differ diff --git a/packages/client/public/images/ms-icon-310x310.png b/packages/client/public/images/ms-icon-310x310.png new file mode 100644 index 0000000..9196760 Binary files /dev/null and b/packages/client/public/images/ms-icon-310x310.png differ diff --git a/packages/client/public/images/ms-icon-70x70.png b/packages/client/public/images/ms-icon-70x70.png new file mode 100644 index 0000000..7a10100 Binary files /dev/null and b/packages/client/public/images/ms-icon-70x70.png differ diff --git a/packages/client/public/social-image.png b/packages/client/public/social-image.png new file mode 100644 index 0000000..b4a1195 Binary files /dev/null and b/packages/client/public/social-image.png differ diff --git a/packages/client/public/vite.svg b/packages/client/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/packages/client/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/client/src/App.tsx b/packages/client/src/App.tsx index 6fb5ffc..8a8617a 100644 --- a/packages/client/src/App.tsx +++ b/packages/client/src/App.tsx @@ -1,32 +1,71 @@ -import { useState } from "react"; import { usePrivy } from "@privy-io/react-auth"; +import { QueryClientProvider } from "@tanstack/react-query"; +import { Route, Routes, Navigate, BrowserRouter } from "react-router-dom"; -import viteLogo from "/vite.svg"; +import { queryClient } from "@/modules/react-query"; + +import { WorkProvider } from "@/providers/WorkProvider"; +import { GardenProvider } from "@/providers/GardenProvider"; + +import { usePWA } from "@/providers/PWAProvider"; +import { useUser } from "@/providers/UserProvider"; + +import Views from "@/views"; +import Login from "@/views/Login"; +import Landing from "@/views/Landing"; +import { Appbar } from "@/components/Layout/AppBar"; function App() { - const [count, setCount] = useState(0); + const { authenticated } = usePrivy(); + const { isMobile, isInstalled, locale } = usePWA(); + const { smartAccountReady } = useUser(); + + console.log("PWA", isMobile, isInstalled, locale); - const { login, logout } = usePrivy(); + const isDownloaded = isMobile; + const isAuthenticated = authenticated && smartAccountReady; return ( - <> -
- - Vite logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

- - -
- + + + + {/* Landing */} + : } + /> + {/* Login */} + + : + : + } + /> + {/* Main: Show app or navigate to login, onboarding, or landing page based on conditions */} + + + + + + + : + : + } + /> + {/* Catch-all: Redirect to the appropriate place */} + {/* } /> */} + + + ); } diff --git a/packages/client/src/components/AppBar.tsx b/packages/client/src/components/AppBar.tsx deleted file mode 100644 index 57ff76f..0000000 --- a/packages/client/src/components/AppBar.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { Link, useLocation } from "react-router-dom"; -// import { a, config, useSpring } from "@react-spring/web"; - -import { HomeIcon, PlusIcon, CircleUserRoundIcon } from "lucide-react"; - -const tabs: { - path: string; - title: string; - Icon: React.FunctionComponent< - React.SVGProps & { - title?: string | undefined; - } - >; -}[] = [ - { - path: "/home", - title: "Home", - Icon: HomeIcon, - }, - { - path: "/contribute", - title: "Contribute", - Icon: PlusIcon, - }, - { - path: "/profile", - title: "Profile", - Icon: CircleUserRoundIcon, - }, -]; - -export const Appbar = () => { - const { pathname } = useLocation(); - - // const spring = useSpring({ - // from: { - // opacity: 0, - // transform: "translateY(100%)", - // }, - // to: { - // opacity: 1, - // transform: "translateY(0)", - // }, - // config: { - // ...config.slow, - // friction: 48, - // clamp: true, - // }, - // }); - - return ( - - ); -}; diff --git a/packages/client/src/components/Button.tsx b/packages/client/src/components/Button.tsx index 155abf2..9dbbd1c 100644 --- a/packages/client/src/components/Button.tsx +++ b/packages/client/src/components/Button.tsx @@ -1,49 +1,83 @@ -import React from "react"; +import { forwardRef } from "react"; +import { RemixiconComponentType } from "@remixicon/react"; interface ButtonProps { - title: string; - onClick?: (e: React.MouseEvent) => void; - full?: boolean; - active?: boolean; + label: string; + style?: "solid" | "soft" | "outline" | "ghost"; + variant?: "primary" | "secondary" | "tertiary"; + size?: "small" | "medium" | "large"; + className?: string; + fullWidth?: boolean; disabled?: boolean; - state?: "default" | "loading" | "success" | "error"; - variant?: "primary" | "secondary"; + loading?: boolean; + Icon?: RemixiconComponentType; + type?: "button" | "submit" | "reset"; + onClick?: () => void; } -export const Button: React.FC = ({ - title, - onClick, - full, - // active, - disabled, - variant, -}) => { - if (variant === "secondary") { +const sizes = { + small: "py-2 px-3", + medium: "py-3 px-4 text-xl", + large: "p-4 sm:p-5 text-xl", +}; + +const variantColors = { + primary: "#367D42", + secondary: "#D2B48C", + tertiary: "blue", +}; + +function generateStyles(variant: "primary" | "secondary" | "tertiary") { + return { + solid: `border-transparent bg-[${variantColors[variant]}] text-white hover:bg-${variantColors[variant]}-700`, + soft: `border-transparent bg-${variantColors[variant]}-100 text-${variantColors[variant]}-800 hover:bg-${variantColors[variant]}-200 dark:hover:bg-${variantColors[variant]}-900 dark:text-${variantColors[variant]}-500 dark:hover:text-${variantColors[variant]}-400`, + outline: `border-${variantColors[variant]}-500 text-${variantColors[variant]}-500 hover:border-${variantColors[variant]}-400 hover:text-${variantColors[variant]}-400 `, + ghost: `border-transparent text-${variantColors[variant]}-500 hover:bg-${variantColors[variant]}-100 hover:text-${variantColors[variant]}-800 dark:hover:bg-${variantColors[variant]}-800/30 dark:hover:text-${variantColors[variant]}-400`, + }; +} + +export const Button = forwardRef( + ( + { + label, + style = "solid", + variant = "primary", + size = "medium", + className, + fullWidth = false, + disabled = false, + loading = false, + Icon, + ...props + }, + ref + ) => { + const sizeClasses = sizes[size]; + const styleClasses = generateStyles(variant)[style]; + return ( ); } - return ( - - ); -}; +); + +Button.displayName = "Button"; diff --git a/packages/client/src/components/Footer.tsx b/packages/client/src/components/Footer.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/packages/client/src/components/Form/Date.tsx b/packages/client/src/components/Form/Date.tsx new file mode 100644 index 0000000..a0ec981 --- /dev/null +++ b/packages/client/src/components/Form/Date.tsx @@ -0,0 +1,42 @@ +import Datepicker from "react-tailwindcss-datepicker"; +import { InputHTMLAttributes, forwardRef } from "react"; + +interface FormDateProps extends InputHTMLAttributes { + label: string; + helperText?: string; + error?: string; +} + +export const FormDate = forwardRef( + ({ label, helperText, error, className, ...props }, _ref) => ( +
+ + {}} + inputClassName="" + containerClassName="" + toggleClassName="" + /> +

+ {helperText ?? error} +

+
+ ) +); + +FormDate.displayName = "FormDate"; diff --git a/packages/client/src/components/Form/Info.tsx b/packages/client/src/components/Form/Info.tsx new file mode 100644 index 0000000..069b198 --- /dev/null +++ b/packages/client/src/components/Form/Info.tsx @@ -0,0 +1,33 @@ +import { RemixiconComponentType } from "@remixicon/react"; + +interface FormInfoProps { + title: string; + info: string; + variant?: "primary" | "secondary" | "tertiary"; + Icon?: RemixiconComponentType; +} + +const variants = { + primary: "bg-teal-50 border-teal-200 border-1 shadow-md", + secondary: "bg-green-100 text-green-700", + tertiary: "bg-yellow-100 text-yellow-700", +}; + +export const FormInfo = ({ + title, + info, + variant = "primary", + ...props +}: FormInfoProps) => { + const variantClasses = variants[variant]; + + return ( +
+

{title}

+

{info}

+
+ ); +}; diff --git a/packages/client/src/components/Form/Input.tsx b/packages/client/src/components/Form/Input.tsx new file mode 100644 index 0000000..431764b --- /dev/null +++ b/packages/client/src/components/Form/Input.tsx @@ -0,0 +1,33 @@ +import { InputHTMLAttributes, forwardRef } from "react"; + +interface FormInputProps extends InputHTMLAttributes { + label: string; + helperText?: string; + error?: string; +} + +export const FormInput = forwardRef( + ({ label, helperText, error, className, ...props }, ref) => ( +
+ + +

+ {helperText ?? error} +

+
+ ) +); + +FormInput.displayName = "FormInput"; diff --git a/packages/client/src/components/Form/Progress.tsx b/packages/client/src/components/Form/Progress.tsx new file mode 100644 index 0000000..db3285e --- /dev/null +++ b/packages/client/src/components/Form/Progress.tsx @@ -0,0 +1,46 @@ +import { RiCheckFill } from "@remixicon/react"; + +interface FormProgressProps { + currentStep: number; + steps: string[]; +} + +export const FormProgress = ({ currentStep, steps }: FormProgressProps) => { + return ( +
    + {steps.map((step, index) => ( +
  • +
    + index + 1 ? "bg-teal-500" + : currentStep === index + 1 ? + "bg-teal-500 text-white before:absolute before:-inset-1 before:bg-teal-200 before:rounded-full before:w-13 before:h-13 before:z-[-1] before:m-auto" + : "bg-slate-200 text-black" + } + `} + > + {currentStep > index + 1 ? + + : index + 1} + +
    index + 1 ? "bg-teal-400" : "bg-slate-400"} ms-2 w-full h-px flex-1 group-last:hidden`} + >
    +
    +
    + + {step} + +
    +
  • + ))} +
+ ); +}; diff --git a/packages/client/src/components/Form/Select.tsx b/packages/client/src/components/Form/Select.tsx new file mode 100644 index 0000000..24c889f --- /dev/null +++ b/packages/client/src/components/Form/Select.tsx @@ -0,0 +1,72 @@ +import "react-tailwindcss-select/dist/index.css"; + +import Select from "react-select"; +import { forwardRef } from "react"; +import { RiCloseFill } from "@remixicon/react"; +import { Control, Controller } from "react-hook-form"; + +interface FormSelectProps { + label: string; + placeholder: string; + selected: string[]; + onRemove: (value: string) => void; + error?: string; + helperText?: string; + options: { label: string; value: string }[]; + control: Control; +} + +export const FormSelect = forwardRef( + ( + { + label, + selected, + onRemove, + // error, + // helperText, + options, + control, + // ...props + }, + _ref + ) => { + return ( + ( +
+ + {selected.length > 0 && + selected.map((id) => ( +
+ +
+ {options.find((option) => option.value === id)?.label} + onRemove(id)} + className="h-3 ml-2 mt-2.5 cursor-pointer" + /> +
+
+ ))} + +

+ {helperText ?? error} +

+
+ ); + } +); + +FormText.displayName = "FormText"; diff --git a/packages/client/src/components/Garden/Actions.tsx b/packages/client/src/components/Garden/Actions.tsx new file mode 100644 index 0000000..6cfbb59 --- /dev/null +++ b/packages/client/src/components/Garden/Actions.tsx @@ -0,0 +1,50 @@ +import { useState } from "react"; + +import { GardenWorkApproval } from "./WorkApproval"; + +interface GardenActionsProps { + actions: Action[]; + works: Work[]; +} + +export const GardenActions: React.FC = ({ + actions, + works, +}) => { + const [work, setWork] = useState(null); + + return ( +
+
    + {actions.map((action) => ( +
  • +

    {action.title}

    +

    {action.instructions}

    +
  • + ))} +
+

Work

+
    + {works.map((work) => ( +
  • setWork(work)}> +

    {work.title}

    +

    {work.feedback}

    +
  • + ))} +
+ setWork(null)} + open={!!work} + > +
+ {work && } +
+
+ +
+
+
+ ); +}; diff --git a/packages/client/src/components/Garden/Asessments.tsx b/packages/client/src/components/Garden/Asessments.tsx new file mode 100644 index 0000000..3237ad8 --- /dev/null +++ b/packages/client/src/components/Garden/Asessments.tsx @@ -0,0 +1,18 @@ +interface GardenAssessmentsProps { + assessments: GardenAssessment[]; +} + +export const GardenAssessments: React.FC = ({ + assessments, +}) => { + return ( +
    + {assessments.map((assessment) => ( +
  • +

    {assessment.tags}

    +

    {assessment.issues}

    +
  • + ))} +
+ ); +}; diff --git a/packages/client/src/components/Garden/Gardeners.tsx b/packages/client/src/components/Garden/Gardeners.tsx new file mode 100644 index 0000000..d369630 --- /dev/null +++ b/packages/client/src/components/Garden/Gardeners.tsx @@ -0,0 +1,25 @@ +import { Gardener } from "@/providers/GardenProvider"; + +interface GardenGardenersProps { + gardeners: Gardener[]; +} + +export const GardenGardeners: React.FC = ({ + gardeners, +}) => { + return ( +
    + {gardeners.map((user) => ( +
  • + Profile + + {user?.email?.address || user.phone?.number || "Unknown User"} + +
  • + ))} +
+ ); +}; diff --git a/packages/client/src/components/Garden/WorkApproval.tsx b/packages/client/src/components/Garden/WorkApproval.tsx new file mode 100644 index 0000000..85f14f7 --- /dev/null +++ b/packages/client/src/components/Garden/WorkApproval.tsx @@ -0,0 +1,103 @@ +import { z } from "zod"; +import toast from "react-hot-toast"; +import { Form, useForm } from "react-hook-form"; +import { useMutation } from "@tanstack/react-query"; +import { zodResolver } from "@hookform/resolvers/zod"; + +import { EAS } from "@/constants"; +import { encodeWorkApprovalData } from "@/utils/eas"; + +import { queryClient } from "@/modules/react-query"; + +import { useUser } from "@/providers/UserProvider"; + +import { FormInput } from "../Form/Input"; +import { Button } from "../Button"; + +interface GardenWorkApprovalProps { + work: Work; +} + +const workApprovalSchema = z.object({ + actionUID: z.string(), + workUID: z.string(), + approved: z.boolean(), + feedback: z.string(), +}); + +export const GardenWorkApproval: React.FC = ({ + work, +}) => { + const { title, feedback, media } = work; + + const { smartAccountClient } = useUser(); + const { register, handleSubmit } = useForm({ + defaultValues: { + actionUID: work.actionUID, + workUID: work.id, + approved: false, + feedback: "", + }, + resolver: zodResolver(workApprovalSchema), + }); + + const workApprovalMutation = useMutation({ + mutationFn: async (draft: WorkApprovalDraft) => { + if (!smartAccountClient) { + throw new Error("No smart account client found"); + } + + const recipient = work.gardenerAddress as `0x${string}`; + + const data = encodeWorkApprovalData(draft, recipient); + + const receipt = await smartAccountClient.sendTransaction({ + to: EAS["42161"].EAS.address as `0x${string}`, + data, + }); + + return receipt; + }, + onMutate: () => { + toast.loading("Approving work..."); + }, + onSuccess: () => { + toast.success("Work approved!"); + queryClient.invalidateQueries({ queryKey: ["workApprovals"] }); + }, + onError: () => { + toast.error("Work approval failed!"); + }, + }); + + return ( +
+

{title}

+

{feedback}

+
    + {media.map((media) => ( +
  • + Media +
  • + ))} +
+ +
+
+ + ); +}; diff --git a/packages/client/src/components/Hero.tsx b/packages/client/src/components/Hero.tsx deleted file mode 100644 index d1e3170..0000000 --- a/packages/client/src/components/Hero.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import React, { useState } from "react"; - -type SubscribeState = "idle" | "subscribing" | "subscribed" | "error"; - -function wait(ms: number) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} - -const url = - "https://house.us21.list-manage.com/subscribe/post-json?u=f9cd12d07ddbdbe80d68c3e28&id=792284a5e1&&c=1;f_id=00ddeae6f0"; - -export const Hero: React.FC = () => { - const [, setSubscribeState] = useState("idle"); - const [, setSubscribeError] = useState(null); - - function handleSubscribe(e: React.FormEvent) { - e.preventDefault(); - - setSubscribeState("subscribing"); - setSubscribeError(null); - - const formData = new FormData(e.currentTarget); - const email = formData.get("email") as string; - - console.log(email); - - fetch(url + "&" + formData, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - mode: "cors", - cache: "default", - }) - .then((response) => response.json()) - .then((data) => { - if (data["result"] !== "success") { - // ERROR - console.log(data["msg"]); - - setSubscribeError("Something went wrong. Please try again."); - setSubscribeState("error"); - } else { - // SUCCESS - Show notification - console.log(data["msg"]); - - setSubscribeState("subscribed"); - - wait(2000).then(() => { - setSubscribeState("idle"); - }); - } - }) - .catch((error) => { - console.error("Error:", error); - - setSubscribeError(error.message); - setSubscribeState("error"); - }); - } - - return ( -
-
-
-

Camp Green

-

-
-

- 📲 Visit app.campgreen.world on - phone to install app -

-
- - -
-
-
- ); -}; diff --git a/packages/client/src/components/Layout/AppBar.tsx b/packages/client/src/components/Layout/AppBar.tsx new file mode 100644 index 0000000..dcc4078 --- /dev/null +++ b/packages/client/src/components/Layout/AppBar.tsx @@ -0,0 +1,66 @@ +import { Link, useLocation } from "react-router-dom"; + +import { + RiHome2Fill, + RiCrossFill, + RiProfileFill, + RemixiconComponentType, +} from "@remixicon/react"; + +const tabs: { + path: string; + title: string; + Icon: RemixiconComponentType; +}[] = [ + { + path: "/gardens", + title: "Home", + Icon: RiHome2Fill, + }, + { + path: "/garden", + title: "Garden", + Icon: RiCrossFill, + }, + { + path: "/profile", + title: "Profile", + Icon: RiProfileFill, + }, +]; + +export const Appbar = () => { + const { pathname } = useLocation(); + + return ( + + ); +}; diff --git a/packages/client/src/components/Layout/Footer.tsx b/packages/client/src/components/Layout/Footer.tsx new file mode 100644 index 0000000..86bbdad --- /dev/null +++ b/packages/client/src/components/Layout/Footer.tsx @@ -0,0 +1,48 @@ +// import { +// RiTwitterFill, +// RiGithubFill, +// RemixiconComponentType, +// } from "@remixicon/react"; +import React from "react"; + +interface FooterProps {} + +// interface Link { +// title: string; +// Icon: RemixiconComponentType; +// link: string; +// action?: () => void; +// } + +// const links: Link[] = [ +// { title: "x", Icon: RiTwitterFill, link: "https://x.com/gp_dev_guild" }, +// { +// title: "github", +// Icon: RiGithubFill, +// link: "https://github.com/greenpill-dev-guild", +// }, +// ]; + +export const Footer: React.FC = () => { + return ( +
+
+

+ Built by Greenpill Dev Guild +

+
+ {/* */} +
+ ); +}; diff --git a/packages/client/src/components/Layout/Header.tsx b/packages/client/src/components/Layout/Header.tsx new file mode 100644 index 0000000..96614f4 --- /dev/null +++ b/packages/client/src/components/Layout/Header.tsx @@ -0,0 +1,47 @@ +import { APP_NAME } from "@/constants"; +import { + RiGithubLine, + RiTwitterLine, + RemixiconComponentType, +} from "@remixicon/react"; +import React from "react"; + +interface HeaderProps {} + +const links: Link[] = [ + { + title: "twitter", + Icon: RiTwitterLine, + link: "https://x.com/greengoodsapp", + }, + { + title: "github", + Icon: RiGithubLine, + link: "https://github.com/greenpill-dev-guild/green-goods", + }, +]; + +export const Header: React.FC = () => { + return ( +
+
+ APP_NAME Logo +

{APP_NAME}

+
+
+ {links.map(({ Icon, link, action, title }) => ( + + + + ))} +
+
+ ); +}; diff --git a/packages/client/src/components/Layout/Hero.tsx b/packages/client/src/components/Layout/Hero.tsx new file mode 100644 index 0000000..25b5eea --- /dev/null +++ b/packages/client/src/components/Layout/Hero.tsx @@ -0,0 +1,135 @@ +import { usePWA } from "@/providers/PWAProvider"; +import React, { useState } from "react"; +import { DeviceFrameset } from "react-device-frameset"; +import "react-device-frameset/styles/marvel-devices.min.css"; +import toast from "react-hot-toast"; + +type SubscribeState = "idle" | "subscribing" | "subscribed" | "error"; + +const url = + "https://app.us13.list-manage.com/subscribe/post?u=16db3a1a92dd56e81459cd500&id=c6c12d1a3f&f_id=0021fae1f0"; + +export const Hero: React.FC = () => { + const { isMobile } = usePWA(); + const [state, setSubscribeState] = useState("idle"); + + function handleSubscribe(e: React.FormEvent) { + e.preventDefault(); + + setSubscribeState("subscribing"); + + const formData = new FormData(e.currentTarget); + const email = formData.get("email") as string; + + console.log(email); + + fetch(url + "&" + formData, { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + mode: "cors", + cache: "default", + }) + .then((response) => response.json()) + .then((data) => { + if (data["result"] !== "success") { + // ERROR + console.log(data["msg"]); + + throw new Error(data["msg"]); + } else { + // SUCCESS - Show notification + console.log(data["msg"]); + + toast.success("Successfilly subscribed!"); + + setSubscribeState("subscribed"); + } + }) + .catch((error) => { + console.error("Error:", error); + + setSubscribeState("error"); + toast.error("Something went wrong. Please try again."); + }); + } + + return ( +
+
+

+ Bringing Biodiversity Onchain +

+

+ Green Goods measures, tracks, and rewards the impact on gardens with a + simple progressive web app.{" "} + + Open the website on your phone to get started! + +

+
+ + +
+ {isMobile && ( + <> + + +
+

Install Green Goods

+

+ To install on your device, tap the 3 dots below and then "Add + to Home Screen". +

+
+ + + +
+ + )} + +
+ {!isMobile && ( +
+ + Green Goods App Mockup + +
+ )} +
+
+ ); +}; diff --git a/packages/client/src/components/Layout/Splash.tsx b/packages/client/src/components/Layout/Splash.tsx new file mode 100644 index 0000000..0b15f5c --- /dev/null +++ b/packages/client/src/components/Layout/Splash.tsx @@ -0,0 +1,33 @@ +import React from "react"; + +import { APP_NAME } from "@/constants"; + +import { Button } from "../Button"; + +interface SplashProps { + login: () => void; + isLoggingIn: boolean; + buttonLabel: string; +} + +export const Splash: React.FC = ({ + login, + isLoggingIn, + buttonLabel, +}) => { + return ( +
+ {APP_NAME} +

+ {APP_NAME} +

+
+ ); +}; diff --git a/packages/client/src/components/Loader.tsx b/packages/client/src/components/Loader.tsx index 9afc5d5..76c9ef6 100644 --- a/packages/client/src/components/Loader.tsx +++ b/packages/client/src/components/Loader.tsx @@ -1,50 +1,45 @@ import React from "react"; -// import { a, config, useSpring } from "@react-spring/web"; export const CircleLoader: React.FC = () => { - // const spring = useSpring({ - // from: { opacity: 0 }, - // to: { opacity: 1 }, - // config: { ...config.default, clamp: true }, - // }); - return ( -
-
-
-
+
+ className="relative h-12 w-12" + // style={spring} + > +
+
+
+
+
); }; diff --git a/packages/client/src/constants.ts b/packages/client/src/constants.ts new file mode 100644 index 0000000..0db93f9 --- /dev/null +++ b/packages/client/src/constants.ts @@ -0,0 +1,34 @@ +import schemas from "../../eas/src/resources/schemas.json"; + +export const APP_NAME = "Green Goods"; +export const APP_DEFAULT_TITLE = "Green Goods"; +export const APP_TITLE_TEMPLATE = "%s - Green Goods"; +export const APP_DESCRIPTION = "Start Bringing Biodiversity Onchain"; +export const APP_URL = "https://greengoods.app"; +export const APP_ICON = "https://greengoods.app/icon.png"; + +export const EAS = { + "42161": { + GARDEN_ASSESSMENT: { + uid: schemas[0].UID, + schema: schemas[0].parsed, + }, + WORK: { + uid: schemas[1].UID, + schema: schemas[1].parsed, + }, + WORK_APPROVAL: { + uid: schemas[2].UID, + schema: schemas[2].parsed, + }, + EAS: { + address: "0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458", + }, + }, +}; + +export const GREEN_GOODS_GARDEN_OPERATOR_WHITELIST = [ + "afo@greenpill.builders", + "coi@greenpill.builders", + "nansel@greenpill.builders", +]; diff --git a/packages/client/src/i18n/en.json b/packages/client/src/i18n/en.json new file mode 100644 index 0000000..dcc8bd5 --- /dev/null +++ b/packages/client/src/i18n/en.json @@ -0,0 +1,11 @@ +{ + "app.title": "Welcome to the App", + "app.login": "Login", + "app.logout": "Logout", + "app.home": "Home", + "app.home.title": "Gardens", + "app.profile": "Profile", + "app.profile.account": "Account", + "app.profile.help": "Help", + "app.profile.settings": "Settings" +} diff --git a/packages/client/src/i18n/pt.json b/packages/client/src/i18n/pt.json new file mode 100644 index 0000000..57abcc6 --- /dev/null +++ b/packages/client/src/i18n/pt.json @@ -0,0 +1,5 @@ +{ + "app.title": "Bienvenido a la aplicación", + "app.login": "Iniciar sesión", + "app.logout": "Cerrar sesión" +} diff --git a/packages/client/src/index.css b/packages/client/src/index.css index eb6f360..4df05e4 100644 --- a/packages/client/src/index.css +++ b/packages/client/src/index.css @@ -3,169 +3,117 @@ @tailwind utilities; :root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; + color: #213547; + background-color: #ffffff; + + scrollbar-width: none; + -ms-overflow-style: none; /* IE and Edge */ + + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: 400; font-synthesis: none; + font-optical-sizing: auto; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} +/* @media (prefers-color-scheme: dark) { + :root { + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + } +} */ -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; +::-webkit-scrollbar { + display: none; } +/* + Typography +*/ h1 { - font-size: 3.2em; - line-height: 1.1; + @apply text-6xl; + @apply font-medium; } h2 { - @apply text-4xl; - @apply font-bold; + @apply text-5xl; + @apply font-medium; } h3 { - @apply text-3xl; + @apply text-4xl; @apply font-medium; } h4 { @apply text-2xl; + @apply font-medium; } h5 { @apply text-xl; + @apply font-medium; +} + +p { + @apply text-base; + @apply font-normal; +} + +span { + @apply text-base; + @apply font-normal; } -h6, -p, -span, -a, -li, label { - font-weight: 300; + @apply text-base; + @apply font-medium; } +a { + @apply text-base; + @apply font-medium; + color: #646cff; + text-decoration: inherit; +} + +.small { + @apply text-sm; + @apply font-normal; +} + +/* a:hover { + color: #535bf2; +} */ + +/* + Components +*/ button { border-radius: 8px; border: 1px solid transparent; padding: 0.6em 1.2em; font-size: 1em; font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; cursor: pointer; transition: border-color 0.25s; } + button:hover { border-color: #646cff; } + button:focus, button:focus-visible { outline: 4px auto -webkit-focus-ring-color; } -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} - -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} - -#root { - width: 100%; - height: 100%; - overflow-y: visible; - overflow: hidden; -} - -/* #root > div { - width: 100%; - height: 100%; - overflow: hidden; - overflow-y: visible; -} */ - -::-webkit-scrollbar { - display: none; -} - -/* - Components -*/ -.particle-pwe-btn { - z-index: 0 !important; -} -.dot { +.loader { position: absolute; opacity: 0.27; animation: dot-fade 1s infinite; diff --git a/packages/client/src/machines/work.ts b/packages/client/src/machines/work.ts deleted file mode 100644 index e69de29..0000000 diff --git a/packages/client/src/main.tsx b/packages/client/src/main.tsx index a9e11f9..eba6b35 100644 --- a/packages/client/src/main.tsx +++ b/packages/client/src/main.tsx @@ -1,34 +1,46 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; -import { PrivyProvider } from "@privy-io/react-auth"; + import { arbitrum } from "viem/chains"; +import { Toaster } from "react-hot-toast"; +import { PrivyProvider } from "@privy-io/react-auth"; -import { SmartAccountProvider } from "./providers/SmartAccountProvider.tsx"; +import { PWAProvider } from "@/providers/PWAProvider.tsx"; +import { UserProvider } from "@/providers/UserProvider.tsx"; -import App from "./App.tsx"; -import "./index.css"; +import { APP_DESCRIPTION } from "@/constants"; +import App from "@/App.tsx"; +import "@/index.css"; createRoot(document.getElementById("root")!).render( - - - - - + + + + + + + + ); diff --git a/packages/client/src/modules/eas.ts b/packages/client/src/modules/eas.ts index e69de29..10cfae3 100644 --- a/packages/client/src/modules/eas.ts +++ b/packages/client/src/modules/eas.ts @@ -0,0 +1,228 @@ +import { graphql } from "gql.tada"; + +import { EAS } from "@/constants"; + +import { getFileByHash } from "./pinata"; +import { easArbitrumClient } from "./urql"; + +const parseDataToWork = async ( + workUID: string, + attestation: { + attester: string; + recipient: string; + time: number; + }, + decodedDataJson: any +): Promise => { + const data = JSON.parse(decodedDataJson); + + const media: string[] = data.filter((d: any) => d.name === "media")[0].value + .value!; + + const mediaUrls = await Promise.all( + media.map(async (hash: string) => { + const file = await getFileByHash(hash); + return file.data; + }) + ); + + const filteredMedia = mediaUrls.filter((url) => typeof url === "string"); + + return { + id: workUID, + gardenerAddress: attestation.attester, + gardenAddress: attestation.recipient, + actionUID: data.filter((d: any) => d.name === "actionUID")[0].value.value!, + title: data.filter((d: any) => d.name === "title")[0].value.value!, + feedback: data.filter((d: any) => d.name === "feedback")[0].value.value!, + metadata: data.filter((d: any) => d.name === "metadata")[0].value.value!, + media: filteredMedia, + createdAt: attestation.time, + approvals: [], + }; +}; + +const parseDataToWorkApproval = ( + workApprovalUID: string, + attestation: { + attester: string; + recipient: string; + time: number; + }, + decodedDataJson: any +): WorkApproval => { + const data = JSON.parse(decodedDataJson); + + return { + id: workApprovalUID, + approverAddress: attestation.attester, + recipientAddress: attestation.recipient, + actionUID: data.filter((d: any) => d.name === "actionUID")[0].value.value!, + workUID: data.filter((d: any) => d.name === "workUID")[0].value.value!, + approved: data.filter((d: any) => d.name === "approved")[0].value.value!, + feedback: data.filter((d: any) => d.name === "feedback")[0].value.value!, + createdAt: attestation.time, + }; +}; + +const parseDataToGardenAssessment = ( + gardenAssessmentUID: string, + attestation: { + attester: string; + recipient: string; + time: number; + }, + decodedDataJson: any +): GardenAssessment => { + const data = JSON.parse(decodedDataJson); + + return { + id: gardenAssessmentUID, + authorAddress: attestation.attester, + gardenAddress: attestation.recipient, + soilMoisturePercentage: data.filter( + (d: any) => d.name === "soilMoisturePercentage" + )[0].value.value!, + carbonTonStock: data.filter((d: any) => d.name === "carbonTonStock")[0] + .value.value!, + carbonTonPotential: data.filter( + (d: any) => d.name === "carbonTonPotential" + )[0].value.value!, + gardenSquareMeters: data.filter( + (d: any) => d.name === "gardenSquareMeters" + )[0].value.value!, + biome: data.filter((d: any) => d.name === "biome")[0].value.value!, + remoteReportCID: data.filter((d: any) => d.name === "remoteReportPDF")[0] + .value.value!, + speciesRegistryCID: data.filter( + (d: any) => d.name === "speciesRegistryJSON" + )[0].value.value!, + polygonCoordinates: data.filter( + (d: any) => d.name === "polygonCoordinates" + )[0].value.value!, + treeGenusesObserved: data.filter( + (d: any) => d.name === "treeGenusesObserved" + )[0].value.value!, + weedGenusesObserved: data.filter( + (d: any) => d.name === "weedGenusesObserved" + )[0].value.value!, + issues: data.filter((d: any) => d.name === "issues")[0].value.value!, + tags: data.filter((d: any) => d.name === "tags")[0].value.value!, + createdAt: attestation.time, + }; +}; + +export const getWorks = async (): Promise => { + // TODO add 'where: valid: true' filter + const QUERY = graphql(/* GraphQL */ ` + query Attestations($where: AttestationWhereInput) { + attestations(where: $where) { + id + attester + recipient + timeCreated + decodedDataJson + } + } + `); + + const { data, error } = await easArbitrumClient + .query(QUERY, { + where: { + schemaId: { equals: EAS["42161"].WORK.uid }, + }, + }) + .toPromise(); + + if (error) console.error(error); + if (!data) console.error("No data found"); + + const works = Promise.all( + data?.attestations.map( + async ({ id, recipient, timeCreated, decodedDataJson }) => + await parseDataToWork( + id, + { attester: recipient, recipient, time: timeCreated }, + decodedDataJson + ) + ) ?? [] + ); + + return works; +}; + +export const getWorkApprovals = async (): Promise => { + // TODO add 'where: valid: true' filter + const QUERY = graphql(/* GraphQL */ ` + query Attestations($where: AttestationWhereInput) { + attestations(where: $where) { + id + attester + recipient + timeCreated + decodedDataJson + } + } + `); + + const { data, error } = await easArbitrumClient + .query(QUERY, { + where: { + schemaId: { equals: EAS["42161"].WORK_APPROVAL.uid }, + }, + }) + .toPromise(); + + if (error) console.error(error); + if (!data) console.error("No data found"); + + return ( + data?.attestations.map(({ id, recipient, timeCreated, decodedDataJson }) => + parseDataToWorkApproval( + id, + { attester: recipient, recipient, time: timeCreated }, + decodedDataJson + ) + ) ?? [] + ); +}; + +export const getGardenAssessments = async (): Promise => { + // TODO add 'where: valid: true' filter + const QUERY = graphql(/* GraphQL */ ` + query Attestations($where: AttestationWhereInput) { + attestations(where: $where) { + id + attester + recipient + timeCreated + decodedDataJson + } + } + `); + + const { data, error } = await easArbitrumClient + .query(QUERY, { + where: { + schemaId: { equals: EAS["42161"].GARDEN_ASSESSMENT.uid }, + }, + }) + .toPromise(); + + if (error) console.error(error); + if (!data) console.error("No data found"); + + return ( + data?.attestations.map(({ id, recipient, timeCreated, decodedDataJson }) => + parseDataToGardenAssessment( + id, + { + attester: recipient, + recipient, + time: timeCreated, + }, + decodedDataJson + ) + ) ?? [] + ); +}; diff --git a/packages/client/src/modules/greengoods.ts b/packages/client/src/modules/greengoods.ts new file mode 100644 index 0000000..e49b45a --- /dev/null +++ b/packages/client/src/modules/greengoods.ts @@ -0,0 +1,75 @@ +import { User } from "@privy-io/react-auth"; + +import plantActionInstructions from "../utils/actions/plant.json"; +import observerActionInstructions from "../utils/actions/observe.json"; + +export function getActions(): Action[] { + return [ + { + id: 0, + startTime: 0, + endTime: 0, + title: "Observation", + instructions: "cid:0x1234", + capitals: [Capital.LIVING], + media: [], + createdAt: 0, + description: plantActionInstructions.description, + inputs: plantActionInstructions.details.inputs as WorkInput[], + mediaInfo: plantActionInstructions.media, + details: plantActionInstructions.details, + review: plantActionInstructions.review, + }, + { + id: 0, + startTime: 0, + endTime: 0, + title: "Planting", + instructions: "cid:0x1234", + capitals: [Capital.LIVING], + media: [], + createdAt: 0, + description: observerActionInstructions.description, + inputs: observerActionInstructions.details.inputs as WorkInput[], + mediaInfo: observerActionInstructions.media, + details: observerActionInstructions.details, + review: observerActionInstructions.review, + }, + ]; +} + +export function getGardens(): Garden[] { + const operators = [ + "0x2aa64E6d80390F5C017F0313cB908051BE2FD35e", + "0xAcD59e854adf632d2322404198624F757C868C97,", + "0x29e6cbF2450F86006292D10A3cF791955600a457", + "0x41f842E28c5a18aAF1fCA0e5908E16d3Ff7e4E9c", + "0x742fa58340df9Ad7c691De4Ed999CF7f71079A8F", + "0xb084b8258e3409deCa8a5847aa5Ee9fda07a62A8", + ]; + + return [ + { + id: "0xa9Cb249a3B651Ce82bf9E9cc48BCF41957647F48", + name: "Root Planet", + location: "Rio Claro, São Paulo", + bannerImage: "", + operators, + gardeners: operators, + gardenAssessments: [], + description: + "Observing invasive species and planting natives species to improve biodiversity.", + tokenAddress: "0x9EF896a314B7aE98609eC0c0cA43724C768046B4", + tokenID: 0, + }, + ]; +} + +export async function getGardeners(): Promise { + const request = await fetch( + import.meta.env.DEV ? "http://localhost:3000/api/users" : "/api/users" + ); + const response: User[] = await request.json(); + + return response; +} diff --git a/packages/client/src/modules/indexer.ts b/packages/client/src/modules/indexer.ts deleted file mode 100644 index 8b13789..0000000 --- a/packages/client/src/modules/indexer.ts +++ /dev/null @@ -1 +0,0 @@ - diff --git a/packages/client/src/modules/pinata.ts b/packages/client/src/modules/pinata.ts index e69de29..64eaddd 100644 --- a/packages/client/src/modules/pinata.ts +++ b/packages/client/src/modules/pinata.ts @@ -0,0 +1,21 @@ +import { PinataSDK } from "pinata"; + +export const pinata = new PinataSDK({ + pinataJwt: import.meta.env.VITE_PINATA_JWT as string, +}); + +export async function uploadFileToIPFS(file: File) { + return await pinata.upload.file(file); +} + +export async function uploadFilesToIPFS(files: File[]) { + return await pinata.upload.fileArray(files); +} + +export async function uploadJSONToIPFS(json: Record) { + return await pinata.upload.json(json); +} + +export async function getFileByHash(hash: string) { + return await pinata.gateways.get(hash); +} diff --git a/packages/client/src/modules/react-query.ts b/packages/client/src/modules/react-query.ts new file mode 100644 index 0000000..6c7b9de --- /dev/null +++ b/packages/client/src/modules/react-query.ts @@ -0,0 +1,3 @@ +import { QueryClient } from "@tanstack/react-query"; + +export const queryClient = new QueryClient(); diff --git a/packages/client/src/modules/urql.ts b/packages/client/src/modules/urql.ts new file mode 100644 index 0000000..1794d82 --- /dev/null +++ b/packages/client/src/modules/urql.ts @@ -0,0 +1,14 @@ +import { Client, cacheExchange, fetchExchange } from "@urql/core"; + +export const greenGoodsIndexer = new Client({ + url: + import.meta.env.DEV ? + "http://localhost:8000" + : "https://green-goods-indever.herokuapp.com", + exchanges: [cacheExchange, fetchExchange], +}); + +export const easArbitrumClient = new Client({ + url: "https://arbitrum.easscan.org/graphql", + exchanges: [cacheExchange, fetchExchange], +}); diff --git a/packages/client/src/providers/GardenProvider.tsx b/packages/client/src/providers/GardenProvider.tsx index e69de29..90d0ace 100644 --- a/packages/client/src/providers/GardenProvider.tsx +++ b/packages/client/src/providers/GardenProvider.tsx @@ -0,0 +1,74 @@ +import React, { useContext } from "react"; +import { User } from "@privy-io/react-auth"; +import { useQuery } from "@tanstack/react-query"; + +import { getGardenAssessments } from "@/modules/eas"; +import { getActions, getGardeners, getGardens } from "@/modules/greengoods"; + +import { GREEN_GOODS_GARDEN_OPERATOR_WHITELIST } from "@/constants"; + +export type Gardener = User & { operator: boolean }; + +export interface GardenDataProps { + actions: Action[]; + gardens: Garden[]; + gardeners: Gardener[]; +} + +const GardenContext = React.createContext({ + actions: [], + gardens: [], + gardeners: [], +}); + +export const useGarden = () => { + return useContext(GardenContext); +}; + +export const GardenProvider = ({ children }: { children: React.ReactNode }) => { + // QUERIES + const { data: actions } = useQuery({ + queryKey: ["actions"], + queryFn: getActions, + }); + + const { data: gardens } = useQuery({ + queryKey: ["gardens"], + queryFn: async () => { + const gardens = getGardens(); + const assessments = await getGardenAssessments(); + + return gardens.map((garden) => { + garden.gardenAssessments = assessments.filter( + (assessment) => assessment.gardenAddress === garden.id + ); + + return garden; + }); + }, + }); + const { data: gardeners } = useQuery({ + queryKey: ["gardeners"], + queryFn: getGardeners, + }); + + return ( + { + return { + ...gardener, + operator: GREEN_GOODS_GARDEN_OPERATOR_WHITELIST.includes( + gardener.email?.address || gardener.phone?.number || "" + ), + }; + }) || [], + }} + > + {children} + + ); +}; diff --git a/packages/client/src/providers/PWAProvider.tsx b/packages/client/src/providers/PWAProvider.tsx index 9cb3717..a4f8ed5 100644 --- a/packages/client/src/providers/PWAProvider.tsx +++ b/packages/client/src/providers/PWAProvider.tsx @@ -1,16 +1,38 @@ -import { useEffect, useState } from "react"; - -export type DisplayMode = "standalone" | "browser" | "twa"; -export type InstallState = "idle" | "prompt" | "installed" | "unsupported"; - +import { IntlProvider } from "react-intl"; +import React, { useState, useEffect, useContext } from "react"; + +import enMessages from "@/i18n/en.json"; +import ptMessages from "@/i18n/pt.json"; + +export type InstallState = + | "idle" + | "not-installed" + | "installed" + | "unsupported"; +export type Locale = "en" | "pt"; export type Platform = "ios" | "android" | "windows" | "unknown"; export interface PWADataProps { + isMobile: boolean; + isInstalled: boolean; platform: Platform; - installState: InstallState; + locale: Locale; + deferredPrompt: BeforeInstallPromptEvent | null; + promptInstall: () => void; handleInstallCheck: (e: any) => void; + switchLanguage: (lang: Locale) => void; +} + +interface BeforeInstallPromptEvent extends Event { + prompt: () => Promise; + userChoice: Promise<{ outcome: "accepted" | "dismissed" }>; } +const messages = { + en: enMessages, + pt: ptMessages, +}; + function getMobileOperatingSystem(): Platform { // @ts-ignore var userAgent = navigator.userAgent || navigator.vendor || window.opera; @@ -33,73 +55,108 @@ function getMobileOperatingSystem(): Platform { return "unknown"; } -export const isHandheld = detectHandheld(); +const PWAContext = React.createContext({ + isMobile: false, + isInstalled: false, + locale: "en", + deferredPrompt: null, + platform: "unknown", + promptInstall: () => {}, + handleInstallCheck: () => {}, + switchLanguage: () => {}, +}); + +export const usePWA = () => { + return useContext(PWAContext); +}; -export const usePWA = (): PWADataProps => { - const [installState, setInstalledState] = useState( - isHandheld ? "installed" : "unsupported" - ); +export const PWAProvider = ({ children }: { children: React.ReactNode }) => { + const [locale, setLocale] = useState("en"); + const [deferredPrompt, setDeferredPrompt] = + useState(null); + const [installState, setInstalledState] = useState("idle"); const platform = getMobileOperatingSystem(); - async function handleInstallCheck(e: any) { + async function handleInstallCheck(e: any | null) { + e?.preventDefault(); // Prevent the automatic prompt + setDeferredPrompt(e); + if ( window.matchMedia("(display-mode: standalone)").matches || - window.matchMedia("(display-mode: fullscreen)").matches + window.matchMedia("(display-mode: fullscreen)").matches || + (window.navigator as any).standalone ) { setInstalledState("installed"); console.log("PWA was installed", e); } else { - // setInstalledState("prompt"); - setInstalledState("installed"); // TODO: Update PWA flow + setInstalledState("not-installed"); console.log("PWA was not installed", e); } } + function handleBeforeInstall(e: Event) { + e.preventDefault(); + setDeferredPrompt(e as BeforeInstallPromptEvent); + } + function handlePWAInstalled() { setInstalledState("installed"); // TODO: Add analytics and fire notification } + function switchLanguage(lang: Locale) { + setLocale(lang); + } + + const promptInstall = () => { + if (deferredPrompt) { + deferredPrompt.prompt(); // Show the install prompt + deferredPrompt.userChoice.then((choiceResult) => { + if (choiceResult.outcome === "accepted") { + console.log("User accepted the install prompt"); + } else { + console.log("User dismissed the install prompt"); + } + setDeferredPrompt(null); // Clear the saved prompt + }); + } + }; + useEffect(() => { - isHandheld && - window.addEventListener("beforeinstallprompt", handleInstallCheck); - isHandheld && window.addEventListener("appinstalled", handlePWAInstalled); + handleInstallCheck(null); + + window.addEventListener("beforeinstallprompt", handleBeforeInstall); + window.addEventListener("appinstalled", handlePWAInstalled); return () => { - isHandheld && - window.removeEventListener("beforeinstallprompt", handleInstallCheck); - isHandheld && - window.removeEventListener("appinstalled", handlePWAInstalled); + window.removeEventListener("beforeinstallprompt", handleBeforeInstall); + window.removeEventListener("appinstalled", handlePWAInstalled); }; }, []); - return { - platform, - installState, - handleInstallCheck, - }; -}; -function detectHandheld(): boolean { - const userAgent = - navigator.userAgent || navigator.vendor || (window as any).opera; - - // Check if the user agent contains any keywords indicating a handheld device - const handheldKeywords = [ - "Android", - "webOS", - "iPhone", - "iPad", - "iPod", - "BlackBerry", - "Windows Phone", - ]; - const isHandheld = handheldKeywords.some((keyword) => - userAgent.includes(keyword) + return ( + + + {children} + + ); - - return isHandheld; -} +}; diff --git a/packages/client/src/providers/SmartAccountProvider.tsx b/packages/client/src/providers/UserProvider.tsx similarity index 65% rename from packages/client/src/providers/SmartAccountProvider.tsx rename to packages/client/src/providers/UserProvider.tsx index 720137e..99664c5 100644 --- a/packages/client/src/providers/SmartAccountProvider.tsx +++ b/packages/client/src/providers/UserProvider.tsx @@ -1,3 +1,13 @@ +import React, { useState, useEffect, useContext } from "react"; +import { + User, + useLogin, + useLogout, + usePrivy, + useWallets, + ConnectedWallet, +} from "@privy-io/react-auth"; + import { ENTRYPOINT_ADDRESS_V07, type SmartAccountClient, @@ -12,68 +22,67 @@ import { createPimlicoBundlerClient, createPimlicoPaymasterClient, } from "permissionless/clients/pimlico"; -import { Chain, Transport } from "viem"; -import { arbitrum } from "viem/chains"; import { EntryPoint } from "permissionless/types"; -import React, { useState, useEffect, useContext } from "react"; -import { ConnectedWallet, usePrivy, useWallets } from "@privy-io/react-auth"; + +import { arbitrum } from "viem/chains"; +import { Chain, Transport } from "viem"; import { createPublicClient, createWalletClient, custom, http } from "viem"; -interface SmartAccountInterface { - eoa: ConnectedWallet | undefined; +type SAC = SmartAccountClient< + EntryPoint, + Transport, + Chain, + SmartAccount +>; + +interface UserInterface { + user: User | null; + isOnboarded: boolean; + eoa?: ConnectedWallet; smartAccountReady: boolean; - smartAccountAddress: `0x${string}` | undefined; - smartAccountClient: - | SmartAccountClient< - EntryPoint, - Transport, - Chain, - SmartAccount - > - | Transport - | any - | SmartAccount - | null; + smartAccountAddress?: `0x${string}`; + smartAccountClient: SAC | null; + login: () => void; + logout: () => void; } -const SmartAccountContext = React.createContext({ +const UserContext = React.createContext({ + user: null, + isOnboarded: false, eoa: undefined, - smartAccountClient: undefined, + smartAccountClient: null, smartAccountAddress: undefined, smartAccountReady: false, + login: () => {}, + logout: () => {}, }); -export const useSmartAccount = () => { - return useContext(SmartAccountContext); +export const useUser = () => { + return useContext(UserContext); }; -export const SmartAccountProvider = ({ - children, -}: { - children: React.ReactNode; -}) => { - // Get a list of all of the wallets (EOAs) the user has connected to your site +export const UserProvider = ({ children }: { children: React.ReactNode }) => { + const [isOnboarded, setOnboarded] = useState(false); + const { wallets } = useWallets(); - const { ready } = usePrivy(); - // Find the embedded wallet by finding the entry in the list with a `walletClientType` of 'privy' + const { ready, user } = usePrivy(); + const { login } = useLogin({ + onComplete(isNewUser) { + setOnboarded(!isNewUser); + }, + onError(error) { + console.error("Privy error logging in", error); + }, + }); + const { logout } = useLogout(); const embeddedWallet = wallets.find( (wallet) => wallet.walletClientType === "privy" ); - // States to store the smart account and its status const [eoa, setEoa] = useState(); - const [smartAccountClient, setSmartAccountClient] = useState< - | SmartAccountClient< - EntryPoint, - Transport, - Chain, - SmartAccount - > - | Transport - | any - | SmartAccount - | null - >(); + const [smartAccountClient, setSmartAccountClient] = useState( + null + ); const [smartAccountAddress, setSmartAccountAddress] = useState< `0x${string}` | undefined >(); @@ -84,8 +93,6 @@ export const SmartAccountProvider = ({ }, [ready, embeddedWallet]); useEffect(() => { - // Creates a smart account given a Privy `ConnectedWallet` object representing - // the user's EOA. const createSmartWallet = async (eoa: ConnectedWallet) => { setEoa(eoa); // Get an EIP1193 provider and viem WalletClient for the EOA @@ -141,28 +148,39 @@ export const SmartAccountProvider = ({ const smartAccountAddress = smartAccountClient.account?.address; - setSmartAccountClient(smartAccountClient); + // Todo: Add test attestation to check if smart account is ready + + setSmartAccountClient( + smartAccountClient as SmartAccountClient< + EntryPoint, + Transport, + Chain, + SmartAccount + > + ); setSmartAccountAddress(smartAccountAddress); setSmartAccountReady(true); - console.log("smartAccountClient", smartAccountClient.account.address); + console.log("smartAccountClient", smartAccountAddress); }; if (embeddedWallet) createSmartWallet(embeddedWallet); }, [embeddedWallet?.address]); - console.log("client", smartAccountClient); - return ( - {children} - + ); }; diff --git a/packages/client/src/providers/WorkProvider.tsx b/packages/client/src/providers/WorkProvider.tsx index bdfecd9..76b3734 100644 --- a/packages/client/src/providers/WorkProvider.tsx +++ b/packages/client/src/providers/WorkProvider.tsx @@ -1,22 +1,161 @@ -// import { getContract } from "viem"; +import { z } from "zod"; +import toast from "react-hot-toast"; +import React, { useContext, useState } from "react"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { useMutation, useQuery } from "@tanstack/react-query"; +import { FormState, useForm, UseFormRegister } from "react-hook-form"; -// import { useSmartAccount } from "./SmartAccountProvider"; +import { EAS } from "@/constants"; + +import { queryClient } from "@/modules/react-query"; + +import { useUser } from "./UserProvider"; +import { useGarden } from "./GardenProvider"; +import { encodeWorkData } from "@/utils/eas"; + +export interface WorkDataProps { + actions: Action[]; + works: Work[]; + workApprovals: WorkApprovalCard[]; + form: { + state: FormState; + actionUID: number | null; + images: File[]; + setImages: React.Dispatch>; + setActionUID: React.Dispatch>; + register: UseFormRegister; + uploadWork?: (e?: React.BaseSyntheticEvent) => Promise; + }; +} + +const workSchema = z.object({ + actionUID: z.number(), + title: z.string(), + feedback: z.string(), + metadata: z.string(), + plantSelection: z.array(z.string()), + plantCount: z.number(), + media: z.array(z.instanceof(File)), +}); + +const WorkContext = React.createContext({ + actions: [], + actionUID: null, + setActionUID: () => {}, + works: [], + workApprovals: [], + uploadWork: async () => "", + form: { + // @ts-ignore + register: () => {}, + actionUID: null, + setActionUID: () => {}, + uploadWork: async () => {}, + }, +}); export const useWork = () => { - // const { smartAccountClient } = useSmartAccount(); + return useContext(WorkContext); +}; - // const easContract = getContract({ - // address: "0x6d3dC0Fe5351087E3Af3bDe8eB3F7350ed894fc3", - // abi: [], - // client: smartAccountClient, - // }); +export const WorkProvider = ({ children }: { children: React.ReactNode }) => { + const { smartAccountClient } = useUser(); + const { actions } = useGarden(); - function uploadWork() { - // easContract.write. - console.log("uploadWork"); - } + // QUERIES + const { data: works } = useQuery({ + queryKey: ["works"], + queryFn: () => [], + }); + const { data: workApprovals } = useQuery({ + queryKey: ["workApprovals"], + queryFn: () => [], + }); - return { - uploadWork, - }; + // MUTATIONS + const [actionUID, setActionUID] = useState(null); + const [images, setImages] = useState([]); + + const { register, handleSubmit, formState } = useForm({ + defaultValues: { + actionUID: 0, + title: "", + feedback: "", + plantSelection: [], + plantCount: 0, + // metadata: {}, + media: [], + }, + resolver: zodResolver(workSchema), + }); + + const workMutation = useMutation({ + mutationFn: async (draft: WorkDraft) => { + if (!smartAccountClient) { + throw new Error("No smart account client found"); + } + + const encodedData = encodeWorkData( + { + ...draft, + media: images, + }, + "0x" + ); + + const encodedFunctionCall: `0x${string}` = `0x${encodedData}`; // Todo encode function call and arguments + + const receipt = await smartAccountClient.sendTransaction({ + to: EAS["42161"].EAS.address as `0x${string}`, + data: encodedFunctionCall, // Todo encode solidty function call and arguments + }); + + return receipt; + }, + onMutate: () => { + toast.loading("Uploading work..."); + }, + onSuccess: () => { + toast.success("Work uploaded!"); + queryClient.invalidateQueries({ queryKey: ["works"] }); + }, + onError: () => { + toast.error("Work upload failed!"); + }, + }); + + const uploadWork = handleSubmit((data) => { + workMutation.mutate(data); + }); + + return ( + { + return { + ...work, + metadata: JSON.parse(work.metadata), + approvals: + workApprovals?.filter( + (approval) => approval.workUID === work.id + ) || [], + }; + }) || [], + workApprovals: workApprovals || [], + form: { + state: formState, + register, + actionUID, + images, + setImages, + setActionUID, + uploadWork, + }, + }} + > + {children} + + ); }; diff --git a/packages/client/src/types/app.d.ts b/packages/client/src/types/app.d.ts new file mode 100644 index 0000000..f15f90a --- /dev/null +++ b/packages/client/src/types/app.d.ts @@ -0,0 +1,6 @@ +declare interface Link { + title: string; + Icon: T; + link: string; + action?: () => void; +} diff --git a/packages/client/src/types/eas.d.ts b/packages/client/src/types/eas.d.ts new file mode 100644 index 0000000..4c4396b --- /dev/null +++ b/packages/client/src/types/eas.d.ts @@ -0,0 +1,249 @@ +/* eslint-disable */ +/* prettier-ignore */ + +/** An IntrospectionQuery representation of your schema. + * + * @remarks + * This is an introspection of your schema saved as a file by GraphQLSP. + * It will automatically be used by `gql.tada` to infer the types of your GraphQL documents. + * If you need to reuse this data or update your `scalars`, update `tadaOutputLocation` to + * instead save to a .ts instead of a .d.ts file. + */ +export type introspection = { + name: never; + query: 'Query'; + mutation: 'Mutation'; + subscription: never; + types: { + 'AffectedRowsOutput': { kind: 'OBJECT'; name: 'AffectedRowsOutput'; fields: { 'count': { name: 'count'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'AggregateAttestation': { kind: 'OBJECT'; name: 'AggregateAttestation'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'AttestationAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'AttestationCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'AttestationMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'AttestationMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'AttestationSumAggregate'; ofType: null; } }; }; }; + 'AggregateEnsName': { kind: 'OBJECT'; name: 'AggregateEnsName'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'EnsNameAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'EnsNameCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'EnsNameMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'EnsNameMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'EnsNameSumAggregate'; ofType: null; } }; }; }; + 'AggregateOffchainRevocation': { kind: 'OBJECT'; name: 'AggregateOffchainRevocation'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'OffchainRevocationAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'OffchainRevocationCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'OffchainRevocationMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'OffchainRevocationMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'OffchainRevocationSumAggregate'; ofType: null; } }; }; }; + 'AggregateSchema': { kind: 'OBJECT'; name: 'AggregateSchema'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'SchemaAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'SchemaCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'SchemaMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'SchemaMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'SchemaSumAggregate'; ofType: null; } }; }; }; + 'AggregateSchemaName': { kind: 'OBJECT'; name: 'AggregateSchemaName'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'SchemaNameAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'SchemaNameCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'SchemaNameMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'SchemaNameMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'SchemaNameSumAggregate'; ofType: null; } }; }; }; + 'AggregateServiceStat': { kind: 'OBJECT'; name: 'AggregateServiceStat'; fields: { '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'ServiceStatCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'ServiceStatMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'ServiceStatMinAggregate'; ofType: null; } }; }; }; + 'AggregateTimestamp': { kind: 'OBJECT'; name: 'AggregateTimestamp'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'TimestampAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'TimestampCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'TimestampMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'TimestampMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'TimestampSumAggregate'; ofType: null; } }; }; }; + 'Attestation': { kind: 'OBJECT'; name: 'Attestation'; fields: { 'attester': { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'data': { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'decodedDataJson': { name: 'decodedDataJson'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'expirationTime': { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'ipfsHash': { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'isOffchain': { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'recipient': { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'refUID': { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'revocable': { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'revoked': { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'schema': { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Schema'; ofType: null; }; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'AttestationAvgAggregate': { kind: 'OBJECT'; name: 'AttestationAvgAggregate'; fields: { 'expirationTime': { name: 'expirationTime'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; }; + 'AttestationAvgOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationAvgOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'AttestationCountAggregate': { kind: 'OBJECT'; name: 'AttestationCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'attester': { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'data': { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'decodedDataJson': { name: 'decodedDataJson'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'expirationTime': { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'ipfsHash': { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'isOffchain': { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'recipient': { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'refUID': { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'revocable': { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'revoked': { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'AttestationCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'AttestationCreateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateNestedOneWithoutAttestationsInput'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateManyInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationCreateManySchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateManySchemaInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationCreateManySchemaInputEnvelope': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateManySchemaInputEnvelope'; isOneOf: false; inputFields: [{ name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateManySchemaInput'; ofType: null; }; }; }; }; defaultValue: null }, { name: 'skipDuplicates'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }]; }; + 'AttestationCreateNestedManyWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateNestedManyWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateOrConnectWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'createMany'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateManySchemaInputEnvelope'; ofType: null; }; defaultValue: null }, { name: 'connect'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }]; }; + 'AttestationCreateOrConnectWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateOrConnectWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationCreateWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationCreateWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationGroupBy': { kind: 'OBJECT'; name: 'AttestationGroupBy'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'AttestationAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'AttestationCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'AttestationMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'AttestationMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'AttestationSumAggregate'; ofType: null; } }; 'attester': { name: 'attester'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'data': { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'decodedDataJson': { name: 'decodedDataJson'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'expirationTime': { name: 'expirationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'ipfsHash': { name: 'ipfsHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'isOffchain': { name: 'isOffchain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'recipient': { name: 'recipient'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'refUID': { name: 'refUID'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'revocable': { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'revoked': { name: 'revoked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'AttestationListRelationFilter': { kind: 'INPUT_OBJECT'; name: 'AttestationListRelationFilter'; isOneOf: false; inputFields: [{ name: 'every'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; ofType: null; }; defaultValue: null }, { name: 'some'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; ofType: null; }; defaultValue: null }, { name: 'none'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; ofType: null; }; defaultValue: null }]; }; + 'AttestationMaxAggregate': { kind: 'OBJECT'; name: 'AttestationMaxAggregate'; fields: { 'attester': { name: 'attester'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'data': { name: 'data'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'decodedDataJson': { name: 'decodedDataJson'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'expirationTime': { name: 'expirationTime'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'ipfsHash': { name: 'ipfsHash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'isOffchain': { name: 'isOffchain'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'recipient': { name: 'recipient'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'refUID': { name: 'refUID'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'revocable': { name: 'revocable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'revoked': { name: 'revoked'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'AttestationMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'AttestationMinAggregate': { kind: 'OBJECT'; name: 'AttestationMinAggregate'; fields: { 'attester': { name: 'attester'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'data': { name: 'data'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'decodedDataJson': { name: 'decodedDataJson'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'expirationTime': { name: 'expirationTime'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'ipfsHash': { name: 'ipfsHash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'isOffchain': { name: 'isOffchain'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'recipient': { name: 'recipient'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'refUID': { name: 'refUID'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'revocable': { name: 'revocable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'revoked': { name: 'revoked'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'AttestationMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'AttestationOrderByRelationAggregateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationOrderByRelationAggregateInput'; isOneOf: false; inputFields: [{ name: '_count'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'AttestationOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'AttestationOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationAvgOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationSumOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'AttestationOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'AttestationOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaOrderByWithRelationInput'; ofType: null; }; defaultValue: null }]; }; + 'AttestationScalarFieldEnum': { name: 'AttestationScalarFieldEnum'; enumValues: 'id' | 'data' | 'decodedDataJson' | 'recipient' | 'attester' | 'time' | 'timeCreated' | 'expirationTime' | 'revocationTime' | 'refUID' | 'revocable' | 'revoked' | 'txid' | 'schemaId' | 'ipfsHash' | 'isOffchain'; }; + 'AttestationScalarWhereInput': { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }]; }; + 'AttestationScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'INPUT_OBJECT'; name: 'BoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'INPUT_OBJECT'; name: 'BoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'AttestationSumAggregate': { kind: 'OBJECT'; name: 'AttestationSumAggregate'; fields: { 'expirationTime': { name: 'expirationTime'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'revocationTime': { name: 'revocationTime'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'timeCreated': { name: 'timeCreated'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'AttestationSumOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationSumOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'AttestationUpdateInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateOneRequiredWithoutAttestationsNestedInput'; ofType: null; }; defaultValue: null }]; }; + 'AttestationUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'AttestationUpdateManyWithWhereWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyWithWhereWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereInput'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyMutationInput'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationUpdateManyWithoutSchemaNestedInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyWithoutSchemaNestedInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateOrConnectWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'upsert'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationUpsertWithWhereUniqueWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'createMany'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateManySchemaInputEnvelope'; ofType: null; }; defaultValue: null }, { name: 'set'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'disconnect'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'delete'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'connect'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'update'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateWithWhereUniqueWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'updateMany'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyWithWhereWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'deleteMany'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }]; }; + 'AttestationUpdateWithWhereUniqueWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateWithWhereUniqueWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationUpdateWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'AttestationUpsertWithWhereUniqueWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'AttestationUpsertWithWhereUniqueWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'update'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }]; }; + 'AttestationWhereInput': { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AttestationWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'data'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'decodedDataJson'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'recipient'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'attester'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'timeCreated'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'expirationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'revocationTime'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'refUID'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'revoked'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'ipfsHash'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'isOffchain'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaRelationFilter'; ofType: null; }; defaultValue: null }]; }; + 'AttestationWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'AttestationWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'BoolFieldUpdateOperationsInput': { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; isOneOf: false; inputFields: [{ name: 'set'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }]; }; + 'BoolFilter': { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; ofType: null; }; defaultValue: null }]; }; + 'BoolWithAggregatesFilter': { kind: 'INPUT_OBJECT'; name: 'BoolWithAggregatesFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; ofType: null; }; defaultValue: null }]; }; + 'Boolean': unknown; + 'EnsName': { kind: 'OBJECT'; name: 'EnsName'; fields: { 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'EnsNameAvgAggregate': { kind: 'OBJECT'; name: 'EnsNameAvgAggregate'; fields: { 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; }; + 'EnsNameAvgOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameAvgOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameCountAggregate': { kind: 'OBJECT'; name: 'EnsNameCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'EnsNameCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameCreateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'EnsNameCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameCreateManyInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'EnsNameGroupBy': { kind: 'OBJECT'; name: 'EnsNameGroupBy'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'EnsNameAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'EnsNameCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'EnsNameMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'EnsNameMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'EnsNameSumAggregate'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'EnsNameMaxAggregate': { kind: 'OBJECT'; name: 'EnsNameMaxAggregate'; fields: { 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'EnsNameMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameMinAggregate': { kind: 'OBJECT'; name: 'EnsNameMinAggregate'; fields: { 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'EnsNameMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'EnsNameCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'EnsNameAvgOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'EnsNameMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'EnsNameMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'EnsNameSumOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameScalarFieldEnum': { name: 'EnsNameScalarFieldEnum'; enumValues: 'id' | 'name' | 'timestamp'; }; + 'EnsNameScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EnsNameScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EnsNameScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EnsNameScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameSumAggregate': { kind: 'OBJECT'; name: 'EnsNameSumAggregate'; fields: { 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'EnsNameSumOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameSumOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameUpdateInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameUpdateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameWhereInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EnsNameWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EnsNameWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EnsNameWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }]; }; + 'EnsNameWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'EnsNameWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'Float': unknown; + 'Int': unknown; + 'IntFieldUpdateOperationsInput': { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; isOneOf: false; inputFields: [{ name: 'set'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'increment'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'decrement'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'multiply'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'divide'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; + 'IntFilter': { kind: 'INPUT_OBJECT'; name: 'IntFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }]; }; + 'IntWithAggregatesFilter': { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'NestedFloatFilter'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }]; }; + 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'createManyAttestation': { name: 'createManyAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createManyEnsName': { name: 'createManyEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createManyOffchainRevocation': { name: 'createManyOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createManySchema': { name: 'createManySchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createManySchemaName': { name: 'createManySchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createManyServiceStat': { name: 'createManyServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createManyTimestamp': { name: 'createManyTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'createOneAttestation': { name: 'createOneAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; }; } }; 'createOneEnsName': { name: 'createOneEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; }; } }; 'createOneOffchainRevocation': { name: 'createOneOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; }; } }; 'createOneSchema': { name: 'createOneSchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Schema'; ofType: null; }; } }; 'createOneSchemaName': { name: 'createOneSchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; }; } }; 'createOneServiceStat': { name: 'createOneServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; }; } }; 'createOneTimestamp': { name: 'createOneTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; }; } }; 'deleteManyAttestation': { name: 'deleteManyAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteManyEnsName': { name: 'deleteManyEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteManyOffchainRevocation': { name: 'deleteManyOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteManySchema': { name: 'deleteManySchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteManySchemaName': { name: 'deleteManySchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteManyServiceStat': { name: 'deleteManyServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteManyTimestamp': { name: 'deleteManyTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'deleteOneAttestation': { name: 'deleteOneAttestation'; type: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; } }; 'deleteOneEnsName': { name: 'deleteOneEnsName'; type: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; } }; 'deleteOneOffchainRevocation': { name: 'deleteOneOffchainRevocation'; type: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; } }; 'deleteOneSchema': { name: 'deleteOneSchema'; type: { kind: 'OBJECT'; name: 'Schema'; ofType: null; } }; 'deleteOneSchemaName': { name: 'deleteOneSchemaName'; type: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; } }; 'deleteOneServiceStat': { name: 'deleteOneServiceStat'; type: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; } }; 'deleteOneTimestamp': { name: 'deleteOneTimestamp'; type: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; } }; 'updateManyAttestation': { name: 'updateManyAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateManyEnsName': { name: 'updateManyEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateManyOffchainRevocation': { name: 'updateManyOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateManySchema': { name: 'updateManySchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateManySchemaName': { name: 'updateManySchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateManyServiceStat': { name: 'updateManyServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateManyTimestamp': { name: 'updateManyTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AffectedRowsOutput'; ofType: null; }; } }; 'updateOneAttestation': { name: 'updateOneAttestation'; type: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; } }; 'updateOneEnsName': { name: 'updateOneEnsName'; type: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; } }; 'updateOneOffchainRevocation': { name: 'updateOneOffchainRevocation'; type: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; } }; 'updateOneSchema': { name: 'updateOneSchema'; type: { kind: 'OBJECT'; name: 'Schema'; ofType: null; } }; 'updateOneSchemaName': { name: 'updateOneSchemaName'; type: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; } }; 'updateOneServiceStat': { name: 'updateOneServiceStat'; type: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; } }; 'updateOneTimestamp': { name: 'updateOneTimestamp'; type: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; } }; 'upsertOneAttestation': { name: 'upsertOneAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; }; } }; 'upsertOneEnsName': { name: 'upsertOneEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; }; } }; 'upsertOneOffchainRevocation': { name: 'upsertOneOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; }; } }; 'upsertOneSchema': { name: 'upsertOneSchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Schema'; ofType: null; }; } }; 'upsertOneSchemaName': { name: 'upsertOneSchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; }; } }; 'upsertOneServiceStat': { name: 'upsertOneServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; }; } }; 'upsertOneTimestamp': { name: 'upsertOneTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; }; } }; }; }; + 'NestedBoolFilter': { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; ofType: null; }; defaultValue: null }]; }; + 'NestedBoolWithAggregatesFilter': { kind: 'INPUT_OBJECT'; name: 'NestedBoolWithAggregatesFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'NestedBoolFilter'; ofType: null; }; defaultValue: null }]; }; + 'NestedFloatFilter': { kind: 'INPUT_OBJECT'; name: 'NestedFloatFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedFloatFilter'; ofType: null; }; defaultValue: null }]; }; + 'NestedIntFilter': { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }]; }; + 'NestedIntWithAggregatesFilter': { kind: 'INPUT_OBJECT'; name: 'NestedIntWithAggregatesFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'NestedFloatFilter'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }]; }; + 'NestedStringFilter': { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; ofType: null; }; defaultValue: null }]; }; + 'NestedStringWithAggregatesFilter': { kind: 'INPUT_OBJECT'; name: 'NestedStringWithAggregatesFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocation': { kind: 'OBJECT'; name: 'OffchainRevocation'; fields: { 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'uid': { name: 'uid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'OffchainRevocationAvgAggregate': { kind: 'OBJECT'; name: 'OffchainRevocationAvgAggregate'; fields: { 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; }; + 'OffchainRevocationAvgOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationAvgOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationCountAggregate': { kind: 'OBJECT'; name: 'OffchainRevocationCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'uid': { name: 'uid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'OffchainRevocationCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationCreateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'uid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'OffchainRevocationCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationCreateManyInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'uid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'OffchainRevocationGroupBy': { kind: 'OBJECT'; name: 'OffchainRevocationGroupBy'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'OffchainRevocationAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'OffchainRevocationCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'OffchainRevocationMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'OffchainRevocationMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'OffchainRevocationSumAggregate'; ofType: null; } }; 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'uid': { name: 'uid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'OffchainRevocationMaxAggregate': { kind: 'OBJECT'; name: 'OffchainRevocationMaxAggregate'; fields: { 'from': { name: 'from'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'uid': { name: 'uid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'OffchainRevocationMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationMinAggregate': { kind: 'OBJECT'; name: 'OffchainRevocationMinAggregate'; fields: { 'from': { name: 'from'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'uid': { name: 'uid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'OffchainRevocationMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationAvgOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationSumOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationScalarFieldEnum': { name: 'OffchainRevocationScalarFieldEnum'; enumValues: 'id' | 'from' | 'uid' | 'txid' | 'timestamp'; }; + 'OffchainRevocationScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationSumAggregate': { kind: 'OBJECT'; name: 'OffchainRevocationSumAggregate'; fields: { 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'OffchainRevocationSumOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationSumOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationUpdateInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationUpdateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationWhereInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'uid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }]; }; + 'OffchainRevocationWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'OffchainRevocationWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'aggregateAttestation': { name: 'aggregateAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateAttestation'; ofType: null; }; } }; 'aggregateEnsName': { name: 'aggregateEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateEnsName'; ofType: null; }; } }; 'aggregateOffchainRevocation': { name: 'aggregateOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateOffchainRevocation'; ofType: null; }; } }; 'aggregateSchema': { name: 'aggregateSchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateSchema'; ofType: null; }; } }; 'aggregateSchemaName': { name: 'aggregateSchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateSchemaName'; ofType: null; }; } }; 'aggregateServiceStat': { name: 'aggregateServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateServiceStat'; ofType: null; }; } }; 'aggregateTimestamp': { name: 'aggregateTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AggregateTimestamp'; ofType: null; }; } }; 'attestation': { name: 'attestation'; type: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; } }; 'attestations': { name: 'attestations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; }; }; }; } }; 'ensName': { name: 'ensName'; type: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; } }; 'ensNames': { name: 'ensNames'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; }; }; }; } }; 'findFirstAttestation': { name: 'findFirstAttestation'; type: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; } }; 'findFirstAttestationOrThrow': { name: 'findFirstAttestationOrThrow'; type: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; } }; 'findFirstEnsName': { name: 'findFirstEnsName'; type: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; } }; 'findFirstEnsNameOrThrow': { name: 'findFirstEnsNameOrThrow'; type: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; } }; 'findFirstOffchainRevocation': { name: 'findFirstOffchainRevocation'; type: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; } }; 'findFirstOffchainRevocationOrThrow': { name: 'findFirstOffchainRevocationOrThrow'; type: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; } }; 'findFirstSchema': { name: 'findFirstSchema'; type: { kind: 'OBJECT'; name: 'Schema'; ofType: null; } }; 'findFirstSchemaName': { name: 'findFirstSchemaName'; type: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; } }; 'findFirstSchemaNameOrThrow': { name: 'findFirstSchemaNameOrThrow'; type: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; } }; 'findFirstSchemaOrThrow': { name: 'findFirstSchemaOrThrow'; type: { kind: 'OBJECT'; name: 'Schema'; ofType: null; } }; 'findFirstServiceStat': { name: 'findFirstServiceStat'; type: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; } }; 'findFirstServiceStatOrThrow': { name: 'findFirstServiceStatOrThrow'; type: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; } }; 'findFirstTimestamp': { name: 'findFirstTimestamp'; type: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; } }; 'findFirstTimestampOrThrow': { name: 'findFirstTimestampOrThrow'; type: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; } }; 'getAttestation': { name: 'getAttestation'; type: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; } }; 'getEnsName': { name: 'getEnsName'; type: { kind: 'OBJECT'; name: 'EnsName'; ofType: null; } }; 'getOffchainRevocation': { name: 'getOffchainRevocation'; type: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; } }; 'getSchema': { name: 'getSchema'; type: { kind: 'OBJECT'; name: 'Schema'; ofType: null; } }; 'getSchemaName': { name: 'getSchemaName'; type: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; } }; 'getServiceStat': { name: 'getServiceStat'; type: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; } }; 'getTimestamp': { name: 'getTimestamp'; type: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; } }; 'groupByAttestation': { name: 'groupByAttestation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AttestationGroupBy'; ofType: null; }; }; }; } }; 'groupByEnsName': { name: 'groupByEnsName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EnsNameGroupBy'; ofType: null; }; }; }; } }; 'groupByOffchainRevocation': { name: 'groupByOffchainRevocation'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OffchainRevocationGroupBy'; ofType: null; }; }; }; } }; 'groupBySchema': { name: 'groupBySchema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SchemaGroupBy'; ofType: null; }; }; }; } }; 'groupBySchemaName': { name: 'groupBySchemaName'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SchemaNameGroupBy'; ofType: null; }; }; }; } }; 'groupByServiceStat': { name: 'groupByServiceStat'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ServiceStatGroupBy'; ofType: null; }; }; }; } }; 'groupByTimestamp': { name: 'groupByTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TimestampGroupBy'; ofType: null; }; }; }; } }; 'offchainRevocation': { name: 'offchainRevocation'; type: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; } }; 'offchainRevocations': { name: 'offchainRevocations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OffchainRevocation'; ofType: null; }; }; }; } }; 'schema': { name: 'schema'; type: { kind: 'OBJECT'; name: 'Schema'; ofType: null; } }; 'schemaName': { name: 'schemaName'; type: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; } }; 'schemaNames': { name: 'schemaNames'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; }; }; }; } }; 'schemata': { name: 'schemata'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Schema'; ofType: null; }; }; }; } }; 'serviceStat': { name: 'serviceStat'; type: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; } }; 'serviceStats': { name: 'serviceStats'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ServiceStat'; ofType: null; }; }; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; } }; 'timestamps': { name: 'timestamps'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Timestamp'; ofType: null; }; }; }; } }; }; }; + 'QueryMode': { name: 'QueryMode'; enumValues: 'default' | 'insensitive'; }; + 'Schema': { kind: 'OBJECT'; name: 'Schema'; fields: { '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'SchemaCount'; ofType: null; } }; 'attestations': { name: 'attestations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Attestation'; ofType: null; }; }; }; } }; 'creator': { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'index': { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'resolver': { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'revocable': { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'schema': { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'schemaNames': { name: 'schemaNames'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SchemaName'; ofType: null; }; }; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'SchemaAvgAggregate': { kind: 'OBJECT'; name: 'SchemaAvgAggregate'; fields: { 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; }; + 'SchemaAvgOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaAvgOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaCount': { kind: 'OBJECT'; name: 'SchemaCount'; fields: { 'attestations': { name: 'attestations'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'schemaNames': { name: 'schemaNames'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'SchemaCountAggregate': { kind: 'OBJECT'; name: 'SchemaCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'creator': { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'index': { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'resolver': { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'revocable': { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'schema': { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'SchemaCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaCreateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'attestations'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateNestedManyWithoutSchemaInput'; ofType: null; }; defaultValue: null }, { name: 'schemaNames'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateNestedManyWithoutSchemaInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateManyInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaCreateNestedOneWithoutAttestationsInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateNestedOneWithoutAttestationsInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutAttestationsInput'; ofType: null; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateOrConnectWithoutAttestationsInput'; ofType: null; }; defaultValue: null }, { name: 'connect'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaCreateNestedOneWithoutSchemaNamesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateNestedOneWithoutSchemaNamesInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutSchemaNamesInput'; ofType: null; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateOrConnectWithoutSchemaNamesInput'; ofType: null; }; defaultValue: null }, { name: 'connect'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaCreateOrConnectWithoutAttestationsInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateOrConnectWithoutAttestationsInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutAttestationsInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaCreateOrConnectWithoutSchemaNamesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateOrConnectWithoutSchemaNamesInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutSchemaNamesInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaCreateWithoutAttestationsInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutAttestationsInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'schemaNames'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateNestedManyWithoutSchemaInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaCreateWithoutSchemaNamesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutSchemaNamesInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'attestations'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationCreateNestedManyWithoutSchemaInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaGroupBy': { kind: 'OBJECT'; name: 'SchemaGroupBy'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'SchemaAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'SchemaCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'SchemaMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'SchemaMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'SchemaSumAggregate'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'index': { name: 'index'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'resolver': { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'revocable': { name: 'revocable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'schema': { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'SchemaMaxAggregate': { kind: 'OBJECT'; name: 'SchemaMaxAggregate'; fields: { 'creator': { name: 'creator'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'index': { name: 'index'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'resolver': { name: 'resolver'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'revocable': { name: 'revocable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'schema': { name: 'schema'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'SchemaMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaMinAggregate': { kind: 'OBJECT'; name: 'SchemaMinAggregate'; fields: { 'creator': { name: 'creator'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'index': { name: 'index'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'resolver': { name: 'resolver'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'revocable': { name: 'revocable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'schema': { name: 'schema'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'SchemaMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaName': { kind: 'OBJECT'; name: 'SchemaName'; fields: { 'attesterAddress': { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'isCreator': { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'schema': { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Schema'; ofType: null; }; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'SchemaNameAvgAggregate': { kind: 'OBJECT'; name: 'SchemaNameAvgAggregate'; fields: { 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; }; + 'SchemaNameAvgOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameAvgOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameCountAggregate': { kind: 'OBJECT'; name: 'SchemaNameCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'attesterAddress': { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'isCreator': { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'SchemaNameCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameCreateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'schema'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateNestedOneWithoutSchemaNamesInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateManyInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameCreateManySchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateManySchemaInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameCreateManySchemaInputEnvelope': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateManySchemaInputEnvelope'; isOneOf: false; inputFields: [{ name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateManySchemaInput'; ofType: null; }; }; }; }; defaultValue: null }, { name: 'skipDuplicates'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameCreateNestedManyWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateNestedManyWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateOrConnectWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'createMany'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateManySchemaInputEnvelope'; ofType: null; }; defaultValue: null }, { name: 'connect'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }]; }; + 'SchemaNameCreateOrConnectWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateOrConnectWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameCreateWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameGroupBy': { kind: 'OBJECT'; name: 'SchemaNameGroupBy'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'SchemaNameAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'SchemaNameCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'SchemaNameMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'SchemaNameMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'SchemaNameSumAggregate'; ofType: null; } }; 'attesterAddress': { name: 'attesterAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'isCreator': { name: 'isCreator'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'time': { name: 'time'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'SchemaNameListRelationFilter': { kind: 'INPUT_OBJECT'; name: 'SchemaNameListRelationFilter'; isOneOf: false; inputFields: [{ name: 'every'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; ofType: null; }; defaultValue: null }, { name: 'some'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; ofType: null; }; defaultValue: null }, { name: 'none'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameMaxAggregate': { kind: 'OBJECT'; name: 'SchemaNameMaxAggregate'; fields: { 'attesterAddress': { name: 'attesterAddress'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'isCreator': { name: 'isCreator'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'SchemaNameMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameMinAggregate': { kind: 'OBJECT'; name: 'SchemaNameMinAggregate'; fields: { 'attesterAddress': { name: 'attesterAddress'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'isCreator': { name: 'isCreator'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'schemaId': { name: 'schemaId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'SchemaNameMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameOrderByRelationAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameOrderByRelationAggregateInput'; isOneOf: false; inputFields: [{ name: '_count'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameAvgOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameSumOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaOrderByWithRelationInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameScalarFieldEnum': { name: 'SchemaNameScalarFieldEnum'; enumValues: 'id' | 'schemaId' | 'attesterAddress' | 'name' | 'time' | 'isCreator'; }; + 'SchemaNameScalarWhereInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'INPUT_OBJECT'; name: 'BoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameSumAggregate': { kind: 'OBJECT'; name: 'SchemaNameSumAggregate'; fields: { 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'SchemaNameSumOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameSumOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameUpdateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateOneRequiredWithoutSchemaNamesNestedInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameUpdateManyWithWhereWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyWithWhereWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereInput'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyMutationInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameUpdateManyWithoutSchemaNestedInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyWithoutSchemaNestedInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateOrConnectWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'upsert'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpsertWithWhereUniqueWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'createMany'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateManySchemaInputEnvelope'; ofType: null; }; defaultValue: null }, { name: 'set'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'disconnect'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'delete'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'connect'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'update'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateWithWhereUniqueWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'updateMany'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyWithWhereWithoutSchemaInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'deleteMany'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameScalarWhereInput'; ofType: null; }; }; }; defaultValue: null }]; }; + 'SchemaNameUpdateWithWhereUniqueWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateWithWhereUniqueWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameUpdateWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameUpsertWithWhereUniqueWithoutSchemaInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpsertWithWhereUniqueWithoutSchemaInput'; isOneOf: false; inputFields: [{ name: 'where'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; ofType: null; }; }; defaultValue: null }, { name: 'update'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameCreateWithoutSchemaInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaNameWhereInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaId'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'attesterAddress'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'isCreator'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaRelationFilter'; ofType: null; }; defaultValue: null }]; }; + 'SchemaNameWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'SchemaNameWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'SchemaOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'SchemaOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaAvgOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaSumOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'SchemaOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'attestations'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationOrderByRelationAggregateInput'; ofType: null; }; defaultValue: null }, { name: 'schemaNames'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameOrderByRelationAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaRelationFilter': { kind: 'INPUT_OBJECT'; name: 'SchemaRelationFilter'; isOneOf: false; inputFields: [{ name: 'is'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereInput'; ofType: null; }; defaultValue: null }, { name: 'isNot'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaScalarFieldEnum': { name: 'SchemaScalarFieldEnum'; enumValues: 'id' | 'schema' | 'creator' | 'resolver' | 'revocable' | 'index' | 'txid' | 'time'; }; + 'SchemaScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'SchemaSumAggregate': { kind: 'OBJECT'; name: 'SchemaSumAggregate'; fields: { 'time': { name: 'time'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'SchemaSumOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaSumOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'time'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpdateInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attestations'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyWithoutSchemaNestedInput'; ofType: null; }; defaultValue: null }, { name: 'schemaNames'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyWithoutSchemaNestedInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpdateOneRequiredWithoutAttestationsNestedInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateOneRequiredWithoutAttestationsNestedInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutAttestationsInput'; ofType: null; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateOrConnectWithoutAttestationsInput'; ofType: null; }; defaultValue: null }, { name: 'upsert'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaUpsertWithoutAttestationsInput'; ofType: null; }; defaultValue: null }, { name: 'connect'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; ofType: null; }; defaultValue: null }, { name: 'update'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateWithoutAttestationsInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpdateOneRequiredWithoutSchemaNamesNestedInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateOneRequiredWithoutSchemaNamesNestedInput'; isOneOf: false; inputFields: [{ name: 'create'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutSchemaNamesInput'; ofType: null; }; defaultValue: null }, { name: 'connectOrCreate'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateOrConnectWithoutSchemaNamesInput'; ofType: null; }; defaultValue: null }, { name: 'upsert'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaUpsertWithoutSchemaNamesInput'; ofType: null; }; defaultValue: null }, { name: 'connect'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; ofType: null; }; defaultValue: null }, { name: 'update'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateWithoutSchemaNamesInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpdateWithoutAttestationsInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateWithoutAttestationsInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schemaNames'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameUpdateManyWithoutSchemaNestedInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpdateWithoutSchemaNamesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateWithoutSchemaNamesInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'attestations'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationUpdateManyWithoutSchemaNestedInput'; ofType: null; }; defaultValue: null }]; }; + 'SchemaUpsertWithoutAttestationsInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpsertWithoutAttestationsInput'; isOneOf: false; inputFields: [{ name: 'update'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateWithoutAttestationsInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutAttestationsInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaUpsertWithoutSchemaNamesInput': { kind: 'INPUT_OBJECT'; name: 'SchemaUpsertWithoutSchemaNamesInput'; isOneOf: false; inputFields: [{ name: 'update'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaUpdateWithoutSchemaNamesInput'; ofType: null; }; }; defaultValue: null }, { name: 'create'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaCreateWithoutSchemaNamesInput'; ofType: null; }; }; defaultValue: null }]; }; + 'SchemaWhereInput': { kind: 'INPUT_OBJECT'; name: 'SchemaWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'SchemaWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'schema'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'creator'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'resolver'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'revocable'; type: { kind: 'INPUT_OBJECT'; name: 'BoolFilter'; ofType: null; }; defaultValue: null }, { name: 'index'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'time'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }, { name: 'attestations'; type: { kind: 'INPUT_OBJECT'; name: 'AttestationListRelationFilter'; ofType: null; }; defaultValue: null }, { name: 'schemaNames'; type: { kind: 'INPUT_OBJECT'; name: 'SchemaNameListRelationFilter'; ofType: null; }; defaultValue: null }]; }; + 'SchemaWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'SchemaWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStat': { kind: 'OBJECT'; name: 'ServiceStat'; fields: { 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'value': { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'ServiceStatCountAggregate': { kind: 'OBJECT'; name: 'ServiceStatCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'value': { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'ServiceStatCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatCreateInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatCreateInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; + 'ServiceStatCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatCreateManyInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; + 'ServiceStatGroupBy': { kind: 'OBJECT'; name: 'ServiceStatGroupBy'; fields: { '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'ServiceStatCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'ServiceStatMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'ServiceStatMinAggregate'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'value': { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'ServiceStatMaxAggregate': { kind: 'OBJECT'; name: 'ServiceStatMaxAggregate'; fields: { 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'value': { name: 'value'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'ServiceStatMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatMinAggregate': { kind: 'OBJECT'; name: 'ServiceStatMinAggregate'; fields: { 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'value': { name: 'value'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'ServiceStatMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'ServiceStatCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'ServiceStatMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'ServiceStatMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatScalarFieldEnum': { name: 'ServiceStatScalarFieldEnum'; enumValues: 'name' | 'value'; }; + 'ServiceStatScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ServiceStatScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ServiceStatScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ServiceStatScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatUpdateInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatUpdateInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatWhereInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ServiceStatWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ServiceStatWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ServiceStatWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'value'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }]; }; + 'ServiceStatWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'ServiceStatWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'SortOrder': { name: 'SortOrder'; enumValues: 'asc' | 'desc'; }; + 'String': unknown; + 'StringFieldUpdateOperationsInput': { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; isOneOf: false; inputFields: [{ name: 'set'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'StringFilter': { kind: 'INPUT_OBJECT'; name: 'StringFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'mode'; type: { kind: 'ENUM'; name: 'QueryMode'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; ofType: null; }; defaultValue: null }]; }; + 'StringWithAggregatesFilter': { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; isOneOf: false; inputFields: [{ name: 'equals'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'notIn'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; defaultValue: null }, { name: 'lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endsWith'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'mode'; type: { kind: 'ENUM'; name: 'QueryMode'; ofType: null; }; defaultValue: null }, { name: 'not'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'NestedIntFilter'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'NestedStringFilter'; ofType: null; }; defaultValue: null }]; }; + 'Timestamp': { kind: 'OBJECT'; name: 'Timestamp'; fields: { 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'tree': { name: 'tree'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'TimestampAvgAggregate': { kind: 'OBJECT'; name: 'TimestampAvgAggregate'; fields: { 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; }; + 'TimestampAvgOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampAvgOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'TimestampCountAggregate': { kind: 'OBJECT'; name: 'TimestampCountAggregate'; fields: { '_all': { name: '_all'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'tree': { name: 'tree'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'TimestampCountOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampCountOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'TimestampCreateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'tree'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'TimestampCreateManyInput': { kind: 'INPUT_OBJECT'; name: 'TimestampCreateManyInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'tree'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'TimestampGroupBy': { kind: 'OBJECT'; name: 'TimestampGroupBy'; fields: { '_avg': { name: '_avg'; type: { kind: 'OBJECT'; name: 'TimestampAvgAggregate'; ofType: null; } }; '_count': { name: '_count'; type: { kind: 'OBJECT'; name: 'TimestampCountAggregate'; ofType: null; } }; '_max': { name: '_max'; type: { kind: 'OBJECT'; name: 'TimestampMaxAggregate'; ofType: null; } }; '_min': { name: '_min'; type: { kind: 'OBJECT'; name: 'TimestampMinAggregate'; ofType: null; } }; '_sum': { name: '_sum'; type: { kind: 'OBJECT'; name: 'TimestampSumAggregate'; ofType: null; } }; 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'tree': { name: 'tree'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'txid': { name: 'txid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'TimestampMaxAggregate': { kind: 'OBJECT'; name: 'TimestampMaxAggregate'; fields: { 'from': { name: 'from'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'tree': { name: 'tree'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'TimestampMaxOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampMaxOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'TimestampMinAggregate': { kind: 'OBJECT'; name: 'TimestampMinAggregate'; fields: { 'from': { name: 'from'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'tree': { name: 'tree'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'txid': { name: 'txid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'TimestampMinOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampMinOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'TimestampOrderByWithAggregationInput': { kind: 'INPUT_OBJECT'; name: 'TimestampOrderByWithAggregationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: '_count'; type: { kind: 'INPUT_OBJECT'; name: 'TimestampCountOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_avg'; type: { kind: 'INPUT_OBJECT'; name: 'TimestampAvgOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_max'; type: { kind: 'INPUT_OBJECT'; name: 'TimestampMaxOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_min'; type: { kind: 'INPUT_OBJECT'; name: 'TimestampMinOrderByAggregateInput'; ofType: null; }; defaultValue: null }, { name: '_sum'; type: { kind: 'INPUT_OBJECT'; name: 'TimestampSumOrderByAggregateInput'; ofType: null; }; defaultValue: null }]; }; + 'TimestampOrderByWithRelationInput': { kind: 'INPUT_OBJECT'; name: 'TimestampOrderByWithRelationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'TimestampScalarFieldEnum': { name: 'TimestampScalarFieldEnum'; enumValues: 'id' | 'from' | 'txid' | 'tree' | 'timestamp'; }; + 'TimestampScalarWhereWithAggregatesInput': { kind: 'INPUT_OBJECT'; name: 'TimestampScalarWhereWithAggregatesInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TimestampScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TimestampScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TimestampScalarWhereWithAggregatesInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'INPUT_OBJECT'; name: 'StringWithAggregatesFilter'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntWithAggregatesFilter'; ofType: null; }; defaultValue: null }]; }; + 'TimestampSumAggregate': { kind: 'OBJECT'; name: 'TimestampSumAggregate'; fields: { 'timestamp': { name: 'timestamp'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; }; }; + 'TimestampSumOrderByAggregateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampSumOrderByAggregateInput'; isOneOf: false; inputFields: [{ name: 'timestamp'; type: { kind: 'ENUM'; name: 'SortOrder'; ofType: null; }; defaultValue: null }]; }; + 'TimestampUpdateInput': { kind: 'INPUT_OBJECT'; name: 'TimestampUpdateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'TimestampUpdateManyMutationInput': { kind: 'INPUT_OBJECT'; name: 'TimestampUpdateManyMutationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'INPUT_OBJECT'; name: 'StringFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFieldUpdateOperationsInput'; ofType: null; }; defaultValue: null }]; }; + 'TimestampWhereInput': { kind: 'INPUT_OBJECT'; name: 'TimestampWhereInput'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TimestampWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TimestampWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'NOT'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TimestampWhereInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'from'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'txid'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'tree'; type: { kind: 'INPUT_OBJECT'; name: 'StringFilter'; ofType: null; }; defaultValue: null }, { name: 'timestamp'; type: { kind: 'INPUT_OBJECT'; name: 'IntFilter'; ofType: null; }; defaultValue: null }]; }; + 'TimestampWhereUniqueInput': { kind: 'INPUT_OBJECT'; name: 'TimestampWhereUniqueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + }; +}; + +import * as gqlTada from 'gql.tada'; + +declare module 'gql.tada' { + interface setupSchema { + introspection: introspection + } +} \ No newline at end of file diff --git a/packages/client/src/types/greengoods.d.ts b/packages/client/src/types/greengoods.d.ts index e69de29..4c42e34 100644 --- a/packages/client/src/types/greengoods.d.ts +++ b/packages/client/src/types/greengoods.d.ts @@ -0,0 +1,162 @@ +declare enum Capital { + SOCIAL, + MATERIAL, + FINANCIAL, + LIVING, + INTELLECTUAL, + EXPERIENTIAL, + SPIRITUAL, + CULTURAL, +} + +declare type Plant = + | "Jatoba" + | "uvaia" + | "avocado" + | "banana" + | "jambo" + | "inga" + | "ipê"; + +// declare interface UserCard { +// id: string; // Privy ID +// username: string; // Unique username +// gardenerAddress: string; // Smart Account Address +// avatar?: string; +// location?: string; +// createdAt?: string; +// } + +// declare interface UserDraft { +// username: string; +// avatar: string; +// location: string; +// } + +// declare interface User extends UserDraft, UserCard { +// eoaAddress: string; // EOA address +// onboarded: boolean; +// email?: string; +// phoneNumber?: string; +// } + +declare interface GardenAssessment { + id: string; + authorAddress: string; + gardenAddress: string; + soilMoisturePercentage: number; + carbonTonStock: number; + carbonTonPotential: number; + gardenSquareMeters: number; + biome: string; + remoteReportCID: string; + speciesRegistryCID: string; + polygonCoordinates: string; + treeGenusesObserved: string[]; + weedGenusesObserved: string[]; + issues: string[]; + tags: string[]; + createdAt: number; +} + +declare interface GardenCard { + id: string; + name: string; + location: string; + bannerImage: string; + operators: string[]; +} + +declare interface Garden extends GardenCard { + description: string; + tokenAddress: string; + tokenID: number; + gardeners: string[]; + gardenAssessments: GardenAssessment[]; +} + +declare interface ActionCard { + id: number; + startTime: number; + endTime: number; + title: string; + instructions: string; + capitals: Captial[]; + media: string[]; + createdAt: number; +} + +declare interface Action extends ActionCard { + description: string; + inputs: WorkInput[]; + mediaInfo: { + title: string; + description: string; + maxImageCount: number; + }; + details: { + title: string; + description: string; + feedbackPlaceholder: string; + }; + review: { + title: string; + description: string; + }; +} + +declare interface WorkInput { + title: string; + placeholder: string; + type: "text" | "textarea" | "select" | "number"; + required: boolean; + options: string[]; +} + +declare interface WorkDraft { + actionUID: number; + title: string; + plantSelection: string[]; + plantCount: number; + feedback: string; + // metadata: Record; + media: File[]; +} + +declare interface WorkCard { + id: string; + title: string; + actionUID: number; + gardenerAddress: string; + gardenAddress: string; + feedback: string; + metadata: string; + media: string[]; + createdAt: number; +} + +declare interface WorkMetadata { + [key: string]: string | number | boolean | string[]; +} + +declare interface Work extends WorkCard { + approvals: WorkApproval[]; +} + +declare interface WorkApprovalDraft { + actionUID: number; + workUID: string; + approved: boolean; + feedback: string; +} + +declare interface WorkApprovalCard { + id: string; + workUID: string; + approved: boolean; + recipientAddress: string; + approverAddress: string; + createdAt: number; +} + +declare interface WorkApproval extends WorkApprovalDraft, WorkApprovalCard {} diff --git a/packages/client/src/types/vite-env.d.ts b/packages/client/src/types/vite-env.d.ts index 7cb47f4..7751425 100644 --- a/packages/client/src/types/vite-env.d.ts +++ b/packages/client/src/types/vite-env.d.ts @@ -1,9 +1,15 @@ /// /// -// declare namespace NodeJS { -// interface ProcessEnv { -// readonly NODE_ENV: "development" | "production" | "test"; -// readonly PUBLIC_URL: string; -// } -// } +interface ImportMetaEnv { + readonly NODE_ENV: "development" | "production" | "test"; + readonly PUBLIC_URL: string; + readonly VITE_ALCHEMY_API_KEY: string; + readonly VITE_PRIVY_APP_ID: string; + readonly VITE_PIMLICO_API_KEY: string; + readonly VITE_PINATA_API_KEY: string; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} diff --git a/packages/client/src/utils/EAS.json b/packages/client/src/utils/EAS.json deleted file mode 100644 index 899ca7e..0000000 --- a/packages/client/src/utils/EAS.json +++ /dev/null @@ -1,1185 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EAS", - "sourceName": "contracts/EAS.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "contract ISchemaRegistry", - "name": "registry", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessDenied", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyRevoked", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyRevokedOffchain", - "type": "error" - }, - { - "inputs": [], - "name": "AlreadyTimestamped", - "type": "error" - }, - { - "inputs": [], - "name": "DeadlineExpired", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientValue", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAttestation", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAttestations", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidExpirationTime", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidNonce", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidOffset", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRegistry", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRevocation", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRevocations", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSchema", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSignature", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidVerifier", - "type": "error" - }, - { - "inputs": [], - "name": "Irrevocable", - "type": "error" - }, - { - "inputs": [], - "name": "NotFound", - "type": "error" - }, - { - "inputs": [], - "name": "NotPayable", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "inputs": [], - "name": "WrongSchema", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "attester", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "schemaUID", - "type": "bytes32" - } - ], - "name": "Attested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldNonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newNonce", - "type": "uint256" - } - ], - "name": "NonceIncreased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "attester", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "schemaUID", - "type": "bytes32" - } - ], - "name": "Revoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "revoker", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "data", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "RevokedOffchain", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "data", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "Timestamped", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint64", - "name": "expirationTime", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "revocable", - "type": "bool" - }, - { - "internalType": "bytes32", - "name": "refUID", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct AttestationRequestData", - "name": "data", - "type": "tuple" - } - ], - "internalType": "struct AttestationRequest", - "name": "request", - "type": "tuple" - } - ], - "name": "attest", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint64", - "name": "expirationTime", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "revocable", - "type": "bool" - }, - { - "internalType": "bytes32", - "name": "refUID", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct AttestationRequestData", - "name": "data", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct Signature", - "name": "signature", - "type": "tuple" - }, - { - "internalType": "address", - "name": "attester", - "type": "address" - }, - { - "internalType": "uint64", - "name": "deadline", - "type": "uint64" - } - ], - "internalType": "struct DelegatedAttestationRequest", - "name": "delegatedRequest", - "type": "tuple" - } - ], - "name": "attestByDelegation", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAttestTypeHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - } - ], - "name": "getAttestation", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "time", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "expirationTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "revocationTime", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "refUID", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "attester", - "type": "address" - }, - { - "internalType": "bool", - "name": "revocable", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct Attestation", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDomainSeparator", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "revoker", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "data", - "type": "bytes32" - } - ], - "name": "getRevokeOffchain", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRevokeTypeHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getSchemaRegistry", - "outputs": [ - { - "internalType": "contract ISchemaRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "data", - "type": "bytes32" - } - ], - "name": "getTimestamp", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newNonce", - "type": "uint256" - } - ], - "name": "increaseNonce", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - } - ], - "name": "isAttestationValid", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint64", - "name": "expirationTime", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "revocable", - "type": "bool" - }, - { - "internalType": "bytes32", - "name": "refUID", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct AttestationRequestData[]", - "name": "data", - "type": "tuple[]" - } - ], - "internalType": "struct MultiAttestationRequest[]", - "name": "multiRequests", - "type": "tuple[]" - } - ], - "name": "multiAttest", - "outputs": [ - { - "internalType": "bytes32[]", - "name": "", - "type": "bytes32[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint64", - "name": "expirationTime", - "type": "uint64" - }, - { - "internalType": "bool", - "name": "revocable", - "type": "bool" - }, - { - "internalType": "bytes32", - "name": "refUID", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct AttestationRequestData[]", - "name": "data", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct Signature[]", - "name": "signatures", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "attester", - "type": "address" - }, - { - "internalType": "uint64", - "name": "deadline", - "type": "uint64" - } - ], - "internalType": "struct MultiDelegatedAttestationRequest[]", - "name": "multiDelegatedRequests", - "type": "tuple[]" - } - ], - "name": "multiAttestByDelegation", - "outputs": [ - { - "internalType": "bytes32[]", - "name": "", - "type": "bytes32[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct RevocationRequestData[]", - "name": "data", - "type": "tuple[]" - } - ], - "internalType": "struct MultiRevocationRequest[]", - "name": "multiRequests", - "type": "tuple[]" - } - ], - "name": "multiRevoke", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct RevocationRequestData[]", - "name": "data", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct Signature[]", - "name": "signatures", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "revoker", - "type": "address" - }, - { - "internalType": "uint64", - "name": "deadline", - "type": "uint64" - } - ], - "internalType": "struct MultiDelegatedRevocationRequest[]", - "name": "multiDelegatedRequests", - "type": "tuple[]" - } - ], - "name": "multiRevokeByDelegation", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "data", - "type": "bytes32[]" - } - ], - "name": "multiRevokeOffchain", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "data", - "type": "bytes32[]" - } - ], - "name": "multiTimestamp", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct RevocationRequestData", - "name": "data", - "type": "tuple" - } - ], - "internalType": "struct RevocationRequest", - "name": "request", - "type": "tuple" - } - ], - "name": "revoke", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "schema", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "uid", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct RevocationRequestData", - "name": "data", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct Signature", - "name": "signature", - "type": "tuple" - }, - { - "internalType": "address", - "name": "revoker", - "type": "address" - }, - { - "internalType": "uint64", - "name": "deadline", - "type": "uint64" - } - ], - "internalType": "struct DelegatedRevocationRequest", - "name": "delegatedRequest", - "type": "tuple" - } - ], - "name": "revokeByDelegation", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "data", - "type": "bytes32" - } - ], - "name": "revokeOffchain", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "data", - "type": "bytes32" - } - ], - "name": "timestamp", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x6101e060405234801561001157600080fd5b50604051614e58380380614e58833981016040819052610030916101f3565b60408051808201825260038082526245415360e81b602080840191909152835180850190945260058452640312e332e360dc1b90840152600160805260a052600060c081905290919082908290610088908390610179565b61018052610097816001610179565b6101a0528151602080840191909120610140528151908201206101605246610100526101276101405161016051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60e05250503061012052600261013d83826102c2565b5050506001600160a01b038116610167576040516311a1e69760e01b815260040160405180910390fd5b6001600160a01b03166101c0526103f2565b60006020835110156101955761018e836101ac565b90506101a6565b816101a084826102c2565b5060ff90505b92915050565b600080829050601f815111156101e0578260405163305a27a960e01b81526004016101d79190610380565b60405180910390fd5b80516101eb826103ce565b179392505050565b60006020828403121561020557600080fd5b81516001600160a01b038116811461021c57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061024d57607f821691505b60208210810361026d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102bd57806000526020600020601f840160051c8101602085101561029a5750805b601f840160051c820191505b818110156102ba57600081556001016102a6565b50505b505050565b81516001600160401b038111156102db576102db610223565b6102ef816102e98454610239565b84610273565b6020601f821160018114610323576000831561030b5750848201515b600019600385901b1c1916600184901b1784556102ba565b600084815260208120601f198516915b828110156103535787850151825560209485019460019092019101610333565b50848210156103715786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b602081526000825180602084015260005b818110156103ae5760208186018101516040868401015201610391565b506000604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561026d5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516149d261048660003960008181610538015281816115c10152611ef901526000612824015260006127f70152600061293101526000612909015260006128640152600061288e015260006128b801526000610c3401526000610c0b01526000610be201526149d26000f3fe6080604052600436106101965760003560e01c806384b0196e116100e1578063cf190f341161008a578063e71ff36511610064578063e71ff365146104dc578063ed24911d146104fc578063f10b5cc814610511578063f17325e71461056257600080fd5b8063cf190f3414610446578063d45c443514610466578063e30bb5631461049d57600080fd5b8063a6d4dbc7116100bb578063a6d4dbc7146103a6578063b469318d146103b9578063b83010d31461041357600080fd5b806384b0196e1461033e5780639541152514610366578063a3112a641461037957600080fd5b806344adc90e116101435780634d0030701161011d5780634d003070146102e957806354fd4d501461030957806379f7573a1461031e57600080fd5b806344adc90e146102a357806346926267146102c35780634cb7e9e5146102d657600080fd5b806317d7de7c1161017457806317d7de7c1461022b5780632d0335ab1461024d5780633c0427151461029057600080fd5b80630eabf6601461019b57806312b11a17146101b057806313893f61146101f2575b600080fd5b6101ae6101a936600461378d565b610575565b005b3480156101bc57600080fd5b507ffeb2925a02bae3dae48d424a0437a2b6ac939aa9230ddc55a1a76f065d9880765b6040519081526020015b60405180910390f35b3480156101fe57600080fd5b5061021261020d36600461378d565b61070c565b60405167ffffffffffffffff90911681526020016101e9565b34801561023757600080fd5b50610240610751565b6040516101e9919061383d565b34801561025957600080fd5b506101df610268366004613889565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6101df61029e3660046138a6565b6107e3565b6102b66102b136600461378d565b6108e6565b6040516101e991906138e1565b6101ae6102d1366004613924565b610a67565b6101ae6102e436600461378d565b610aeb565b3480156102f557600080fd5b5061021261030436600461393f565b610bce565b34801561031557600080fd5b50610240610bdb565b34801561032a57600080fd5b506101ae61033936600461393f565b610c7e565b34801561034a57600080fd5b50610353610d17565b6040516101e99796959493929190613994565b6102b661037436600461378d565b610d79565b34801561038557600080fd5b5061039961039436600461393f565b610fec565b6040516101e99190613b16565b6101ae6103b4366004613b29565b6111ae565b3480156103c557600080fd5b506102126103d4366004613b3d565b73ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205467ffffffffffffffff1690565b34801561041f57600080fd5b507fb5d556f07587ec0f08cf386545cc4362c702a001650c2058002615ee5c9d1e756101df565b34801561045257600080fd5b5061021261046136600461393f565b611253565b34801561047257600080fd5b5061021261048136600461393f565b60009081526005602052604090205467ffffffffffffffff1690565b3480156104a957600080fd5b506104cc6104b836600461393f565b600090815260046020526040902054151590565b60405190151581526020016101e9565b3480156104e857600080fd5b506102126104f736600461378d565b611261565b34801561050857600080fd5b506101df611299565b34801561051d57600080fd5b5060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101e9565b6101df610570366004613b69565b6112a8565b348160005b81811015610705577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201811460008686848181106105bb576105bb613ba4565b90506020028101906105cd9190613bd3565b6105d690613e69565b60208101518051919250908015806105f357508260400151518114155b1561062a576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156106ce576106c66040518060a001604052808660000151815260200185848151811061065f5761065f613ba4565b602002602001015181526020018660400151848151811061068257610682613ba4565b60200260200101518152602001866060015173ffffffffffffffffffffffffffffffffffffffff168152602001866080015167ffffffffffffffff16815250611366565b60010161062d565b506106e483600001518385606001518a88611578565b6106ee9088613f99565b9650505050506106fe8160010190565b905061057a565b5050505050565b60004282825b818110156107455761073d3387878481811061073057610730613ba4565b9050602002013585611bc9565b600101610712565b50909150505b92915050565b60606002805461076090613fac565b80601f016020809104026020016040519081016040528092919081815260200182805461078c90613fac565b80156107d95780601f106107ae576101008083540402835291602001916107d9565b820191906000526020600020905b8154815290600101906020018083116107bc57829003601f168201915b5050505050905090565b60006107f66107f183614126565b611cc8565b604080516001808252818301909252600091816020015b6040805160c081018252600080825260208083018290529282018190526060808301829052608083015260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161080d57905050905061087b60208401846141a1565b610884906141d5565b8160008151811061089757610897613ba4565b60209081029190910101526108c08335826108b860c0870160a08801613889565b346001611e53565b602001516000815181106108d6576108d6613ba4565b6020026020010151915050919050565b60608160008167ffffffffffffffff81111561090457610904613c11565b60405190808252806020026020018201604052801561093757816020015b60608152602001906001900390816109225790505b509050600034815b84811015610a51577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff850181143689898481811061097f5761097f613ba4565b905060200281019061099191906141e1565b90506109a06020820182614215565b90506000036109db576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a0082356109ef6020850185614215565b6109f89161427d565b338887611e53565b8051909150610a0f9086613f99565b94508060200151878581518110610a2857610a28613ba4565b602002602001018190525080602001515186019550505050610a4a8160010190565b905061093f565b50610a5c8383612586565b979650505050505050565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081610a7e579050509050610ab9368390038301602084016142e3565b81600081518110610acc57610acc613ba4565b6020908102919091010152610ae682358233346001611578565b505050565b348160005b81811015610705577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201811436868684818110610b3057610b30613ba4565b9050602002810190610b4291906141e1565b9050610baf8135610b5660208401846142ff565b808060200260200160405190810160405280939291908181526020016000905b82821015610ba257610b93604083028601368190038101906142e3565b81526020019060010190610b76565b5050505050338886611578565b610bb99086613f99565b94505050610bc78160010190565b9050610af0565b60004261074b8382612670565b6060610c067f0000000000000000000000000000000000000000000000000000000000000000612732565b610c2f7f0000000000000000000000000000000000000000000000000000000000000000612732565b610c587f0000000000000000000000000000000000000000000000000000000000000000612732565b604051602001610c6a93929190614367565b604051602081830303815290604052905090565b33600090815260036020526040902054808211610cc7576040517f756688fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526003602090815260409182902084905581518381529081018490527f57b09af877df9068fd60a69d7b21f5576b8b38955812d6ae4ac52942f1e38fb7910160405180910390a15050565b600060608060008060006060610d2b6127f0565b610d3361281d565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b60608160008167ffffffffffffffff811115610d9757610d97613c11565b604051908082528060200260200182016040528015610dca57816020015b6060815260200190600190039081610db55790505b509050600034815b84811015610a51577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8501811436898984818110610e1257610e12613ba4565b9050602002810190610e249190613bd3565b9050366000610e366020840184614215565b909250905080801580610e575750610e5160408501856143fe565b90508114155b15610e8e576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610f6f57610f676040518060a0016040528087600001358152602001868685818110610ec357610ec3613ba4565b9050602002810190610ed591906141a1565b610ede906141d5565b8152602001610ef060408901896143fe565b85818110610f0057610f00613ba4565b905060600201803603810190610f169190614465565b8152602001610f2b6080890160608a01613889565b73ffffffffffffffffffffffffffffffffffffffff168152602001610f5660a0890160808a01614481565b67ffffffffffffffff169052611cc8565b600101610e91565b506000610f988535610f81858761427d565b610f916080890160608a01613889565b8b8a611e53565b8051909150610fa79089613f99565b975080602001518a8881518110610fc057610fc0613ba4565b602002602001018190525080602001515189019850505050505050610fe58160010190565b9050610dd2565b604080516101408101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e0820183905261010082019290925261012081019190915260008281526004602081815260409283902083516101408101855281548152600182015492810192909252600281015467ffffffffffffffff808216958401959095526801000000000000000081048516606084015270010000000000000000000000000000000090049093166080820152600383015460a08201529082015473ffffffffffffffffffffffffffffffffffffffff90811660c0830152600583015490811660e083015274010000000000000000000000000000000000000000900460ff1615156101008201526006820180549192916101208401919061112590613fac565b80601f016020809104026020016040519081016040528092919081815260200182805461115190613fac565b801561119e5780601f106111735761010080835404028352916020019161119e565b820191906000526020600020905b81548152906001019060200180831161118157829003601f168201915b5050505050815250509050919050565b6111c56111c03683900383018361449c565b611366565b604080516001808252818301909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816111dc579050509050611217368390038301602084016142e3565b8160008151811061122a5761122a613ba4565b6020908102919091010152610ae682358261124b60e0860160c08701613889565b346001611578565b60004261074b338483611bc9565b60004282825b818110156107455761129186868381811061128457611284613ba4565b9050602002013584612670565b600101611267565b60006112a361284a565b905090565b604080516001808252818301909252600091829190816020015b6040805160c081018252600080825260208083018290529282018190526060808301829052608083015260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816112c257905050905061133060208401846141a1565b611339906141d5565b8160008151811061134c5761134c613ba4565b60209081029190910101526108c083358233346001611e53565b608081015167ffffffffffffffff161580159061139a57504267ffffffffffffffff16816080015167ffffffffffffffff16105b156113d1576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808201516040808401516060850151855184518587015173ffffffffffffffffffffffffffffffffffffffff84166000908152600390985294872080549697949694956114c6957fb5d556f07587ec0f08cf386545cc4362c702a001650c2058002615ee5c9d1e7595949392886114498361450c565b909155506080808c015160408051602081019990995273ffffffffffffffffffffffffffffffffffffffff9097169688019690965260608701949094529285019190915260a084015260c083015267ffffffffffffffff1660e0820152610100015b60405160208183030381529060405280519060200120612982565b905061153c84606001518284602001518560400151866000015160405160200161152893929190928352602083019190915260f81b7fff0000000000000000000000000000000000000000000000000000000000000016604082015260410190565b6040516020818303038152906040526129ca565b611572576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815260048101869052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a2ea7c6e90602401600060405180830381865afa158015611608573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261164e9190810190614544565b8051909150611689576040517fbf37b20e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855160008167ffffffffffffffff8111156116a6576116a6613c11565b60405190808252806020026020018201604052801561174557816020015b60408051610140810182526000808252602080830182905292820181905260608083018290526080830182905260a0830182905260c0830182905260e0830182905261010083019190915261012082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816116c45790505b50905060008267ffffffffffffffff81111561176357611763613c11565b60405190808252806020026020018201604052801561178c578160200160208202803683370190505b50905060005b83811015611bab5760008a82815181106117ae576117ae613ba4565b6020908102919091018101518051600090815260049092526040909120805491925090611807576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8c816001015414611844576040517fbf37b20e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600581015473ffffffffffffffffffffffffffffffffffffffff8c811691161461189a576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600581015474010000000000000000000000000000000000000000900460ff166118f0576040517f157bd4c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002810154700100000000000000000000000000000000900467ffffffffffffffff161561194a576040517f905e710700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b426002820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff811670010000000000000000000000000000000067ffffffffffffffff948516810291821793849055604080516101408101825287548152600188015460208201529386169286169290921791830191909152680100000000000000008304841660608301529091049091166080820152600382015460a0820152600482015473ffffffffffffffffffffffffffffffffffffffff90811660c0830152600583015490811660e083015274010000000000000000000000000000000000000000900460ff1615156101008201526006820180548391610120840191611a5690613fac565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8290613fac565b8015611acf5780601f10611aa457610100808354040283529160200191611acf565b820191906000526020600020905b815481529060010190602001808311611ab257829003601f168201915b505050505081525050858481518110611aea57611aea613ba4565b60200260200101819052508160200151848481518110611b0c57611b0c613ba4565b6020026020010181815250508c8b73ffffffffffffffffffffffffffffffffffffffff16868581518110611b4257611b42613ba4565b602002602001015160c0015173ffffffffffffffffffffffffffffffffffffffff167ff930a6e2523c9cc298691873087a740550b8fc85a0680830414c148ed927f6158560000151604051611b9991815260200190565b60405180910390a45050600101611792565b50611bbb84838360018b8b612a46565b9a9950505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600660209081526040808320858452918290529091205467ffffffffffffffff1615611c3d576040517fec9d6eeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526020829052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff861690811790915590519091859173ffffffffffffffffffffffffffffffffffffffff8816917f92a1f7a41a7c585a8b09e25b195e225b1d43248daca46b0faf9e0792777a222991a450505050565b608081015167ffffffffffffffff1615801590611cfc57504267ffffffffffffffff16816080015167ffffffffffffffff16105b15611d33576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808201516040808401516060808601518651855186880151868801519488015160808901518051908b012060a08a015173ffffffffffffffffffffffffffffffffffffffff871660009081526003909c52988b2080549a9b989a98996114c6997ffeb2925a02bae3dae48d424a0437a2b6ac939aa9230ddc55a1a76f065d988076999493928c611dc48361450c565b919050558e608001516040516020016114ab9b9a999897969594939291909a8b5273ffffffffffffffffffffffffffffffffffffffff998a1660208c015260408b019890985295909716606089015267ffffffffffffffff938416608089015291151560a088015260c087015260e0860152610100850193909352610120840152166101408201526101600190565b60408051808201909152600081526060602082015284516040805180820190915260008152606060208201528167ffffffffffffffff811115611e9857611e98613c11565b604051908082528060200260200182016040528015611ec1578160200160208202803683370190505b5060208201526040517fa2ea7c6e000000000000000000000000000000000000000000000000000000008152600481018990526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a2ea7c6e90602401600060405180830381865afa158015611f55573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611f9b9190810190614544565b8051909150611fd6576040517fbf37b20e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008367ffffffffffffffff811115611ff157611ff1613c11565b60405190808252806020026020018201604052801561209057816020015b60408051610140810182526000808252602080830182905292820181905260608083018290526080830182905260a0830182905260c0830182905260e0830182905261010083019190915261012082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161200f5790505b50905060008467ffffffffffffffff8111156120ae576120ae613c11565b6040519080825280602002602001820160405280156120d7578160200160208202803683370190505b50905060005b858110156125655760008b82815181106120f9576120f9613ba4565b60200260200101519050600067ffffffffffffffff16816020015167ffffffffffffffff161415801561214457504267ffffffffffffffff16816020015167ffffffffffffffff1611155b1561217b576040517f08e8b93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846040015115801561218e575080604001515b156121c5576040517f157bd4c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061014001604052806000801b81526020018f81526020016121e94290565b67ffffffffffffffff168152602001836020015167ffffffffffffffff168152602001600067ffffffffffffffff16815260200183606001518152602001836000015173ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815260200183604001511515815260200183608001518152509050600080600090505b61228b8382612e35565b600081815260046020526040902054909250156122aa57600101612281565b81835260008281526004602081815260409283902086518155908601516001820155918501516002830180546060880151608089015167ffffffffffffffff908116700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff92821668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009094169190951617919091171691909117905560a0850151600383015560c0850151908201805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905560e0850151600583018054610100880151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff000000000000000000000000000000000000000000909116929093169190911791909117905561012084015184919060068201906124299082614669565b505050606084015115612480576060840151600090815260046020526040902054612480576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8287868151811061249357612493613ba4565b60200260200101819052508360a001518686815181106124b5576124b5613ba4565b60200260200101818152505081896020015186815181106124d8576124d8613ba4565b6020026020010181815250508f8e73ffffffffffffffffffffffffffffffffffffffff16856000015173ffffffffffffffffffffffffffffffffffffffff167f8bf46bf4cfd674fa735a3d63ec1c9ad4153f033c290341f3a588b75685141b358560405161254891815260200190565b60405180910390a45050505061255e8160010190565b90506120dd565b5061257583838360008c8c612a46565b845250919998505050505050505050565b606060008267ffffffffffffffff8111156125a3576125a3613c11565b6040519080825280602002602001820160405280156125cc578160200160208202803683370190505b508451909150600090815b818110156126655760008782815181106125f3576125f3613ba4565b6020026020010151905060008151905060005b818110156126515782818151811061262057612620613ba4565b602002602001015187878151811061263a5761263a613ba4565b602090810291909101015260019586019501612606565b50505061265e8160010190565b90506125d7565b509195945050505050565b60008281526005602052604090205467ffffffffffffffff16156126c0576040517f2e26794600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff85169081179091559051909184917f5aafceeb1c7ad58e4a84898bdee37c02c0fc46e7d24e6b60e8209449f183459f9190a35050565b6060600061273f83612e94565b600101905060008167ffffffffffffffff81111561275f5761275f613c11565b6040519080825280601f01601f191660200182016040528015612789576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461279357509392505050565b60606112a37f00000000000000000000000000000000000000000000000000000000000000006000612f76565b60606112a37f00000000000000000000000000000000000000000000000000000000000000006001612f76565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156128b057507f000000000000000000000000000000000000000000000000000000000000000046145b156128da57507f000000000000000000000000000000000000000000000000000000000000000090565b6112a3604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b600061074b61298f61284a565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060006129d98585613021565b50909250905060008160038111156129f3576129f3614782565b148015612a2b57508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80612a3c5750612a3c86868661306e565b9695505050505050565b84516000906001819003612a9e57612a968888600081518110612a6b57612a6b613ba4565b602002602001015188600081518110612a8657612a86613ba4565b60200260200101518888886131bb565b915050612a3c565b602088015173ffffffffffffffffffffffffffffffffffffffff8116612b3f5760005b82811015612b2457878181518110612adb57612adb613ba4565b6020026020010151600014612b1c576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612ac1565b508315612b3457612b34856134da565b600092505050612a3c565b6000808273ffffffffffffffffffffffffffffffffffffffff1663ce46e0466040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb191906147b1565b905060005b84811015612c6e5760008a8281518110612bd257612bd2613ba4565b6020026020010151905080600003612bea5750612c66565b82612c21576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b88811115612c5b576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b978890039792909201915b600101612bb6565b508715612d49576040517f88e5b2d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906388e5b2d9908490612ccb908e908e906004016147ce565b60206040518083038185885af1158015612ce9573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612d0e91906147b1565b612d44576040517fbf2f3a8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e18565b6040517f91db0b7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906391db0b7e908490612d9f908e908e906004016147ce565b60206040518083038185885af1158015612dbd573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612de291906147b1565b612e18576040517fe8bee83900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8515612e2757612e27876134da565b509998505050505050505050565b60208083015160c084015160e0850151604080870151606088015161010089015160a08a01516101208b01519451600099612e7699989796918c9101614864565b60405160208183030381529060405280519060200120905092915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612edd577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612f09576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612f2757662386f26fc10000830492506010015b6305f5e1008310612f3f576305f5e100830492506008015b6127108310612f5357612710830492506004015b60648310612f65576064830492506002015b600a831061074b5760010192915050565b606060ff8314612f9057612f89836134ed565b905061074b565b818054612f9c90613fac565b80601f0160208091040260200160405190810160405280929190818152602001828054612fc890613fac565b80156130155780601f10612fea57610100808354040283529160200191613015565b820191906000526020600020905b815481529060010190602001808311612ff857829003601f168201915b5050505050905061074b565b6000806000835160410361305b5760208401516040850151606086015160001a61304d8882858561352c565b955095509550505050613067565b50508151600091506002905b9250925092565b60008060008573ffffffffffffffffffffffffffffffffffffffff16858560405160240161309d929190614981565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e000000000000000000000000000000000000000000000000000000001790525161311e919061499a565b600060405180830381855afa9150503d8060008114613159576040519150601f19603f3d011682016040523d82523d6000602084013e61315e565b606091505b509150915081801561317257506020815110155b8015612a3c575080517f1626ba7e00000000000000000000000000000000000000000000000000000000906131b090830160209081019084016149ac565b149695505050505050565b602086015160009073ffffffffffffffffffffffffffffffffffffffff811661322f578515613216576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821561322557613225846134da565b6000915050612a3c565b851561331a578073ffffffffffffffffffffffffffffffffffffffff1663ce46e0466040518163ffffffff1660e01b8152600401602060405180830381865afa158015613280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a491906147b1565b6132da576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83861115613314576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85840393505b84156133f2576040517fe49617e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063e49617e1908890613374908b90600401613b16565b60206040518083038185885af1158015613392573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906133b791906147b1565b6133ed576040517fccf3bb2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134bf565b6040517fe60c350500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063e60c3505908890613446908b90600401613b16565b60206040518083038185885af1158015613464573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061348991906147b1565b6134bf576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82156134ce576134ce846134da565b50939695505050505050565b80156134ea576134ea3382613626565b50565b606060006134fa83613700565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115613567575060009150600390508261361c565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156135bb573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166136125750600092506001915082905061361c565b9250600091508190505b9450945094915050565b80471015613666576040517fcd78605900000000000000000000000000000000000000000000000000000000815230600482015260240160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146136c0576040519150601f19603f3d011682016040523d82523d6000602084013e6136c5565b606091505b5050905080610ae6576040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ff8216601f81111561074b576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008083601f84011261375357600080fd5b50813567ffffffffffffffff81111561376b57600080fd5b6020830191508360208260051b850101111561378657600080fd5b9250929050565b600080602083850312156137a057600080fd5b823567ffffffffffffffff8111156137b757600080fd5b6137c385828601613741565b90969095509350505050565b60005b838110156137ea5781810151838201526020016137d2565b50506000910152565b6000815180845261380b8160208601602086016137cf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061385060208301846137f3565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff811681146134ea57600080fd5b803561388481613857565b919050565b60006020828403121561389b57600080fd5b813561385081613857565b6000602082840312156138b857600080fd5b813567ffffffffffffffff8111156138cf57600080fd5b820160e0818503121561385057600080fd5b602080825282518282018190526000918401906040840190835b818110156139195783518352602093840193909201916001016138fb565b509095945050505050565b6000606082840312801561393757600080fd5b509092915050565b60006020828403121561395157600080fd5b5035919050565b600081518084526020840193506020830160005b8281101561398a57815186526020958601959091019060010161396c565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e0602082015260006139cf60e08301896137f3565b82810360408401526139e181896137f3565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c0840152611bbb8185613958565b805182526020810151602083015260006040820151613a48604085018267ffffffffffffffff169052565b506060820151613a64606085018267ffffffffffffffff169052565b506080820151613a80608085018267ffffffffffffffff169052565b5060a082015160a084015260c0820151613ab260c085018273ffffffffffffffffffffffffffffffffffffffff169052565b5060e0820151613ada60e085018273ffffffffffffffffffffffffffffffffffffffff169052565b50610100820151613af061010085018215159052565b50610120820151610140610120850152613b0e6101408501826137f3565b949350505050565b6020815260006138506020830184613a1d565b600061010082840312801561393757600080fd5b60008060408385031215613b5057600080fd5b8235613b5b81613857565b946020939093013593505050565b600060208284031215613b7b57600080fd5b813567ffffffffffffffff811115613b9257600080fd5b82016040818503121561385057600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112613c0757600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613c6357613c63613c11565b60405290565b60405160c0810167ffffffffffffffff81118282101715613c6357613c63613c11565b6040516080810167ffffffffffffffff81118282101715613c6357613c63613c11565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613cf657613cf6613c11565b604052919050565b600067ffffffffffffffff821115613d1857613d18613c11565b5060051b60200190565b600060408284031215613d3457600080fd5b6040805190810167ffffffffffffffff81118282101715613d5757613d57613c11565b604052823581526020928301359281019290925250919050565b600060608284031215613d8357600080fd5b6040516060810167ffffffffffffffff81118282101715613da657613da6613c11565b604052905080823560ff81168114613dbd57600080fd5b815260208381013590820152604092830135920191909152919050565b600082601f830112613deb57600080fd5b8135613dfe613df982613cfe565b613caf565b80828252602082019150602060608402860101925085831115613e2057600080fd5b602085015b83811015613e4757613e378782613d71565b8352602090920191606001613e25565b5095945050505050565b803567ffffffffffffffff8116811461388457600080fd5b600060a08236031215613e7b57600080fd5b613e83613c40565b82358152602083013567ffffffffffffffff811115613ea157600080fd5b830136601f820112613eb257600080fd5b8035613ec0613df982613cfe565b8082825260208201915060208360061b850101925036831115613ee257600080fd5b6020840193505b82841015613f0e57613efb3685613d22565b8252602082019150604084019350613ee9565b6020850152505050604083013567ffffffffffffffff811115613f3057600080fd5b613f3c36828601613dda565b604083015250613f4e60608401613879565b6060820152613f5f60808401613e51565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561074b5761074b613f6a565b600181811c90821680613fc057607f821691505b602082108103613ff9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b80151581146134ea57600080fd5b600067ffffffffffffffff82111561402757614027613c11565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060c0828403121561406557600080fd5b61406d613c69565b9050813561407a81613857565b815261408860208301613e51565b6020820152604082013561409b81613fff565b604082015260608281013590820152608082013567ffffffffffffffff8111156140c457600080fd5b8201601f810184136140d557600080fd5b80356140e3613df98261400d565b8181528560208385010111156140f857600080fd5b8160208401602083013760009181016020019190915260808301525060a09182013591810191909152919050565b600060e0823603121561413857600080fd5b614140613c40565b82358152602083013567ffffffffffffffff81111561415e57600080fd5b61416a36828601614053565b60208301525061417d3660408501613d71565b604082015260a083013561419081613857565b6060820152613f5f60c08401613e51565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112613c0757600080fd5b600061074b3683614053565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613c0757600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261424a57600080fd5b83018035915067ffffffffffffffff82111561426557600080fd5b6020019150600581901b360382131561378657600080fd5b600061428b613df984613cfe565b8381526020810190600585901b8401368111156142a757600080fd5b845b8181101561391957803567ffffffffffffffff8111156142c857600080fd5b6142d436828901614053565b855250602093840193016142a9565b6000604082840312156142f557600080fd5b6138508383613d22565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261433457600080fd5b83018035915067ffffffffffffffff82111561434f57600080fd5b6020019150600681901b360382131561378657600080fd5b600084516143798184602089016137cf565b7f2e0000000000000000000000000000000000000000000000000000000000000090830190815284516143b38160018401602089016137cf565b7f2e000000000000000000000000000000000000000000000000000000000000006001929091019182015283516143f18160028401602088016137cf565b0160020195945050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261443357600080fd5b83018035915067ffffffffffffffff82111561444e57600080fd5b602001915060608102360382131561378657600080fd5b60006060828403121561447757600080fd5b6138508383613d71565b60006020828403121561449357600080fd5b61385082613e51565b60006101008284031280156144b057600080fd5b506144b9613c40565b823581526144ca8460208501613d22565b60208201526144dc8460608501613d71565b604082015260c08301356144ef81613857565b606082015261450060e08401613e51565b60808201529392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361453d5761453d613f6a565b5060010190565b60006020828403121561455657600080fd5b815167ffffffffffffffff81111561456d57600080fd5b82016080818503121561457f57600080fd5b614587613c8c565b81518152602082015161459981613857565b602082015260408201516145ac81613fff565b6040820152606082015167ffffffffffffffff8111156145cb57600080fd5b80830192505084601f8301126145e057600080fd5b81516145ee613df98261400d565b81815286602083860101111561460357600080fd5b6146148260208301602087016137cf565b606083015250949350505050565b601f821115610ae657806000526020600020601f840160051c810160208510156146495750805b601f840160051c820191505b818110156107055760008155600101614655565b815167ffffffffffffffff81111561468357614683613c11565b614697816146918454613fac565b84614622565b6020601f8211600181146146e957600083156146b35750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455610705565b6000848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156147375787850151825560209485019460019092019101614717565b508482101561477357868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000602082840312156147c357600080fd5b815161385081613fff565b6000604082016040835280855180835260608501915060608160051b86010192506020870160005b82811015614845577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0878603018452614830858351613a1d565b945060209384019391909101906001016147f6565b50505050828103602084015261485b8185613958565b95945050505050565b8981527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008960601b1660208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008860601b1660348201527fffffffffffffffff0000000000000000000000000000000000000000000000008760c01b1660488201527fffffffffffffffff0000000000000000000000000000000000000000000000008660c01b16605082015284151560f81b60588201528360598201526000607982016000855161493c818460208a016137cf565b8201905061496e818660e01b7fffffffff00000000000000000000000000000000000000000000000000000000169052565b6004019c9b505050505050505050505050565b828152604060208201526000613b0e60408301846137f3565b60008251613c078184602087016137cf565b6000602082840312156149be57600080fd5b505191905056fea164736f6c634300081a000a", - "deployedBytecode": "0x6080604052600436106101965760003560e01c806384b0196e116100e1578063cf190f341161008a578063e71ff36511610064578063e71ff365146104dc578063ed24911d146104fc578063f10b5cc814610511578063f17325e71461056257600080fd5b8063cf190f3414610446578063d45c443514610466578063e30bb5631461049d57600080fd5b8063a6d4dbc7116100bb578063a6d4dbc7146103a6578063b469318d146103b9578063b83010d31461041357600080fd5b806384b0196e1461033e5780639541152514610366578063a3112a641461037957600080fd5b806344adc90e116101435780634d0030701161011d5780634d003070146102e957806354fd4d501461030957806379f7573a1461031e57600080fd5b806344adc90e146102a357806346926267146102c35780634cb7e9e5146102d657600080fd5b806317d7de7c1161017457806317d7de7c1461022b5780632d0335ab1461024d5780633c0427151461029057600080fd5b80630eabf6601461019b57806312b11a17146101b057806313893f61146101f2575b600080fd5b6101ae6101a936600461378d565b610575565b005b3480156101bc57600080fd5b507ffeb2925a02bae3dae48d424a0437a2b6ac939aa9230ddc55a1a76f065d9880765b6040519081526020015b60405180910390f35b3480156101fe57600080fd5b5061021261020d36600461378d565b61070c565b60405167ffffffffffffffff90911681526020016101e9565b34801561023757600080fd5b50610240610751565b6040516101e9919061383d565b34801561025957600080fd5b506101df610268366004613889565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6101df61029e3660046138a6565b6107e3565b6102b66102b136600461378d565b6108e6565b6040516101e991906138e1565b6101ae6102d1366004613924565b610a67565b6101ae6102e436600461378d565b610aeb565b3480156102f557600080fd5b5061021261030436600461393f565b610bce565b34801561031557600080fd5b50610240610bdb565b34801561032a57600080fd5b506101ae61033936600461393f565b610c7e565b34801561034a57600080fd5b50610353610d17565b6040516101e99796959493929190613994565b6102b661037436600461378d565b610d79565b34801561038557600080fd5b5061039961039436600461393f565b610fec565b6040516101e99190613b16565b6101ae6103b4366004613b29565b6111ae565b3480156103c557600080fd5b506102126103d4366004613b3d565b73ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205467ffffffffffffffff1690565b34801561041f57600080fd5b507fb5d556f07587ec0f08cf386545cc4362c702a001650c2058002615ee5c9d1e756101df565b34801561045257600080fd5b5061021261046136600461393f565b611253565b34801561047257600080fd5b5061021261048136600461393f565b60009081526005602052604090205467ffffffffffffffff1690565b3480156104a957600080fd5b506104cc6104b836600461393f565b600090815260046020526040902054151590565b60405190151581526020016101e9565b3480156104e857600080fd5b506102126104f736600461378d565b611261565b34801561050857600080fd5b506101df611299565b34801561051d57600080fd5b5060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101e9565b6101df610570366004613b69565b6112a8565b348160005b81811015610705577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201811460008686848181106105bb576105bb613ba4565b90506020028101906105cd9190613bd3565b6105d690613e69565b60208101518051919250908015806105f357508260400151518114155b1561062a576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156106ce576106c66040518060a001604052808660000151815260200185848151811061065f5761065f613ba4565b602002602001015181526020018660400151848151811061068257610682613ba4565b60200260200101518152602001866060015173ffffffffffffffffffffffffffffffffffffffff168152602001866080015167ffffffffffffffff16815250611366565b60010161062d565b506106e483600001518385606001518a88611578565b6106ee9088613f99565b9650505050506106fe8160010190565b905061057a565b5050505050565b60004282825b818110156107455761073d3387878481811061073057610730613ba4565b9050602002013585611bc9565b600101610712565b50909150505b92915050565b60606002805461076090613fac565b80601f016020809104026020016040519081016040528092919081815260200182805461078c90613fac565b80156107d95780601f106107ae576101008083540402835291602001916107d9565b820191906000526020600020905b8154815290600101906020018083116107bc57829003601f168201915b5050505050905090565b60006107f66107f183614126565b611cc8565b604080516001808252818301909252600091816020015b6040805160c081018252600080825260208083018290529282018190526060808301829052608083015260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161080d57905050905061087b60208401846141a1565b610884906141d5565b8160008151811061089757610897613ba4565b60209081029190910101526108c08335826108b860c0870160a08801613889565b346001611e53565b602001516000815181106108d6576108d6613ba4565b6020026020010151915050919050565b60608160008167ffffffffffffffff81111561090457610904613c11565b60405190808252806020026020018201604052801561093757816020015b60608152602001906001900390816109225790505b509050600034815b84811015610a51577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff850181143689898481811061097f5761097f613ba4565b905060200281019061099191906141e1565b90506109a06020820182614215565b90506000036109db576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a0082356109ef6020850185614215565b6109f89161427d565b338887611e53565b8051909150610a0f9086613f99565b94508060200151878581518110610a2857610a28613ba4565b602002602001018190525080602001515186019550505050610a4a8160010190565b905061093f565b50610a5c8383612586565b979650505050505050565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081610a7e579050509050610ab9368390038301602084016142e3565b81600081518110610acc57610acc613ba4565b6020908102919091010152610ae682358233346001611578565b505050565b348160005b81811015610705577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201811436868684818110610b3057610b30613ba4565b9050602002810190610b4291906141e1565b9050610baf8135610b5660208401846142ff565b808060200260200160405190810160405280939291908181526020016000905b82821015610ba257610b93604083028601368190038101906142e3565b81526020019060010190610b76565b5050505050338886611578565b610bb99086613f99565b94505050610bc78160010190565b9050610af0565b60004261074b8382612670565b6060610c067f0000000000000000000000000000000000000000000000000000000000000000612732565b610c2f7f0000000000000000000000000000000000000000000000000000000000000000612732565b610c587f0000000000000000000000000000000000000000000000000000000000000000612732565b604051602001610c6a93929190614367565b604051602081830303815290604052905090565b33600090815260036020526040902054808211610cc7576040517f756688fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526003602090815260409182902084905581518381529081018490527f57b09af877df9068fd60a69d7b21f5576b8b38955812d6ae4ac52942f1e38fb7910160405180910390a15050565b600060608060008060006060610d2b6127f0565b610d3361281d565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b60608160008167ffffffffffffffff811115610d9757610d97613c11565b604051908082528060200260200182016040528015610dca57816020015b6060815260200190600190039081610db55790505b509050600034815b84811015610a51577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8501811436898984818110610e1257610e12613ba4565b9050602002810190610e249190613bd3565b9050366000610e366020840184614215565b909250905080801580610e575750610e5160408501856143fe565b90508114155b15610e8e576040517f947d5a8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610f6f57610f676040518060a0016040528087600001358152602001868685818110610ec357610ec3613ba4565b9050602002810190610ed591906141a1565b610ede906141d5565b8152602001610ef060408901896143fe565b85818110610f0057610f00613ba4565b905060600201803603810190610f169190614465565b8152602001610f2b6080890160608a01613889565b73ffffffffffffffffffffffffffffffffffffffff168152602001610f5660a0890160808a01614481565b67ffffffffffffffff169052611cc8565b600101610e91565b506000610f988535610f81858761427d565b610f916080890160608a01613889565b8b8a611e53565b8051909150610fa79089613f99565b975080602001518a8881518110610fc057610fc0613ba4565b602002602001018190525080602001515189019850505050505050610fe58160010190565b9050610dd2565b604080516101408101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e0820183905261010082019290925261012081019190915260008281526004602081815260409283902083516101408101855281548152600182015492810192909252600281015467ffffffffffffffff808216958401959095526801000000000000000081048516606084015270010000000000000000000000000000000090049093166080820152600383015460a08201529082015473ffffffffffffffffffffffffffffffffffffffff90811660c0830152600583015490811660e083015274010000000000000000000000000000000000000000900460ff1615156101008201526006820180549192916101208401919061112590613fac565b80601f016020809104026020016040519081016040528092919081815260200182805461115190613fac565b801561119e5780601f106111735761010080835404028352916020019161119e565b820191906000526020600020905b81548152906001019060200180831161118157829003601f168201915b5050505050815250509050919050565b6111c56111c03683900383018361449c565b611366565b604080516001808252818301909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816111dc579050509050611217368390038301602084016142e3565b8160008151811061122a5761122a613ba4565b6020908102919091010152610ae682358261124b60e0860160c08701613889565b346001611578565b60004261074b338483611bc9565b60004282825b818110156107455761129186868381811061128457611284613ba4565b9050602002013584612670565b600101611267565b60006112a361284a565b905090565b604080516001808252818301909252600091829190816020015b6040805160c081018252600080825260208083018290529282018190526060808301829052608083015260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816112c257905050905061133060208401846141a1565b611339906141d5565b8160008151811061134c5761134c613ba4565b60209081029190910101526108c083358233346001611e53565b608081015167ffffffffffffffff161580159061139a57504267ffffffffffffffff16816080015167ffffffffffffffff16105b156113d1576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808201516040808401516060850151855184518587015173ffffffffffffffffffffffffffffffffffffffff84166000908152600390985294872080549697949694956114c6957fb5d556f07587ec0f08cf386545cc4362c702a001650c2058002615ee5c9d1e7595949392886114498361450c565b909155506080808c015160408051602081019990995273ffffffffffffffffffffffffffffffffffffffff9097169688019690965260608701949094529285019190915260a084015260c083015267ffffffffffffffff1660e0820152610100015b60405160208183030381529060405280519060200120612982565b905061153c84606001518284602001518560400151866000015160405160200161152893929190928352602083019190915260f81b7fff0000000000000000000000000000000000000000000000000000000000000016604082015260410190565b6040516020818303038152906040526129ca565b611572576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815260048101869052600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a2ea7c6e90602401600060405180830381865afa158015611608573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261164e9190810190614544565b8051909150611689576040517fbf37b20e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855160008167ffffffffffffffff8111156116a6576116a6613c11565b60405190808252806020026020018201604052801561174557816020015b60408051610140810182526000808252602080830182905292820181905260608083018290526080830182905260a0830182905260c0830182905260e0830182905261010083019190915261012082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816116c45790505b50905060008267ffffffffffffffff81111561176357611763613c11565b60405190808252806020026020018201604052801561178c578160200160208202803683370190505b50905060005b83811015611bab5760008a82815181106117ae576117ae613ba4565b6020908102919091018101518051600090815260049092526040909120805491925090611807576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8c816001015414611844576040517fbf37b20e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600581015473ffffffffffffffffffffffffffffffffffffffff8c811691161461189a576040517f4ca8886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600581015474010000000000000000000000000000000000000000900460ff166118f0576040517f157bd4c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002810154700100000000000000000000000000000000900467ffffffffffffffff161561194a576040517f905e710700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b426002820180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff811670010000000000000000000000000000000067ffffffffffffffff948516810291821793849055604080516101408101825287548152600188015460208201529386169286169290921791830191909152680100000000000000008304841660608301529091049091166080820152600382015460a0820152600482015473ffffffffffffffffffffffffffffffffffffffff90811660c0830152600583015490811660e083015274010000000000000000000000000000000000000000900460ff1615156101008201526006820180548391610120840191611a5690613fac565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8290613fac565b8015611acf5780601f10611aa457610100808354040283529160200191611acf565b820191906000526020600020905b815481529060010190602001808311611ab257829003601f168201915b505050505081525050858481518110611aea57611aea613ba4565b60200260200101819052508160200151848481518110611b0c57611b0c613ba4565b6020026020010181815250508c8b73ffffffffffffffffffffffffffffffffffffffff16868581518110611b4257611b42613ba4565b602002602001015160c0015173ffffffffffffffffffffffffffffffffffffffff167ff930a6e2523c9cc298691873087a740550b8fc85a0680830414c148ed927f6158560000151604051611b9991815260200190565b60405180910390a45050600101611792565b50611bbb84838360018b8b612a46565b9a9950505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600660209081526040808320858452918290529091205467ffffffffffffffff1615611c3d576040517fec9d6eeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526020829052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff861690811790915590519091859173ffffffffffffffffffffffffffffffffffffffff8816917f92a1f7a41a7c585a8b09e25b195e225b1d43248daca46b0faf9e0792777a222991a450505050565b608081015167ffffffffffffffff1615801590611cfc57504267ffffffffffffffff16816080015167ffffffffffffffff16105b15611d33576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808201516040808401516060808601518651855186880151868801519488015160808901518051908b012060a08a015173ffffffffffffffffffffffffffffffffffffffff871660009081526003909c52988b2080549a9b989a98996114c6997ffeb2925a02bae3dae48d424a0437a2b6ac939aa9230ddc55a1a76f065d988076999493928c611dc48361450c565b919050558e608001516040516020016114ab9b9a999897969594939291909a8b5273ffffffffffffffffffffffffffffffffffffffff998a1660208c015260408b019890985295909716606089015267ffffffffffffffff938416608089015291151560a088015260c087015260e0860152610100850193909352610120840152166101408201526101600190565b60408051808201909152600081526060602082015284516040805180820190915260008152606060208201528167ffffffffffffffff811115611e9857611e98613c11565b604051908082528060200260200182016040528015611ec1578160200160208202803683370190505b5060208201526040517fa2ea7c6e000000000000000000000000000000000000000000000000000000008152600481018990526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a2ea7c6e90602401600060405180830381865afa158015611f55573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611f9b9190810190614544565b8051909150611fd6576040517fbf37b20e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008367ffffffffffffffff811115611ff157611ff1613c11565b60405190808252806020026020018201604052801561209057816020015b60408051610140810182526000808252602080830182905292820181905260608083018290526080830182905260a0830182905260c0830182905260e0830182905261010083019190915261012082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161200f5790505b50905060008467ffffffffffffffff8111156120ae576120ae613c11565b6040519080825280602002602001820160405280156120d7578160200160208202803683370190505b50905060005b858110156125655760008b82815181106120f9576120f9613ba4565b60200260200101519050600067ffffffffffffffff16816020015167ffffffffffffffff161415801561214457504267ffffffffffffffff16816020015167ffffffffffffffff1611155b1561217b576040517f08e8b93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846040015115801561218e575080604001515b156121c5576040517f157bd4c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040518061014001604052806000801b81526020018f81526020016121e94290565b67ffffffffffffffff168152602001836020015167ffffffffffffffff168152602001600067ffffffffffffffff16815260200183606001518152602001836000015173ffffffffffffffffffffffffffffffffffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815260200183604001511515815260200183608001518152509050600080600090505b61228b8382612e35565b600081815260046020526040902054909250156122aa57600101612281565b81835260008281526004602081815260409283902086518155908601516001820155918501516002830180546060880151608089015167ffffffffffffffff908116700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff92821668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009094169190951617919091171691909117905560a0850151600383015560c0850151908201805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617905560e0850151600583018054610100880151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff000000000000000000000000000000000000000000909116929093169190911791909117905561012084015184919060068201906124299082614669565b505050606084015115612480576060840151600090815260046020526040902054612480576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8287868151811061249357612493613ba4565b60200260200101819052508360a001518686815181106124b5576124b5613ba4565b60200260200101818152505081896020015186815181106124d8576124d8613ba4565b6020026020010181815250508f8e73ffffffffffffffffffffffffffffffffffffffff16856000015173ffffffffffffffffffffffffffffffffffffffff167f8bf46bf4cfd674fa735a3d63ec1c9ad4153f033c290341f3a588b75685141b358560405161254891815260200190565b60405180910390a45050505061255e8160010190565b90506120dd565b5061257583838360008c8c612a46565b845250919998505050505050505050565b606060008267ffffffffffffffff8111156125a3576125a3613c11565b6040519080825280602002602001820160405280156125cc578160200160208202803683370190505b508451909150600090815b818110156126655760008782815181106125f3576125f3613ba4565b6020026020010151905060008151905060005b818110156126515782818151811061262057612620613ba4565b602002602001015187878151811061263a5761263a613ba4565b602090810291909101015260019586019501612606565b50505061265e8160010190565b90506125d7565b509195945050505050565b60008281526005602052604090205467ffffffffffffffff16156126c0576040517f2e26794600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff85169081179091559051909184917f5aafceeb1c7ad58e4a84898bdee37c02c0fc46e7d24e6b60e8209449f183459f9190a35050565b6060600061273f83612e94565b600101905060008167ffffffffffffffff81111561275f5761275f613c11565b6040519080825280601f01601f191660200182016040528015612789576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461279357509392505050565b60606112a37f00000000000000000000000000000000000000000000000000000000000000006000612f76565b60606112a37f00000000000000000000000000000000000000000000000000000000000000006001612f76565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161480156128b057507f000000000000000000000000000000000000000000000000000000000000000046145b156128da57507f000000000000000000000000000000000000000000000000000000000000000090565b6112a3604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b600061074b61298f61284a565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060006129d98585613021565b50909250905060008160038111156129f3576129f3614782565b148015612a2b57508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80612a3c5750612a3c86868661306e565b9695505050505050565b84516000906001819003612a9e57612a968888600081518110612a6b57612a6b613ba4565b602002602001015188600081518110612a8657612a86613ba4565b60200260200101518888886131bb565b915050612a3c565b602088015173ffffffffffffffffffffffffffffffffffffffff8116612b3f5760005b82811015612b2457878181518110612adb57612adb613ba4565b6020026020010151600014612b1c576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101612ac1565b508315612b3457612b34856134da565b600092505050612a3c565b6000808273ffffffffffffffffffffffffffffffffffffffff1663ce46e0466040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb191906147b1565b905060005b84811015612c6e5760008a8281518110612bd257612bd2613ba4565b6020026020010151905080600003612bea5750612c66565b82612c21576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b88811115612c5b576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b978890039792909201915b600101612bb6565b508715612d49576040517f88e5b2d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906388e5b2d9908490612ccb908e908e906004016147ce565b60206040518083038185885af1158015612ce9573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612d0e91906147b1565b612d44576040517fbf2f3a8b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e18565b6040517f91db0b7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906391db0b7e908490612d9f908e908e906004016147ce565b60206040518083038185885af1158015612dbd573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612de291906147b1565b612e18576040517fe8bee83900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8515612e2757612e27876134da565b509998505050505050505050565b60208083015160c084015160e0850151604080870151606088015161010089015160a08a01516101208b01519451600099612e7699989796918c9101614864565b60405160208183030381529060405280519060200120905092915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612edd577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612f09576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612f2757662386f26fc10000830492506010015b6305f5e1008310612f3f576305f5e100830492506008015b6127108310612f5357612710830492506004015b60648310612f65576064830492506002015b600a831061074b5760010192915050565b606060ff8314612f9057612f89836134ed565b905061074b565b818054612f9c90613fac565b80601f0160208091040260200160405190810160405280929190818152602001828054612fc890613fac565b80156130155780601f10612fea57610100808354040283529160200191613015565b820191906000526020600020905b815481529060010190602001808311612ff857829003601f168201915b5050505050905061074b565b6000806000835160410361305b5760208401516040850151606086015160001a61304d8882858561352c565b955095509550505050613067565b50508151600091506002905b9250925092565b60008060008573ffffffffffffffffffffffffffffffffffffffff16858560405160240161309d929190614981565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1626ba7e000000000000000000000000000000000000000000000000000000001790525161311e919061499a565b600060405180830381855afa9150503d8060008114613159576040519150601f19603f3d011682016040523d82523d6000602084013e61315e565b606091505b509150915081801561317257506020815110155b8015612a3c575080517f1626ba7e00000000000000000000000000000000000000000000000000000000906131b090830160209081019084016149ac565b149695505050505050565b602086015160009073ffffffffffffffffffffffffffffffffffffffff811661322f578515613216576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821561322557613225846134da565b6000915050612a3c565b851561331a578073ffffffffffffffffffffffffffffffffffffffff1663ce46e0466040518163ffffffff1660e01b8152600401602060405180830381865afa158015613280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a491906147b1565b6132da576040517f1574f9f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83861115613314576040517f1101129400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85840393505b84156133f2576040517fe49617e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063e49617e1908890613374908b90600401613b16565b60206040518083038185885af1158015613392573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906133b791906147b1565b6133ed576040517fccf3bb2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134bf565b6040517fe60c350500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063e60c3505908890613446908b90600401613b16565b60206040518083038185885af1158015613464573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061348991906147b1565b6134bf576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82156134ce576134ce846134da565b50939695505050505050565b80156134ea576134ea3382613626565b50565b606060006134fa83613700565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115613567575060009150600390508261361c565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156135bb573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166136125750600092506001915082905061361c565b9250600091508190505b9450945094915050565b80471015613666576040517fcd78605900000000000000000000000000000000000000000000000000000000815230600482015260240160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146136c0576040519150601f19603f3d011682016040523d82523d6000602084013e6136c5565b606091505b5050905080610ae6576040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060ff8216601f81111561074b576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008083601f84011261375357600080fd5b50813567ffffffffffffffff81111561376b57600080fd5b6020830191508360208260051b850101111561378657600080fd5b9250929050565b600080602083850312156137a057600080fd5b823567ffffffffffffffff8111156137b757600080fd5b6137c385828601613741565b90969095509350505050565b60005b838110156137ea5781810151838201526020016137d2565b50506000910152565b6000815180845261380b8160208601602086016137cf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061385060208301846137f3565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff811681146134ea57600080fd5b803561388481613857565b919050565b60006020828403121561389b57600080fd5b813561385081613857565b6000602082840312156138b857600080fd5b813567ffffffffffffffff8111156138cf57600080fd5b820160e0818503121561385057600080fd5b602080825282518282018190526000918401906040840190835b818110156139195783518352602093840193909201916001016138fb565b509095945050505050565b6000606082840312801561393757600080fd5b509092915050565b60006020828403121561395157600080fd5b5035919050565b600081518084526020840193506020830160005b8281101561398a57815186526020958601959091019060010161396c565b5093949350505050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e0602082015260006139cf60e08301896137f3565b82810360408401526139e181896137f3565b905086606084015273ffffffffffffffffffffffffffffffffffffffff861660808401528460a084015282810360c0840152611bbb8185613958565b805182526020810151602083015260006040820151613a48604085018267ffffffffffffffff169052565b506060820151613a64606085018267ffffffffffffffff169052565b506080820151613a80608085018267ffffffffffffffff169052565b5060a082015160a084015260c0820151613ab260c085018273ffffffffffffffffffffffffffffffffffffffff169052565b5060e0820151613ada60e085018273ffffffffffffffffffffffffffffffffffffffff169052565b50610100820151613af061010085018215159052565b50610120820151610140610120850152613b0e6101408501826137f3565b949350505050565b6020815260006138506020830184613a1d565b600061010082840312801561393757600080fd5b60008060408385031215613b5057600080fd5b8235613b5b81613857565b946020939093013593505050565b600060208284031215613b7b57600080fd5b813567ffffffffffffffff811115613b9257600080fd5b82016040818503121561385057600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112613c0757600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613c6357613c63613c11565b60405290565b60405160c0810167ffffffffffffffff81118282101715613c6357613c63613c11565b6040516080810167ffffffffffffffff81118282101715613c6357613c63613c11565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613cf657613cf6613c11565b604052919050565b600067ffffffffffffffff821115613d1857613d18613c11565b5060051b60200190565b600060408284031215613d3457600080fd5b6040805190810167ffffffffffffffff81118282101715613d5757613d57613c11565b604052823581526020928301359281019290925250919050565b600060608284031215613d8357600080fd5b6040516060810167ffffffffffffffff81118282101715613da657613da6613c11565b604052905080823560ff81168114613dbd57600080fd5b815260208381013590820152604092830135920191909152919050565b600082601f830112613deb57600080fd5b8135613dfe613df982613cfe565b613caf565b80828252602082019150602060608402860101925085831115613e2057600080fd5b602085015b83811015613e4757613e378782613d71565b8352602090920191606001613e25565b5095945050505050565b803567ffffffffffffffff8116811461388457600080fd5b600060a08236031215613e7b57600080fd5b613e83613c40565b82358152602083013567ffffffffffffffff811115613ea157600080fd5b830136601f820112613eb257600080fd5b8035613ec0613df982613cfe565b8082825260208201915060208360061b850101925036831115613ee257600080fd5b6020840193505b82841015613f0e57613efb3685613d22565b8252602082019150604084019350613ee9565b6020850152505050604083013567ffffffffffffffff811115613f3057600080fd5b613f3c36828601613dda565b604083015250613f4e60608401613879565b6060820152613f5f60808401613e51565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561074b5761074b613f6a565b600181811c90821680613fc057607f821691505b602082108103613ff9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b80151581146134ea57600080fd5b600067ffffffffffffffff82111561402757614027613c11565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060c0828403121561406557600080fd5b61406d613c69565b9050813561407a81613857565b815261408860208301613e51565b6020820152604082013561409b81613fff565b604082015260608281013590820152608082013567ffffffffffffffff8111156140c457600080fd5b8201601f810184136140d557600080fd5b80356140e3613df98261400d565b8181528560208385010111156140f857600080fd5b8160208401602083013760009181016020019190915260808301525060a09182013591810191909152919050565b600060e0823603121561413857600080fd5b614140613c40565b82358152602083013567ffffffffffffffff81111561415e57600080fd5b61416a36828601614053565b60208301525061417d3660408501613d71565b604082015260a083013561419081613857565b6060820152613f5f60c08401613e51565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41833603018112613c0757600080fd5b600061074b3683614053565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112613c0757600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261424a57600080fd5b83018035915067ffffffffffffffff82111561426557600080fd5b6020019150600581901b360382131561378657600080fd5b600061428b613df984613cfe565b8381526020810190600585901b8401368111156142a757600080fd5b845b8181101561391957803567ffffffffffffffff8111156142c857600080fd5b6142d436828901614053565b855250602093840193016142a9565b6000604082840312156142f557600080fd5b6138508383613d22565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261433457600080fd5b83018035915067ffffffffffffffff82111561434f57600080fd5b6020019150600681901b360382131561378657600080fd5b600084516143798184602089016137cf565b7f2e0000000000000000000000000000000000000000000000000000000000000090830190815284516143b38160018401602089016137cf565b7f2e000000000000000000000000000000000000000000000000000000000000006001929091019182015283516143f18160028401602088016137cf565b0160020195945050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261443357600080fd5b83018035915067ffffffffffffffff82111561444e57600080fd5b602001915060608102360382131561378657600080fd5b60006060828403121561447757600080fd5b6138508383613d71565b60006020828403121561449357600080fd5b61385082613e51565b60006101008284031280156144b057600080fd5b506144b9613c40565b823581526144ca8460208501613d22565b60208201526144dc8460608501613d71565b604082015260c08301356144ef81613857565b606082015261450060e08401613e51565b60808201529392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361453d5761453d613f6a565b5060010190565b60006020828403121561455657600080fd5b815167ffffffffffffffff81111561456d57600080fd5b82016080818503121561457f57600080fd5b614587613c8c565b81518152602082015161459981613857565b602082015260408201516145ac81613fff565b6040820152606082015167ffffffffffffffff8111156145cb57600080fd5b80830192505084601f8301126145e057600080fd5b81516145ee613df98261400d565b81815286602083860101111561460357600080fd5b6146148260208301602087016137cf565b606083015250949350505050565b601f821115610ae657806000526020600020601f840160051c810160208510156146495750805b601f840160051c820191505b818110156107055760008155600101614655565b815167ffffffffffffffff81111561468357614683613c11565b614697816146918454613fac565b84614622565b6020601f8211600181146146e957600083156146b35750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455610705565b6000848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156147375787850151825560209485019460019092019101614717565b508482101561477357868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000602082840312156147c357600080fd5b815161385081613fff565b6000604082016040835280855180835260608501915060608160051b86010192506020870160005b82811015614845577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0878603018452614830858351613a1d565b945060209384019391909101906001016147f6565b50505050828103602084015261485b8185613958565b95945050505050565b8981527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008960601b1660208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008860601b1660348201527fffffffffffffffff0000000000000000000000000000000000000000000000008760c01b1660488201527fffffffffffffffff0000000000000000000000000000000000000000000000008660c01b16605082015284151560f81b60588201528360598201526000607982016000855161493c818460208a016137cf565b8201905061496e818660e01b7fffffffff00000000000000000000000000000000000000000000000000000000169052565b6004019c9b505050505050505050505050565b828152604060208201526000613b0e60408301846137f3565b60008251613c078184602087016137cf565b6000602082840312156149be57600080fd5b505191905056fea164736f6c634300081a000a", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/packages/client/src/utils/actions/observe.json b/packages/client/src/utils/actions/observe.json new file mode 100644 index 0000000..3185ecb --- /dev/null +++ b/packages/client/src/utils/actions/observe.json @@ -0,0 +1,33 @@ +{ + "description": "Observe the growth and health of the plants, including the location, date, and any other relevant details. Each observation action should be documented separately.", + "media": { + "title": "Capture the Observation", + "description": "Please take a photo of the location where you will be observing the plants. You can also take photos of the plants to document their growth and health.", + "maxImageCount": 7 + }, + "details": { + "title": "Input Observation Details", + "description": "Please provide the following details about the observation.", + "feedbackPlaceholder": "Provide feedback or any issues during the observation process", + "inputs": [ + { + "title": "Plants Observed", + "placeholder": "Select the different species observed", + "type": "select", + "required": false, + "options": [] + }, + { + "title": "Number of Plants Observed", + "placeholder": "Enter the number of plants observed", + "type": "number", + "required": false, + "options": [] + } + ] + }, + "review": { + "title": "Review Observation Details", + "description": "Please review the details you have provided before submitting." + } +} diff --git a/packages/client/src/utils/actions/plant.json b/packages/client/src/utils/actions/plant.json new file mode 100644 index 0000000..cbb520f --- /dev/null +++ b/packages/client/src/utils/actions/plant.json @@ -0,0 +1,33 @@ +{ + "description": "Capture the planting process for seedlings or saplings, including the location, date, and any other relevant details. Each planting action should be documented separately.", + "media": { + "title": "Photograph the Plot", + "description": "Please take a photo of the location where you will be planting Seedlings or Saplings.", + "maxImageCount": 8 + }, + "details": { + "title": "Input Planting Details", + "description": "Please provide the following details about the planting process.", + "feedbackPlaceholder": "Provide feedback or any issues during the planting process", + "inputs": [ + { + "title": "Plants Planted", + "placeholder": "Select the different species planted", + "type": "select", + "required": true, + "options": ["Acacia", "Eucalyptus", "Pine", "Other"] + }, + { + "title": "How many plants were planted?", + "placeholder": "Enter the number of plants planted", + "type": "number", + "required": true, + "options": [] + } + ] + }, + "review": { + "title": "Review Planting Details", + "description": "Please review the details you have provided before submitting." + } +} diff --git a/packages/client/src/utils/eas.ts b/packages/client/src/utils/eas.ts new file mode 100644 index 0000000..4174c9f --- /dev/null +++ b/packages/client/src/utils/eas.ts @@ -0,0 +1,144 @@ +import { encodeFunctionData } from "viem"; +import { + SchemaEncoder, + ZERO_BYTES32, + NO_EXPIRATION, +} from "@ethereum-attestation-service/eas-sdk"; + +import { EAS } from "@/constants"; +import { uploadFileToIPFS, uploadJSONToIPFS } from "@/modules/pinata"; + +const value = 0n; + +export function encodeAttestCallData( + schema: `0x${string}`, + data: `0x${string}`, + recipient: `0x${string}` +) { + return encodeFunctionData({ + abi: [ + { + inputs: [ + { + components: [ + { + internalType: "bytes32", + name: "schema", + type: "bytes32", + }, + { + components: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint64", + name: "expirationTime", + type: "uint64", + }, + { + internalType: "bool", + name: "revocable", + type: "bool", + }, + { + internalType: "bytes32", + name: "refUID", + type: "bytes32", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + internalType: "struct AttestationRequestData", + name: "data", + type: "tuple", + }, + ], + internalType: "struct AttestationRequest", + name: "request", + type: "tuple", + }, + ], + name: "attest", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + ], + args: [ + { + schema, + data: { + data, + recipient, + value, + revocable: true, + refUID: ZERO_BYTES32, + expirationTime: NO_EXPIRATION, + }, + }, + ], + }); +} + +export async function encodeWorkData( + data: WorkDraft, + recipient: `0x${string}` +) { + const schema = EAS["42161"].WORK.schema as `0x${string}`; + const schemaEncoder = new SchemaEncoder(schema); + + const media = await Promise.all( + data.media.map(async (file) => { + return (await uploadFileToIPFS(file)).IpfsHash; + }) + ); + + const metadata = await uploadJSONToIPFS({ + plantSelection: data.plantSelection, + plantCount: data.plantCount, + }); + + const encodedData = schemaEncoder.encodeData([ + { name: "actionUID", value: data.actionUID, type: "uint256" }, + { name: "title", value: data.title, type: "string" }, + { name: "feedback", value: data.feedback, type: "string" }, + { name: "metadata", value: metadata, type: "string" }, + { name: "media", value: media, type: "string[]" }, + ]) as `0x${string}`; + + return encodeAttestCallData(schema, encodedData, recipient); +} + +export function encodeWorkApprovalData( + data: WorkApprovalDraft, + recipient: `0x${string}` +) { + const schema = EAS["42161"].WORK_APPROVAL.schema as `0x${string}`; + const schemaEncoder = new SchemaEncoder(schema); + + const encodedData = schemaEncoder.encodeData([ + { name: "actionUID", value: data.actionUID, type: "uint256" }, + { name: "workUID", value: data.workUID, type: "bytes32" }, + { name: "approved", value: data.approved, type: "bool" }, + { name: "feedback", value: data.feedback, type: "string" }, + ]) as `0x${string}`; + + return encodeAttestCallData(schema, encodedData, recipient); +} diff --git a/packages/client/src/utils/text.ts b/packages/client/src/utils/text.ts new file mode 100644 index 0000000..f871099 --- /dev/null +++ b/packages/client/src/utils/text.ts @@ -0,0 +1,60 @@ +export const formatAddress: (arg0: string) => string = (address) => { + if (!address) return "no address provided"; + if (address.includes(".eth")) return address; + + const start = address.slice(0, 6); + const end = address.slice(address.length - 4); + return `${start}...${end}`; +}; + +export function truncate(str: string, n: number) { + return str.length > n ? str.slice(0, n - 1) + "..." : str; +} + +export function isValidEmail(email: string) { + // eslint-disable-next-line no-useless-escape + return /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test( + email + ); +} + +export function truncateDescription(description: string) { + return description.length > 80 ? + description.slice(0, 80 - 1) + "..." + : description; +} + +export function formatPrice( + price: number | null, + currency?: "ETH" | "USDC" | "OP" +) { + return price?.toLocaleString("en-US", { + style: "currency", + currency: currency ?? "USD", + }); +} + +export function formatLastUpdated(updatedAt: string) { + const updatedDate = new Date(updatedAt).getSeconds(); + const now = new Date().getSeconds(); + + const differenceInSeconds = Math.floor((now - updatedDate) / 1000); + + const intervals = [ + { label: "year", seconds: 31536000 }, + { label: "month", seconds: 2592000 }, + { label: "day", seconds: 86400 }, + { label: "hour", seconds: 3600 }, + { label: "minute", seconds: 60 }, + { label: "second", seconds: 1 }, + ]; + + for (const interval of intervals) { + const count = Math.floor(differenceInSeconds / interval.seconds); + if (count !== 0) { + return `${count} ${interval.label}${count !== 1 ? "s" : ""} ago`; + } + } + + return "just now"; +} diff --git a/packages/client/src/views/Gardens/Card.tsx b/packages/client/src/views/Gardens/Card.tsx new file mode 100644 index 0000000..32a6400 --- /dev/null +++ b/packages/client/src/views/Gardens/Card.tsx @@ -0,0 +1,56 @@ +import React from "react"; +import { + RiMapPin2Fill, + // RiCalendar2Fill, + // RiThumbUpFill, +} from "@remixicon/react"; +import { Button } from "@/components/Button"; + +// import { truncateDescription } from "../../utils/text"; +// import { Button } from "../Button"; + +export interface GardenCardProps extends Garden { + onCardClick: () => void; +} + +export const GardenCard: React.FC = ({ + // id, + name, + location, + bannerImage, + // operators, + onCardClick, +}) => { + return ( +
+
+ Image Description +
+
+

+ {name} +

+
+ + {location} +
+ {/*

{problem}

*/} +
+
+
+
+ ); +}; diff --git a/packages/client/src/views/Gardens/Garden.tsx b/packages/client/src/views/Gardens/Garden.tsx new file mode 100644 index 0000000..2722128 --- /dev/null +++ b/packages/client/src/views/Gardens/Garden.tsx @@ -0,0 +1,128 @@ +import { + RiMapPin2Fill, + RiArrowLeftFill, + RiCalendarEventFill, + RiProfileFill, + // RiThumbUpFill, + // PencilLineIcon, +} from "@remixicon/react"; +import React, { useState } from "react"; +import { useParams } from "react-router-dom"; + +import { formatAddress } from "@/utils/text"; + +import { useGarden } from "@/providers/GardenProvider"; + +import { CircleLoader } from "@/components/Loader"; +import { GardenActions } from "@/components/Garden/Actions"; +import { GardenAssessments } from "@/components/Garden/Asessments"; +import { GardenGardeners } from "@/components/Garden/Gardeners"; +import { useWork } from "@/providers/WorkProvider"; + +enum GardenTab { + Actions = "actions", + Assessments = "assessments", + Gardeners = "gardeners", +} + +interface GardenProps {} + +export const cardStyles = "bg-white border rounded-xl shadow-sm"; +export const cardTitleStyles = "text-base font-medium bg-teal-100 py-2 px-3"; +export const cardContentStyles = "text-sm leading-1 mt-2 px-3 pb-2"; + +export const Garden: React.FC = () => { + const { id } = useParams<{ + id: string; + }>(); + const { actions, gardens, gardeners } = useGarden(); + const { works } = useWork(); + const [activeTab, setActiveTab] = useState(GardenTab.Actions); + + const garden = gardens.find((garden) => garden.id === id); + + if (!garden) return ; + + const { name, bannerImage, location, operators, gardenAssessments } = garden; + + const gardenWorks = works.filter((work) => work.gardenAddress === id); + const gardenGardeners = gardeners.filter((gardener) => + garden.gardeners.includes(gardener.wallet?.address ?? "") + ); + + const renderTabContent = () => { + switch (activeTab) { + case GardenTab.Actions: + return ; + case GardenTab.Assessments: + return ; + case GardenTab.Gardeners: + return ; + default: + return null; + } + }; + + return ( +
+ +
+

{name}

+
+
+
+ + + {operators + .map((operator) => formatAddress(operator)) + .join(", ")} + +
+
+ + {location} +
+
+ + {/* + {start_date && end_date ? + `${start_date.toLocaleDateString()} - ${end_date.toLocaleDateString()}` + : "No timeline provided."} + */} +
+
+
+
+
+
    + {Object.values(GardenTab).map((tab) => ( +
  • setActiveTab(tab)} + style={{ + fontWeight: activeTab === tab ? "bold" : "normal", + cursor: "pointer", + }} + > + {tab} +
  • + ))} +
+ {renderTabContent()} +
+
+ ); +}; diff --git a/packages/client/src/views/Gardens/index.tsx b/packages/client/src/views/Gardens/index.tsx new file mode 100644 index 0000000..342a209 --- /dev/null +++ b/packages/client/src/views/Gardens/index.tsx @@ -0,0 +1,49 @@ +import { Outlet, useLocation, useNavigate } from "react-router-dom"; + +import { useGarden } from "@/providers/GardenProvider"; + +import { GardenCard } from "./Card"; + +export interface GardensProps {} + +const Gardens: React.FC = () => { + const { gardens } = useGarden(); + const navigate = useNavigate(); + const location = useLocation(); + + function handleCardClick(id: string) { + navigate(`/gardens/${id}`); + } + + return ( +
+
+

Gardens

+
+ {/*
    */} + {location.pathname === "/gardens" ? +
      + {gardens.length ? + gardens.map((garden) => ( +
    • + handleCardClick(garden.id)} + /> +
    • + )) + :

      + No gardens found, + + 😔 + +

      + } +
    + : null} + +
+ ); +}; + +export default Gardens; diff --git a/packages/client/src/views/Home/index.tsx b/packages/client/src/views/Home/index.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/packages/client/src/views/Landing/index.tsx b/packages/client/src/views/Landing/index.tsx new file mode 100644 index 0000000..8331eb0 --- /dev/null +++ b/packages/client/src/views/Landing/index.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import { Hero } from "@/components/Layout/Hero"; +import { Header } from "@/components/Layout/Header"; +import { Footer } from "@/components/Layout/Footer"; + +interface LandingProps {} + +const Landing: React.FC = () => { + return ( + <> +
+ +