@x1scroll/agent-sdk 1.1.0 → 1.1.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +10 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x1scroll/agent-sdk",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Agent identity and on-chain memory protocol for X1 blockchain",
5
5
  "license": "BSL-1.1",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * @x1scroll/agent-sdk
5
5
  * Agent Identity Protocol — persistent agent identity and on-chain memory for X1 blockchain.
6
6
  *
7
- * Program ID: 52EW3sn2Tkq6EMnp86JWUzXrNzrFujpdEgovsjwapbAM (immutable)
8
- * Treasury: HYP2VdVk2QNGKMBfWGFZpaFqMoqQkB7Vp5F12eSxCxtf (immutable)
7
+ * Program ID: ECgaMEwH4KLSz3awDo1vz84mSrx5n6h1ZCrbmunB5UxB (immutable)
8
+ * Treasury: GmvrL1ymC9ENuQCUqymC9robGa9t9L59AbFiwhDDd4Ld (immutable)
9
9
  * Network: X1 Mainnet
10
10
  * License: BSL-1.1 — https://x1scroll.io/license
11
11
  *
@@ -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 },
@@ -40,13 +43,13 @@ const FALLBACK_VALIDATORS = [
40
43
  * On-chain program address. Immutable — this SDK only talks to this program.
41
44
  * Forks that swap this address are out of the protocol.
42
45
  */
43
- const PROGRAM_ID = new PublicKey('52EW3sn2Tkq6EMnp86JWUzXrNzrFujpdEgovsjwapbAM');
46
+ const PROGRAM_ID = new PublicKey('ECgaMEwH4KLSz3awDo1vz84mSrx5n6h1ZCrbmunB5UxB');
44
47
 
45
48
  /**
46
49
  * Fee collector wallet. Built into every instruction on-chain.
47
50
  * Developers don't configure fees — the program handles it automatically.
48
51
  */
49
- const TREASURY = new PublicKey('HYP2VdVk2QNGKMBfWGFZpaFqMoqQkB7Vp5F12eSxCxtf');
52
+ const TREASURY = new PublicKey('GmvrL1ymC9ENuQCUqymC9robGa9t9L59AbFiwhDDd4Ld');
50
53
 
51
54
  const DEFAULT_RPC_URL = 'https://rpc.x1.xyz';
52
55
 
@@ -371,8 +374,9 @@ class AgentClient {
371
374
  if (this._registryCache && now < this._registryCacheExpiry) {
372
375
  return this._registryCache;
373
376
  }
374
- // For now: return fallback (registry program not deployed yet)
375
- // When program is live, this queries on-chain StorageNode accounts
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;