torchsdk 3.7.4 → 3.7.5
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/package.json +1 -1
- package/readme.md +10 -2
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -16,6 +16,14 @@ for sdk audit, refer to [audit.md](./audit.md).
|
|
|
16
16
|
|
|
17
17
|
SDK version tracks the on-chain program IDL version.
|
|
18
18
|
|
|
19
|
+
### v3.7.4
|
|
20
|
+
|
|
21
|
+
- **V28 Migration Payer Reimbursement** — The on-chain program now snapshots the payer's lamports before and after Raydium CPIs, then reimburses the exact migration cost from the treasury. Net cost to payer: 0 SOL. `MIN_MIGRATION_SOL` (1.5 SOL safety floor) replaces the old `RAYDIUM_POOL_CREATION_FEE` (0.15 SOL) constant. The inline auto-migrate path in `buildBuyTransactionInternal` has been collapsed into a single `buildMigrateTransaction()` call (~50 lines removed). IDL updated to v3.7.1. 36 Kani proofs all passing on program v3.7.1.
|
|
22
|
+
|
|
23
|
+
### v3.7.3
|
|
24
|
+
|
|
25
|
+
- **`fetchWithFallback` resilience** — Improved metadata fetch with gateway URL fallback.
|
|
26
|
+
|
|
19
27
|
### v3.7.2
|
|
20
28
|
|
|
21
29
|
- **Auto-Buyback Client-Side Pre-Checks** — `buildAutoBuybackTransaction` now validates all on-chain conditions before building the transaction. Pre-checks: migration status, baseline initialization, cooldown interval, supply floor (500M), price vs baseline threshold (80%), and minimum buyback amount (0.01 SOL). Throws descriptive errors so callers know exactly why a buyback can't fire (e.g. `"Buyback cooldown: 142 slots remaining"`, `"Price is healthy — no buyback needed (current: 95.2% of baseline, threshold: 80.0%)"`). Return message now includes the actual SOL buyback amount.
|
|
@@ -137,7 +145,7 @@ All builders return `{ transaction: Transaction, message: string }`. You sign an
|
|
|
137
145
|
| `buildDirectBuyTransaction(connection, params)` | Buy tokens (buyer pays directly, no vault) |
|
|
138
146
|
| `buildSellTransaction(connection, params)` | Sell tokens back to the bonding curve (vault-routed) |
|
|
139
147
|
| `buildVaultSwapTransaction(connection, params)` | Buy/sell migrated tokens on Raydium DEX (vault-routed) |
|
|
140
|
-
| `buildMigrateTransaction(connection, params)` | Migrate bonding-complete token to Raydium DEX (permissionless) |
|
|
148
|
+
| `buildMigrateTransaction(connection, params)` | Migrate bonding-complete token to Raydium DEX (permissionless, payer reimbursed by treasury) |
|
|
141
149
|
| `buildCreateTokenTransaction(connection, params)` | Launch a new token |
|
|
142
150
|
| `buildStarTransaction(connection, params)` | Star a token (0.05 SOL, vault-routed) |
|
|
143
151
|
|
|
@@ -318,7 +326,7 @@ const { transaction } = await buildDirectBuyTransaction(connection, {
|
|
|
318
326
|
{ mint: string, borrower: string, sol_amount: number, vault?: string }
|
|
319
327
|
{ mint: string, liquidator: string, borrower: string, vault?: string }
|
|
320
328
|
|
|
321
|
-
// Migrate (permissionless — anyone can trigger for bonding-complete tokens)
|
|
329
|
+
// Migrate (permissionless — anyone can trigger for bonding-complete tokens, treasury reimburses payer)
|
|
322
330
|
{ mint: string, payer: string }
|
|
323
331
|
|
|
324
332
|
// Rewards (optional vault routing)
|