configured privy for bsc

This commit is contained in:
DRUBOTZ23 2025-02-19 20:48:51 +05:30
parent 680c65c6ff
commit b4a5b2b3ad
3 changed files with 74 additions and 103 deletions

154
package-lock.json generated
View File

@ -51,6 +51,7 @@
"tailwindcss-animate": "^1.0.7",
"unified": "^11.0.5",
"vaul": "^0.9.1",
"viem": "^2.23.3",
"zod": "^3.24.1"
},
"devDependencies": {
@ -68,7 +69,8 @@
"node_modules/@adraffy/ens-normalize": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz",
"integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg=="
"integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==",
"license": "MIT"
},
"node_modules/@alloc/quick-lru": {
"version": "5.2.0",
@ -1441,11 +1443,12 @@
}
},
"node_modules/@noble/curves": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.0.tgz",
"integrity": "sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==",
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz",
"integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==",
"license": "MIT",
"dependencies": {
"@noble/hashes": "1.7.0"
"@noble/hashes": "1.7.1"
},
"engines": {
"node": "^14.21.3 || >=16"
@ -1455,9 +1458,10 @@
}
},
"node_modules/@noble/hashes": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.0.tgz",
"integrity": "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==",
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz",
"integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==",
"license": "MIT",
"engines": {
"node": "^14.21.3 || >=16"
},
@ -3970,9 +3974,10 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/abitype": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.7.tgz",
"integrity": "sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw==",
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz",
"integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/wevm"
},
@ -9309,15 +9314,16 @@
}
},
"node_modules/ox": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/ox/-/ox-0.6.5.tgz",
"integrity": "sha512-vmnH8KvMDwFZDbNY1mq2CBRBWIgSliZB/dFV0xKp+DfF/dJkTENt6nmA+DzHSSAgL/GO2ydjkXWvlndJgSY4KQ==",
"version": "0.6.7",
"resolved": "https://registry.npmjs.org/ox/-/ox-0.6.7.tgz",
"integrity": "sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/wevm"
}
],
"license": "MIT",
"dependencies": {
"@adraffy/ens-normalize": "^1.10.1",
"@noble/curves": "^1.6.0",
@ -9337,33 +9343,36 @@
}
},
"node_modules/ox/node_modules/@scure/base": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz",
"integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==",
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz",
"integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==",
"license": "MIT",
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/ox/node_modules/@scure/bip32": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.1.tgz",
"integrity": "sha512-jSO+5Ud1E588Y+LFo8TaB8JVPNAZw/lGGao+1SepHDeTs2dFLurdNIAgUuDlwezqEjRjElkCJajVrtrZaBxvaQ==",
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz",
"integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==",
"license": "MIT",
"dependencies": {
"@noble/curves": "~1.8.0",
"@noble/hashes": "~1.7.0",
"@scure/base": "~1.2.1"
"@noble/curves": "~1.8.1",
"@noble/hashes": "~1.7.1",
"@scure/base": "~1.2.2"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/ox/node_modules/@scure/bip39": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.1.tgz",
"integrity": "sha512-GnlufVSP9UdAo/H2Patfv22VTtpNTyfi+I3qCKpvuB5l1KWzEYx+l2TNpBy9Ksh4xTs3Rn06tBlpWCi/1Vz8gw==",
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz",
"integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==",
"license": "MIT",
"dependencies": {
"@noble/hashes": "~1.7.0",
"@scure/base": "~1.2.1"
"@noble/hashes": "~1.7.1",
"@scure/base": "~1.2.4"
},
"funding": {
"url": "https://paulmillr.com/funding/"
@ -9372,7 +9381,8 @@
"node_modules/ox/node_modules/eventemitter3": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
"license": "MIT"
},
"node_modules/p-limit": {
"version": "3.1.0",
@ -12055,23 +12065,24 @@
}
},
"node_modules/viem": {
"version": "2.22.9",
"resolved": "https://registry.npmjs.org/viem/-/viem-2.22.9.tgz",
"integrity": "sha512-2yy46qYhcdo8GZggQ3Zoq9QCahI0goddzpVI/vSnTpcClQBSDxYRCuAqRzzLqjvJ7hS0UYgplC7eRkM2sYgflw==",
"version": "2.23.3",
"resolved": "https://registry.npmjs.org/viem/-/viem-2.23.3.tgz",
"integrity": "sha512-ON/Uybteajqxn3iFyhV/6Ybm+QKhcrsVyTZf/9v2w0CvYQIoyJYCfHSsQR9zpsbOGrR7d2p62w6jzb6fqzzacg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/wevm"
}
],
"license": "MIT",
"dependencies": {
"@noble/curves": "1.7.0",
"@noble/hashes": "1.6.1",
"@scure/bip32": "1.6.0",
"@scure/bip39": "1.5.0",
"abitype": "1.0.7",
"@noble/curves": "1.8.1",
"@noble/hashes": "1.7.1",
"@scure/bip32": "1.6.2",
"@scure/bip39": "1.5.4",
"abitype": "1.0.8",
"isows": "1.0.6",
"ox": "0.6.5",
"ox": "0.6.7",
"ws": "8.18.0"
},
"peerDependencies": {
@ -12083,70 +12094,37 @@
}
}
},
"node_modules/viem/node_modules/@noble/curves": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.7.0.tgz",
"integrity": "sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==",
"dependencies": {
"@noble/hashes": "1.6.0"
},
"engines": {
"node": "^14.21.3 || >=16"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/viem/node_modules/@noble/curves/node_modules/@noble/hashes": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz",
"integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==",
"engines": {
"node": "^14.21.3 || >=16"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/viem/node_modules/@noble/hashes": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz",
"integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==",
"engines": {
"node": "^14.21.3 || >=16"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/viem/node_modules/@scure/base": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz",
"integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==",
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz",
"integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==",
"license": "MIT",
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/viem/node_modules/@scure/bip32": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.0.tgz",
"integrity": "sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==",
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz",
"integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==",
"license": "MIT",
"dependencies": {
"@noble/curves": "~1.7.0",
"@noble/hashes": "~1.6.0",
"@scure/base": "~1.2.1"
"@noble/curves": "~1.8.1",
"@noble/hashes": "~1.7.1",
"@scure/base": "~1.2.2"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/viem/node_modules/@scure/bip39": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.0.tgz",
"integrity": "sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==",
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz",
"integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==",
"license": "MIT",
"dependencies": {
"@noble/hashes": "~1.6.0",
"@scure/base": "~1.2.1"
"@noble/hashes": "~1.7.1",
"@scure/base": "~1.2.4"
},
"funding": {
"url": "https://paulmillr.com/funding/"

View File

@ -52,6 +52,7 @@
"tailwindcss-animate": "^1.0.7",
"unified": "^11.0.5",
"vaul": "^0.9.1",
"viem": "^2.23.3",
"zod": "^3.24.1"
},
"devDependencies": {

View File

@ -4,10 +4,8 @@ import { PrivyProvider } from "@privy-io/react-auth";
import { toSolanaWalletConnectors } from "@privy-io/react-auth/solana";
const solanaConnectors = toSolanaWalletConnectors({
// By default, shouldAutoConnect is enabled
shouldAutoConnect: false,
});
// Replace this with any of the networks listed at https://github.com/wevm/viem/blob/main/src/chains/index.ts
import {bsc} from 'viem/chains';
export default function MyPrivyProvider({
children,
@ -23,16 +21,11 @@ export default function MyPrivyProvider({
accentColor: "#812f20",
theme: "light",
showWalletLoginFirst: false,
walletChainType: "solana-only",
// walletList: ["phantom"],
logo: "https://supabasekong-swwwcowsg8kso0cg4swosw48.dev3vds1.link/storage/v1/object/public/logo/banner.png",
logo: "https://auth.privy.io/logos/privy-logo.png",
walletChainType: 'ethereum-only',
walletList: ['metamask', 'wallet_connect', 'coinbase_wallet', 'rabby_wallet', 'cryptocom','safe']
},
loginMethods: ["email", "wallet"],
fundingMethodConfig: {
moonpay: {
useSandbox: true,
},
},
// Create embedded wallets for users who don't have a wallet
embeddedWallets: {
createOnLogin: "all-users",
@ -41,9 +34,8 @@ export default function MyPrivyProvider({
mfa: {
noPromptOnMfaRequired: false,
},
externalWallets: {
solana: { connectors: solanaConnectors },
},
defaultChain: bsc,
supportedChains: [bsc]
}}
>
{children}