1
+ import { CHAIN_NAMESPACES , CustomChainConfig } from "@web3auth/base" ;
1
2
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider" ;
2
3
import { SolanaPrivateKeyProvider } from "@web3auth/solana-provider" ;
3
4
import { expect } from "chai" ;
@@ -20,17 +21,19 @@ describe("web3auth backend", function () {
20
21
const provider = new EthereumPrivateKeyProvider ( {
21
22
config : {
22
23
chainConfig : {
23
- displayName : "ETH Mainnet" ,
24
- blockExplorer : "https://etherscan.io" ,
24
+ chainNamespace : CHAIN_NAMESPACES . EIP155 ,
25
+ displayName : "ETH Sepolia" ,
26
+ blockExplorerUrl : "https://sepolia.etherscan.io" ,
25
27
ticker : "ETH" ,
26
28
tickerName : "Ethereum" ,
27
- chainId : "0x5 " , // goerli
28
- rpcTarget : "https://rpc.ankr.com/eth_goerli " ,
29
+ chainId : "0xaa36a7 " , // sepolia
30
+ rpcTarget : "https://rpc.ankr.com/eth_sepolia " ,
29
31
} ,
30
32
} ,
31
33
} ) ;
32
34
web3auth . init ( { provider } ) ;
33
35
} ) ;
36
+
34
37
it ( "should return a provider with private key" , async function ( ) {
35
38
const provider = await web3auth . connect ( {
36
39
verifier : TORUS_TEST_VERIFIER ,
@@ -63,9 +66,10 @@ describe("web3auth backend", function () {
63
66
clientId : "BCtbnOamqh0cJFEUYA0NB5YkvBECZ3HLZsKfvSRBvew2EiiKW3UxpyQASSR0artjQkiUOCHeZ_ZeygXpYpxZjOs" ,
64
67
web3AuthNetwork : "testnet" ,
65
68
} ) ;
66
- const chainConfig = {
69
+ const chainConfig : CustomChainConfig = {
70
+ chainNamespace : CHAIN_NAMESPACES . SOLANA ,
67
71
displayName : "Solana Devnet" ,
68
- blockExplorer : "https://explorer.solana.com/" ,
72
+ blockExplorerUrl : "https://explorer.solana.com/" ,
69
73
ticker : "sol" ,
70
74
tickerName : "Solana" ,
71
75
chainId : "0x3" ,
0 commit comments