@atbash/sdk 0.3.9 → 0.3.10-dev.0

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
@@ -106,6 +106,11 @@ var meterProvider = null;
106
106
  var callCounter = null;
107
107
  var durationHistogram = null;
108
108
  var defaultSource = "sdk";
109
+ function autoInit() {
110
+ if (meterProvider) return;
111
+ if (process.env.ATBASH_TELEMETRY === "false") return;
112
+ setupTelemetry({ enabled: true });
113
+ }
109
114
  function setupTelemetry(config) {
110
115
  if (!config.enabled) return;
111
116
  if (meterProvider) return;
@@ -138,6 +143,7 @@ function setupTelemetry(config) {
138
143
  });
139
144
  }
140
145
  function recordCall(functionName, source, agentPubkey) {
146
+ autoInit();
141
147
  if (!callCounter) return;
142
148
  callCounter.add(1, {
143
149
  "function.name": functionName,
@@ -163,13 +169,13 @@ async function shutdownTelemetry() {
163
169
 
164
170
  // src/client.ts
165
171
  var { createClient, encryption: encryption2, newSignatureProvider } = import_postchain_client2.default;
166
- var DEFAULT_ENDPOINT = "https://atbash.ai";
172
+ var DEFAULT_ENDPOINT = "https://chromia-verified-ai-dev-two.vercel.app";
167
173
  var DEFAULT_CHROMIA_NODE_URLS = [
168
174
  "https://node6.testnet.chromia.com:7740",
169
175
  "https://node7.testnet.chromia.com:7740",
170
176
  "https://node8.testnet.chromia.com:7740"
171
177
  ];
172
- var DEFAULT_BLOCKCHAIN_RID = "25B41DF620C489349C54944496FF5C6E58CFCEFED0C51658780B67299D40E8ED";
178
+ var DEFAULT_BLOCKCHAIN_RID = "F09A7219ACAE32C06D3962BB04D15F36C679C2BEB3FF24CDE5C8D577017EFFC6";
173
179
  function isValidPrivateKey(hex) {
174
180
  return /^[0-9a-fA-F]{64}$/.test(hex);
175
181
  }
package/dist/index.d.cts CHANGED
@@ -148,9 +148,9 @@ interface AtbashClientConfig {
148
148
  };
149
149
  }
150
150
 
151
- declare const DEFAULT_ENDPOINT = "https://atbash.ai";
151
+ declare const DEFAULT_ENDPOINT = "https://chromia-verified-ai-dev-two.vercel.app";
152
152
  declare const DEFAULT_CHROMIA_NODE_URLS: string[];
153
- declare const DEFAULT_BLOCKCHAIN_RID = "25B41DF620C489349C54944496FF5C6E58CFCEFED0C51658780B67299D40E8ED";
153
+ declare const DEFAULT_BLOCKCHAIN_RID = "F09A7219ACAE32C06D3962BB04D15F36C679C2BEB3FF24CDE5C8D577017EFFC6";
154
154
  declare function isValidPrivateKey(hex: string): boolean;
155
155
  declare function derivePublicKey(privKeyHex: string): string;
156
156
  declare function generateKeyPair(): {
@@ -219,10 +219,6 @@ interface TelemetryConfig {
219
219
  /** Flush interval in ms. Default: 60000 */
220
220
  exportIntervalMs?: number;
221
221
  }
222
- /**
223
- * Initialize telemetry. Call once at startup.
224
- * Does nothing if config.enabled is false.
225
- */
226
222
  declare function setupTelemetry(config: TelemetryConfig): void;
227
223
  /**
228
224
  * Flush pending metrics and shut down. Call before process exits.
package/dist/index.d.ts CHANGED
@@ -148,9 +148,9 @@ interface AtbashClientConfig {
148
148
  };
149
149
  }
150
150
 
151
- declare const DEFAULT_ENDPOINT = "https://atbash.ai";
151
+ declare const DEFAULT_ENDPOINT = "https://chromia-verified-ai-dev-two.vercel.app";
152
152
  declare const DEFAULT_CHROMIA_NODE_URLS: string[];
153
- declare const DEFAULT_BLOCKCHAIN_RID = "25B41DF620C489349C54944496FF5C6E58CFCEFED0C51658780B67299D40E8ED";
153
+ declare const DEFAULT_BLOCKCHAIN_RID = "F09A7219ACAE32C06D3962BB04D15F36C679C2BEB3FF24CDE5C8D577017EFFC6";
154
154
  declare function isValidPrivateKey(hex: string): boolean;
155
155
  declare function derivePublicKey(privKeyHex: string): string;
156
156
  declare function generateKeyPair(): {
@@ -219,10 +219,6 @@ interface TelemetryConfig {
219
219
  /** Flush interval in ms. Default: 60000 */
220
220
  exportIntervalMs?: number;
221
221
  }
222
- /**
223
- * Initialize telemetry. Call once at startup.
224
- * Does nothing if config.enabled is false.
225
- */
226
222
  declare function setupTelemetry(config: TelemetryConfig): void;
227
223
  /**
228
224
  * Flush pending metrics and shut down. Call before process exits.
package/dist/index.js CHANGED
@@ -36,6 +36,11 @@ var meterProvider = null;
36
36
  var callCounter = null;
37
37
  var durationHistogram = null;
38
38
  var defaultSource = "sdk";
39
+ function autoInit() {
40
+ if (meterProvider) return;
41
+ if (process.env.ATBASH_TELEMETRY === "false") return;
42
+ setupTelemetry({ enabled: true });
43
+ }
39
44
  function setupTelemetry(config) {
40
45
  if (!config.enabled) return;
41
46
  if (meterProvider) return;
@@ -68,6 +73,7 @@ function setupTelemetry(config) {
68
73
  });
69
74
  }
70
75
  function recordCall(functionName, source, agentPubkey) {
76
+ autoInit();
71
77
  if (!callCounter) return;
72
78
  callCounter.add(1, {
73
79
  "function.name": functionName,
@@ -93,13 +99,13 @@ async function shutdownTelemetry() {
93
99
 
94
100
  // src/client.ts
95
101
  var { createClient, encryption: encryption2, newSignatureProvider } = postchain2;
96
- var DEFAULT_ENDPOINT = "https://atbash.ai";
102
+ var DEFAULT_ENDPOINT = "https://chromia-verified-ai-dev-two.vercel.app";
97
103
  var DEFAULT_CHROMIA_NODE_URLS = [
98
104
  "https://node6.testnet.chromia.com:7740",
99
105
  "https://node7.testnet.chromia.com:7740",
100
106
  "https://node8.testnet.chromia.com:7740"
101
107
  ];
102
- var DEFAULT_BLOCKCHAIN_RID = "25B41DF620C489349C54944496FF5C6E58CFCEFED0C51658780B67299D40E8ED";
108
+ var DEFAULT_BLOCKCHAIN_RID = "F09A7219ACAE32C06D3962BB04D15F36C679C2BEB3FF24CDE5C8D577017EFFC6";
103
109
  function isValidPrivateKey(hex) {
104
110
  return /^[0-9a-fA-F]{64}$/.test(hex);
105
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atbash/sdk",
3
- "version": "0.3.9",
3
+ "version": "0.3.10-dev.0",
4
4
  "description": "Atbash SDK — control boundary before the last irreversible step in an agent workflow",
5
5
  "homepage": "https://atbash.ai",
6
6
  "author": "Atbash",