neozip-blockchain 0.7.0 → 0.7.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 (47) hide show
  1. package/README.md +22 -15
  2. package/dist/constants/metadata.d.ts +2 -2
  3. package/dist/constants/metadata.js +4 -4
  4. package/dist/constants/metadata.js.map +1 -1
  5. package/dist/constants/servers.d.ts +17 -19
  6. package/dist/constants/servers.d.ts.map +1 -1
  7. package/dist/constants/servers.js +24 -27
  8. package/dist/constants/servers.js.map +1 -1
  9. package/dist/core/ZipkitMinter.js +4 -4
  10. package/dist/core/ZipkitMinter.js.map +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/{zipstamp-server → token-service}/CalendarManager.d.ts +6 -6
  16. package/dist/token-service/CalendarManager.d.ts.map +1 -0
  17. package/dist/{zipstamp-server → token-service}/CalendarManager.js +8 -8
  18. package/dist/token-service/CalendarManager.js.map +1 -0
  19. package/dist/{zipstamp-server/ZipstampServerAPI.d.ts → token-service/TokenServiceAPI.d.ts} +19 -19
  20. package/dist/token-service/TokenServiceAPI.d.ts.map +1 -0
  21. package/dist/{zipstamp-server/ZipstampServerAPI.js → token-service/TokenServiceAPI.js} +56 -56
  22. package/dist/token-service/TokenServiceAPI.js.map +1 -0
  23. package/dist/{zipstamp-server/ZipstampServerClient.d.ts → token-service/TokenServiceClient.d.ts} +41 -28
  24. package/dist/token-service/TokenServiceClient.d.ts.map +1 -0
  25. package/dist/{zipstamp-server/ZipstampServerClient.js → token-service/TokenServiceClient.js} +35 -27
  26. package/dist/token-service/TokenServiceClient.js.map +1 -0
  27. package/dist/{zipstamp-server/ZipstampServerHelpers.d.ts → token-service/TokenServiceHelpers.d.ts} +60 -47
  28. package/dist/token-service/TokenServiceHelpers.d.ts.map +1 -0
  29. package/dist/{zipstamp-server/ZipstampServerHelpers.js → token-service/TokenServiceHelpers.js} +71 -46
  30. package/dist/token-service/TokenServiceHelpers.js.map +1 -0
  31. package/dist/token-service/index.d.ts +24 -0
  32. package/dist/token-service/index.d.ts.map +1 -0
  33. package/dist/token-service/index.js +68 -0
  34. package/dist/token-service/index.js.map +1 -0
  35. package/package.json +25 -23
  36. package/dist/zipstamp-server/CalendarManager.d.ts.map +0 -1
  37. package/dist/zipstamp-server/CalendarManager.js.map +0 -1
  38. package/dist/zipstamp-server/ZipstampServerAPI.d.ts.map +0 -1
  39. package/dist/zipstamp-server/ZipstampServerAPI.js.map +0 -1
  40. package/dist/zipstamp-server/ZipstampServerClient.d.ts.map +0 -1
  41. package/dist/zipstamp-server/ZipstampServerClient.js.map +0 -1
  42. package/dist/zipstamp-server/ZipstampServerHelpers.d.ts.map +0 -1
  43. package/dist/zipstamp-server/ZipstampServerHelpers.js.map +0 -1
  44. package/dist/zipstamp-server/index.d.ts +0 -24
  45. package/dist/zipstamp-server/index.d.ts.map +0 -1
  46. package/dist/zipstamp-server/index.js +0 -67
  47. package/dist/zipstamp-server/index.js.map +0 -1
@@ -1,31 +1,31 @@
1
1
  /**
2
2
  * ======================================
3
- * ZipstampServerAPI.ts - Zipstamp Server API Integration
3
+ * TokenServiceAPI.ts - NeoZip Token Service API integration
4
4
  * ======================================
5
5
  *
6
- * This module provides timestamping functionality using the Zipstamp server API,
6
+ * This module provides timestamping functionality using the NeoZip Token Service API,
7
7
  * similar to OpenTimestamps but using Ethereum blockchain.
8
8
  *
9
9
  * Key Features:
10
- * - Ethereum blockchain timestamping via Zipstamp server
10
+ * - Ethereum blockchain timestamping via NeoZip Token Service
11
11
  * - Merkle root calculation and verification
12
12
  * - ZIP file integration for timestamp metadata
13
13
  * - Support for immediate, batched, and transferable modes
14
14
  *
15
- * @fileoverview Zipstamp server API utilities for blockchain timestamping
15
+ * @fileoverview NeoZip Token Service API utilities for blockchain timestamping
16
16
  * @author NeoWare Inc.
17
17
  */
18
18
  import type { ZipkitLike, ZipEntryLike } from '../types';
19
- import type { TimestampMetadata } from './ZipstampServerHelpers';
19
+ import type { TimestampMetadata } from './TokenServiceHelpers';
20
20
  export declare const CMP_METHOD: {
21
21
  STORED: number;
22
22
  DEFLATED: number;
23
23
  };
24
24
  /**
25
25
  * Timestamp metadata format stored in ZIP files
26
- * Re-exported from ZipstampServerHelpers.ts
26
+ * Re-exported from TokenServiceHelpers.ts
27
27
  */
28
- export type { TimestampMetadata } from './ZipstampServerHelpers';
28
+ export type { TimestampMetadata } from './TokenServiceHelpers';
29
29
  /**
30
30
  * Verification result for timestamped ZIP files.
31
31
  *
@@ -115,9 +115,9 @@ export declare function getEthTimestampEntry(zip: ZipkitLike): ZipEntryLike | nu
115
115
  */
116
116
  export declare function extractTimestampData(zip: ZipkitLike, entry: ZipEntryLike): Promise<TimestampMetadata | null>;
117
117
  /**
118
- * Creates a timestamp by submitting a merkle root to the Zipstamp server.
118
+ * Creates a timestamp by submitting a merkle root to the NeoZip Token Service.
119
119
  *
120
- * Submits a SHA-256 digest (merkle root) to the Zipstamp server API for blockchain
120
+ * Submits a SHA-256 digest (merkle root) to the NeoZip Token Service API for blockchain
121
121
  * timestamping. The digest is typically the merkle root of a ZIP file's contents.
122
122
  *
123
123
  * The function uses `submitDigest` internally and converts the response to a
@@ -126,7 +126,7 @@ export declare function extractTimestampData(zip: ZipkitLike, entry: ZipEntryLik
126
126
  * @param merkleRoot - A 64-character hexadecimal string representing the SHA-256 hash
127
127
  * @param options - Configuration options for timestamp creation
128
128
  * @param options.recipientEmail - Optional email address for notifications
129
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
129
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
130
130
  * @param options.debug - Enable debug logging (defaults to `false`)
131
131
  * @param options.mode - **Deprecated**: For backward compatibility only, not sent to API
132
132
  * @param options.recipientAddress - **Deprecated**: For backward compatibility only, not sent to API
@@ -150,16 +150,16 @@ export declare function extractTimestampData(zip: ZipkitLike, entry: ZipEntryLik
150
150
  */
151
151
  export declare function createTimestamp(merkleRoot: string, options?: CreateTimestampOptions): Promise<TimestampMetadata | null>;
152
152
  /**
153
- * Verifies a timestamp against the Zipstamp server.
153
+ * Verifies a timestamp against the NeoZip Token Service.
154
154
  *
155
155
  * Verifies that a timestamp has been confirmed on the blockchain by checking
156
- * with the Zipstamp server API. Uses `verifyDigest` internally and converts the
156
+ * with the NeoZip Token Service API. Uses `verifyDigest` internally and converts the
157
157
  * response to an `EthTimestampVerifyResult` format.
158
158
  *
159
159
  * @param merkleRoot - The SHA-256 digest (merkle root) to verify
160
160
  * @param timestampData - The timestamp metadata from the ZIP file (contains batchId, chainId, etc.)
161
161
  * @param options - Configuration options for verification
162
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
162
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
163
163
  * @param options.debug - Enable debug logging (defaults to `false`)
164
164
  * @returns Promise resolving to verification result with status and blockchain details
165
165
  *
@@ -183,12 +183,12 @@ export declare function verifyTimestamp(merkleRoot: string, timestampData: Times
183
183
  * Verifies a timestamp within a ZIP file.
184
184
  *
185
185
  * Extracts the merkle root and timestamp metadata from a ZIP file, then verifies
186
- * the timestamp against the Zipstamp server API. This is a convenience function that
186
+ * the timestamp against the NeoZip Token Service API. This is a convenience function that
187
187
  * combines `getEthTimestampEntry`, `extractTimestampData`, and `verifyTimestamp`.
188
188
  *
189
189
  * @param zip - A ZipkitLike instance representing the timestamped ZIP file
190
190
  * @param options - Configuration options for verification
191
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
191
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
192
192
  * @param options.debug - Enable debug logging (defaults to `false`)
193
193
  * @returns Promise resolving to verification result
194
194
  *
@@ -243,7 +243,7 @@ export declare function createTimestampMetadataEntry(zipkit: ZipkitLike, timesta
243
243
  /**
244
244
  * Creates timestamp metadata for a ZIP file.
245
245
  *
246
- * Extracts the merkle root from a ZIP file and submits it to the Zipstamp server
246
+ * Extracts the merkle root from a ZIP file and submits it to the NeoZip Token Service
247
247
  * for timestamping. Returns the timestamp metadata that can then be added to
248
248
  * the ZIP file using `createTimestampMetadataEntry`.
249
249
  *
@@ -254,7 +254,7 @@ export declare function createTimestampMetadataEntry(zipkit: ZipkitLike, timesta
254
254
  * @param zipkit - A ZipkitLike instance representing the ZIP file to timestamp
255
255
  * @param options - Configuration options for timestamp creation
256
256
  * @param options.recipientEmail - Optional email address for notifications
257
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
257
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
258
258
  * @param options.debug - Enable debug logging (defaults to `false`)
259
259
  * @returns Promise resolving to timestamp metadata, or `null` if creation fails
260
260
  * @throws {Error} If merkle root is not found in ZIP or timestamp creation fails
@@ -394,7 +394,7 @@ export declare function getMetadataFileNames(): string[];
394
394
  * Verifies a Merkle proof locally using sorted pair hashing (keccak256).
395
395
  *
396
396
  * Performs local verification of a Merkle proof without requiring access to
397
- * the Zipstamp server or blockchain. Uses the same sorted pair hashing algorithm
397
+ * the NeoZip Token Service or blockchain. Uses the same sorted pair hashing algorithm
398
398
  * as OpenZeppelin's MerkleProof library, ensuring compatibility with on-chain
399
399
  * verification.
400
400
  *
@@ -424,4 +424,4 @@ export declare function getMetadataFileNames(): string[];
424
424
  * ```
425
425
  */
426
426
  export declare function verifyMerkleProofLocal(digest: string, batchMerkleRoot: string, merkleProof: string[]): boolean;
427
- //# sourceMappingURL=ZipstampServerAPI.d.ts.map
427
+ //# sourceMappingURL=TokenServiceAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenServiceAPI.d.ts","sourceRoot":"","sources":["../../src/token-service/TokenServiceAPI.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAMzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG/D,eAAO,MAAM,UAAU;;;CAA6B,CAAC;AAErD;;;GAGG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,cAAc,CAAC;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KAC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U,EAClB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAcnC;AAOD;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,mBAAmB,GAAG,IAAI,CAoBjF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,YAAY,CAYpE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAuB9F;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAWT"}
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  /**
3
3
  * ======================================
4
- * ZipstampServerAPI.ts - Zipstamp Server API Integration
4
+ * TokenServiceAPI.ts - NeoZip Token Service API integration
5
5
  * ======================================
6
6
  *
7
- * This module provides timestamping functionality using the Zipstamp server API,
7
+ * This module provides timestamping functionality using the NeoZip Token Service API,
8
8
  * similar to OpenTimestamps but using Ethereum blockchain.
9
9
  *
10
10
  * Key Features:
11
- * - Ethereum blockchain timestamping via Zipstamp server
11
+ * - Ethereum blockchain timestamping via NeoZip Token Service
12
12
  * - Merkle root calculation and verification
13
13
  * - ZIP file integration for timestamp metadata
14
14
  * - Support for immediate, batched, and transferable modes
15
15
  *
16
- * @fileoverview Zipstamp server API utilities for blockchain timestamping
16
+ * @fileoverview NeoZip Token Service API utilities for blockchain timestamping
17
17
  * @author NeoWare Inc.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -35,7 +35,7 @@ const servers_1 = require("../constants/servers");
35
35
  const metadata_1 = require("../constants/metadata");
36
36
  const crc32_1 = require("../utils/crc32");
37
37
  const ethers_1 = require("ethers");
38
- const ZipstampServerHelpers_1 = require("./ZipstampServerHelpers");
38
+ const TokenServiceHelpers_1 = require("./TokenServiceHelpers");
39
39
  exports.CMP_METHOD = { STORED: 0, DEFLATED: 8 };
40
40
  /**
41
41
  * Safely extracts merkle root from a ZIP file.
@@ -121,9 +121,9 @@ async function extractTimestampData(zip, entry) {
121
121
  }
122
122
  }
123
123
  /**
124
- * Creates a timestamp by submitting a merkle root to the Zipstamp server.
124
+ * Creates a timestamp by submitting a merkle root to the NeoZip Token Service.
125
125
  *
126
- * Submits a SHA-256 digest (merkle root) to the Zipstamp server API for blockchain
126
+ * Submits a SHA-256 digest (merkle root) to the NeoZip Token Service API for blockchain
127
127
  * timestamping. The digest is typically the merkle root of a ZIP file's contents.
128
128
  *
129
129
  * The function uses `submitDigest` internally and converts the response to a
@@ -132,7 +132,7 @@ async function extractTimestampData(zip, entry) {
132
132
  * @param merkleRoot - A 64-character hexadecimal string representing the SHA-256 hash
133
133
  * @param options - Configuration options for timestamp creation
134
134
  * @param options.recipientEmail - Optional email address for notifications
135
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
135
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
136
136
  * @param options.debug - Enable debug logging (defaults to `false`)
137
137
  * @param options.mode - **Deprecated**: For backward compatibility only, not sent to API
138
138
  * @param options.recipientAddress - **Deprecated**: For backward compatibility only, not sent to API
@@ -159,24 +159,24 @@ async function createTimestamp(merkleRoot, options = {}) {
159
159
  throw new Error('Invalid merkle root format. Must be a 64-character hex string (SHA-256)');
160
160
  }
161
161
  try {
162
- const serverUrl = (0, servers_1.getZipStampServerUrl)(options);
162
+ const serverUrl = (0, servers_1.getTokenServiceUrl)(options);
163
163
  if (options.debug) {
164
- console.log('[Zipstamp Server API] ========================================');
165
- console.log('[Zipstamp Server API] Creating Timestamp');
166
- console.log('[Zipstamp Server API] ========================================');
167
- console.log('[Zipstamp Server API] Server URL:', serverUrl);
168
- console.log('[Zipstamp Server API] Merkle Root:', merkleRoot);
169
- console.log('[Zipstamp Server API] ----------------------------------------');
164
+ console.log('[TokenService] ========================================');
165
+ console.log('[TokenService] Creating Timestamp');
166
+ console.log('[TokenService] ========================================');
167
+ console.log('[TokenService] Server URL:', serverUrl);
168
+ console.log('[TokenService] Merkle Root:', merkleRoot);
169
+ console.log('[TokenService] ----------------------------------------');
170
170
  }
171
171
  // Use submitDigest helper (only digest, email, and chainId are sent to API)
172
172
  // Note: mode, recipientAddress, and metadata options are for backward compatibility
173
- // but are not actually sent to the Zipstamp server API
174
- const response = await (0, ZipstampServerHelpers_1.submitDigest)(merkleRoot, options.recipientEmail, undefined, // chainId - let server determine
173
+ // but are not actually sent to the NeoZip Token Service API
174
+ const response = await (0, TokenServiceHelpers_1.submitDigest)(merkleRoot, options.recipientEmail, undefined, // chainId - let server determine
175
175
  { serverUrl, debug: options.debug });
176
176
  if (!response.success) {
177
177
  const errorMsg = response.error || 'Failed to create timestamp';
178
178
  if (options.debug) {
179
- console.error('[Zipstamp Server API] Error in response:', errorMsg);
179
+ console.error('[TokenService] Error in response:', errorMsg);
180
180
  }
181
181
  throw new Error(errorMsg);
182
182
  }
@@ -204,37 +204,37 @@ async function createTimestamp(merkleRoot, options = {}) {
204
204
  submittedAt: new Date().toISOString(),
205
205
  };
206
206
  if (options.debug) {
207
- console.log('[Zipstamp Server API] Processed Timestamp Metadata:');
207
+ console.log('[TokenService] Processed Timestamp Metadata:');
208
208
  console.log(JSON.stringify(timestampMetadata, null, 2));
209
- console.log('[Zipstamp Server API] ========================================\n');
209
+ console.log('[TokenService] ========================================\n');
210
210
  }
211
211
  return timestampMetadata;
212
212
  }
213
213
  catch (error) {
214
214
  if (options.debug) {
215
- console.error('[Zipstamp Server API] ========================================');
216
- console.error('[Zipstamp Server API] Error creating timestamp:');
217
- console.error('[Zipstamp Server API]', error instanceof Error ? error.message : String(error));
215
+ console.error('[TokenService] ========================================');
216
+ console.error('[TokenService] Error creating timestamp:');
217
+ console.error('[TokenService]', error instanceof Error ? error.message : String(error));
218
218
  if (error instanceof Error && error.stack) {
219
- console.error('[Zipstamp Server API] Stack trace:');
219
+ console.error('[TokenService] Stack trace:');
220
220
  console.error(error.stack);
221
221
  }
222
- console.error('[Zipstamp Server API] ========================================\n');
222
+ console.error('[TokenService] ========================================\n');
223
223
  }
224
224
  throw error;
225
225
  }
226
226
  }
227
227
  /**
228
- * Verifies a timestamp against the Zipstamp server.
228
+ * Verifies a timestamp against the NeoZip Token Service.
229
229
  *
230
230
  * Verifies that a timestamp has been confirmed on the blockchain by checking
231
- * with the Zipstamp server API. Uses `verifyDigest` internally and converts the
231
+ * with the NeoZip Token Service API. Uses `verifyDigest` internally and converts the
232
232
  * response to an `EthTimestampVerifyResult` format.
233
233
  *
234
234
  * @param merkleRoot - The SHA-256 digest (merkle root) to verify
235
235
  * @param timestampData - The timestamp metadata from the ZIP file (contains batchId, chainId, etc.)
236
236
  * @param options - Configuration options for verification
237
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
237
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
238
238
  * @param options.debug - Enable debug logging (defaults to `false`)
239
239
  * @returns Promise resolving to verification result with status and blockchain details
240
240
  *
@@ -255,25 +255,25 @@ async function createTimestamp(merkleRoot, options = {}) {
255
255
  */
256
256
  async function verifyTimestamp(merkleRoot, timestampData, options = {}) {
257
257
  try {
258
- const serverUrl = (0, servers_1.getZipStampServerUrl)(options);
258
+ const serverUrl = (0, servers_1.getTokenServiceUrl)(options);
259
259
  if (options.debug) {
260
- console.log('[Zipstamp Server API] ========================================');
261
- console.log('[Zipstamp Server API] Verifying Timestamp');
262
- console.log('[Zipstamp Server API] ========================================');
263
- console.log('[Zipstamp Server API] Server URL:', serverUrl);
264
- console.log('[Zipstamp Server API] Merkle Root:', merkleRoot);
265
- console.log('[Zipstamp Server API] Timestamp Data:');
260
+ console.log('[TokenService] ========================================');
261
+ console.log('[TokenService] Verifying Timestamp');
262
+ console.log('[TokenService] ========================================');
263
+ console.log('[TokenService] Server URL:', serverUrl);
264
+ console.log('[TokenService] Merkle Root:', merkleRoot);
265
+ console.log('[TokenService] Timestamp Data:');
266
266
  console.log(JSON.stringify(timestampData, null, 2));
267
- console.log('[Zipstamp Server API] ----------------------------------------');
267
+ console.log('[TokenService] ----------------------------------------');
268
268
  }
269
269
  // Use verifyDigest helper
270
- const response = await (0, ZipstampServerHelpers_1.verifyDigest)(merkleRoot, timestampData.chainId, timestampData.batchId || undefined, undefined, // client - use default
270
+ const response = await (0, TokenServiceHelpers_1.verifyDigest)(merkleRoot, timestampData.chainId, timestampData.batchId || undefined, undefined, // client - use default
271
271
  { serverUrl, debug: options.debug });
272
272
  if (!response.success) {
273
273
  const errorMsg = response.error || 'Verification failed';
274
274
  if (options.debug) {
275
- console.error('[Zipstamp Server API] Error in response:', errorMsg);
276
- console.log('[Zipstamp Server API] ========================================\n');
275
+ console.error('[TokenService] Error in response:', errorMsg);
276
+ console.log('[TokenService] ========================================\n');
277
277
  }
278
278
  return {
279
279
  status: 'error',
@@ -293,9 +293,9 @@ async function verifyTimestamp(merkleRoot, timestampData, options = {}) {
293
293
  timestamp: response.timestamp,
294
294
  };
295
295
  if (options.debug) {
296
- console.log('[Zipstamp Server API] Verification Result (VALID):');
296
+ console.log('[TokenService] Verification Result (VALID):');
297
297
  console.log(JSON.stringify(result, null, 2));
298
- console.log('[Zipstamp Server API] ========================================\n');
298
+ console.log('[TokenService] ========================================\n');
299
299
  }
300
300
  return result;
301
301
  }
@@ -306,9 +306,9 @@ async function verifyTimestamp(merkleRoot, timestampData, options = {}) {
306
306
  message: 'Timestamp is pending confirmation',
307
307
  };
308
308
  if (options.debug) {
309
- console.log('[Zipstamp Server API] Verification Result (PENDING):');
309
+ console.log('[TokenService] Verification Result (PENDING):');
310
310
  console.log(JSON.stringify(pendingResult, null, 2));
311
- console.log('[Zipstamp Server API] ========================================\n');
311
+ console.log('[TokenService] ========================================\n');
312
312
  }
313
313
  return pendingResult;
314
314
  }
@@ -318,14 +318,14 @@ async function verifyTimestamp(merkleRoot, timestampData, options = {}) {
318
318
  message: error instanceof Error ? error.message : 'Verification error',
319
319
  };
320
320
  if (options.debug) {
321
- console.error('[Zipstamp Server API] ========================================');
322
- console.error('[Zipstamp Server API] Error during verification:');
323
- console.error('[Zipstamp Server API]', error instanceof Error ? error.message : String(error));
321
+ console.error('[TokenService] ========================================');
322
+ console.error('[TokenService] Error during verification:');
323
+ console.error('[TokenService]', error instanceof Error ? error.message : String(error));
324
324
  if (error instanceof Error && error.stack) {
325
- console.error('[Zipstamp Server API] Stack trace:');
325
+ console.error('[TokenService] Stack trace:');
326
326
  console.error(error.stack);
327
327
  }
328
- console.error('[Zipstamp Server API] ========================================\n');
328
+ console.error('[TokenService] ========================================\n');
329
329
  }
330
330
  return errorResult;
331
331
  }
@@ -334,12 +334,12 @@ async function verifyTimestamp(merkleRoot, timestampData, options = {}) {
334
334
  * Verifies a timestamp within a ZIP file.
335
335
  *
336
336
  * Extracts the merkle root and timestamp metadata from a ZIP file, then verifies
337
- * the timestamp against the Zipstamp server API. This is a convenience function that
337
+ * the timestamp against the NeoZip Token Service API. This is a convenience function that
338
338
  * combines `getEthTimestampEntry`, `extractTimestampData`, and `verifyTimestamp`.
339
339
  *
340
340
  * @param zip - A ZipkitLike instance representing the timestamped ZIP file
341
341
  * @param options - Configuration options for verification
342
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
342
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
343
343
  * @param options.debug - Enable debug logging (defaults to `false`)
344
344
  * @returns Promise resolving to verification result
345
345
  *
@@ -439,7 +439,7 @@ function createTimestampMetadataEntry(zipkit, timestampMetadata) {
439
439
  /**
440
440
  * Creates timestamp metadata for a ZIP file.
441
441
  *
442
- * Extracts the merkle root from a ZIP file and submits it to the Zipstamp server
442
+ * Extracts the merkle root from a ZIP file and submits it to the NeoZip Token Service
443
443
  * for timestamping. Returns the timestamp metadata that can then be added to
444
444
  * the ZIP file using `createTimestampMetadataEntry`.
445
445
  *
@@ -450,7 +450,7 @@ function createTimestampMetadataEntry(zipkit, timestampMetadata) {
450
450
  * @param zipkit - A ZipkitLike instance representing the ZIP file to timestamp
451
451
  * @param options - Configuration options for timestamp creation
452
452
  * @param options.recipientEmail - Optional email address for notifications
453
- * @param options.serverUrl - Optional Zipstamp server URL (defaults to `ZIPSTAMP_SERVER_URL` env var or `https://zipstamp-dev.neozip.io`)
453
+ * @param options.serverUrl - Optional NeoZip Token Service URL (defaults to `TOKEN_SERVICE_URL` env var or `https://testnet.token-service.neozip.io`)
454
454
  * @param options.debug - Enable debug logging (defaults to `false`)
455
455
  * @returns Promise resolving to timestamp metadata, or `null` if creation fails
456
456
  * @throws {Error} If merkle root is not found in ZIP or timestamp creation fails
@@ -626,9 +626,9 @@ function getMetadataFileNames() {
626
626
  // Proof Verification Utilities
627
627
  // ============================================================================
628
628
  /**
629
- * Proof verification utilities for Zipstamp server timestamps.
629
+ * Proof verification utilities for NeoZip Token Service timestamps.
630
630
  *
631
- * The Zipstamp server provides merkle proofs as an array of bytes32 hex strings.
631
+ * The NeoZip Token Service provides merkle proofs as an array of bytes32 hex strings.
632
632
  * This module provides local proof verification in the same style as
633
633
  * OpenZeppelin's MerkleProof (sorted pair hashing).
634
634
  */
@@ -651,7 +651,7 @@ function hashPair(a, b) {
651
651
  * Verifies a Merkle proof locally using sorted pair hashing (keccak256).
652
652
  *
653
653
  * Performs local verification of a Merkle proof without requiring access to
654
- * the Zipstamp server or blockchain. Uses the same sorted pair hashing algorithm
654
+ * the NeoZip Token Service or blockchain. Uses the same sorted pair hashing algorithm
655
655
  * as OpenZeppelin's MerkleProof library, ensuring compatibility with on-chain
656
656
  * verification.
657
657
  *
@@ -693,4 +693,4 @@ function verifyMerkleProofLocal(digest, batchMerkleRoot, merkleProof) {
693
693
  return false;
694
694
  }
695
695
  }
696
- //# sourceMappingURL=ZipstampServerAPI.js.map
696
+ //# sourceMappingURL=TokenServiceAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenServiceAPI.js","sourceRoot":"","sources":["../../src/token-service/TokenServiceAPI.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAkGH,oDAeC;AAwBD,oDAgBC;AAoCD,0CAoFC;AA+BD,0CA+FC;AAmCD,oDA4BC;AA4BD,oEA6BC;AAuCD,oDAiBC;AAwDD,8CAoBC;AAuBD,0CAYC;AAwBD,sCAuBC;AAqBD,oDAEC;AAiED,wDAeC;AAj0BD,iDAAwE;AACxE,kDAA0D;AAC1D,oDAAuE;AACvE,0CAAuC;AACvC,mCAAgC;AAEhC,+DAAmE;AAEtD,QAAA,UAAU,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AAyDrD;;GAEG;AACH,SAAS,iBAAiB,CAAC,GAAe;IACxC,IA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