mirror of
https://github.com/placeholder-soft/privy-cross-app.git
synced 2026-01-12 07:14:08 +08:00
chore: test env
This commit is contained in:
1
.env.development
Normal file
1
.env.development
Normal file
@@ -0,0 +1 @@
|
||||
VITE_PRIVY_APP_ID=clt8w3guc082a12djsayai4py
|
||||
@@ -12,12 +12,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@privy-io/react-auth": "^1.94.3",
|
||||
"@t3-oss/env-core": "^0.11.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"ethers": "^6.13.4",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router": "^7.0.0",
|
||||
"react-router-dom": "^7.0.0"
|
||||
"react-router-dom": "^7.0.0",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.13.0",
|
||||
|
||||
57
pnpm-lock.yaml
generated
57
pnpm-lock.yaml
generated
@@ -10,7 +10,10 @@ importers:
|
||||
dependencies:
|
||||
'@privy-io/react-auth':
|
||||
specifier: ^1.94.3
|
||||
version: 1.94.3(@solana/web3.js@1.95.5(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)
|
||||
version: 1.94.3(@solana/web3.js@1.95.5(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1)
|
||||
'@t3-oss/env-core':
|
||||
specifier: ^0.11.1
|
||||
version: 0.11.1(typescript@5.6.2)(zod@3.24.1)
|
||||
autoprefixer:
|
||||
specifier: ^10.4.20
|
||||
version: 10.4.20(postcss@8.4.49)
|
||||
@@ -29,6 +32,9 @@ importers:
|
||||
react-router-dom:
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
zod:
|
||||
specifier: ^3.24.1
|
||||
version: 3.24.1
|
||||
devDependencies:
|
||||
'@eslint/js':
|
||||
specifier: ^9.13.0
|
||||
@@ -988,6 +994,15 @@ packages:
|
||||
'@swc/helpers@0.5.15':
|
||||
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
|
||||
|
||||
'@t3-oss/env-core@0.11.1':
|
||||
resolution: {integrity: sha512-MaxOwEoG1ntCFoKJsS7nqwgcxLW1SJw238AJwfJeaz3P/8GtkxXZsPPolsz1AdYvUTbe3XvqZ/VCdfjt+3zmKw==}
|
||||
peerDependencies:
|
||||
typescript: '>=5.0.0'
|
||||
zod: ^3.0.0
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
'@tanstack/react-virtual@3.10.9':
|
||||
resolution: {integrity: sha512-OXO2uBjFqA4Ibr2O3y0YMnkrRWGVNqcvHQXmGvMu6IK8chZl3PrDxFXdGZ2iZkSrKh3/qUYoFqYe+Rx23RoU0g==}
|
||||
peerDependencies:
|
||||
@@ -3236,8 +3251,8 @@ packages:
|
||||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
zod@3.23.8:
|
||||
resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==}
|
||||
zod@3.24.1:
|
||||
resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==}
|
||||
|
||||
snapshots:
|
||||
|
||||
@@ -4035,9 +4050,9 @@ snapshots:
|
||||
|
||||
'@privy-io/api-base@1.4.0':
|
||||
dependencies:
|
||||
zod: 3.23.8
|
||||
zod: 3.24.1
|
||||
|
||||
'@privy-io/js-sdk-core@0.34.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(viem@2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))':
|
||||
'@privy-io/js-sdk-core@0.34.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(viem@2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1))':
|
||||
dependencies:
|
||||
'@ethersproject/abstract-signer': 5.7.0
|
||||
'@ethersproject/bignumber': 5.7.0
|
||||
@@ -4055,7 +4070,7 @@ snapshots:
|
||||
set-cookie-parser: 2.7.1
|
||||
uuid: 9.0.1
|
||||
optionalDependencies:
|
||||
viem: 2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)
|
||||
viem: 2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1)
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
@@ -4066,12 +4081,12 @@ snapshots:
|
||||
bs58: 5.0.0
|
||||
ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)
|
||||
libphonenumber-js: 1.11.15
|
||||
zod: 3.23.8
|
||||
zod: 3.24.1
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
|
||||
'@privy-io/react-auth@1.94.3(@solana/web3.js@1.95.5(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)':
|
||||
'@privy-io/react-auth@1.94.3(@solana/web3.js@1.95.5(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1)':
|
||||
dependencies:
|
||||
'@coinbase/wallet-sdk': 4.0.3
|
||||
'@ethersproject/abstract-signer': 5.7.0
|
||||
@@ -4089,7 +4104,7 @@ snapshots:
|
||||
'@heroicons/react': 2.2.0(react@18.3.1)
|
||||
'@marsidev/react-turnstile': 0.4.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
'@metamask/eth-sig-util': 6.0.2
|
||||
'@privy-io/js-sdk-core': 0.34.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(viem@2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8))
|
||||
'@privy-io/js-sdk-core': 0.34.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)(viem@2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1))
|
||||
'@simplewebauthn/browser': 9.0.1
|
||||
'@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.95.5(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))
|
||||
'@solana/wallet-standard-wallet-adapter-base': 1.1.2(@solana/web3.js@1.95.5(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@5.0.0)
|
||||
@@ -4118,7 +4133,7 @@ snapshots:
|
||||
stylis: 4.3.4
|
||||
tinycolor2: 1.6.0
|
||||
uuid: 9.0.1
|
||||
viem: 2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8)
|
||||
viem: 2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1)
|
||||
web3-core: 1.10.4(encoding@0.1.13)
|
||||
web3-core-helpers: 1.10.3
|
||||
optionalDependencies:
|
||||
@@ -4426,6 +4441,12 @@ snapshots:
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
|
||||
'@t3-oss/env-core@0.11.1(typescript@5.6.2)(zod@3.24.1)':
|
||||
dependencies:
|
||||
zod: 3.24.1
|
||||
optionalDependencies:
|
||||
typescript: 5.6.2
|
||||
|
||||
'@tanstack/react-virtual@3.10.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
|
||||
dependencies:
|
||||
'@tanstack/virtual-core': 3.10.9
|
||||
@@ -4940,10 +4961,10 @@ snapshots:
|
||||
jsonparse: 1.3.1
|
||||
through: 2.3.8
|
||||
|
||||
abitype@1.0.6(typescript@5.6.2)(zod@3.23.8):
|
||||
abitype@1.0.6(typescript@5.6.2)(zod@3.24.1):
|
||||
optionalDependencies:
|
||||
typescript: 5.6.2
|
||||
zod: 3.23.8
|
||||
zod: 3.24.1
|
||||
|
||||
abort-controller@3.0.0:
|
||||
dependencies:
|
||||
@@ -6107,14 +6128,14 @@ snapshots:
|
||||
type-check: 0.4.0
|
||||
word-wrap: 1.2.5
|
||||
|
||||
ox@0.1.2(typescript@5.6.2)(zod@3.23.8):
|
||||
ox@0.1.2(typescript@5.6.2)(zod@3.24.1):
|
||||
dependencies:
|
||||
'@adraffy/ens-normalize': 1.11.0
|
||||
'@noble/curves': 1.6.0
|
||||
'@noble/hashes': 1.5.0
|
||||
'@scure/bip32': 1.5.0
|
||||
'@scure/bip39': 1.4.0
|
||||
abitype: 1.0.6(typescript@5.6.2)(zod@3.23.8)
|
||||
abitype: 1.0.6(typescript@5.6.2)(zod@3.24.1)
|
||||
eventemitter3: 5.0.1
|
||||
optionalDependencies:
|
||||
typescript: 5.6.2
|
||||
@@ -6758,15 +6779,15 @@ snapshots:
|
||||
'@types/react': 18.3.12
|
||||
react: 18.3.1
|
||||
|
||||
viem@2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.23.8):
|
||||
viem@2.21.49(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)(zod@3.24.1):
|
||||
dependencies:
|
||||
'@noble/curves': 1.6.0
|
||||
'@noble/hashes': 1.5.0
|
||||
'@scure/bip32': 1.5.0
|
||||
'@scure/bip39': 1.4.0
|
||||
abitype: 1.0.6(typescript@5.6.2)(zod@3.23.8)
|
||||
abitype: 1.0.6(typescript@5.6.2)(zod@3.24.1)
|
||||
isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))
|
||||
ox: 0.1.2(typescript@5.6.2)(zod@3.23.8)
|
||||
ox: 0.1.2(typescript@5.6.2)(zod@3.24.1)
|
||||
webauthn-p256: 0.0.10
|
||||
ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)
|
||||
optionalDependencies:
|
||||
@@ -6998,4 +7019,4 @@ snapshots:
|
||||
|
||||
yocto-queue@0.1.0: {}
|
||||
|
||||
zod@3.23.8: {}
|
||||
zod@3.24.1: {}
|
||||
|
||||
10
src/env.ts
Normal file
10
src/env.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { createEnv } from "@t3-oss/env-core";
|
||||
import { z } from "zod";
|
||||
|
||||
export const env = createEnv({
|
||||
clientPrefix: "VITE_",
|
||||
client: {
|
||||
VITE_PRIVY_APP_ID: z.string(),
|
||||
},
|
||||
runtimeEnv: import.meta.env,
|
||||
});
|
||||
@@ -3,6 +3,7 @@ import { FC, useState, useEffect } from "react";
|
||||
import { GIFT_ART_APP_ID } from "../../main.tsx";
|
||||
import { useNavigate } from "react-router";
|
||||
import { ethers } from "ethers";
|
||||
import { env } from "../../env.ts";
|
||||
|
||||
const usdcContractAddress = "0x9e0D7B454676116C123d56ff4d5ed609D75Ad00E";
|
||||
|
||||
@@ -207,6 +208,9 @@ export const AppPage = () => {
|
||||
);
|
||||
const crossEmbeddedWalletAddress = crossAccounts?.embeddedWallets[0]?.address;
|
||||
|
||||
console.log(env.VITE_PRIVY_APP_ID);
|
||||
|
||||
|
||||
return (
|
||||
<div className="h-screen flex flex-col justify-center items-center text-lg">
|
||||
<div className="flex flex-col items-center border border-gray-200 rounded-lg p-12">
|
||||
|
||||
Reference in New Issue
Block a user