@x1scroll/agent-sdk 1.1.0 → 1.1.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/package.json +1 -1
- package/src/index.js +6 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -30,6 +30,9 @@ const bs58decode = (typeof bs58.decode === 'function') ? bs58.decode : bs58.defa
|
|
|
30
30
|
// ── Registry cache TTL ────────────────────────────────────────────────────────
|
|
31
31
|
const REGISTRY_CACHE_TTL = 5 * 60 * 1000; // 5 minutes in ms
|
|
32
32
|
|
|
33
|
+
// ── Validator Storage Registry Program (LIVE on X1 Mainnet) ──────────────────
|
|
34
|
+
const STORAGE_REGISTRY_PROGRAM_ID = new PublicKey('GqzvCjz8nzxWxH39twk4oPfFaHXeyVDty9oJ6F4UcfF5');
|
|
35
|
+
|
|
33
36
|
// ── Fallback validators — used when registry is empty or unreachable ───────────
|
|
34
37
|
const FALLBACK_VALIDATORS = [
|
|
35
38
|
{ endpoint: 'https://x1scroll.io/api/ipfs/upload', active: true, fallback: true },
|
|
@@ -371,8 +374,9 @@ class AgentClient {
|
|
|
371
374
|
if (this._registryCache && now < this._registryCacheExpiry) {
|
|
372
375
|
return this._registryCache;
|
|
373
376
|
}
|
|
374
|
-
//
|
|
375
|
-
//
|
|
377
|
+
// Registry program is live: GqzvCjz8nzxWxH39twk4oPfFaHXeyVDty9oJ6F4UcfF5
|
|
378
|
+
// TODO: query on-chain StorageNode accounts via getProgramAccounts
|
|
379
|
+
// For now: return fallback while validator onboarding ramps up
|
|
376
380
|
this._registryCache = FALLBACK_VALIDATORS;
|
|
377
381
|
this._registryCacheExpiry = now + REGISTRY_CACHE_TTL;
|
|
378
382
|
return this._registryCache;
|