From b811d51f88044f291bda645289569cbaad227e8e Mon Sep 17 00:00:00 2001 From: kenilshah Date: Mon, 1 Jul 2024 03:13:42 +0530 Subject: [PATCH] added attestation --- package.json | 1 + .../app/api/orchestrator/[frameId]/route.ts | 34 + packages/nextjs/app/page.tsx | 823 ++++++++++++++++++ packages/nextjs/app/paymaster.tsx | 666 +++++++++++++- packages/nextjs/app/receiptAttestation.tsx | 47 +- packages/nextjs/package.json | 3 +- yarn.lock | 276 +++++- 7 files changed, 1798 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 6a4e3da..18f9336 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "node": ">=18.17.0" }, "dependencies": { + "@coinbase/onchainkit": "^0.23.4", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@ethereum-attestation-service/eas-sdk": "^2.3.0", diff --git a/packages/nextjs/app/api/orchestrator/[frameId]/route.ts b/packages/nextjs/app/api/orchestrator/[frameId]/route.ts index 009f1aa..43c8c36 100644 --- a/packages/nextjs/app/api/orchestrator/[frameId]/route.ts +++ b/packages/nextjs/app/api/orchestrator/[frameId]/route.ts @@ -3,6 +3,9 @@ import { FrameRequest, getFrameHtmlResponse } from "@coinbase/onchainkit"; import Analytics from "~~/model/analytics"; import connectDB from "~~/services/connectDB"; import { getFrameAtServer } from "~~/services/frames"; +import { EAS, SchemaEncoder, SchemaRegistry } from "@ethereum-attestation-service/eas-sdk"; +import { ethers } from "ethers"; + const storeAnalytics = async (body: FrameRequest, state: any) => { const analyticsEntry = new Analytics({ @@ -16,7 +19,38 @@ const storeAnalytics = async (body: FrameRequest, state: any) => { await analyticsEntry.save(); console.log(analyticsEntry); }; +async function createAttestation(txnId : string){ +const eas = new EAS("0x4200000000000000000000000000000000000021"); +const offchain = await eas.getOffchain(); +const provider = new ethers.JsonRpcProvider("https://base-sepolia.infura.io/v3/847856edbfc14f50a4782dce0fa77ce5") +// Signer must be an ethers-like signer. +const schemaUID = "0x3ca31d9c24a48e437eba25cb423d9a873a751511c70dc0b2a8fb4c9a8d45b506" +const signer = new ethers.Wallet("c04f2876f3691d44fdba3592bf800c05516d419f10ac269a7a565c21dfda57fa", provider); +const schemaEncoder = new SchemaEncoder("address seller,address buyer,uint256 amount,uint256 quantity,bytes32 txHash,string productId"); +const encodedData = schemaEncoder.encodeData([ + { name: "seller", value: "0x0000000000000000000000000000000000000000", type: "address" }, + { name: "buyer", value: "0x0000000000000000000000000000000000000000", type: "address" }, + { name: "amount", value: "0", type: "uint256" }, + { name: "quantity", value: "0", type: "uint256" }, + { name: "txHash", value: {txnId}, type: "bytes32" }, + { name: "productId", value: "", type: "string" }, +]); + +const tx = await eas.attest({ + schema: schemaUID, + data: { + recipient: "0x0000000000000000000000000000000000000000", + expirationTime: BigInt(0), + 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 newAttestationUID; +} async function getResponse(req: NextRequest): Promise { await connectDB(); const url = req.nextUrl.pathname; diff --git a/packages/nextjs/app/page.tsx b/packages/nextjs/app/page.tsx index fb6cb08..b7f9b59 100644 --- a/packages/nextjs/app/page.tsx +++ b/packages/nextjs/app/page.tsx @@ -10,3 +10,826 @@ const Home: NextPage = () => { }; export default Home; +// "use client" +// import type { NextPage } from "next"; +// import { BugAntIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; +// import { Address } from "~~/components/scaffold-eth"; +// import { ENTRYPOINT_ADDRESS_V06, createSmartAccountClient } from "permissionless"; +// import { privateKeyToSimpleSmartAccount } from "permissionless/accounts"; +// import { createPimlicoPaymasterClient } from "permissionless/clients/pimlico"; +// import { createPublicClient, encodeFunctionData, http, parseEther } from "viem"; +// import { baseSepolia } from "viem/chains"; +// import { ethers } from "ethers"; +// import Link from "next/link"; +// import { EAS, SchemaEncoder, SchemaRegistry, }from "@ethereum-attestation-service/eas-sdk"; + +// const Home: NextPage = () => { + + +// async function lfg() { + +// const eas = new EAS("0x4200000000000000000000000000000000000021"); +// const provider = new ethers.JsonRpcProvider("https://base-sepolia.infura.io/v3/847856edbfc14f50a4782dce0fa77ce5") +// const signer = new ethers.Wallet("c04f2876f3691d44fdba3592bf800c05516d419f10ac269a7a565c21dfda57fa", provider); +// eas.connect(signer); +// const schemaEncoder = new SchemaEncoder("address seller,address buyer,uint256 amount,uint256 quantity,bytes32 txHash,string productId"); +// const encodedData = schemaEncoder.encodeData([ +// { name: "seller", value: "0x0000000000000000000000000000000000000000", type: "address" }, +// { name: "buyer", value: "0x0000000000000000000000000000000000000000", type: "address" }, +// { name: "amount", value: "0", type: "uint256" }, +// { name: "quantity", value: "0", type: "uint256" }, +// { name: "txHash", value: "", type: "bytes32" }, +// { name: "productId", value: "", type: "string" }, +// ]); +// const schemaUID = "0x3ca31d9c24a48e437eba25cb423d9a873a751511c70dc0b2a8fb4c9a8d45b506" +// const tx = await eas.attest({ +// schema: schemaUID, +// data: { +// recipient: "0xFD50b031E778fAb33DfD2Fc3Ca66a1EeF0652165", +// expirationTime: BigInt(0), +// 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); +// // const offchain = await eas.getOffchain(); +// // console.log(offchain); + + + + +// // const offchainAttestation = await offchain.signOffchainAttestation({ +// // recipient: '0xFD50b031E778fAb33DfD2Fc3Ca66a1EeF0652165', +// // // Unix timestamp of when attestation expires. (0 for no expiration) +// // expirationTime: BigInt('0'), +// // // Unix timestamp of current time +// // time: BigInt(1671219636), +// // revocable: true, // Be aware that if your schema is not revocable, this MUST be false + +// // nonce: BigInt('0'), +// // schema: "0x3ca31d9c24a48e437eba25cb423d9a873a751511c70dc0b2a8fb4c9a8d45b506", +// // refUID: '0x0000000000000000000000000000000000000000000000000000000000000000', +// // data: encodedData, +// // }, signer); + + + + +// // console.log("New attestation UID:", offchainAttestation); + +// const rpcUrl = "https://api.developer.coinbase.com/rpc/v1/base-sepolia/YoFvJm3qNGMvTrtaqg0fbB20fBTqXxAP"; + +// const publicClient = createPublicClient({ +// transport: http(rpcUrl), +// }); + +// const simpleAccount = await privateKeyToSimpleSmartAccount(publicClient, { +// // Set this to your private key +// privateKey: "0xc04f2876f3691d44fdba3592bf800c05516d419f10ac269a7a565c21dfda57fa", +// factoryAddress: "0x9406Cc6185a346906296840746125a0E44976454", +// entryPoint: ENTRYPOINT_ADDRESS_V06, +// }); +// const cloudPaymaster = createPimlicoPaymasterClient({ +// chain: baseSepolia, +// transport: http(rpcUrl), +// entryPoint: ENTRYPOINT_ADDRESS_V06, +// }); + +// const smartAccountClient = createSmartAccountClient({ +// account: simpleAccount, +// chain: baseSepolia, +// bundlerTransport: http(rpcUrl), +// // IMPORTANT: Set up Cloud Paymaster to sponsor your transaction +// middleware: { +// sponsorUserOperation: cloudPaymaster.sponsorUserOperation, +// }, +// }); +// const abi = [ +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "initialOwner", +// "type": "address" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "constructor" +// }, +// { +// "inputs": [], +// "name": "ECDSAInvalidSignature", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "uint256", +// "name": "length", +// "type": "uint256" +// } +// ], +// "name": "ECDSAInvalidSignatureLength", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "bytes32", +// "name": "s", +// "type": "bytes32" +// } +// ], +// "name": "ECDSAInvalidSignatureS", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "allowance", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "needed", +// "type": "uint256" +// } +// ], +// "name": "ERC20InsufficientAllowance", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "sender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "balance", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "needed", +// "type": "uint256" +// } +// ], +// "name": "ERC20InsufficientBalance", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "approver", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidApprover", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "receiver", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidReceiver", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "sender", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidSender", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidSpender", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "uint256", +// "name": "deadline", +// "type": "uint256" +// } +// ], +// "name": "ERC2612ExpiredSignature", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "signer", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// } +// ], +// "name": "ERC2612InvalidSigner", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "account", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "currentNonce", +// "type": "uint256" +// } +// ], +// "name": "InvalidAccountNonce", +// "type": "error" +// }, +// { +// "inputs": [], +// "name": "InvalidShortString", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// } +// ], +// "name": "OwnableInvalidOwner", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "account", +// "type": "address" +// } +// ], +// "name": "OwnableUnauthorizedAccount", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "string", +// "name": "str", +// "type": "string" +// } +// ], +// "name": "StringTooLong", +// "type": "error" +// }, +// { +// "anonymous": false, +// "inputs": [ +// { +// "indexed": true, +// "internalType": "address", +// "name": "owner", +// "type": "address" +// }, +// { +// "indexed": true, +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "indexed": false, +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "Approval", +// "type": "event" +// }, +// { +// "anonymous": false, +// "inputs": [], +// "name": "EIP712DomainChanged", +// "type": "event" +// }, +// { +// "anonymous": false, +// "inputs": [ +// { +// "indexed": true, +// "internalType": "address", +// "name": "previousOwner", +// "type": "address" +// }, +// { +// "indexed": true, +// "internalType": "address", +// "name": "newOwner", +// "type": "address" +// } +// ], +// "name": "OwnershipTransferred", +// "type": "event" +// }, +// { +// "anonymous": false, +// "inputs": [ +// { +// "indexed": true, +// "internalType": "address", +// "name": "from", +// "type": "address" +// }, +// { +// "indexed": true, +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "indexed": false, +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "Transfer", +// "type": "event" +// }, +// { +// "inputs": [], +// "name": "DOMAIN_SEPARATOR", +// "outputs": [ +// { +// "internalType": "bytes32", +// "name": "", +// "type": "bytes32" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// } +// ], +// "name": "allowance", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "approve", +// "outputs": [ +// { +// "internalType": "bool", +// "name": "", +// "type": "bool" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "account", +// "type": "address" +// } +// ], +// "name": "balanceOf", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "decimals", +// "outputs": [ +// { +// "internalType": "uint8", +// "name": "", +// "type": "uint8" +// } +// ], +// "stateMutability": "view", +// "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": [ +// { +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "amount", +// "type": "uint256" +// } +// ], +// "name": "mint", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "name", +// "outputs": [ +// { +// "internalType": "string", +// "name": "", +// "type": "string" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// } +// ], +// "name": "nonces", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "owner", +// "outputs": [ +// { +// "internalType": "address", +// "name": "", +// "type": "address" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "deadline", +// "type": "uint256" +// }, +// { +// "internalType": "uint8", +// "name": "v", +// "type": "uint8" +// }, +// { +// "internalType": "bytes32", +// "name": "r", +// "type": "bytes32" +// }, +// { +// "internalType": "bytes32", +// "name": "s", +// "type": "bytes32" +// } +// ], +// "name": "permit", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "renounceOwnership", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "symbol", +// "outputs": [ +// { +// "internalType": "string", +// "name": "", +// "type": "string" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "totalSupply", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "transfer", +// "outputs": [ +// { +// "internalType": "bool", +// "name": "", +// "type": "bool" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "from", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "transferFrom", +// "outputs": [ +// { +// "internalType": "bool", +// "name": "", +// "type": "bool" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "newOwner", +// "type": "address" +// } +// ], +// "name": "transferOwnership", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "seller", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "amount", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "qt", +// "type": "uint256" +// } +// ], +// "name": "trf", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// } +// ] +// const num1 = parseEther('5'); +// const num2 = BigInt('1'); +// const callData = encodeFunctionData({ +// abi: abi, +// functionName: "trf", +// args: ['0x027fe3f132403c1b59ddaba14b576d15865f69c0', num1, num2], +// }); +// const txHash = await smartAccountClient.sendTransaction({ +// account: smartAccountClient.account, +// to: "0x059ee9bde2aff94d0e6ad396ec0ec7d27bff6dc8", +// data: callData, +// value: 0n, +// }); +// console.log(txHash) +// console.log("✅ Transaction successfully sponsored!"); +// console.log(`🔍 View on Etherscan: https://sepolia.basescan.org/tx/${txHash}`); +// } +// return ( +// <> +//
+//
+//

+// Welcome to +// Scaffold-ETH 2 +//

+//
+//

Connected Address:

+ +//
+//

+// Get started by editing{" "} +// +// packages/nextjs/app/page.tsx +// +//

+//

+// Edit your smart contract{" "} +// +// YourContract.sol +// {" "} +// in{" "} +// +// packages/hardhat/contracts +// +//

+//
+ +//
+//
+//
+// +//

+// Tinker with your smart contract using the{" "} +// +// Debug Contracts +// {" "} +// tab. +//

+//
+//
+// +// <> +// +// +//

+// Explore your local transactions with the{" "} +// +// Block Explorer +// {" "} +// tab. +//

+//
+//
+//
+//
+// + +// ); +// }; +// export default Home; diff --git a/packages/nextjs/app/paymaster.tsx b/packages/nextjs/app/paymaster.tsx index 6a2db06..8ffac5d 100644 --- a/packages/nextjs/app/paymaster.tsx +++ b/packages/nextjs/app/paymaster.tsx @@ -7,6 +7,7 @@ // import { createPublicClient, encodeFunctionData, http } from "viem"; // import { baseSepolia } from "viem/chains"; // import { useState } from "react"; +// import { ethers } from "ethers"; // import { loadStripeOnramp } from "@stripe/crypto"; // const Home: NextPage = () => { // const { address: connectedAddress } = useAccount(); @@ -41,26 +42,661 @@ // }, // }); // const abi = [ -// { -// inputs: [ -// { internalType: "address", name: "recipient", type: "address" }, -// { internalType: "uint16", name: "item", type: "uint16" }, -// ], -// name: "mintTo", -// outputs: [{ internalType: "uint256", name: "", type: "uint256" }], -// stateMutability: "payable", -// type: "function", -// }, -// ]; - +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "initialOwner", +// "type": "address" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "constructor" +// }, +// { +// "inputs": [], +// "name": "ECDSAInvalidSignature", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "uint256", +// "name": "length", +// "type": "uint256" +// } +// ], +// "name": "ECDSAInvalidSignatureLength", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "bytes32", +// "name": "s", +// "type": "bytes32" +// } +// ], +// "name": "ECDSAInvalidSignatureS", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "allowance", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "needed", +// "type": "uint256" +// } +// ], +// "name": "ERC20InsufficientAllowance", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "sender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "balance", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "needed", +// "type": "uint256" +// } +// ], +// "name": "ERC20InsufficientBalance", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "approver", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidApprover", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "receiver", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidReceiver", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "sender", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidSender", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// } +// ], +// "name": "ERC20InvalidSpender", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "uint256", +// "name": "deadline", +// "type": "uint256" +// } +// ], +// "name": "ERC2612ExpiredSignature", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "signer", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// } +// ], +// "name": "ERC2612InvalidSigner", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "account", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "currentNonce", +// "type": "uint256" +// } +// ], +// "name": "InvalidAccountNonce", +// "type": "error" +// }, +// { +// "inputs": [], +// "name": "InvalidShortString", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// } +// ], +// "name": "OwnableInvalidOwner", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "account", +// "type": "address" +// } +// ], +// "name": "OwnableUnauthorizedAccount", +// "type": "error" +// }, +// { +// "inputs": [ +// { +// "internalType": "string", +// "name": "str", +// "type": "string" +// } +// ], +// "name": "StringTooLong", +// "type": "error" +// }, +// { +// "anonymous": false, +// "inputs": [ +// { +// "indexed": true, +// "internalType": "address", +// "name": "owner", +// "type": "address" +// }, +// { +// "indexed": true, +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "indexed": false, +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "Approval", +// "type": "event" +// }, +// { +// "anonymous": false, +// "inputs": [], +// "name": "EIP712DomainChanged", +// "type": "event" +// }, +// { +// "anonymous": false, +// "inputs": [ +// { +// "indexed": true, +// "internalType": "address", +// "name": "previousOwner", +// "type": "address" +// }, +// { +// "indexed": true, +// "internalType": "address", +// "name": "newOwner", +// "type": "address" +// } +// ], +// "name": "OwnershipTransferred", +// "type": "event" +// }, +// { +// "anonymous": false, +// "inputs": [ +// { +// "indexed": true, +// "internalType": "address", +// "name": "from", +// "type": "address" +// }, +// { +// "indexed": true, +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "indexed": false, +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "Transfer", +// "type": "event" +// }, +// { +// "inputs": [], +// "name": "DOMAIN_SEPARATOR", +// "outputs": [ +// { +// "internalType": "bytes32", +// "name": "", +// "type": "bytes32" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// } +// ], +// "name": "allowance", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "approve", +// "outputs": [ +// { +// "internalType": "bool", +// "name": "", +// "type": "bool" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "account", +// "type": "address" +// } +// ], +// "name": "balanceOf", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "decimals", +// "outputs": [ +// { +// "internalType": "uint8", +// "name": "", +// "type": "uint8" +// } +// ], +// "stateMutability": "view", +// "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": [ +// { +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "amount", +// "type": "uint256" +// } +// ], +// "name": "mint", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "name", +// "outputs": [ +// { +// "internalType": "string", +// "name": "", +// "type": "string" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// } +// ], +// "name": "nonces", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "owner", +// "outputs": [ +// { +// "internalType": "address", +// "name": "", +// "type": "address" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "owner", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "spender", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "deadline", +// "type": "uint256" +// }, +// { +// "internalType": "uint8", +// "name": "v", +// "type": "uint8" +// }, +// { +// "internalType": "bytes32", +// "name": "r", +// "type": "bytes32" +// }, +// { +// "internalType": "bytes32", +// "name": "s", +// "type": "bytes32" +// } +// ], +// "name": "permit", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "renounceOwnership", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "symbol", +// "outputs": [ +// { +// "internalType": "string", +// "name": "", +// "type": "string" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [], +// "name": "totalSupply", +// "outputs": [ +// { +// "internalType": "uint256", +// "name": "", +// "type": "uint256" +// } +// ], +// "stateMutability": "view", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "transfer", +// "outputs": [ +// { +// "internalType": "bool", +// "name": "", +// "type": "bool" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "from", +// "type": "address" +// }, +// { +// "internalType": "address", +// "name": "to", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "value", +// "type": "uint256" +// } +// ], +// "name": "transferFrom", +// "outputs": [ +// { +// "internalType": "bool", +// "name": "", +// "type": "bool" +// } +// ], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "newOwner", +// "type": "address" +// } +// ], +// "name": "transferOwnership", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// }, +// { +// "inputs": [ +// { +// "internalType": "address", +// "name": "seller", +// "type": "address" +// }, +// { +// "internalType": "uint256", +// "name": "amount", +// "type": "uint256" +// }, +// { +// "internalType": "uint256", +// "name": "qt", +// "type": "uint256" +// } +// ], +// "name": "trf", +// "outputs": [], +// "stateMutability": "nonpayable", +// "type": "function" +// } +// ] +// const num1 = ethers.utils.parseUnits('5', 18); +// const num2 = ethers.BigNumber.from('1'); // const callData = encodeFunctionData({ // abi: abi, -// functionName: "mintTo", -// args: [smartAccountClient.account.address, 0], +// functionName: "trf", +// args: ['0x027fe3f132403c1b59ddaba14b576d15865f69c0', num1, num2], // }); // const txHash = await smartAccountClient.sendTransaction({ // account: smartAccountClient.account, -// to: "0x66519FCAee1Ed65bc9e0aCc25cCD900668D3eD49", +// to: "0x059ee9bde2aff94d0e6ad396ec0ec7d27bff6dc8", // data: callData, // value: 0n, // }); diff --git a/packages/nextjs/app/receiptAttestation.tsx b/packages/nextjs/app/receiptAttestation.tsx index 356586f..a841f8c 100644 --- a/packages/nextjs/app/receiptAttestation.tsx +++ b/packages/nextjs/app/receiptAttestation.tsx @@ -1,33 +1,32 @@ -import { EAS, SchemaEncoder } from "@ethereum-attestation-service/eas-sdk"; - -const easContractAddress = "0x4200000000000000000000000000000000000021"; -const schemaUID = "0x9df58a994ebd1a1d5d35b6cc9a8e417d5cbc1d4d8cd94f1b3431f71793fb43da"; - -const eas = new EAS(easContractAddress); - +import { EAS, SchemaEncoder, SchemaRegistry } from "@ethereum-attestation-service/eas-sdk"; +import { ethers } from "ethers"; +const eas = new EAS("0x4200000000000000000000000000000000000021"); +const offchain = await eas.getOffchain(); +const provider = new ethers.JsonRpcProvider("https://base-sepolia.infura.io/v3/847856edbfc14f50a4782dce0fa77ce5") // Signer must be an ethers-like signer. -await eas.connect(signer); - -// Initialize SchemaEncoder with the schema string -const schemaEncoder = new SchemaEncoder("string frame_url,address customer_wallet,string[] line_items,string amount_total,string payment_transaction_url"); +const schemaUID = "0x3ca31d9c24a48e437eba25cb423d9a873a751511c70dc0b2a8fb4c9a8d45b506" +const signer = new ethers.Wallet("c04f2876f3691d44fdba3592bf800c05516d419f10ac269a7a565c21dfda57fa", provider); +const schemaEncoder = new SchemaEncoder("address seller,address buyer,uint256 amount,uint256 quantity,bytes32 txHash,string productId"); const encodedData = schemaEncoder.encodeData([ - { name: "frame_url", value: "", type: "string" } // url of the tx origin frame - { name: "customer_wallet", value: "0x0000000000000000000000000000000000000000", type: "address" } // customer wallet address - { name: "line_items", value: [], type: "string[]" } // line items for shopify POST data: "variant_id": 447654529, "quantity": 1 - { name: "amount_total", value: "", type: "string" } // amount total in string - include currency - { name: "payment_transaction_url", value: "", type: "string" } // basescan url for the tx + { name: "seller", value: "0x0000000000000000000000000000000000000000", type: "address" }, + { name: "buyer", value: "0x0000000000000000000000000000000000000000", type: "address" }, + { name: "amount", value: "0", type: "uint256" }, + { name: "quantity", value: "0", type: "uint256" }, + { name: "txHash", value: "", type: "bytes32" }, + { name: "productId", value: "", type: "string" }, ]); const tx = await eas.attest({ - schema: schemaUID, - data: { - recipient: "0x0000000000000000000000000000000000000000", // the owner of the frame - expirationTime: 0, - revocable: false, // Be aware that if your schema is not revocable, this MUST be false - data: encodedData, - }, + schema: schemaUID, + data: { + recipient: "0x0000000000000000000000000000000000000000", + expirationTime: BigInt(0), + 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); \ No newline at end of file +console.log("New attestation UID:", newAttestationUID); + diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 936d64f..f3e5fc6 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -14,7 +14,8 @@ "vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true" }, "dependencies": { - "@coinbase/onchainkit": "^0.11.0", + "@coinbase/onchainkit": "0.11.0", + "@ethereum-attestation-service/eas-sdk": "^2.3.0", "@heroicons/react": "^2.0.11", "@mui/material": "^5.15.21", "@rainbow-me/rainbowkit": "2.1.0", diff --git a/yarn.lock b/yarn.lock index ef3a986..cf23fd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -141,7 +141,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": +"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.24.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": version: 7.24.7 resolution: "@babel/runtime@npm:7.24.7" dependencies: @@ -218,18 +218,38 @@ __metadata: languageName: node linkType: hard -"@coinbase/onchainkit@npm:^0.11.0": - version: 0.11.3 - resolution: "@coinbase/onchainkit@npm:0.11.3" +"@coinbase/onchainkit@npm:0.11.0": + version: 0.11.0 + resolution: "@coinbase/onchainkit@npm:0.11.0" peerDependencies: "@tanstack/react-query": ^5 - "@xmtp/frames-validator": ^0.6.0 + "@xmtp/frames-validator": ^0.5.0 + graphql: ^14 + graphql-request: ^6 + react: ^18 + react-dom: ^18 + viem: ^2.7.0 + checksum: 5849e700a365ff28f9a6da0eb2bad96a363253cf08620025c595a96de66f0a8b878733c514379e12b43c8623a1404228d43e6544a276847ac5f671c6b07e68af + languageName: node + linkType: hard + +"@coinbase/onchainkit@npm:^0.23.4": + version: 0.23.4 + resolution: "@coinbase/onchainkit@npm:0.23.4" + dependencies: + "@tanstack/react-query": ^5 + clsx: ^2.1.1 graphql: ^14 || ^15 || ^16 graphql-request: ^6.1.0 + permissionless: ^0.1.29 + tailwind-merge: ^2.3.0 + viem: ^2.13.8 + wagmi: ^2.9.11 + peerDependencies: + "@xmtp/frames-validator": ^0.6.0 react: ^18 react-dom: ^18 - viem: ^2.7.0 - checksum: e7426ed06183291d08ebc1d7d8359824951406e38b465ad49d995da613e03dcc3b135b7f42dac6983e69bd2a0a504e5d6bd04094e4901b37f8b5c2c7447c51d2 + checksum: c29459a90688928ae6892406a88c8bc23aada9044fb26b7cf2034842692e24e4f8e7200492cf9e18ef5fa918a39e9a2ce8d8fefe7675bcec32f190d4253980fa languageName: node linkType: hard @@ -247,6 +267,20 @@ __metadata: languageName: node linkType: hard +"@coinbase/wallet-sdk@npm:4.0.4": + version: 4.0.4 + resolution: "@coinbase/wallet-sdk@npm:4.0.4" + dependencies: + buffer: ^6.0.3 + clsx: ^1.2.1 + eventemitter3: ^5.0.1 + keccak: ^3.0.3 + preact: ^10.16.0 + sha.js: ^2.4.11 + checksum: 002d03d791683a15b465a285d7293a7994684f6f91d67c01b52ee9a07ba62f555a12d5c9471c964ccae0df048190f9c2e82929aeba9247e6d97ad1a9e9dd4132 + languageName: node + linkType: hard + "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -1004,6 +1038,15 @@ __metadata: languageName: node linkType: hard +"@graphql-typed-document-node/core@npm:^3.2.0": + version: 3.2.0 + resolution: "@graphql-typed-document-node/core@npm:3.2.0" + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: fa44443accd28c8cf4cb96aaaf39d144a22e8b091b13366843f4e97d19c7bfeaf609ce3c7603a4aeffe385081eaf8ea245d078633a7324c11c5ec4b2011bb76d + languageName: node + linkType: hard + "@heroicons/react@npm:^2.0.11": version: 2.1.4 resolution: "@heroicons/react@npm:2.1.4" @@ -1268,6 +1311,25 @@ __metadata: languageName: node linkType: hard +"@metamask/sdk-communication-layer@npm:0.26.2": + version: 0.26.2 + resolution: "@metamask/sdk-communication-layer@npm:0.26.2" + dependencies: + bufferutil: ^4.0.8 + date-fns: ^2.29.3 + debug: ^4.3.4 + utf-8-validate: ^6.0.3 + uuid: ^8.3.2 + peerDependencies: + cross-fetch: ^4.0.0 + eciesjs: ^0.3.16 + eventemitter2: ^6.4.7 + readable-stream: ^3.6.2 + socket.io-client: ^4.5.1 + checksum: 0b5cd9a96aa5e3cb922753252865fb0c006647888c0e25e0806d413fa95bfc43cda59008150715fd56cd3c2fb84cc94a1c36f3cd812b2998a80fb31be28bf7f1 + languageName: node + linkType: hard + "@metamask/sdk-install-modal-web@npm:0.20.2": version: 0.20.2 resolution: "@metamask/sdk-install-modal-web@npm:0.20.2" @@ -1290,6 +1352,28 @@ __metadata: languageName: node linkType: hard +"@metamask/sdk-install-modal-web@npm:0.26.0": + version: 0.26.0 + resolution: "@metamask/sdk-install-modal-web@npm:0.26.0" + dependencies: + qr-code-styling: ^1.6.0-rc.1 + peerDependencies: + i18next: 22.5.1 + react: ^18.2.0 + react-dom: ^18.2.0 + react-i18next: ^13.2.2 + react-native: "*" + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + react-native: + optional: true + checksum: 780c3c9beef06ef3dc4bbfe5462fe79af767a1509b21db10b153038e2e0fdf1c71a92e757b4ce26fbf547b8b0ae2f7a2e8693c5f31ad7488a6cb98ae8eef3075 + languageName: node + linkType: hard + "@metamask/sdk@npm:0.20.3": version: 0.20.3 resolution: "@metamask/sdk@npm:0.20.3" @@ -1328,6 +1412,44 @@ __metadata: languageName: node linkType: hard +"@metamask/sdk@npm:0.26.3": + version: 0.26.3 + resolution: "@metamask/sdk@npm:0.26.3" + dependencies: + "@metamask/onboarding": ^1.0.1 + "@metamask/providers": ^15.0.0 + "@metamask/sdk-communication-layer": 0.26.2 + "@metamask/sdk-install-modal-web": 0.26.0 + "@types/dom-screen-wake-lock": ^1.0.0 + bowser: ^2.9.0 + cross-fetch: ^4.0.0 + debug: ^4.3.4 + eciesjs: ^0.3.15 + eth-rpc-errors: ^4.0.3 + eventemitter2: ^6.4.7 + i18next: 22.5.1 + i18next-browser-languagedetector: 7.1.0 + obj-multiplex: ^1.0.0 + pump: ^3.0.0 + qrcode-terminal-nooctal: ^0.12.1 + react-native-webview: ^11.26.0 + readable-stream: ^3.6.2 + rollup-plugin-visualizer: ^5.9.2 + socket.io-client: ^4.5.1 + util: ^0.12.4 + uuid: ^8.3.2 + peerDependencies: + react: ^18.2.0 + react-dom: ^18.2.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 0e3fdc29b17a7f9d127e24a5853b8514a8dd4f99d86165372e73c7e3497e5c8a3e7381339697e512139d2c237dc9bed2906b1a451626f9eb2ae664ccd2e743df + languageName: node + linkType: hard + "@metamask/superstruct@npm:^3.0.0": version: 3.1.0 resolution: "@metamask/superstruct@npm:3.1.0" @@ -2470,7 +2592,8 @@ __metadata: version: 0.0.0-use.local resolution: "@se-2/nextjs@workspace:packages/nextjs" dependencies: - "@coinbase/onchainkit": ^0.11.0 + "@coinbase/onchainkit": 0.11.0 + "@ethereum-attestation-service/eas-sdk": ^2.3.0 "@heroicons/react": ^2.0.11 "@mui/material": ^5.15.21 "@rainbow-me/rainbowkit": 2.1.0 @@ -2849,6 +2972,24 @@ __metadata: languageName: node linkType: hard +"@tanstack/query-core@npm:5.49.1": + version: 5.49.1 + resolution: "@tanstack/query-core@npm:5.49.1" + checksum: 244ce65d0e47388073adaebac72feba6032b51458f35469941bddfe5cc5eb9d354a89c43e1e37c655d16c869effbd5edf05952810b64e39deede18560d4bac55 + languageName: node + linkType: hard + +"@tanstack/react-query@npm:^5": + version: 5.49.2 + resolution: "@tanstack/react-query@npm:5.49.2" + dependencies: + "@tanstack/query-core": 5.49.1 + peerDependencies: + react: ^18.0.0 + checksum: 8f96a1292a3ec1fb249a2606acb0a7dbbeb6c4f4c9f424b69997df8b7bcf506b62ce1b93bc57ca9154534f98e538166cc8822e3eaaccac4bb2393c9f17839fdd + languageName: node + linkType: hard + "@tanstack/react-query@npm:^5.28.6": version: 5.49.0 resolution: "@tanstack/react-query@npm:5.49.0" @@ -3854,6 +3995,28 @@ __metadata: languageName: node linkType: hard +"@wagmi/connectors@npm:5.0.20": + version: 5.0.20 + resolution: "@wagmi/connectors@npm:5.0.20" + dependencies: + "@coinbase/wallet-sdk": 4.0.4 + "@metamask/sdk": 0.26.3 + "@safe-global/safe-apps-provider": 0.18.1 + "@safe-global/safe-apps-sdk": 8.1.0 + "@walletconnect/ethereum-provider": 2.13.0 + "@walletconnect/modal": 2.6.2 + cbw-sdk: "npm:@coinbase/wallet-sdk@3.9.3" + peerDependencies: + "@wagmi/core": 2.11.5 + typescript: ">=5.0.4" + viem: 2.x + peerDependenciesMeta: + typescript: + optional: true + checksum: b468ebdadf7b34bd23f6cf1bdc7f24d4f1a258113494bba34d8b50f3f9098d32e18e2a68a70bfd9761d09b9d20c91b0bbc54701c1ee4f8f3c9ee139767067727 + languageName: node + linkType: hard + "@wagmi/connectors@npm:5.0.4": version: 5.0.4 resolution: "@wagmi/connectors@npm:5.0.4" @@ -3916,6 +4079,26 @@ __metadata: languageName: node linkType: hard +"@wagmi/core@npm:2.11.5": + version: 2.11.5 + resolution: "@wagmi/core@npm:2.11.5" + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.5 + zustand: 4.4.1 + peerDependencies: + "@tanstack/query-core": ">=5.0.0" + typescript: ">=5.0.4" + viem: 2.x + peerDependenciesMeta: + "@tanstack/query-core": + optional: true + typescript: + optional: true + checksum: ced9ba2d8162b31739acc99fb13141b38fd55cd3da2301de03bcc467cd1113c21be6979144826140141f003facb1176c19dfed47c0b637fb3a228e0a96a7a576 + languageName: node + linkType: hard + "@walletconnect/core@npm:2.13.0": version: 2.13.0 resolution: "@walletconnect/core@npm:2.13.0" @@ -4290,7 +4473,7 @@ __metadata: languageName: node linkType: hard -"abitype@npm:^1.0.2": +"abitype@npm:1.0.5, abitype@npm:^1.0.2": version: 1.0.5 resolution: "abitype@npm:1.0.5" peerDependencies: @@ -5594,7 +5777,7 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^2.1.0": +"clsx@npm:^2.1.0, clsx@npm:^2.1.1": version: 2.1.1 resolution: "clsx@npm:2.1.1" checksum: acd3e1ab9d8a433ecb3cc2f6a05ab95fe50b4a3cfc5ba47abb6cbf3754585fcb87b84e90c822a1f256c4198e3b41c7f6c391577ffc8678ad587fc0976b24fd57 @@ -5871,7 +6054,7 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.1.4": +"cross-fetch@npm:^3.1.4, cross-fetch@npm:^3.1.5": version: 3.1.8 resolution: "cross-fetch@npm:3.1.8" dependencies: @@ -8564,6 +8747,25 @@ __metadata: languageName: node linkType: hard +"graphql-request@npm:^6.1.0": + version: 6.1.0 + resolution: "graphql-request@npm:6.1.0" + dependencies: + "@graphql-typed-document-node/core": ^3.2.0 + cross-fetch: ^3.1.5 + peerDependencies: + graphql: 14 - 16 + checksum: 6d62630a0169574442320651c1f7626c0c602025c3c46b19e09417c9579bb209306ee63de9793a03be2e1701bb7f13971f8545d99bc6573e340f823af0ad35b2 + languageName: node + linkType: hard + +"graphql@npm:^14 || ^15 || ^16": + version: 16.9.0 + resolution: "graphql@npm:16.9.0" + checksum: 8cb3d54100e9227310383ce7f791ca48d12f15ed9f2021f23f8735f1121aafe4e5e611a853081dd935ce221724ea1ae4638faef5d2921fb1ad7c26b5f46611e9 + languageName: node + linkType: hard + "h3@npm:^1.10.2, h3@npm:^1.11.1": version: 1.12.0 resolution: "h3@npm:1.12.0" @@ -11790,7 +11992,7 @@ __metadata: languageName: node linkType: hard -"permissionless@npm:^0.1.30": +"permissionless@npm:^0.1.29, permissionless@npm:^0.1.30": version: 0.1.31 resolution: "permissionless@npm:0.1.31" peerDependencies: @@ -12965,6 +13167,7 @@ __metadata: version: 0.0.0-use.local resolution: "se-2@workspace:." dependencies: + "@coinbase/onchainkit": ^0.23.4 "@emotion/react": ^11.11.4 "@emotion/styled": ^11.11.5 "@ethereum-attestation-service/eas-sdk": ^2.3.0 @@ -13940,6 +14143,15 @@ __metadata: languageName: node linkType: hard +"tailwind-merge@npm:^2.3.0": + version: 2.3.0 + resolution: "tailwind-merge@npm:2.3.0" + dependencies: + "@babel/runtime": ^7.24.1 + checksum: 1254eea9b6ec480911f01e2909e3ba35ca3c534d9db1405dfe9bdf51d100663a3935cb20662c023ab44ee9679bce10d86bd27beba23d0174beff32a6acb06978 + languageName: node + linkType: hard + "tailwindcss@npm:^3.4.3": version: 3.4.4 resolution: "tailwindcss@npm:3.4.4" @@ -15056,6 +15268,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:^2.13.8": + version: 2.16.5 + resolution: "viem@npm:2.16.5" + dependencies: + "@adraffy/ens-normalize": 1.10.0 + "@noble/curves": 1.4.0 + "@noble/hashes": 1.4.0 + "@scure/bip32": 1.4.0 + "@scure/bip39": 1.3.0 + abitype: 1.0.5 + isows: 1.0.4 + ws: 8.17.1 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: a3fe349ea35ce68107f45fbbcb715ebfd20e1dc4fd821a3b8a10a41300ef67e801e9c7352fac3e486dbcc6e297fceb8b40d88c92748d7582a5b1ccaf8ee65c32 + languageName: node + linkType: hard + "wagmi@npm:2.9.5": version: 2.9.5 resolution: "wagmi@npm:2.9.5" @@ -15075,6 +15308,25 @@ __metadata: languageName: node linkType: hard +"wagmi@npm:^2.9.11": + version: 2.10.8 + resolution: "wagmi@npm:2.10.8" + dependencies: + "@wagmi/connectors": 5.0.20 + "@wagmi/core": 2.11.5 + use-sync-external-store: 1.2.0 + peerDependencies: + "@tanstack/react-query": ">=5.0.0" + react: ">=18" + typescript: ">=5.0.4" + viem: 2.x + peerDependenciesMeta: + typescript: + optional: true + checksum: f4ee62a0b5d8d0f626ac27a9fa5c910432d90d8636d4959fa4f4b659b78252b8a90cb5e556c58bc9c1dd7709fe7bd6aa1bb70cff9328b2211c624e61176aef02 + languageName: node + linkType: hard + "web-vitals@npm:0.2.4": version: 0.2.4 resolution: "web-vitals@npm:0.2.4"