Skip to content

Commit 4af7f52

Browse files
committed
V10 changes for vanillajs example
1 parent a5b4575 commit 4af7f52

File tree

6 files changed

+941
-0
lines changed

6 files changed

+941
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Web3Auth (`@web3auth/modal`) x EVM x JavaScript
2+
3+
[![Web3Auth](https://img.shields.io/badge/Web3Auth-SDK-blue)](https://web3auth.io/docs/sdk/pnp/web/modal)
4+
[![Web3Auth](https://img.shields.io/badge/Web3Auth-Community-cyan)](https://community.web3auth.io)
5+
6+
[Join our Community Portal](https://community.web3auth.io/) to get support and stay up to date with the latest news and updates.
7+
8+
This example demonstrates how to use Web3Auth with EVM in JavaScript.
9+
10+
## How to Use
11+
12+
### One-Click Deploy to Vercel
13+
14+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FWeb3Auth%2Fweb3auth-pnp-examples%2Ftree%2Fmain%2Fweb-modal-sdk%2Fquick-starts%2Fvanillajs-modal-quick-start&project-name=w3a-vanillajs-modal&repository-name=w3a-vanillajs-modal)
15+
16+
### Download Manually
17+
18+
```bash
19+
npx degit Web3Auth/web3auth-pnp-examples/web-modal-sdk/quick-starts/vanillajs-modal-quick-start w3a-example
20+
```
21+
22+
Install & Run:
23+
24+
```bash
25+
cd w3a-example
26+
npm install
27+
npm run start
28+
# or
29+
cd w3a-example
30+
yarn
31+
yarn start
32+
```
33+
34+
## Important Links
35+
36+
- [Website](https://web3auth.io)
37+
- [Docs](https://web3auth.io/docs)
38+
- [Guides](https://web3auth.io/docs/guides)
39+
- [SDK / API References](https://web3auth.io/docs/sdk)
40+
- [Pricing](https://web3auth.io/pricing.html)
41+
- [Community Portal](https://community.web3auth.io)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Web3Auth Getting Started</title>
6+
<meta charset="UTF-8" />
7+
<link rel="stylesheet" href="style.css" />
8+
</head>
9+
10+
<body>
11+
<div class="container">
12+
<h1 class="title">
13+
<a target="_blank" href="https://web3auth.io/docs/sdk/pnp/web/modal">Web3Auth</a> & JS Ethereum
14+
Example
15+
</h1>
16+
<!-- Logged In -->
17+
<div class="grid btn-logged-in">
18+
<button id="get-user-info" class="btn">Get User Info</button>
19+
<button id="get-accounts" class="btn">Get Accounts</button>
20+
<button id="get-balance" class="btn">Get Balance</button>
21+
<button id="sign-message" class="btn">Sign Message</button>
22+
<button id="show-wallet" class="btn">Show Wallet</button>
23+
24+
<button id="logout" class="btn">Logout</button>
25+
<div class="console" id="console">
26+
<p id="code" class="code"></p>
27+
</div>
28+
</div>
29+
30+
<!-- Logged Logout -->
31+
<div class="grid btn-logged-out">
32+
<button id="login" class="btn">Login</button>
33+
</div>
34+
<footer class="footer">
35+
<a href="https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/web-modal-sdk/quick-starts/vanillajs-modal-quick-start"
36+
target="_blank" rel="noopener noreferrer">
37+
Source code
38+
</a>
39+
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FWeb3Auth%2Fweb3auth-pnp-examples%2Ftree%2Fmain%2Fweb-modal-sdk%2Fquick-starts%2Fvanillajs-modal-quick-start&project-name=w3a-vanillajs-modal&repository-name=w3a-vanillajs-modal">
40+
<img src="https://vercel.com/button" alt="Deploy with Vercel" />
41+
</a>
42+
</footer>
43+
</div>
44+
45+
46+
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
47+
<script src="https://unpkg.com/[email protected]/base64js.min.js"></script>
48+
49+
<!--IMP START - Quick Start-->
50+
<script src="https://cdn.jsdelivr.net/npm/@web3auth/modal@latest"></script>
51+
<!--IMP END - Quick Start-->
52+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
53+
54+
<script src="script.js?as"></script>
55+
</body>
56+
57+
</html>

0 commit comments

Comments
 (0)