Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 2 additions & 42 deletions docs/sdk/mpc-core-kit/mpc-core-kit-js/initialize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: "Web3Auth MPC Core Kit JS SDK - Initialize for Web | Documentation

import ChainConfig from "@site/src/common/sdk/pnp/web/_chain-config.mdx";
import Web3AuthOptions from "@site/src/common/sdk/pnp/web/_web3authcore-options.mdx";
import CreateAnInstance from "@site/src/common/sdk/mpc-core-kit/_create-an-instance.mdx";
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

Expand Down Expand Up @@ -194,48 +195,7 @@ export declare const UX_MODE: {

### Usage

<Tabs
defaultValue="secp256k1"
values={[
{ label: "Secp256k1", value: "secp256k1" },
{ label: "Ed25519", value: "ed25519" },
]}
>

<TabItem value="secp256k1">

```javascript
import { Web3AuthMPCCoreKit, WEB3AUTH_NETWORK } from "@web3auth/mpc-core-kit";
import { tssLib } from "@toruslabs/tss-dkls-lib";

const coreKitInstance = new Web3AuthMPCCoreKit({
web3AuthClientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.MAINNET,
manualSync: true, // This is the recommended approach
tssLib: tssLib,
storage: window.storage,
});
```

</TabItem>

<TabItem value="ed25519">

```javascript
import { Web3AuthMPCCoreKit, WEB3AUTH_NETWORK } from "@web3auth/mpc-core-kit";
import { tssLib } from "@toruslabs/tss-frost-lib";

const coreKitInstance = new Web3AuthMPCCoreKit({
web3AuthClientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.MAINNET,
manualSync: true, // This is the recommended approach
tssLib: tssLib,
storage: window.storage,
});
```

</TabItem>
</Tabs>
<CreateAnInstance />

## Initialize Web3AuthMPCCoreKit

Expand Down
45 changes: 45 additions & 0 deletions src/common/sdk/mpc-core-kit/_create-an-instance.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

<Tabs
defaultValue="secp256k1"
values={[
{ label: "Secp256k1", value: "secp256k1" },
{ label: "Ed25519", value: "ed25519" },
]}
>

<TabItem value="secp256k1">

```javascript
import { Web3AuthMPCCoreKit, WEB3AUTH_NETWORK } from "@web3auth/mpc-core-kit";
import { tssLib } from "@toruslabs/tss-dkls-lib";

const coreKitInstance = new Web3AuthMPCCoreKit({
web3AuthClientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.MAINNET,
manualSync: true, // This is the recommended approach
tssLib: tssLib,
storage: window.storage,
});
```

</TabItem>

<TabItem value="ed25519">

```javascript
import { Web3AuthMPCCoreKit, WEB3AUTH_NETWORK } from "@web3auth/mpc-core-kit";
import { tssLib } from "@toruslabs/tss-frost-lib";

const coreKitInstance = new Web3AuthMPCCoreKit({
web3AuthClientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.MAINNET,
manualSync: true, // This is the recommended approach
tssLib: tssLib,
storage: window.storage,
});
```

</TabItem>
</Tabs>
Loading