New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tonkeeper/tonconnect-ui

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tonkeeper/tonconnect-ui - npm Package Compare versions

Comparing version 2.0.11-beta.6 to 2.0.11

2

package.json
{
"name": "@tonkeeper/tonconnect-ui",
"version": "2.0.11-beta.6",
"version": "2.0.11",
"scripts": {

@@ -5,0 +5,0 @@ "start": "vite --host",

@@ -1,42 +0,66 @@

# TON Connect UI
# TON Connect UI by Tonkeeper
TonConnect UI is a UI kit for TonConnect SDK. Use it to connect your app to TON wallets via TonConnect protocol.
> This is a Tonkeeper-maintained fork of the official [TonConnect UI](https://github.com/ton-connect/sdk/tree/main/packages/ui) with additional features and improvements. While maintaining compatibility with the core TonConnect protocol, this fork includes Tonkeeper-specific enhancements for better integration with Tonkeeper wallet and extended functionality.
If you use React for your dapp, take a look at [TonConnect UI React kit](https://github.com/ton-connect/sdk/tree/main/packages/ui-react).
## Installation
If you want to use TonConnect on the server side, you should use the [TonConnect SDK](https://github.com/ton-connect/sdk/tree/main/packages/sdk).
```bash
npm i @tonkeeper/ton-connect-ui
```
## Key Differences from Official TonConnect UI
You can find more details and the protocol specification in the [docs](https://docs.ton.org/develop/dapps/ton-connect/overview).
- Ability to set primary wallet
- Tonkeeper is installed by default
---
### Set Primary Wallet or Disable Default Wallet
[Latest API documentation](https://ton-connect.github.io/sdk/modules/_tonconnect_ui.html)
This package allows you to specify a primary wallet for your dApp or disable the default wallet. Use the `primaryWalletAppName` prop in the `TonConnectUIProvider` component.
# Getting started
To **set a primary wallet**, pass its `appName` to the `primaryWalletAppName` prop:
## Installation with cdn
Add the script to your HTML file:
```html
<script src="https://unpkg.com/@tonconnect/ui@latest/dist/tonconnect-ui.min.js"></script>
```tsx
<TonConnectUIProvider
manifestUrl="https://<YOUR_APP_URL>/tonconnect-manifest.json"
primaryWalletAppName="tonkeeper"
>
{/* Your app components */}
</TonConnectUIProvider>
```
ℹ️ If you don't want auto-update the library, pass concrete version instead of `latest`, e.g.
```html
<script src="https://unpkg.com/@tonconnect/ui@0.0.9/dist/tonconnect-ui.min.js"></script>
```
To **disable the default wallet** (tonkeeper as default), set the `primaryWalletAppName` to `null`:
You can find `TonConnectUI` in global variable `TON_CONNECT_UI`, e.g.
```html
<script>
const tonConnectUI = new TON_CONNECT_UI.TonConnectUI({
manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
buttonRootId: '<YOUR_CONNECT_BUTTON_ANCHOR_ID>'
});
</script>
```tsx
<TonConnectUIProvider
manifestUrl="https://<YOUR_APP_URL>/tonconnect-manifest.json"
primaryWalletAppName={null}
>
{/* Your app components */}
</TonConnectUIProvider>
```
The `appName` must match one of the wallet `appName` values defined in your `walletsListConfiguration`. For example, the `appName` for **Tonkeeper** is `"tonkeeper"`.
## Installation with npm
`npm i @tonconnect/ui`
## Official TonConnect Resources
- [Original TonConnect UI](https://github.com/ton-connect/sdk/tree/main/packages/ui)
- [Protocol Documentation](https://docs.ton.org/develop/dapps/ton-connect/overview)
If you use React for your dapp, take a look at [TonConnect UI React kit](https://github.com/tonkeeper/tonconnect-sdk/tree/main/packages/ui-react).
If you want to use TonConnect on the server side, you should use the [TonConnect SDK](https://github.com/tonkeeper/tonconnect-sdk/sdk/tree/main/packages/sdk).
You can find more details and the protocol specification in the [docs](https://docs.ton.org/develop/dapps/ton-connect/overview).
---
[Latest API documentation](https://tonkeeper.github.io/tonconnect-sdk/modules/_tonconnect_ui.html)
[Demo dApp](https://github.com/tonkeeper/demo-dapp-with-wallet)
# Getting started
## Installation
```bash
npm i @tonkeeper/ton-connect-ui
```
# Usage

@@ -46,3 +70,3 @@

```ts
import TonConnectUI from '@tonconnect/ui'
import { TonConnectUI } from '@tonconnect/ui'

@@ -57,5 +81,5 @@ const tonConnectUI = new TonConnectUI({

[TonConnectUiOptionsWithManifest](https://ton-connect.github.io/sdk/interfaces/_tonconnect_ui.TonConnectUiOptionsWithManifest.html)
[TonConnectUiOptionsWithManifest](https://tonkeeper.github.io/tonconnect-sdk/interfaces/_tonconnect_ui.TonConnectUiOptionsWithManifest.html)
[TonConnectUiOptionsWithConnector](https://ton-connect.github.io/sdk/interfaces/_tonconnect_ui.TonConnectUiOptionsWithConnector.html)
[TonConnectUiOptionsWithConnector](https://tonkeeper.github.io/tonconnect-sdk/interfaces/_tonconnect_ui.TonConnectUiOptionsWithConnector.html)

@@ -80,3 +104,3 @@ ## Change options if needed

[See all available options](https://ton-connect.github.io/sdk/interfaces/_tonconnect_ui.TonConnectUiOptions.html)
[See all available options](https://tonkeeper.github.io/tonconnect-sdk/interfaces/_tonconnect_ui.TonConnectUiOptions.html)

@@ -459,3 +483,3 @@ ## Fetch wallets list

[See all available options](https://ton-connect.github.io/sdk/interfaces/_tonconnect_ui.UIPreferences.html)
[See all available options](https://tonkeeper.github.io/tonconnect-sdk/interfaces/_tonconnect_ui.UIPreferences.html)

@@ -592,3 +616,3 @@ #### Change border radius

[See all available options](https://ton-connect.github.io/sdk/interfaces/_tonconnect_ui.PartialColorsSet.html)
[See all available options](https://tonkeeper.github.io/tonconnect-sdk/interfaces/_tonconnect_ui.PartialColorsSet.html)

@@ -595,0 +619,0 @@ #### Combine options

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc