Skip to content

Commit

Permalink
Add BitKub Chain docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shahbaz17 committed Nov 14, 2024
1 parent 624a06e commit f50ffa4
Show file tree
Hide file tree
Showing 12 changed files with 611 additions and 1 deletion.
24 changes: 24 additions & 0 deletions docs/connect-blockchain/evm/bitkub/android.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Integrate Web3Auth with the BitKub Blockchain in Android
sidebar_label: Android
image: "banners/bitkub.png"
keywords: [android, bitkub, web3auth, authentication, blockchain]
description: "Integrate Web3Auth with the BitKub Blockchain in Android | Documentation - Web3Auth"
---

import EVMInteraction from "@site/src/common/docs/android-connect-blockchain/_evm-interaction.mdx";
import SEO from "@site/src/components/SEO";

<SEO
title="Integrate Web3Auth with the BitKub Blockchain in Android"
description="Integrate Web3Auth with the BitKub Blockchain in Android | Documentation - Web3Auth"
image="https://web3auth.io/docs/banners/bitkub.png"
slug="/connect-blockchain/evm/bitkub/android"
/>

While using the Web3Auth Android SDK, you get the private key within the user scope after successful
authorization. This private key can be used to retrieve the user's address, and interact with
[BitKub](https://developers.bitkubchain.com/) to make any blockchain calls. We have highlighted a
few here for getting you started quickly on that.

<EVMInteraction />
67 changes: 67 additions & 0 deletions docs/connect-blockchain/evm/bitkub/bitkub.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Integrate Web3Auth with the BitKub Blockchain
hide_table_of_contents: true
image: "banners/bitkub.png"
description: "Integrate Web3Auth with the BitKub Blockchain | Documentation - Web3Auth"
---

import Tiles from "@theme/Tiles";
import SEO from "@site/src/components/SEO";

<SEO
title="Integrate Web3Auth with the BitKub Blockchain"
description="Integrate Web3Auth with the BitKub Blockchain | Documentation - Web3Auth"
image="https://web3auth.io/docs/banners/bitkub.png"
slug="/connect-blockchain/evm/bitkub"
/>

The BitKub blockchain's integration with Web3Auth, helps you get started with the integration in a
matter of minutes. The integration is available for the following platforms: Web, Android, iOS,
Flutter, React Native, and Unity.

export const BitKub = [
{
name: "",
description: "",
tiles: [
{
key: "web",
title: "Web",
icon: "logo-js.png",
path: "/connect-blockchain/evm/bitkub/web",
},
{
key: "android",
title: "Android (Kotlin)",
icon: "logo-android.png",
path: "/connect-blockchain/evm/bitkub/android",
},
{
key: "apple",
title: "iOS (Swift)",
icon: "logo-apple.png",
path: "/connect-blockchain/evm/bitkub/ios",
},
{
key: "flutter",
title: "Flutter",
icon: "logo-flutter.png",
path: "/connect-blockchain/evm/bitkub/flutter",
},
{
key: "react-native",
title: "React Native",
icon: "logo-react.png",
path: "/connect-blockchain/evm/bitkub/react-native",
},
{
key: "unity",
title: "Unity",
icon: "logo-unity.png",
path: "/connect-blockchain/evm/bitkub/unity",
},
],
},
];

<Tiles tileGroups={BitKub} />
26 changes: 26 additions & 0 deletions docs/connect-blockchain/evm/bitkub/flutter.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Integrate Web3Auth with the BitKub Blockchain in Flutter
sidebar_label: Flutter
image: "banners/bitkub.png"
keywords: [flutter, bitkub, web3auth, authentication, blockchain]
description: "Integrate Web3Auth with the BitKub Blockchain in Flutter | Documentation - Web3Auth"
---

import EVMInteraction from "@site/src/common/docs/flutter-connect-blockchain/_evm-interaction.mdx";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import SEO from "@site/src/components/SEO";

<SEO
title="Integrate Web3Auth with the BitKub Blockchain in Flutter"
description="Integrate Web3Auth with the BitKub Blockchain in Flutter | Documentation - Web3Auth"
image="https://web3auth.io/docs/banners/bitkub.png"
slug="/connect-blockchain/evm/bitkub/flutter"
/>

While using the Web3Auth Flutter SDK, you get the private key within the user scope after successful
authorization. This private key can be used to retrieve the user's address, and interact with
[BitKub](https://developers.bitkubchain.com/) to make any blockchain calls. We have highlighted a
few here for getting you started quickly on that.

<EVMInteraction />
97 changes: 97 additions & 0 deletions docs/connect-blockchain/evm/bitkub/ios.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Integrate Web3Auth with the BitKub Blockchain in iOS/Swift Applications
sidebar_label: iOS
image: "banners/bitkub.png"
keywords: [ios, swift, bitkub, web3auth, authentication, blockchain]
description:
"Integrate Web3Auth with the BitKub Blockchain in iOS/Swift Applications | Documentation -
Web3Auth"
---

import InstallationSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-installation.mdx";
import GetAccountSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-get-account.mdx";
import UserInfoSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-user-info.mdx";
import GetBalanceSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-get-balance.mdx";
import InitialisationSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-initialisation.mdx";
import SignMessageSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-sign-message.mdx";
import SendTransactionSnippet from "@site/src/common/docs/ios-connect-blockchain/_evm-send-transaction.mdx";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import SEO from "@site/src/components/SEO";

<SEO
title="Integrate Web3Auth with the BitKub Blockchain in iOS/Swift Applications"
description="Integrate Web3Auth with the BitKub Blockchain in iOS/Swift Applications | Documentation - Web3Auth"
image="https://web3auth.io/docs/banners/bitkub.png"
slug="/connect-blockchain/evm/bitkub/ios"
/>

While using the Web3Auth iOS SDK, you get the private key within the user scope. This private key
can interact with [BitKub](https://developers.bitkubchain.com/) to make any blockchain calls, like
getting the user's `account`, fetching `balance`, `sign transaction`, `send transaction`, `read`
from and `write` to the smart contract, etc. We have highlighted a few here to get you started
quickly on that.

## Installation

<InstallationSnippet />

## Chain Details for BitKub

<Tabs
defaultValue="mainnet"
values={[
{ label: "Mainnet", value: "mainnet", },
{ label: "Testnet", value: "testnet", },
]}
>
<TabItem
value="mainnet"
>

- Chain ID: `0x60`
- Public RPC URL: `https://rpc.bitkubchain.io`
- Display Name: BitKub Mainnet
- Block Explorer Link: `https://www.bkcscan.com`
- Ticker: KUB
- Ticker Name: KUB

</TabItem>

<TabItem
value="testnet"
>

- Chain ID: `0x6545`
- Public RPC URL: `https://rpc-testnet.bitkubchain.io/`
- Display Name: BitKub Testnet
- Block Explorer Link: `https://testnet.bkcscan.com`
- Ticker: tKUB
- Ticker Name: tKUB

</TabItem>
</Tabs>

## Initialize

<InitialisationSnippet />

## Get User Info

<UserInfoSnippet />

## Get Account

<GetAccountSnippet />

## Get Balance

<GetBalanceSnippet />

## Send Transaction

<SendTransactionSnippet />

## Sign a message

<SignMessageSnippet />
119 changes: 119 additions & 0 deletions docs/connect-blockchain/evm/bitkub/react-native.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
title: Integrate Web3Auth with the BitKub Blockchain in React Native
sidebar_label: React Native
image: "banners/bitkub.png"
keywords: [react-native, bitkub, web3auth, authentication, blockchain]
description:
"Integrate Web3Auth with the BitKub Blockchain in React Native | Documentation - Web3Auth"
---

import InstallationSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-installation.mdx";
import GetAccountSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-get-account.mdx";
import UserInfoSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-user-info.mdx";
import GetBalanceSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-get-balance.mdx";
import InitialisationSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-initialisation.mdx";
import SignMessageSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-sign-message.mdx";
import SendTransactionSnippet from "@site/src/common/docs/react-native-connect-blockchain/_evm-send-transaction.mdx";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import SEO from "@site/src/components/SEO";

<SEO
title="Integrate Web3Auth with the BitKub Blockchain in React Native"
description="Integrate Web3Auth with the BitKub Blockchain in React Native | Documentation - Web3Auth"
image="https://web3auth.io/docs/banners/bitkub.png"
slug="/connect-blockchain/evm/bitkub/react-native"
/>

While using the Web3Auth React Native SDK, you get a
[`EIP1193`](https://eips.ethereum.org/EIPS/eip-1193) provider, similar to the
[Metamask Provider](https://docs.metamask.io/guide/ethereum-provider.html). This provider can be
used with libraries like [`web3.js`](https://web3js.readthedocs.io/en/v1.2.8/getting-started.html),
[`ethers.js`](https://docs.ethers.io/v5/getting-started/) etc. to make
[BitKub](https://developers.bitkubchain.com/) blockchain calls like getting the user's `account`,
fetching `balance`, `sign transaction`, `send transaction`, `read` from and `write` to the smart
contract, etc. We have highlighted a few here to get you started quickly on that.

## Installation

<InstallationSnippet />

## Initializing Provider

Using `eip155` as `chainNamespace` while initializing `web3auth` will provide an
[`EIP1193`](https://eips.ethereum.org/EIPS/eip-1193) compatible provider as **`web3auth.provider`**
after successful authentication.

### Getting the `chainConfig`

<Tabs
defaultValue="mainnet"
values={[
{ label: "Mainnet", value: "mainnet", },
{ label: "Testnet", value: "testnet", },
]}
>
<TabItem
value="mainnet"
>

```typescript
const chainConfig = {
chainNamespace: ChainNamespace.EIP155,
chainId: "0x60", // hex of 96
rpcTarget: "https://rpc.bitkubchain.io",
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode etc
displayName: "BitKub",
blockExplorer: "https://www.bkcscan.com",
ticker: "KUB",
tickerName: "KUB",
};
```

</TabItem>

<TabItem
value="testnet"
>

```typescript
const chainConfig = {
chainNamespace: ChainNamespace.EIP155,
chainId: "0x6545", // hex of 25925
rpcTarget: "https://rpc-testnet.bitkubchain.io",
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode etc
displayName: "BitKub Testnet",
blockExplorer: "https://testnet.bkcscan.com",
ticker: "tKUB",
tickerName: "tKUB",
};
```

</TabItem>
</Tabs>

## Initialize

<InitialisationSnippet />

## Get User Info

<UserInfoSnippet />

## Get Account

<GetAccountSnippet />

## Get Balance

<GetBalanceSnippet />

## Send Transaction

<SendTransactionSnippet />

## Sign a message

<SignMessageSnippet />
Loading

0 comments on commit f50ffa4

Please sign in to comment.