Hey can i use polygon amoy with web3auth connect,with node-sdk
Yaaa ,but am getting an error that network is decommissioned ,try with sepolia .i am using alchemy amoy rpc
would you mind trying with https://rpc-amoy.polygon.technology/
and tell me if is it working?
yaa, already tried with that
I’m trying this example with Amoy and it’s working ok.
Can you please share some code snippets ?
is it working in sapphire devnet?
following is my error
Returned error: Network decommissioned, please use Sepolia instead
at Object.ErrorResponse (/usr/src/node_modules/web3-core-helpers/lib/errors.js:28:19)
at /usr/src/node_modules/web3-core-requestmanager/lib/index.js:300:36
at /usr/src/node_modules/web3-providers-http/lib/index.js:124:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
data: {
see: ‘https://www.infura.io/blog/post/deprecation-notice-for-all-infura-supported-goerli-endpoints’
}
}
const { Web3Auth } = web3authpkg;
const web3auth = new Web3Auth({
web3AuthNetwork: process.env.NETWORK,
clientId: process.env.WEB3_AUTH_KEY, // Get your Client ID from Web3Auth Dashboard
chainConfig: {
chainNamespace: "eip155",
chainId: process.env.CHAIN_ID,
rpcTarget: process.env.RPC_PROVIDER
});
web3auth.init({ network: process.env.NETWORK });
export const getUserPublicKey = async (sub, idToken) => {
const web3authverifier = process.env.WEB3_AUTH_VERIFER;
console.log("idtoken", idToken);
console.log("sub", sub);
console.log("web3authverifier", web3authverifier)
const web3Authprovider = await web3auth.connect({
verifier: web3authverifier, // replace with your verifier name, and it has to be on the same network passed in init().
verifierId: sub, // replace with your verifier id(sub or email), setup while creating the verifier on Web3Auth's Dashboard
idToken: idToken, // replace with your newly created unused JWT Token.
});
const tempProvider = new ethers.providers.Web3Provider(web3Authprovider);
const tempSigner = tempProvider.getSigner();
const publicKey = await tempSigner.getAddress();
return publicKey;
};
The error stack seems to show that the error is not originating from web3auth sdk.
Also, it’s related to deprecation of goerli network. Pls check if you’re using goerli and migrate to sepolia instead.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.