@gasfree-kit/ton-gasless 0.2.0 → 0.3.1

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.
package/README.md CHANGED
@@ -6,7 +6,7 @@ With this package, the user only needs USDT. The relay pays the TON gas and char
6
6
 
7
7
  ## What This Package Does
8
8
 
9
- - creates a WDK-backed TON wallet
9
+ - creates a TON wallet from a seed phrase
10
10
  - quotes the relay fee in USDT
11
11
  - checks that balance covers transfer amount plus fee
12
12
  - submits the gasless transfer
@@ -26,7 +26,7 @@ With this package, the user only needs USDT. The relay pays the TON gas and char
26
26
  │ │
27
27
  v v
28
28
  ┌────────────┐ ┌───────────────┐
29
- WDK TON │ │ Relay fee │
29
+ │ TON │ │ Relay fee │
30
30
  │ wallet │ │ quote (USDT) │
31
31
  └──────┬─────┘ └───────┬───────┘
32
32
  │ │
@@ -46,29 +46,24 @@ With this package, the user only needs USDT. The relay pays the TON gas and char
46
46
  └──────────────────────────┘
47
47
  ```
48
48
 
49
- ```mermaid
50
- flowchart TD
51
- A["Your app"] --> B["@gasfree-kit/ton-gasless"]
52
- B --> C["WDK TON wallet"]
53
- B --> D["Relay fee quote"]
54
- C --> E["Sponsored relay"]
55
- D --> E
56
- E -->|pays TON gas| F["TON blockchain"]
57
- E -->|deducts fee| G["USDT commission"]
58
- ```
49
+ ## Prerequisites
59
50
 
60
- ## Installation
51
+ This package depends on [`@gasfree-kit/core`](../core/README.md) for:
61
52
 
62
- ```bash
63
- npm install @gasfree-kit/ton-gasless
64
- ```
53
+ - **Seed phrase generation** — `generateSeedPhrase()` creates the mnemonic used to set up wallets
54
+ - **Address validation** — `validateTonAddress()` catches malformed addresses before sending
55
+ - **Error classes** — `GasfreeError`, `InsufficientBalanceError`, etc. for consistent error handling
65
56
 
66
- Peer dependencies:
57
+ `@gasfree-kit/core` is installed automatically as a dependency.
58
+
59
+ ## Installation
67
60
 
68
61
  ```bash
69
- npm install @tetherto/wdk-wallet-ton-gasless tonweb
62
+ npm install @gasfree-kit/ton-gasless @gasfree-kit/core
70
63
  ```
71
64
 
65
+ After installing, your package manager will prompt you to install the peer dependencies listed in `package.json`.
66
+
72
67
  ## Configuration
73
68
 
74
69
  ```ts
@@ -170,15 +165,15 @@ console.log(result.data.fee);
170
165
 
171
166
  ## Main Exports
172
167
 
173
- | Export | What it does |
174
- | ------------------------ | ---------------------------------------------------------- |
175
- | `setupTonGaslessWallet` | Creates the WDK-backed TON wallet and resolves the address |
176
- | `TonTransfer` | Checks balances, estimates fees, and sends transfers |
177
- | `getTonGaslessConfig` | Expands and validates the runtime config |
178
- | `tonUsdtTokenRoot` | Built-in TON USDT root address |
179
- | `usdtTonBaseUnits` | Converts human-readable USDT to base units |
180
- | `fromTonBaseUnitsToUsdt` | Converts base units back to readable USDT |
181
- | `getTonUsdtValue` | Utility helper for TON to USDT conversions |
168
+ | Export | What it does |
169
+ | ------------------------ | ------------------------------------------------------------------ |
170
+ | `setupTonGaslessWallet` | Creates the TON wallet from a seed phrase and resolves the address |
171
+ | `TonTransfer` | Checks balances, estimates fees, and sends transfers |
172
+ | `getTonGaslessConfig` | Expands and validates the runtime config |
173
+ | `tonUsdtTokenRoot` | Built-in TON USDT root address |
174
+ | `usdtTonBaseUnits` | Converts human-readable USDT to base units |
175
+ | `fromTonBaseUnitsToUsdt` | Converts base units back to readable USDT |
176
+ | `getTonUsdtValue` | Utility helper for TON to USDT conversions |
182
177
 
183
178
  ## Safety Notes
184
179
 
package/dist/index.d.mts CHANGED
@@ -26,10 +26,10 @@ type TonGaslessClientConfig = {
26
26
  declare function getTonGaslessConfig(config: TonGaslessClientConfig): TonGaslessNetworkConfig;
27
27
 
28
28
  /**
29
- * Set up a TON gasless wallet via WDK.
29
+ * Set up a TON gasless wallet.
30
30
  *
31
- * Uses legacy derivation path (m/44'/607'/0'/0/{index}) for compatibility
32
- * with wallets created by wdk-wallet-ton <= beta.5.
31
+ * Pins the BIP-44 derivation path at m/44'/607'/0'/0/{index} so the
32
+ * resulting address stays stable across underlying-library upgrades.
33
33
  */
34
34
  declare function setupTonGaslessWallet(seedPhrase: string, config: TonGaslessClientConfig, derivationPath?: string): Promise<{
35
35
  wallet: _tetherto_wdk_wallet_ton_gasless.default;
package/dist/index.d.ts CHANGED
@@ -26,10 +26,10 @@ type TonGaslessClientConfig = {
26
26
  declare function getTonGaslessConfig(config: TonGaslessClientConfig): TonGaslessNetworkConfig;
27
27
 
28
28
  /**
29
- * Set up a TON gasless wallet via WDK.
29
+ * Set up a TON gasless wallet.
30
30
  *
31
- * Uses legacy derivation path (m/44'/607'/0'/0/{index}) for compatibility
32
- * with wallets created by wdk-wallet-ton <= beta.5.
31
+ * Pins the BIP-44 derivation path at m/44'/607'/0'/0/{index} so the
32
+ * resulting address stays stable across underlying-library upgrades.
33
33
  */
34
34
  declare function setupTonGaslessWallet(seedPhrase: string, config: TonGaslessClientConfig, derivationPath?: string): Promise<{
35
35
  wallet: _tetherto_wdk_wallet_ton_gasless.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gasfree-kit/ton-gasless",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Gasless USDT transfers on TON via sponsored relay",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -17,12 +17,25 @@
17
17
  "README.md"
18
18
  ],
19
19
  "dependencies": {
20
- "@gasfree-kit/core": "0.2.0"
20
+ "@gasfree-kit/core": "0.2.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@tetherto/wdk-wallet-ton-gasless": "^1.0.0-beta.4",
24
24
  "tonweb": "^0.0.66"
25
25
  },
26
+ "keywords": [
27
+ "gasless",
28
+ "gas-free",
29
+ "ton",
30
+ "toncoin",
31
+ "usdt",
32
+ "transfer",
33
+ "sponsored",
34
+ "relay",
35
+ "web3",
36
+ "sdk",
37
+ "meta-transactions"
38
+ ],
26
39
  "license": "MIT",
27
40
  "publishConfig": {
28
41
  "access": "public"