@ton/appkit 0.0.3 → 0.0.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
1
 
2
- > @ton/appkit@0.0.3 build /home/runner/work/kit/kit/packages/appkit
2
+ > @ton/appkit@0.0.4-alpha.0 build /home/runner/work/kit/kit/packages/appkit
3
3
  > pnpm build:clean && pnpm build:cjs && pnpm build:esm
4
4
 
5
5
 
6
- > @ton/appkit@0.0.3 build:clean /home/runner/work/kit/kit/packages/appkit
6
+ > @ton/appkit@0.0.4-alpha.0 build:clean /home/runner/work/kit/kit/packages/appkit
7
7
  > git clean -xdf dist
8
8
 
9
9
 
10
- > @ton/appkit@0.0.3 build:cjs /home/runner/work/kit/kit/packages/appkit
10
+ > @ton/appkit@0.0.4-alpha.0 build:cjs /home/runner/work/kit/kit/packages/appkit
11
11
  > tsc -p tsconfig.cjs.json
12
12
 
13
13
 
14
- > @ton/appkit@0.0.3 build:esm /home/runner/work/kit/kit/packages/appkit
14
+ > @ton/appkit@0.0.4-alpha.0 build:esm /home/runner/work/kit/kit/packages/appkit
15
15
  > tsc -p tsconfig.json
16
16
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @ton/appkit
2
2
 
3
+ ## 0.0.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @ton/walletkit@0.0.11-alpha.0
9
+
3
10
  ## 0.0.3
4
11
 
5
12
  ### Patch Changes
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ <!--
2
+ This file is auto-generated. Do not edit manually.
3
+ Changes will be overwritten when running the docs update script.
4
+ Source template: template/packages/appkit/README.md
5
+ -->
6
+
1
7
  # TonAppKit
2
8
 
3
9
  A dApp-side integration layer for TON Connect with a unified asset API for TON, Jettons, and NFTs
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export * from '@ton/walletkit/swap/dedust';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/swap/dedust/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) TonTech.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("@ton/walletkit/swap/dedust"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export * from '@ton/walletkit/swap/dedust';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/swap/dedust/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export * from '@ton/walletkit/swap/dedust';
package/docs/actions.md CHANGED
@@ -1,3 +1,9 @@
1
+ <!--
2
+ This file is auto-generated. Do not edit manually.
3
+ Changes will be overwritten when running the docs update script.
4
+ Source template: template/packages/appkit/docs/actions.md
5
+ -->
6
+
1
7
  # Actions
2
8
 
3
9
  AppKit provides a set of actions to interact with the blockchain and wallets.
@@ -1,3 +1,9 @@
1
+ <!--
2
+ This file is auto-generated. Do not edit manually.
3
+ Changes will be overwritten when running the docs update script.
4
+ Source template: template/packages/appkit/docs/connectors.md
5
+ -->
6
+
1
7
  # Connectors
2
8
 
3
9
  AppKit supports wallet connections through connectors. The primary connector is `TonConnect`.
package/docs/swap.md CHANGED
@@ -1,21 +1,32 @@
1
+ <!--
2
+ This file is auto-generated. Do not edit manually.
3
+ Changes will be overwritten when running the docs update script.
4
+ Source template: template/packages/appkit/docs/swap.md
5
+ -->
6
+
1
7
  # Swap
2
8
 
3
- AppKit supports swapping assets through the `SwapProvider` interface. The primary provider is `OmnistonSwapProvider`, which integrates with the [STON.fi](https://ston.fi) DEX aggregator via the [Omniston SDK](https://docs.ston.org/docs/developer-section/sdk/omniston-sdk).
9
+ AppKit supports swapping assets through the `SwapProvider` interface. Available providers:
10
+
11
+ - **OmnistonSwapProvider** – [STON.fi](https://ston.fi) DEX aggregator via [Omniston SDK](https://docs.ston.org/docs/developer-section/sdk/omniston-sdk)
12
+ - **DeDustSwapProvider** – [DeDust](https://dedust.io) Router v2 aggregator (no extra dependencies)
4
13
 
5
14
  ## Installation
6
15
 
7
- To use `OmnistonSwapProvider`, you need to install `@ston-fi/omniston-sdk`:
16
+ **Omniston** requires the Omniston SDK:
8
17
 
9
18
  ```bash
10
19
  npm install @ston-fi/omniston-sdk
11
20
  ```
12
21
 
22
+ **DeDust** has no additional dependencies.
23
+
13
24
  ## Setup
14
25
 
15
- You can set up `OmnistonSwapProvider` by passing it to the `AppKit` constructor.
26
+ You can set up swap providers by passing them to the `AppKit` constructor.
16
27
 
17
28
  ```ts
18
- // Initialize AppKit with swap provider
29
+ // Initialize AppKit with swap providers
19
30
  const appKit = new AppKit({
20
31
  networks: {
21
32
  [Network.mainnet().chainId]: {
@@ -27,17 +38,20 @@ const appKit = new AppKit({
27
38
  },
28
39
  providers: [
29
40
  new OmnistonSwapProvider({
30
- // Optional configuration
31
41
  apiUrl: 'https://api.ston.fi',
32
42
  defaultSlippageBps: 100, // 1%
33
43
  }),
44
+ new DeDustSwapProvider({
45
+ defaultSlippageBps: 100,
46
+ referralAddress: 'EQ...', // Optional
47
+ }),
34
48
  ],
35
49
  });
36
50
  ```
37
51
 
38
52
  ### Register Dynamically
39
53
 
40
- Alternatively, you can register the provider dynamically using `registerProvider`:
54
+ Alternatively, you can register providers dynamically using `registerProvider`:
41
55
 
42
56
  ```ts
43
57
  // 1. Initialize AppKit
@@ -52,15 +66,12 @@ const appKit = new AppKit({
52
66
  },
53
67
  });
54
68
 
55
- // 2. Register swap provider
56
- const provider = new OmnistonSwapProvider({
57
- // Optional configuration
58
- apiUrl: 'https://api.ston.fi',
59
- });
60
-
61
- registerProvider(appKit, provider);
69
+ // 2. Register swap providers
70
+ registerProvider(appKit, new OmnistonSwapProvider({ defaultSlippageBps: 100 }));
71
+ registerProvider(appKit, new DeDustSwapProvider({ defaultSlippageBps: 100 }));
62
72
  ```
63
73
 
64
74
  ## Configuration
65
75
 
66
- For detailed configuration options and usage of `OmnistonSwapProvider`, please refer to the [Omniston SDK documentation](https://docs.ston.org/docs/developer-section/sdk/omniston-sdk) and the [provider documentation](../src/swap/omniston/README.md).
76
+ - **Omniston**: [Omniston SDK documentation](https://docs.ston.org/docs/developer-section/sdk/omniston-sdk) and [provider README](https://github.com/ton-connect/kit/blob/main/packages/walletkit/src/defi/swap/omniston/README.md)
77
+ - **DeDust**: [provider README](https://github.com/ton-connect/kit/blob/main/packages/walletkit/src/defi/swap/dedust/README.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ton/appkit",
3
- "version": "0.0.3",
3
+ "version": "0.0.4-alpha.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,6 +40,16 @@
40
40
  "types": "./dist/cjs/swap/omniston/index.d.ts",
41
41
  "default": "./dist/cjs/swap/omniston/index.js"
42
42
  }
43
+ },
44
+ "./swap/dedust": {
45
+ "import": {
46
+ "types": "./dist/esm/swap/dedust/index.d.ts",
47
+ "default": "./dist/esm/swap/dedust/index.js"
48
+ },
49
+ "require": {
50
+ "types": "./dist/cjs/swap/dedust/index.d.ts",
51
+ "default": "./dist/cjs/swap/dedust/index.js"
52
+ }
43
53
  }
44
54
  },
45
55
  "typesVersions": {
@@ -49,11 +59,14 @@
49
59
  ],
50
60
  "swap/omniston": [
51
61
  "./dist/cjs/swap/omniston/index.d.ts"
62
+ ],
63
+ "swap/dedust": [
64
+ "./dist/cjs/swap/dedust/index.d.ts"
52
65
  ]
53
66
  }
54
67
  },
55
68
  "dependencies": {
56
- "@ton/walletkit": "0.0.10"
69
+ "@ton/walletkit": "0.0.11-alpha.0"
57
70
  },
58
71
  "peerDependencies": {
59
72
  "@tanstack/query-core": ">=5.0.0",
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ export * from '@ton/walletkit/swap/dedust';