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
37 changes: 34 additions & 3 deletions appkit/javascript/core/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ import BitcoinImplementation from '/snippets/appkit/javascript/bitcoin/about/imp

import TonImplementation from '/snippets/appkit/javascript/ton/about/implementation.mdx'

import TronImplementation from '/snippets/appkit/javascript/tron/about/implementation.mdx'

import CoreImplementation from '/snippets/appkit/javascript/core/about/implementation.mdx'

AppKit provides seamless integration with multiple blockchain ecosystems. . It supports [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum,
[@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, as well as Bitcoin, TON and other networks. AppKit Core with Universal Provider library, enable compatibility across any blockchain protocol.
Choose one of these to get started.
AppKit provides seamless integration with multiple blockchain ecosystems. It supports [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum,
[@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, as well as Bitcoin, TON, TRON and other networks.

AppKit Core with [Universal Provider](https://www.npmjs.com/package/@walletconnect/universal-provider) library, enable compatibility across any blockchain protocol.

<Note>
We recommend using [Vite](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) to get
Expand Down Expand Up @@ -172,6 +175,29 @@ pnpm add @reown/appkit @reown/appkit-adapter-ton

</CodeGroup>

</Tab>
<Tab title="TRON">

<CodeGroup>

```bash npm
npm install @reown/appkit @reown/appkit-adapter-tron
```

```bash Yarn
yarn add @reown/appkit @reown/appkit-adapter-tron
```

```bash Bun
bun add @reown/appkit @reown/appkit-adapter-tron
```

```bash pnpm
pnpm add @reown/appkit @reown/appkit-adapter-tron
```

</CodeGroup>

</Tab>
<Tab title="Others networks (AppKit Core)">

Expand Down Expand Up @@ -251,6 +277,11 @@ Check the JavaScript TON example

<TonImplementation />

</Tab>
<Tab title="TRON">

<TronImplementation />

</Tab>
<Tab title="Others networks (AppKit Core)">
<Card title="AppKit Core Example" icon="github" href="https://github.com/reown-com/appkit-web-examples/tree/main/javascript/javascript-core-universal-connector">
Expand Down
10 changes: 6 additions & 4 deletions appkit/next/core/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ import TonImplementation from '/snippets/appkit/next/ton/about/implementation.md

import CoreImplementation from '/snippets/appkit/react/core/about/implementation.mdx'

AppKit provides seamless integration with multiple blockchain ecosystems. . It supports [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum,
[@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, as well as Bitcoin, TON and other networks. AppKit Core with Universal Provider library, enable compatibility across any blockchain protocol.
AppKit provides seamless integration with multiple blockchain ecosystems. It supports [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum,
[@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, as well as Bitcoin, TON and other networks.

AppKit Core with [Universal Provider](https://www.npmjs.com/package/@walletconnect/universal-provider) library, enable compatibility across any blockchain protocol.

<Note>
These steps are specific to [Next.js](https://nextjs.org/) app router. For other React frameworks
Expand All @@ -29,9 +31,9 @@ AppKit provides seamless integration with multiple blockchain ecosystems. . It s

## Installation

**If you prefer referring to a video tutorial for this, please [click here](#video-tutorial).**
If you prefer referring to a video tutorial for this, please [click here](#video-tutorial).

**Setting up from scratch? Try out the [AppKit CLI templates](#alternative-installation) or the [AI-assisted setup](#alternative-installation).**
Setting up from scratch? Try out the [AppKit CLI templates](#alternative-installation) or the [AI-assisted setup](#alternative-installation).

## Custom Installation

Expand Down
74 changes: 68 additions & 6 deletions appkit/react/core/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ import BitcoinImplementation from '/snippets/appkit/react/bitcoin/about/implemen

import TonImplementation from '/snippets/appkit/react/ton/about/implementation.mdx'

import TronImplementation from '/snippets/appkit/react/tron/about/implementation.mdx'

import CoreImplementation from '/snippets/appkit/react/core/about/implementation.mdx'

AppKit provides seamless integration with multiple blockchain ecosystems. It supports [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum,
[@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, as well as Bitcoin, TON and other networks. AppKit Core with Universal Provider library, enable compatibility across any blockchain protocol.
[@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, as well as Bitcoin, TON, TRON and other networks.

AppKit Core with [Universal Provider](https://www.npmjs.com/package/@walletconnect/universal-provider) library, enable compatibility across any blockchain protocol.

Choose one of these to get started.

## Installation

**If you prefer referring to a video tutorial for this, please [click here](#video-tutorial).**
If you prefer referring to a video tutorial for this, please [click here](#video-tutorial).

**Setting up from scratch? Try out the [AppKit CLI templates](#alternative-installation) or the [AI-assisted setup](#alternative-installation).**
Setting up from scratch? Try out the [AppKit CLI templates](#alternative-installation) or the [AI-assisted setup](#alternative-installation).

## Custom Installation

Expand Down Expand Up @@ -177,6 +181,29 @@ pnpm add @reown/appkit @reown/appkit-adapter-ton

</CodeGroup>

</Tab>
<Tab title="TRON">

<CodeGroup>

```bash npm
npm install @reown/appkit @reown/appkit-adapter-tron
```

```bash Yarn
yarn add @reown/appkit @reown/appkit-adapter-tron
```

```bash Bun
bun add @reown/appkit @reown/appkit-adapter-tron
```

```bash pnpm
pnpm add @reown/appkit @reown/appkit-adapter-tron
```

</CodeGroup>

</Tab>
<Tab title="Others networks (AppKit Core)">

Expand Down Expand Up @@ -211,9 +238,13 @@ Create a new project on [Reown Dashboard](https://dashboard.reown.com) and obtai

## Implementation

### `AppKitProvider` Component
AppKit providers two different approaches on React to initialize it.

<Tabs>

AppKit now provides an `AppKitProvider` React component for easy integration in React applications. This component wraps your app and provides the AppKit context to all child components.
<Tab title="AppKitProvider">

Use `AppKitProvider` React component for easy integration in React applications. This component wraps your app and provides the AppKit context to all child components.

```tsx
import { AppKitProvider } from '@reown/appkit/react'
Expand All @@ -234,7 +265,33 @@ function App() {
}
```

### Framework Specific Implementation
</Tab>
<Tab title="createAppKit">

Use `createAppKit` method from `@reown/appkit/react` to initialize AppKit instance and call it on the root of your application with desired parameters depending on your use case.

```tsx
import { createAppKit } from '@reown/appkit/react'

createAppKit({
networks: [
/* Your networks */
],
adapters: [
/* Your adapters */
],
...appKitProps
})

function App() {
return <>{children}</>
}
```

</Tab>
</Tabs>

### Adapter Configuration

<Tabs>
<Tab title="Wagmi">
Expand Down Expand Up @@ -281,6 +338,11 @@ Check the React Bitcoin example

<TonImplementation />

</Tab>
<Tab title="TRON">

<TronImplementation />

</Tab>
<Tab title="Others networks (AppKit Core)">
<Card title="AppKit Core Example" icon="github" href="https://github.com/reown-com/appkit-web-examples/tree/main/react/react-core-universal-connector">
Expand Down
32 changes: 31 additions & 1 deletion appkit/vue/core/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import BitcoinImplementation from '/snippets/appkit/vue/bitcoin/about/implementa

import TonImplementation from '/snippets/appkit/vue/ton/about/implementation.mdx'

import TronImplementation from '/snippets/appkit/vue/tron/about/implementation.mdx'

## Introduction

AppKit has support for [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum, [@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, Bitcoin and TON.
AppKit has support for [Wagmi](https://wagmi.sh/) and [Ethers v6](https://docs.ethers.org/v6/) on Ethereum, [@solana/web3.js](https://solana-labs.github.io/solana-web3.js/) on Solana, Bitcoin, TON and TRON.
Choose one of these to get started.

## Installation
Expand Down Expand Up @@ -165,6 +167,29 @@ pnpm add @reown/appkit @reown/appkit-adapter-ton

</CodeGroup>

</Tab>
<Tab title="TRON">

<CodeGroup>

```bash npm
npm install @reown/appkit @reown/appkit-adapter-tron
```

```bash Yarn
yarn add @reown/appkit @reown/appkit-adapter-tron
```

```bash Bun
bun add @reown/appkit @reown/appkit-adapter-tron
```

```bash pnpm
pnpm add @reown/appkit @reown/appkit-adapter-tron
```

</CodeGroup>

</Tab>
</Tabs>

Expand Down Expand Up @@ -220,6 +245,11 @@ Check the Vue TON example

<TonImplementation />

</Tab>
<Tab title="TRON">

<TronImplementation />

</Tab>
</Tabs>

Expand Down
105 changes: 105 additions & 0 deletions snippets/appkit/javascript/tron/about/implementation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
AppKit TRON is built on top of the AppKit library and provides a set of components and actions to easily connect TRON wallets with your decentralized application.

On top of your app set up the following configuration.

```tsx
// App.tsx
import { createAppKit } from '@reown/appkit'
import { TronAdapter } from '@reown/appkit-adapter-tron'
import { tronMainnet, tronShastaTestnet } from '@reown/appkit/networks'

// Import wallet adapters you want to support
import { TronLinkAdapter } from '@tronweb3/tronwallet-adapter-tronlink'

// 1. Get projectId from https://dashboard.reown.com
const projectId = 'YOUR_PROJECT_ID'

// 2. Set the networks
const networks = [tronMainnet, tronShastaTestnet]

// 3. Set up TRON Adapter with wallet adapters
const tronAdapter = new TronAdapter({
walletAdapters: [
new TronLinkAdapter({
openUrlWhenWalletNotFound: false,
checkTimeout: 3000
})
]
})

// 4. Create a metadata object - optional
const metadata = {
name: 'AppKit',
description: 'AppKit TRON Example',
url: 'https://example.com', // origin must match your domain & subdomain
icons: ['https://avatars.githubusercontent.com/u/179229932']
}

// 5. Create modal
const modal = createAppKit({
adapters: [tronAdapter],
networks,
metadata,
projectId,
features: {
analytics: true, // Optional - defaults to your Dashboard configuration
email: false,
socials: []
}
})

// 6. Trigger modal programaticaly

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto Review Issue: Spelling error in JavaScript snippet

Severity: LOW
Category: code_quality
Tool: Claude Auto Review

Context:

  • Pattern: Comment reads "programaticaly" instead of "programmatically"
  • Risk: Spelling error in code comments
  • Impact: Minor quality issue
  • Trigger: Users reading code examples

Recommendation: Fix typo:

// 6. Trigger modal programmatically

const openConnectModalBtn = document.getElementById('open-connect-modal')
const openNetworkModalBtn = document.getElementById('open-network-modal')

openConnectModalBtn.addEventListener('click', () => modal.open())
openNetworkModalBtn.addEventListener('click', () => modal.open({ view: 'Networks' }))
```

## Install Wallet Adapters

TRON adapter requires you to install wallet adapters separately. This gives you control over which wallets to support and reduces bundle size.

```bash npm
npm install @tronweb3/tronwallet-adapter-tronlink
```

```bash Yarn
yarn add @tronweb3/tronwallet-adapter-tronlink
```

```bash Bun
bun add @tronweb3/tronwallet-adapter-tronlink
```

```bash pnpm
pnpm add @tronweb3/tronwallet-adapter-tronlink
```

### Additional Wallet Adapters

You can install additional TRON wallet adapters:

```bash
npm install @tronweb3/tronwallet-adapter-metamask-tron
npm install @tronweb3/tronwallet-adapter-trust
npm install @tronweb3/tronwallet-adapter-okxwallet
npm install @tronweb3/tronwallet-adapter-bitkeep
npm install @tronweb3/tronwallet-adapter-binance
```

Then add them to the `walletAdapters` array:

```tsx
import { TronLinkAdapter } from '@tronweb3/tronwallet-adapter-tronlink'
import { MetaMaskAdapter } from '@tronweb3/tronwallet-adapter-metamask-tron'
import { TrustAdapter } from '@tronweb3/tronwallet-adapter-trust'

const tronAdapter = new TronAdapter({
walletAdapters: [
new TronLinkAdapter({ openUrlWhenWalletNotFound: false, checkTimeout: 3000 }),
new MetaMaskAdapter(),
new TrustAdapter()
]
})
```
Loading