Skip to content

Commit 16954bd

Browse files
authored
Merge pull request #1067 from Web3Auth/add-unichain
Add Unichain support with documentation
2 parents 1bbab89 + 12fdfd2 commit 16954bd

File tree

11 files changed

+519
-0
lines changed

11 files changed

+519
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Integrate Web3Auth with the Unichain Blockchain in Android
3+
sidebar_label: Android
4+
image: "banners/unichain.png"
5+
keywords: [android, unichain, web3auth, authentication, blockchain]
6+
description: "Integrate Web3Auth with the Unichain Blockchain in Android | Documentation - Web3Auth"
7+
---
8+
9+
import EVMInteraction from "@site/src/common/docs/android-connect-blockchain/_evm-interaction.mdx";
10+
import SEO from "@site/src/components/SEO";
11+
12+
<SEO
13+
title="Integrate Web3Auth with the Unichain Blockchain in Android"
14+
description="Integrate Web3Auth with the Unichain Blockchain in Android | Documentation - Web3Auth"
15+
image="https://web3auth.io/docs/banners/unichain.png"
16+
slug="/connect-blockchain/evm/unichain/android"
17+
/>
18+
19+
While using the Web3Auth Android SDK, you get the private key within the user scope after successful
20+
authorization. This private key can be used to retrieve the user's address, and interact with
21+
[Unichain](https://www.unichain.org/) to make any blockchain calls. We have highlighted a few here
22+
for getting you started quickly on that.
23+
24+
<EVMInteraction />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Integrate Web3Auth with the Unichain Blockchain in Flutter
3+
sidebar_label: Flutter
4+
image: "banners/unichain.png"
5+
keywords: [flutter, unichain, web3auth, authentication, blockchain]
6+
description: "Integrate Web3Auth with the Unichain Blockchain in Flutter | Documentation - Web3Auth"
7+
---
8+
9+
import EVMInteraction from "@site/src/common/docs/flutter-connect-blockchain/_evm-interaction.mdx";
10+
import Tabs from "@theme/Tabs";
11+
import TabItem from "@theme/TabItem";
12+
import SEO from "@site/src/components/SEO";
13+
14+
<SEO
15+
title="Integrate Web3Auth with the Unichain Blockchain in Flutter"
16+
description="Integrate Web3Auth with the Unichain Blockchain in Flutter | Documentation - Web3Auth"
17+
image="https://web3auth.io/docs/banners/unichain.png"
18+
slug="/connect-blockchain/evm/unichain/flutter"
19+
/>
20+
21+
While using the Web3Auth Flutter SDK, you get the private key within the user scope after successful
22+
authorization. This private key can be used to retrieve the user's address, and interact with
23+
[Unichain](https://www.unichain.org/) to make any blockchain calls. We have highlighted a few here
24+
for getting you started quickly on that.
25+
26+
<EVMInteraction />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Integrate Web3Auth with the Unichain Blockchain in iOS/Swift Applications
3+
sidebar_label: iOS
4+
image: "/docs/banners/unichain.png"
5+
keywords: [ios, swift, unichain, web3auth, authentication, blockchain]
6+
description:
7+
"Integrate Web3Auth with the Unichain Blockchain in iOS/Swift Applications | Documentation -
8+
Web3Auth"
9+
---
10+
11+
import EVMInteraction from "@site/src/common/docs/ios-connect-blockchain/_evm-interaction.mdx";
12+
import SEO from "@site/src/components/SEO";
13+
14+
<SEO
15+
title="Integrate Web3Auth with the Unichain Blockchain in iOS/Swift Applications"
16+
description="Integrate Web3Auth with the Unichain Blockchain in iOS/Swift Applications | Documentation - Web3Auth"
17+
image="https://web3auth.io/docs/banners/unichain.png"
18+
slug="/connect-blockchain/evm/unichain/ios"
19+
/>
20+
21+
While using the Web3Auth iOS SDK, you get the private key within the user scope after successful
22+
authorization. This private key can be used to retrieve the user's address, and interact with
23+
[Unichain](https://www.unichain.org/) to make any blockchain calls. We have highlighted a few here
24+
for getting you started quickly on that.
25+
26+
<EVMInteraction />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
title: Integrate Web3Auth with the Unichain Blockchain in React Native
3+
sidebar_label: React Native
4+
image: "banners/unichain.png"
5+
keywords: [react-native, unichain, web3auth, authentication, blockchain]
6+
description:
7+
"Integrate Web3Auth with the Unichain Blockchain in React Native | Documentation - Web3Auth"
8+
---
9+
10+
import InstallationSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-installation.mdx";
11+
import GetAccountSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-get-account.mdx";
12+
import UserInfoSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-user-info.mdx";
13+
import GetBalanceSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-get-balance.mdx";
14+
import InitialisationSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-initialisation.mdx";
15+
import SignMessageSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-sign-message.mdx";
16+
import SendTransactionSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-send-transaction.mdx";
17+
import Tabs from "@theme/Tabs";
18+
import TabItem from "@theme/TabItem";
19+
import SEO from "@site/src/components/SEO";
20+
21+
<SEO
22+
title="Integrate Web3Auth with the Unichain Blockchain in React Native"
23+
description="Integrate Web3Auth with the Unichain Blockchain in React Native | Documentation - Web3Auth"
24+
image="https://web3auth.io/docs/banners/unichain.png"
25+
slug="/connect-blockchain/evm/unichain/react-native"
26+
/>
27+
28+
While using the Web3Auth React Native SDK, you get a
29+
[`EIP1193`](https://eips.ethereum.org/EIPS/eip-1193) provider, similar to the
30+
[Metamask Provider](https://docs.metamask.io/guide/ethereum-provider.html). This provider can be
31+
used with libraries like [`web3.js`](https://web3js.readthedocs.io/en/v1.2.8/getting-started.html),
32+
[`ethers.js`](https://docs.ethers.io/v5/getting-started/) etc. to make
33+
[Unichain](https://www.unichain.org/) blockchain calls like getting the user's `account`, fetching
34+
`balance`, `sign transaction`, `send transaction`, `read` from and `write` to the smart contract,
35+
etc. We have highlighted a few here to get you started quickly on that.
36+
37+
## Installation
38+
39+
<InstallationSnippet />
40+
41+
## Initializing Provider
42+
43+
Using `eip155` as `chainNamespace` while initializing `web3auth` will provide an
44+
[`EIP1193`](https://eips.ethereum.org/EIPS/eip-1193) compatible provider as **`web3auth.provider`**
45+
after successful authentication.
46+
47+
### Getting the `chainConfig`
48+
49+
<Tabs
50+
defaultValue="mainnet"
51+
values={[
52+
{ label: "Mainnet", value: "mainnet", },
53+
{ label: "Testnet", value: "testnet", },
54+
]}
55+
>
56+
<TabItem
57+
value="mainnet"
58+
>
59+
60+
```typescript
61+
const chainConfig = {
62+
chainNamespace: ChainNamespace.EIP155,
63+
chainId: "0x82", // hex of 130
64+
rpcTarget: "https://mainnet.unichain.org",
65+
// Avoid using public rpcTarget in production.
66+
// Use services like Infura, Quicknode etc
67+
displayName: "Unichain Mainnet",
68+
blockExplorer: "https://uniscan.xyz",
69+
ticker: "ETH",
70+
tickerName: "ETH",
71+
};
72+
```
73+
74+
</TabItem>
75+
76+
<TabItem
77+
value="testnet"
78+
>
79+
80+
```typescript
81+
const chainConfig = {
82+
chainNamespace: ChainNamespace.EIP155,
83+
chainId: "0x515", // hex of 1301
84+
rpcTarget: "https://sepolia.unichain.org",
85+
// Avoid using public rpcTarget in production.
86+
// Use services like Infura, Quicknode etc
87+
displayName: "Unichain Sepolia Testnet",
88+
blockExplorer: "https://sepolia.uniscan.xyz/",
89+
ticker: "ETH",
90+
tickerName: "ETH",
91+
};
92+
```
93+
94+
</TabItem>
95+
</Tabs>
96+
97+
## Initialize
98+
99+
<InitialisationSnippet />
100+
101+
## Get User Info
102+
103+
<UserInfoSnippet />
104+
105+
## Get Account
106+
107+
<GetAccountSnippet />
108+
109+
## Get Balance
110+
111+
<GetBalanceSnippet />
112+
113+
## Send Transaction
114+
115+
<SendTransactionSnippet />
116+
117+
## Sign a message
118+
119+
<SignMessageSnippet />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Integrate Web3Auth with the Unichain Blockchain
3+
hide_table_of_contents: true
4+
image: "banners/unichain.png"
5+
description: "Integrate Web3Auth with the Unichain Blockchain | Documentation - Web3Auth"
6+
---
7+
8+
import Tiles from "@theme/Tiles";
9+
import SEO from "@site/src/components/SEO";
10+
11+
<SEO
12+
title="Integrate Web3Auth with the Unichain Blockchain"
13+
description="Integrate Web3Auth with the Unichain Blockchain | Documentation - Web3Auth"
14+
image="https://web3auth.io/docs/banners/unichain.png"
15+
slug="/connect-blockchain/evm/unichain"
16+
/>
17+
18+
Integrate Web3Auth seamlessly with EVM-based Unichain blockchain. For Web SDKs, Web3Auth returns a
19+
provider that can be directly used to initialize the libraries like ethers.js, web3.js etc. and make
20+
blockchain calls, while for Mobile & Gaming SDKs, the private key is available in the user scope
21+
which can be used in a similar way to initialize the respective blockchain interaction libraries and
22+
make calls to the network.
23+
24+
This documentation provides a straightforward guide for developers looking to implement blockchain
25+
connections quickly and effortlessly across various platforms.
26+
27+
export const Unichain = [
28+
{
29+
name: "",
30+
description: "",
31+
tiles: [
32+
{
33+
key: "web",
34+
title: "Web",
35+
icon: "logo-js.png",
36+
path: "/connect-blockchain/evm/unichain/web",
37+
},
38+
{
39+
key: "android",
40+
title: "Android (Kotlin)",
41+
icon: "logo-android.png",
42+
path: "/connect-blockchain/evm/unichain/android",
43+
},
44+
{
45+
key: "apple",
46+
title: "iOS (Swift)",
47+
icon: "logo-apple.png",
48+
path: "/connect-blockchain/evm/unichain/ios",
49+
},
50+
{
51+
key: "flutter",
52+
title: "Flutter",
53+
icon: "logo-flutter.png",
54+
path: "/connect-blockchain/evm/unichain/flutter",
55+
},
56+
{
57+
key: "react-native",
58+
title: "React Native",
59+
icon: "logo-react.png",
60+
path: "/connect-blockchain/evm/unichain/react-native",
61+
},
62+
{
63+
key: "unity",
64+
title: "Unity",
65+
icon: "logo-unity.png",
66+
path: "/connect-blockchain/evm/unichain/unity",
67+
},
68+
],
69+
},
70+
];
71+
72+
<Tiles tileGroups={Unichain} />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Integrate Web3Auth with the Unichain Blockchain in Unity
3+
sidebar_label: Unity
4+
image: "banners/unity.png"
5+
keywords: [unity, unichain, web3auth, authentication, blockchain]
6+
description: "Integrate Web3Auth with the Unichain Blockchain in Unity | Documentation - Web3Auth"
7+
---
8+
9+
import InstallationSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-installation.mdx";
10+
import GetAccountSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-get-account.mdx";
11+
import UserInfoSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-user-info.mdx";
12+
import GetBalanceSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-get-balance.mdx";
13+
import InitialisationSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-initialisation.mdx";
14+
import SignMessageSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-sign-message.mdx";
15+
import SendTransactionSnippet from "@site/src/common/docs/unity-connect-blockchain/_evm-send-transaction.mdx";
16+
import Tabs from "@theme/Tabs";
17+
import TabItem from "@theme/TabItem";
18+
import SEO from "@site/src/components/SEO";
19+
20+
<SEO
21+
title="Integrate Web3Auth with the Unichain Blockchain in Unity"
22+
description="Integrate Web3Auth with the Unichain Blockchain in Unity | Documentation - Web3Auth"
23+
image="https://web3auth.io/docs/banners/unichain.png"
24+
slug="/connect-blockchain/evm/unichain/unity"
25+
/>
26+
27+
While using the Web3Auth Unity SDK, you get the private key within the user scope. This private key
28+
can interact with the [Nethereum Library](https://nethereum.com/) to make EVM-based blockchain
29+
calls, like getting the user's `account`, fetch `balance`, `sign transaction`, `send transaction`,
30+
`read` from and `write` to the smart contract, etc. We have highlighted a few here to get you
31+
started quickly on that.
32+
33+
## Installation
34+
35+
<InstallationSnippet />
36+
37+
## Chain Details for Unichain
38+
39+
<Tabs
40+
defaultValue="mainnet"
41+
values={[
42+
{ label: "Mainnet", value: "mainnet", },
43+
{ label: "Testnet", value: "testnet", },
44+
]}
45+
>
46+
<TabItem
47+
value="mainnet"
48+
>
49+
50+
- Chain ID: `0x82`
51+
- Public RPC URL: `https://mainnet.unichain.org` (Avoid using public rpcTarget in production, use
52+
services like Infura, Quicknode etc)
53+
- Display Name: Unichain Mainnet
54+
- Block Explorer Link: `https://uniscan.xyz`
55+
- Ticker: ETH
56+
- Ticker Name: ETH
57+
58+
</TabItem>
59+
60+
<TabItem
61+
value="testnet"
62+
>
63+
64+
- Chain ID: `0x515`
65+
- Public RPC URL: `https://sepolia.unichain.org` (Avoid using public rpcTarget in production, use
66+
services like Infura, Quicknode etc)
67+
- Display Name: Unichain Sepolia Testnet
68+
- Block Explorer Link: `https://sepolia.uniscan.xyz/`
69+
- Ticker: ETH
70+
- Ticker Name: ETH
71+
72+
</TabItem>
73+
</Tabs>
74+
75+
## Initialize
76+
77+
<InitialisationSnippet />
78+
79+
## Get User Info
80+
81+
<UserInfoSnippet />
82+
83+
## Get Account
84+
85+
<GetAccountSnippet />
86+
87+
## Get Balance
88+
89+
<GetBalanceSnippet />
90+
91+
## Sign a message
92+
93+
<SignMessageSnippet />
94+
95+
## Send Transaction
96+
97+
<SendTransactionSnippet />

0 commit comments

Comments
 (0)