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