ton-provider-system 0.3.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/dist/index.cjs CHANGED
@@ -324,7 +324,13 @@ var DEFAULT_PROVIDERS = {
324
324
  },
325
325
  rps: 1,
326
326
  // Without API key
327
- priority: 100,
327
+ // Preferred on testnet: Toncenter serves the full v2 surface incl.
328
+ // getTransactions (curl-proven 200). Orbs only proxies liteserver
329
+ // get-methods/state and 403s on getTransactions, so it must NOT be the
330
+ // primary testnet provider (it stays a fallback for get-method reads).
331
+ // Selection is score-based and priority is the lever (lower = better),
332
+ // so this gives Toncenter the testnet edge over Orbs (priority 90).
333
+ priority: 10,
328
334
  enabled: true,
329
335
  description: "Official TON Center public endpoint"
330
336
  },
@@ -336,7 +342,9 @@ var DEFAULT_PROVIDERS = {
336
342
  v2: "https://ton-testnet.orbs.network/api/v2"
337
343
  },
338
344
  rps: 10,
339
- priority: 50,
345
+ // Demoted below toncenter_testnet (priority 10): Orbs is the decentralised
346
+ // fallback for non-transaction (get-method/state) testnet reads only.
347
+ priority: 90,
340
348
  enabled: true,
341
349
  isDynamic: true,
342
350
  description: "Decentralized gateway - no API key needed"
@@ -373,7 +381,12 @@ function createDefaultConfig() {
373
381
  version: "1.0",
374
382
  providers: { ...DEFAULT_PROVIDERS },
375
383
  defaults: {
376
- testnet: ["orbs_testnet", "toncenter_testnet"],
384
+ // Testnet: Toncenter first (transactions-capable), Orbs as fallback.
385
+ // This default order only governs the no-healthy-providers fallback
386
+ // path; the primary, score-based selection is driven by priority
387
+ // (see toncenter_testnet/orbs_testnet above). Mainnet order is left
388
+ // unchanged (Orbs stays primary there — no regression).
389
+ testnet: ["toncenter_testnet", "orbs_testnet"],
377
390
  mainnet: ["orbs_mainnet", "toncenter_mainnet"]
378
391
  }
379
392
  };