Skip to content

Commit 961d05e

Browse files
committed
Add MM SDK & DTK products in quick start
1 parent c319d22 commit 961d05e

File tree

137 files changed

+1542
-563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1542
-563
lines changed

src/pages/quick-start/builder/android/index.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/pages/quick-start/builder/android/stepContent/index.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,55 @@
1-
import { DisplayChoice } from "../interfaces";
1+
import { DisplayChoice } from '../interfaces'
2+
3+
//Product choices
4+
export const EMBEDDED_WALLETS = 'EMBEDDED_WALLETS'
5+
export const METAMASK_SDK = 'METAMASK_SDK'
6+
export const DELEGATION_TOOLKIT = 'DELEGATION_TOOLKIT'
7+
8+
// Product choices
9+
export const PRODUCTS: DisplayChoice[] = [
10+
{ key: EMBEDDED_WALLETS, displayName: 'Embedded Wallets' },
11+
{ key: METAMASK_SDK, displayName: 'Metamask SDK' },
12+
{ key: DELEGATION_TOOLKIT, displayName: 'Delegation Toolkit' },
13+
]
214

315
// Platform choices
4-
export const REACT = "REACT";
5-
export const NEXTJS = "NEXTJS";
6-
export const VUE = "VUE";
7-
export const ANGULAR = "ANGULAR";
8-
export const ANDROID = "ANDROID";
9-
export const IOS = "IOS";
10-
export const WEBGL = "WEBGL";
11-
export const REACT_NATIVE = "REACT_NATIVE";
12-
export const FLUTTER = "FLUTTER";
13-
14-
export const LANGS: DisplayChoice[] = [
15-
{ key: REACT, displayName: "React" },
16-
{ key: NEXTJS, displayName: "Next JS" },
17-
{ key: VUE, displayName: "Vue" },
18-
{ key: ANGULAR, displayName: "Angular" },
19-
{ key: ANDROID, displayName: "Android" },
20-
{ key: IOS, displayName: "iOS/Swift" },
21-
{ key: REACT_NATIVE, displayName: "React Native" },
22-
{ key: FLUTTER, displayName: "Flutter" },
23-
];
16+
export const REACT = 'REACT'
17+
export const NEXTJS = 'NEXTJS'
18+
export const VUE = 'VUE'
19+
export const ANGULAR = 'ANGULAR'
20+
export const ANDROID = 'ANDROID'
21+
export const IOS = 'IOS'
22+
export const WEBGL = 'WEBGL'
23+
export const REACT_NATIVE = 'REACT_NATIVE'
24+
export const FLUTTER = 'FLUTTER'
25+
26+
export const LANGS_EMBEDDED_WALLETS: DisplayChoice[] = [
27+
{ key: REACT, displayName: 'React' },
28+
{ key: NEXTJS, displayName: 'Next JS' },
29+
{ key: VUE, displayName: 'Vue' },
30+
{ key: ANGULAR, displayName: 'Angular' },
31+
{ key: ANDROID, displayName: 'Android' },
32+
{ key: IOS, displayName: 'iOS/Swift' },
33+
{ key: REACT_NATIVE, displayName: 'React Native' },
34+
{ key: FLUTTER, displayName: 'Flutter' },
35+
]
36+
37+
export const LANGS_METAMASK_SDK: DisplayChoice[] = [
38+
{ key: REACT, displayName: 'React' },
39+
{ key: NEXTJS, displayName: 'Next JS' },
40+
]
41+
42+
export const LANGS_DELEGATION_TOOLKIT: DisplayChoice[] = [
43+
{ key: REACT, displayName: 'React' },
44+
{ key: NEXTJS, displayName: 'Next JS' },
45+
]
2446

2547
// Misc choices
2648

27-
export const YES = "YES";
28-
export const NO = "NO";
49+
export const YES = 'YES'
50+
export const NO = 'NO'
2951

3052
export const TOGGLE: DisplayChoice[] = [
31-
{ key: NO, displayName: "No" },
32-
{ key: YES, displayName: "Yes" },
33-
];
53+
{ key: NO, displayName: 'No' },
54+
{ key: YES, displayName: 'Yes' },
55+
]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import IBfileLinks from '../../../../../utils/IBfileLinks.json'
2+
import { ReplaceFileAggregator } from '../../../utils'
3+
import getSteps from './steps'
4+
5+
const framework = {
6+
build({ filenames, files, steps }) {
7+
const replacementAggregator = new ReplaceFileAggregator()
8+
getSteps(steps, files, replacementAggregator)
9+
filenames.push(IBfileLinks.DTK_NEXTJS_LAYOUT_TSX)
10+
filenames.push(IBfileLinks.DTK_NEXTJS_PAGE_TSX)
11+
filenames.push(IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX)
12+
filenames.push(IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX)
13+
filenames.push(IBfileLinks.DTK_NEXTJS_PACKAGE_JSON)
14+
filenames.push(IBfileLinks.DTK_NEXTJS_GET_BALANCE_TSX)
15+
filenames.push(IBfileLinks.DTK_NEXTJS_SEND_TRANSACTION_TSX)
16+
filenames.push(IBfileLinks.DTK_NEXTJS_SWITCH_NETWORK_TSX)
17+
18+
return { filenames, files, steps }
19+
},
20+
}
21+
22+
export default framework
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Delegation Toolkit NextJS Quick Start
3+
---
4+
5+
Integrate secure and seamless Web3 authentication into your NextJS app using Web3Auth.
6+
7+
Clone the NextJS Quick Start Application
8+
9+
```shell
10+
npx degit Web3Auth/web3auth-examples/quick-starts/nextjs-quick-start w3a-quick-start
11+
```
12+
13+
:::info
14+
15+
If you face any problem anytime, you can always find help in the [**Web3Auth Community**](https://web3auth.io/community/c/help-pnp/pnp-web/7).
16+
17+
:::
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import IBfileLinks from '../../../../../utils/IBfileLinks.json'
2+
import STEPS from './stepContent'
3+
4+
export default function getSteps(steps, files, replacementAggregator) {
5+
steps.push(
6+
{
7+
...STEPS.nextjsQuickStart,
8+
pointer: replacementAggregator.highlightRange(
9+
IBfileLinks.DTK_NEXTJS_LAYOUT_TSX,
10+
files[IBfileLinks.DTK_NEXTJS_LAYOUT_TSX],
11+
'Quick Start'
12+
),
13+
},
14+
{
15+
...STEPS.installation,
16+
pointer: replacementAggregator.highlightRange(
17+
IBfileLinks.DTK_NEXTJS_PACKAGE_JSON,
18+
files[IBfileLinks.DTK_NEXTJS_PACKAGE_JSON],
19+
'Web3Auth Installation'
20+
),
21+
},
22+
{
23+
...STEPS.registerApp,
24+
pointer: replacementAggregator.highlightRange(
25+
IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX,
26+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX],
27+
'Dashboard Registration'
28+
),
29+
},
30+
{
31+
...STEPS.config,
32+
pointer: replacementAggregator.highlightRange(
33+
IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX,
34+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX],
35+
'Config'
36+
),
37+
},
38+
{
39+
...STEPS.setupWeb3AuthProvider,
40+
pointer: replacementAggregator.highlightRange(
41+
IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX,
42+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX],
43+
'Setup Web3Auth Provider'
44+
),
45+
},
46+
{
47+
...STEPS.setupWagmiProvider,
48+
pointer: replacementAggregator.highlightRange(
49+
IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX,
50+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_PROVIDER_TSX],
51+
'Setup Wagmi Provider'
52+
),
53+
},
54+
{
55+
...STEPS.login,
56+
pointer: replacementAggregator.highlightRange(
57+
IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX,
58+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX],
59+
'Login'
60+
),
61+
},
62+
{
63+
...STEPS.wagmiCalls,
64+
pointer: replacementAggregator.highlightRange(
65+
IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX,
66+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX],
67+
'Blockchain Calls'
68+
),
69+
},
70+
{
71+
...STEPS.logout,
72+
pointer: replacementAggregator.highlightRange(
73+
IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX,
74+
files[IBfileLinks.DTK_NEXTJS_COMPONENTS_APP_TSX],
75+
'Logout'
76+
),
77+
}
78+
)
79+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import IBfileLinks from '../../../../../utils/IBfileLinks.json'
2+
import { ReplaceFileAggregator } from '../../../utils'
3+
import getSteps from './steps'
4+
5+
const framework = {
6+
build({ filenames, files, steps }) {
7+
const replacementAggregator = new ReplaceFileAggregator()
8+
getSteps(steps, files, replacementAggregator)
9+
filenames.push(IBfileLinks.EW_REACT_WEB3AUTHCONTEXT_TSX)
10+
filenames.push(IBfileLinks.EW_REACT_MAIN_TSX)
11+
filenames.push(IBfileLinks.EW_REACT_APP_TSX)
12+
filenames.push(IBfileLinks.EW_REACT_PACKAGE_JSON)
13+
filenames.push(IBfileLinks.EW_REACT_INDEX_HTML)
14+
filenames.push(IBfileLinks.EW_REACT_GET_BALANCE_TSX)
15+
filenames.push(IBfileLinks.EW_REACT_SEND_TRANSACTION_TSX)
16+
filenames.push(IBfileLinks.EW_REACT_SWITCH_NETWORK_TSX)
17+
18+
return { filenames, files, steps }
19+
},
20+
}
21+
22+
export default framework

0 commit comments

Comments
 (0)