-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
30 lines (26 loc) · 799 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// web3auth node
import { Web3Auth } from "@web3auth/node-sdk";
import {
WALLET_ADAPTERS,
CHAIN_NAMESPACES,
SafeEventEmitterProvider,
} from "@web3auth/base";
const WEB3AUTH_CLIENT_ID =
"BCUDbtKqHKHHp_juQ4fd-vekT41t2MBTANNjxcysVGfeJoBzW2RVaTNKqUaxMjF6t-daed_3NRVDgNqWhnw4dHk";
const CHAIN_CONFIG = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x61",
rpcTarget: "https://rpc.ankr.com/bsc_testnet_chapel",
displayName: "Binance SmartChain Testnet",
blockExplorer: "https://testnet.bscscan.com",
ticker: "BNB",
tickerName: "BNB",
};
const web3auth = new Web3Auth({
clientId: WEB3AUTH_CLIENT_ID,
chainConfig: CHAIN_CONFIG,
web3AuthNetwork: "testnet",
// usePnPKey: "false", // By default, this sdk returns CoreKitKey
});
web3auth.init();
console.log(web3auth);