neozipkit 0.1.1 → 0.2.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.
Files changed (115) hide show
  1. package/README.md +52 -105
  2. package/contracts/INTEGRATION.md +338 -0
  3. package/contracts/NETWORKS.md +156 -0
  4. package/contracts/README.md +152 -0
  5. package/{src/server/blockchain → contracts}/constants.ts +5 -22
  6. package/contracts/deploy-bytecode.mjs +94 -0
  7. package/dist/blockchain/ZipKitMinter.d.ts +106 -0
  8. package/dist/blockchain/ZipKitMinter.js +347 -0
  9. package/dist/blockchain/ZipKitNFT.d.ts +3 -0
  10. package/dist/blockchain/ZipKitNFT.js +7 -0
  11. package/dist/blockchain/ZipKitOTS.d.ts +135 -0
  12. package/dist/blockchain/ZipKitOTS.js +564 -0
  13. package/dist/blockchain/ZipKitVerifier.d.ts +69 -0
  14. package/dist/blockchain/ZipKitVerifier.js +289 -0
  15. package/dist/{server/blockchain/WalletAnalyzer.d.ts → blockchain/ZipKitWallet.d.ts} +31 -43
  16. package/dist/{server/blockchain/WalletAnalyzer.js → blockchain/ZipKitWallet.js} +193 -161
  17. package/dist/blockchain/contracts.d.ts +14 -0
  18. package/dist/blockchain/contracts.js +77 -0
  19. package/dist/blockchain/index.d.ts +7 -0
  20. package/dist/blockchain/index.js +50 -0
  21. package/dist/{server/blockchain → blockchain}/types.d.ts +12 -34
  22. package/dist/{server/blockchain → blockchain}/types.js +1 -22
  23. package/dist/browser-index.d.ts +0 -3
  24. package/dist/browser-index.js +4 -5
  25. package/dist/browser.d.ts +0 -3
  26. package/dist/browser.js +4 -5
  27. package/dist/index.d.ts +8 -15
  28. package/dist/index.js +12 -24
  29. package/dist/server/{platform/server/ZipKitServer.d.ts → ZipKitServer.d.ts} +4 -35
  30. package/dist/server/{platform/server/ZipKitServer.js → ZipKitServer.js} +55 -182
  31. package/dist/shared/ZipEntry.js +1 -1
  32. package/dist/shared/ZipKit.d.ts +0 -6
  33. package/dist/shared/ZipKit.js +1 -18
  34. package/dist/shared/types.js +2 -2
  35. package/dist/shared/version.d.ts +2 -4
  36. package/dist/shared/version.js +4 -5
  37. package/package.json +13 -3
  38. package/src/blockchain/README.md +229 -0
  39. package/src/blockchain/ZipKitMinter.ts +470 -0
  40. package/src/blockchain/ZipKitNFT.ts +12 -0
  41. package/src/blockchain/ZipKitOTS.ts +622 -0
  42. package/src/blockchain/ZipKitVerifier.ts +382 -0
  43. package/src/blockchain/ZipKitWallet.ts +338 -0
  44. package/src/blockchain/contracts.ts +88 -0
  45. package/src/blockchain/index.ts +61 -0
  46. package/src/blockchain/types.ts +91 -0
  47. package/src/browser/{TokenVerifierBrowser.ts → TokenVerifierBrowser.ts-remove} +1 -1
  48. package/src/browser-index.ts +3 -3
  49. package/src/index.ts +10 -17
  50. package/src/server/README.md +25 -0
  51. package/src/server/ZipKitServer.ts +305 -0
  52. package/src/shared/ZipEntry.ts +1 -1
  53. package/src/shared/ZipKit.ts +1 -19
  54. package/src/shared/types.ts +3 -3
  55. package/src/shared/version.ts +3 -4
  56. package/src/types/modules.d.ts +11 -1
  57. package/contracts/Lock.sol +0 -34
  58. package/contracts/compile-contract.js +0 -168
  59. package/contracts/deploy/deploy-both-contracts.js +0 -286
  60. package/contracts/deploy/deploy-enhanced-contract.js +0 -197
  61. package/contracts/deploy/deploy-private-contract.js +0 -190
  62. package/contracts/deploy/deploy-public-clean.js +0 -1063
  63. package/contracts/deploy/deploy-public-contract.js +0 -1107
  64. package/contracts/deployment.config.example.js +0 -25
  65. package/contracts/remix-compile.js +0 -222
  66. package/contracts/setup-deployment.js +0 -51
  67. package/contracts/src/ZipFileNFT-DEPRECATED-6field.sol +0 -260
  68. package/contracts/src/ZipFileNFT-DEPRECATED-Enhanced.sol +0 -289
  69. package/dist/browser/CertificateGeneratorBrowser.d.ts +0 -75
  70. package/dist/browser/CertificateGeneratorBrowser.js +0 -433
  71. package/dist/browser/TokenVerifierBrowser.d.ts +0 -76
  72. package/dist/browser/TokenVerifierBrowser.js +0 -299
  73. package/dist/server/blockchain/NFTMinter.d.ts +0 -41
  74. package/dist/server/blockchain/NFTMinter.js +0 -323
  75. package/dist/server/blockchain/TokenQuerier.d.ts +0 -31
  76. package/dist/server/blockchain/TokenQuerier.js +0 -259
  77. package/dist/server/blockchain/TokenVerifier.d.ts +0 -20
  78. package/dist/server/blockchain/TokenVerifier.js +0 -395
  79. package/dist/server/blockchain/WalletFormatter.d.ts +0 -39
  80. package/dist/server/blockchain/WalletFormatter.js +0 -196
  81. package/dist/server/blockchain/WalletManager.d.ts +0 -46
  82. package/dist/server/blockchain/WalletManager.js +0 -294
  83. package/dist/server/blockchain/ZipMetadata.d.ts +0 -27
  84. package/dist/server/blockchain/ZipMetadata.js +0 -131
  85. package/dist/server/blockchain/ZipTokenProcessor.d.ts +0 -44
  86. package/dist/server/blockchain/ZipTokenProcessor.js +0 -204
  87. package/dist/server/blockchain/constants.d.ts +0 -102
  88. package/dist/server/blockchain/constants.js +0 -968
  89. package/dist/server/blockchain/index.d.ts +0 -9
  90. package/dist/server/blockchain/index.js +0 -44
  91. package/dist/server/blockchain/test-certificate.d.ts +0 -8
  92. package/dist/server/blockchain/test-certificate.js +0 -100
  93. package/dist/server/platform/servercomponents/ZipKitOTS.d.ts +0 -91
  94. package/dist/server/platform/servercomponents/ZipKitOTS.js +0 -271
  95. package/examples/unzip-token.ts +0 -488
  96. package/examples/zip-token.ts +0 -604
  97. package/src/server/blockchain/NFTMinter.ts +0 -357
  98. package/src/server/blockchain/TokenQuerier.ts +0 -287
  99. package/src/server/blockchain/TokenVerifier.ts +0 -453
  100. package/src/server/blockchain/WalletAnalyzer.ts +0 -397
  101. package/src/server/blockchain/WalletFormatter.ts +0 -206
  102. package/src/server/blockchain/WalletManager.ts +0 -294
  103. package/src/server/blockchain/ZipMetadata.ts +0 -117
  104. package/src/server/blockchain/ZipTokenProcessor.ts +0 -234
  105. package/src/server/blockchain/index.ts +0 -42
  106. package/src/server/blockchain/test-certificate.ts +0 -137
  107. package/src/server/blockchain/types.ts +0 -134
  108. package/src/server/platform/server/ZipKitServer.ts +0 -459
  109. package/src/server/platform/servercomponents/ZipKitOTS.ts +0 -313
  110. package/src/server/platform/servercomponents/opentimestamps.d.ts +0 -23
  111. /package/contracts/{bytecode.txt → NZIP-NFT-bytecode.txt} +0 -0
  112. /package/dist/{server/blockchain → blockchain}/CertificateToken.d.ts +0 -0
  113. /package/dist/{server/blockchain → blockchain}/CertificateToken.js +0 -0
  114. /package/src/{server/blockchain → blockchain}/CertificateToken.ts +0 -0
  115. /package/src/browser/{CertificateGeneratorBrowser.ts → CertificateGeneratorBrowser.ts-remove} +0 -0
@@ -1,968 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CURRENT_DEPLOYMENT = exports.NETWORK_CONFIG = exports.NZIP_CONTRACT_ABI = exports.DEPRECATED_CONTRACTS = exports.CONTRACT_ADDRESSES = void 0;
4
- exports.getNZipContractAddress = getNZipContractAddress;
5
- /**
6
- * Contract addresses for different networks
7
- */
8
- exports.CONTRACT_ADDRESSES = {
9
- NZIP_NFT: {
10
- 84532: "0xFD76a5d420704F34d84b0767961835c43D7b30a8", // Current v2.0 contract
11
- 8453: "", // To be configured when deploying to mainnet
12
- 1: "", // Ethereum Mainnet
13
- 11155111: "", // Sepolia Testnet
14
- 137: "", // Polygon
15
- 42161: "", // Arbitrum
16
- }
17
- };
18
- /**
19
- * Deprecated contract addresses (no longer in use)
20
- */
21
- exports.DEPRECATED_CONTRACTS = {
22
- NZIP_NFT_V1: {
23
- 84532: "0xb78CB3bcC788fca38c731b1E9D70CF60b04CA015", // DEPRECATED v1.0
24
- }
25
- };
26
- /**
27
- * Complete NZIP NFT Contract v2.0 ABI
28
- * This is the full ABI from Remix compilation used by the current deployment
29
- */
30
- exports.NZIP_CONTRACT_ABI = [
31
- {
32
- "inputs": [],
33
- "stateMutability": "nonpayable",
34
- "type": "constructor"
35
- },
36
- {
37
- "inputs": [
38
- {
39
- "internalType": "address",
40
- "name": "sender",
41
- "type": "address"
42
- },
43
- {
44
- "internalType": "uint256",
45
- "name": "tokenId",
46
- "type": "uint256"
47
- },
48
- {
49
- "internalType": "address",
50
- "name": "owner",
51
- "type": "address"
52
- }
53
- ],
54
- "name": "ERC721IncorrectOwner",
55
- "type": "error"
56
- },
57
- {
58
- "inputs": [
59
- {
60
- "internalType": "address",
61
- "name": "operator",
62
- "type": "address"
63
- },
64
- {
65
- "internalType": "uint256",
66
- "name": "tokenId",
67
- "type": "uint256"
68
- }
69
- ],
70
- "name": "ERC721InsufficientApproval",
71
- "type": "error"
72
- },
73
- {
74
- "inputs": [
75
- {
76
- "internalType": "address",
77
- "name": "approver",
78
- "type": "address"
79
- }
80
- ],
81
- "name": "ERC721InvalidApprover",
82
- "type": "error"
83
- },
84
- {
85
- "inputs": [
86
- {
87
- "internalType": "address",
88
- "name": "operator",
89
- "type": "address"
90
- }
91
- ],
92
- "name": "ERC721InvalidOperator",
93
- "type": "error"
94
- },
95
- {
96
- "inputs": [
97
- {
98
- "internalType": "address",
99
- "name": "owner",
100
- "type": "address"
101
- }
102
- ],
103
- "name": "ERC721InvalidOwner",
104
- "type": "error"
105
- },
106
- {
107
- "inputs": [
108
- {
109
- "internalType": "address",
110
- "name": "receiver",
111
- "type": "address"
112
- }
113
- ],
114
- "name": "ERC721InvalidReceiver",
115
- "type": "error"
116
- },
117
- {
118
- "inputs": [
119
- {
120
- "internalType": "address",
121
- "name": "sender",
122
- "type": "address"
123
- }
124
- ],
125
- "name": "ERC721InvalidSender",
126
- "type": "error"
127
- },
128
- {
129
- "inputs": [
130
- {
131
- "internalType": "uint256",
132
- "name": "tokenId",
133
- "type": "uint256"
134
- }
135
- ],
136
- "name": "ERC721NonexistentToken",
137
- "type": "error"
138
- },
139
- {
140
- "inputs": [
141
- {
142
- "internalType": "address",
143
- "name": "owner",
144
- "type": "address"
145
- }
146
- ],
147
- "name": "OwnableInvalidOwner",
148
- "type": "error"
149
- },
150
- {
151
- "inputs": [
152
- {
153
- "internalType": "address",
154
- "name": "account",
155
- "type": "address"
156
- }
157
- ],
158
- "name": "OwnableUnauthorizedAccount",
159
- "type": "error"
160
- },
161
- {
162
- "anonymous": false,
163
- "inputs": [
164
- {
165
- "indexed": true,
166
- "internalType": "address",
167
- "name": "owner",
168
- "type": "address"
169
- },
170
- {
171
- "indexed": true,
172
- "internalType": "address",
173
- "name": "approved",
174
- "type": "address"
175
- },
176
- {
177
- "indexed": true,
178
- "internalType": "uint256",
179
- "name": "tokenId",
180
- "type": "uint256"
181
- }
182
- ],
183
- "name": "Approval",
184
- "type": "event"
185
- },
186
- {
187
- "anonymous": false,
188
- "inputs": [
189
- {
190
- "indexed": true,
191
- "internalType": "address",
192
- "name": "owner",
193
- "type": "address"
194
- },
195
- {
196
- "indexed": true,
197
- "internalType": "address",
198
- "name": "operator",
199
- "type": "address"
200
- },
201
- {
202
- "indexed": false,
203
- "internalType": "bool",
204
- "name": "approved",
205
- "type": "bool"
206
- }
207
- ],
208
- "name": "ApprovalForAll",
209
- "type": "event"
210
- },
211
- {
212
- "anonymous": false,
213
- "inputs": [
214
- {
215
- "indexed": false,
216
- "internalType": "uint256",
217
- "name": "_fromTokenId",
218
- "type": "uint256"
219
- },
220
- {
221
- "indexed": false,
222
- "internalType": "uint256",
223
- "name": "_toTokenId",
224
- "type": "uint256"
225
- }
226
- ],
227
- "name": "BatchMetadataUpdate",
228
- "type": "event"
229
- },
230
- {
231
- "anonymous": false,
232
- "inputs": [
233
- {
234
- "indexed": false,
235
- "internalType": "uint256",
236
- "name": "_tokenId",
237
- "type": "uint256"
238
- }
239
- ],
240
- "name": "MetadataUpdate",
241
- "type": "event"
242
- },
243
- {
244
- "anonymous": false,
245
- "inputs": [
246
- {
247
- "indexed": true,
248
- "internalType": "address",
249
- "name": "previousOwner",
250
- "type": "address"
251
- },
252
- {
253
- "indexed": true,
254
- "internalType": "address",
255
- "name": "newOwner",
256
- "type": "address"
257
- }
258
- ],
259
- "name": "OwnershipTransferred",
260
- "type": "event"
261
- },
262
- {
263
- "anonymous": false,
264
- "inputs": [
265
- {
266
- "indexed": true,
267
- "internalType": "address",
268
- "name": "from",
269
- "type": "address"
270
- },
271
- {
272
- "indexed": true,
273
- "internalType": "address",
274
- "name": "to",
275
- "type": "address"
276
- },
277
- {
278
- "indexed": true,
279
- "internalType": "uint256",
280
- "name": "tokenId",
281
- "type": "uint256"
282
- }
283
- ],
284
- "name": "Transfer",
285
- "type": "event"
286
- },
287
- {
288
- "anonymous": false,
289
- "inputs": [
290
- {
291
- "indexed": true,
292
- "internalType": "uint256",
293
- "name": "tokenId",
294
- "type": "uint256"
295
- },
296
- {
297
- "indexed": true,
298
- "internalType": "address",
299
- "name": "creator",
300
- "type": "address"
301
- },
302
- {
303
- "indexed": false,
304
- "internalType": "string",
305
- "name": "fileName",
306
- "type": "string"
307
- },
308
- {
309
- "indexed": false,
310
- "internalType": "string",
311
- "name": "merkleRootHash",
312
- "type": "string"
313
- },
314
- {
315
- "indexed": false,
316
- "internalType": "uint256",
317
- "name": "creationTimestamp",
318
- "type": "uint256"
319
- },
320
- {
321
- "indexed": false,
322
- "internalType": "string",
323
- "name": "ipfsHash",
324
- "type": "string"
325
- },
326
- {
327
- "indexed": false,
328
- "internalType": "uint256",
329
- "name": "tokenizationTime",
330
- "type": "uint256"
331
- },
332
- {
333
- "indexed": false,
334
- "internalType": "uint256",
335
- "name": "blockNumber",
336
- "type": "uint256"
337
- }
338
- ],
339
- "name": "ZipFileTokenized",
340
- "type": "event"
341
- },
342
- {
343
- "inputs": [
344
- {
345
- "internalType": "address",
346
- "name": "to",
347
- "type": "address"
348
- },
349
- {
350
- "internalType": "uint256",
351
- "name": "tokenId",
352
- "type": "uint256"
353
- }
354
- ],
355
- "name": "approve",
356
- "outputs": [],
357
- "stateMutability": "nonpayable",
358
- "type": "function"
359
- },
360
- {
361
- "inputs": [
362
- {
363
- "internalType": "address",
364
- "name": "owner",
365
- "type": "address"
366
- }
367
- ],
368
- "name": "balanceOf",
369
- "outputs": [
370
- {
371
- "internalType": "uint256",
372
- "name": "",
373
- "type": "uint256"
374
- }
375
- ],
376
- "stateMutability": "view",
377
- "type": "function"
378
- },
379
- {
380
- "inputs": [
381
- {
382
- "internalType": "bytes32",
383
- "name": "",
384
- "type": "bytes32"
385
- }
386
- ],
387
- "name": "compositeKeyToTokenId",
388
- "outputs": [
389
- {
390
- "internalType": "uint256",
391
- "name": "",
392
- "type": "uint256"
393
- }
394
- ],
395
- "stateMutability": "view",
396
- "type": "function"
397
- },
398
- {
399
- "inputs": [
400
- {
401
- "internalType": "string",
402
- "name": "merkleRootHash",
403
- "type": "string"
404
- },
405
- {
406
- "internalType": "uint256",
407
- "name": "creationTimestamp",
408
- "type": "uint256"
409
- }
410
- ],
411
- "name": "generateCompositeKey",
412
- "outputs": [
413
- {
414
- "internalType": "bytes32",
415
- "name": "",
416
- "type": "bytes32"
417
- }
418
- ],
419
- "stateMutability": "pure",
420
- "type": "function"
421
- },
422
- {
423
- "inputs": [
424
- {
425
- "internalType": "uint256",
426
- "name": "tokenId",
427
- "type": "uint256"
428
- }
429
- ],
430
- "name": "getApproved",
431
- "outputs": [
432
- {
433
- "internalType": "address",
434
- "name": "",
435
- "type": "address"
436
- }
437
- ],
438
- "stateMutability": "view",
439
- "type": "function"
440
- },
441
- {
442
- "inputs": [
443
- {
444
- "internalType": "uint256",
445
- "name": "tokenId",
446
- "type": "uint256"
447
- }
448
- ],
449
- "name": "getBlockchainMetadata",
450
- "outputs": [
451
- {
452
- "internalType": "uint256",
453
- "name": "blockNumber",
454
- "type": "uint256"
455
- },
456
- {
457
- "internalType": "uint256",
458
- "name": "tokenizationTime",
459
- "type": "uint256"
460
- }
461
- ],
462
- "stateMutability": "view",
463
- "type": "function"
464
- },
465
- {
466
- "inputs": [
467
- {
468
- "internalType": "string",
469
- "name": "merkleRoot",
470
- "type": "string"
471
- }
472
- ],
473
- "name": "getTokensByMerkleRoot",
474
- "outputs": [
475
- {
476
- "internalType": "uint256[]",
477
- "name": "",
478
- "type": "uint256[]"
479
- }
480
- ],
481
- "stateMutability": "view",
482
- "type": "function"
483
- },
484
- {
485
- "inputs": [],
486
- "name": "getVersion",
487
- "outputs": [
488
- {
489
- "internalType": "string",
490
- "name": "",
491
- "type": "string"
492
- }
493
- ],
494
- "stateMutability": "pure",
495
- "type": "function"
496
- },
497
- {
498
- "inputs": [
499
- {
500
- "internalType": "uint256",
501
- "name": "tokenId",
502
- "type": "uint256"
503
- }
504
- ],
505
- "name": "getZipFileInfo",
506
- "outputs": [
507
- {
508
- "components": [
509
- {
510
- "internalType": "string",
511
- "name": "fileName",
512
- "type": "string"
513
- },
514
- {
515
- "internalType": "string",
516
- "name": "merkleRootHash",
517
- "type": "string"
518
- },
519
- {
520
- "internalType": "string",
521
- "name": "ipfsHash",
522
- "type": "string"
523
- },
524
- {
525
- "internalType": "address",
526
- "name": "creator",
527
- "type": "address"
528
- },
529
- {
530
- "internalType": "uint256",
531
- "name": "creationTimestamp",
532
- "type": "uint256"
533
- },
534
- {
535
- "internalType": "uint256",
536
- "name": "tokenizationTime",
537
- "type": "uint256"
538
- },
539
- {
540
- "internalType": "uint256",
541
- "name": "blockNumber",
542
- "type": "uint256"
543
- }
544
- ],
545
- "internalType": "struct ZipFileNFT.ZipFileInfo",
546
- "name": "",
547
- "type": "tuple"
548
- }
549
- ],
550
- "stateMutability": "view",
551
- "type": "function"
552
- },
553
- {
554
- "inputs": [
555
- {
556
- "internalType": "address",
557
- "name": "owner",
558
- "type": "address"
559
- },
560
- {
561
- "internalType": "address",
562
- "name": "operator",
563
- "type": "address"
564
- }
565
- ],
566
- "name": "isApprovedForAll",
567
- "outputs": [
568
- {
569
- "internalType": "bool",
570
- "name": "",
571
- "type": "bool"
572
- }
573
- ],
574
- "stateMutability": "view",
575
- "type": "function"
576
- },
577
- {
578
- "inputs": [
579
- {
580
- "internalType": "string",
581
- "name": "merkleRootHash",
582
- "type": "string"
583
- },
584
- {
585
- "internalType": "uint256",
586
- "name": "creationTimestamp",
587
- "type": "uint256"
588
- }
589
- ],
590
- "name": "isZipFileTokenized",
591
- "outputs": [
592
- {
593
- "internalType": "bool",
594
- "name": "exists",
595
- "type": "bool"
596
- },
597
- {
598
- "internalType": "uint256",
599
- "name": "tokenId",
600
- "type": "uint256"
601
- }
602
- ],
603
- "stateMutability": "view",
604
- "type": "function"
605
- },
606
- {
607
- "inputs": [],
608
- "name": "name",
609
- "outputs": [
610
- {
611
- "internalType": "string",
612
- "name": "",
613
- "type": "string"
614
- }
615
- ],
616
- "stateMutability": "view",
617
- "type": "function"
618
- },
619
- {
620
- "inputs": [],
621
- "name": "owner",
622
- "outputs": [
623
- {
624
- "internalType": "address",
625
- "name": "",
626
- "type": "address"
627
- }
628
- ],
629
- "stateMutability": "view",
630
- "type": "function"
631
- },
632
- {
633
- "inputs": [
634
- {
635
- "internalType": "uint256",
636
- "name": "tokenId",
637
- "type": "uint256"
638
- }
639
- ],
640
- "name": "ownerOf",
641
- "outputs": [
642
- {
643
- "internalType": "address",
644
- "name": "",
645
- "type": "address"
646
- }
647
- ],
648
- "stateMutability": "view",
649
- "type": "function"
650
- },
651
- {
652
- "inputs": [
653
- {
654
- "internalType": "string",
655
- "name": "fileName",
656
- "type": "string"
657
- },
658
- {
659
- "internalType": "string",
660
- "name": "merkleRootHash",
661
- "type": "string"
662
- },
663
- {
664
- "internalType": "uint256",
665
- "name": "creationTimestamp",
666
- "type": "uint256"
667
- },
668
- {
669
- "internalType": "string",
670
- "name": "ipfsHash",
671
- "type": "string"
672
- },
673
- {
674
- "internalType": "string",
675
- "name": "metadataURI",
676
- "type": "string"
677
- }
678
- ],
679
- "name": "publicMintZipFile",
680
- "outputs": [
681
- {
682
- "internalType": "uint256",
683
- "name": "",
684
- "type": "uint256"
685
- }
686
- ],
687
- "stateMutability": "nonpayable",
688
- "type": "function"
689
- },
690
- {
691
- "inputs": [],
692
- "name": "renounceOwnership",
693
- "outputs": [],
694
- "stateMutability": "nonpayable",
695
- "type": "function"
696
- },
697
- {
698
- "inputs": [
699
- {
700
- "internalType": "address",
701
- "name": "from",
702
- "type": "address"
703
- },
704
- {
705
- "internalType": "address",
706
- "name": "to",
707
- "type": "address"
708
- },
709
- {
710
- "internalType": "uint256",
711
- "name": "tokenId",
712
- "type": "uint256"
713
- }
714
- ],
715
- "name": "safeTransferFrom",
716
- "outputs": [],
717
- "stateMutability": "nonpayable",
718
- "type": "function"
719
- },
720
- {
721
- "inputs": [
722
- {
723
- "internalType": "address",
724
- "name": "from",
725
- "type": "address"
726
- },
727
- {
728
- "internalType": "address",
729
- "name": "to",
730
- "type": "address"
731
- },
732
- {
733
- "internalType": "uint256",
734
- "name": "tokenId",
735
- "type": "uint256"
736
- },
737
- {
738
- "internalType": "bytes",
739
- "name": "data",
740
- "type": "bytes"
741
- }
742
- ],
743
- "name": "safeTransferFrom",
744
- "outputs": [],
745
- "stateMutability": "nonpayable",
746
- "type": "function"
747
- },
748
- {
749
- "inputs": [
750
- {
751
- "internalType": "address",
752
- "name": "operator",
753
- "type": "address"
754
- },
755
- {
756
- "internalType": "bool",
757
- "name": "approved",
758
- "type": "bool"
759
- }
760
- ],
761
- "name": "setApprovalForAll",
762
- "outputs": [],
763
- "stateMutability": "nonpayable",
764
- "type": "function"
765
- },
766
- {
767
- "inputs": [
768
- {
769
- "internalType": "bytes4",
770
- "name": "interfaceId",
771
- "type": "bytes4"
772
- }
773
- ],
774
- "name": "supportsInterface",
775
- "outputs": [
776
- {
777
- "internalType": "bool",
778
- "name": "",
779
- "type": "bool"
780
- }
781
- ],
782
- "stateMutability": "view",
783
- "type": "function"
784
- },
785
- {
786
- "inputs": [],
787
- "name": "symbol",
788
- "outputs": [
789
- {
790
- "internalType": "string",
791
- "name": "",
792
- "type": "string"
793
- }
794
- ],
795
- "stateMutability": "view",
796
- "type": "function"
797
- },
798
- {
799
- "inputs": [
800
- {
801
- "internalType": "uint256",
802
- "name": "tokenId",
803
- "type": "uint256"
804
- }
805
- ],
806
- "name": "tokenURI",
807
- "outputs": [
808
- {
809
- "internalType": "string",
810
- "name": "",
811
- "type": "string"
812
- }
813
- ],
814
- "stateMutability": "view",
815
- "type": "function"
816
- },
817
- {
818
- "inputs": [],
819
- "name": "totalSupply",
820
- "outputs": [
821
- {
822
- "internalType": "uint256",
823
- "name": "",
824
- "type": "uint256"
825
- }
826
- ],
827
- "stateMutability": "view",
828
- "type": "function"
829
- },
830
- {
831
- "inputs": [
832
- {
833
- "internalType": "address",
834
- "name": "from",
835
- "type": "address"
836
- },
837
- {
838
- "internalType": "address",
839
- "name": "to",
840
- "type": "address"
841
- },
842
- {
843
- "internalType": "uint256",
844
- "name": "tokenId",
845
- "type": "uint256"
846
- }
847
- ],
848
- "name": "transferFrom",
849
- "outputs": [],
850
- "stateMutability": "nonpayable",
851
- "type": "function"
852
- },
853
- {
854
- "inputs": [
855
- {
856
- "internalType": "address",
857
- "name": "newOwner",
858
- "type": "address"
859
- }
860
- ],
861
- "name": "transferOwnership",
862
- "outputs": [],
863
- "stateMutability": "nonpayable",
864
- "type": "function"
865
- },
866
- {
867
- "inputs": [
868
- {
869
- "internalType": "uint256",
870
- "name": "tokenId",
871
- "type": "uint256"
872
- },
873
- {
874
- "internalType": "string",
875
- "name": "providedMerkleRoot",
876
- "type": "string"
877
- }
878
- ],
879
- "name": "verifyZipFile",
880
- "outputs": [
881
- {
882
- "internalType": "bool",
883
- "name": "isValid",
884
- "type": "bool"
885
- }
886
- ],
887
- "stateMutability": "view",
888
- "type": "function"
889
- },
890
- {
891
- "inputs": [
892
- {
893
- "internalType": "uint256",
894
- "name": "",
895
- "type": "uint256"
896
- }
897
- ],
898
- "name": "zipFileInfo",
899
- "outputs": [
900
- {
901
- "internalType": "string",
902
- "name": "fileName",
903
- "type": "string"
904
- },
905
- {
906
- "internalType": "string",
907
- "name": "merkleRootHash",
908
- "type": "string"
909
- },
910
- {
911
- "internalType": "string",
912
- "name": "ipfsHash",
913
- "type": "string"
914
- },
915
- {
916
- "internalType": "address",
917
- "name": "creator",
918
- "type": "address"
919
- },
920
- {
921
- "internalType": "uint256",
922
- "name": "creationTimestamp",
923
- "type": "uint256"
924
- },
925
- {
926
- "internalType": "uint256",
927
- "name": "tokenizationTime",
928
- "type": "uint256"
929
- },
930
- {
931
- "internalType": "uint256",
932
- "name": "blockNumber",
933
- "type": "uint256"
934
- }
935
- ],
936
- "stateMutability": "view",
937
- "type": "function"
938
- }
939
- ];
940
- /**
941
- * Helper function to get contract address for a chain
942
- */
943
- function getNZipContractAddress(chainId) {
944
- return exports.CONTRACT_ADDRESSES.NZIP_NFT[chainId] || "";
945
- }
946
- /**
947
- * Network configurations
948
- */
949
- exports.NETWORK_CONFIG = {
950
- 1: "Ethereum Mainnet",
951
- 11155111: "Sepolia Testnet",
952
- 84532: "Base Sepolia",
953
- 8453: "Base Mainnet",
954
- 137: "Polygon",
955
- 42161: "Arbitrum",
956
- };
957
- /**
958
- * Current deployment information
959
- */
960
- exports.CURRENT_DEPLOYMENT = {
961
- version: "2.0.0",
962
- network: "Base Sepolia",
963
- chainId: 84532,
964
- address: exports.CONTRACT_ADDRESSES.NZIP_NFT[84532],
965
- deployedAt: "2024-11-29", // Update when deploying to new networks
966
- txHash: "0x7f12a5974b6e6ee6cbb8bc6068b6d784fcc448a6fc567d1cc8a34b98a48efd9f",
967
- explorer: "https://sepolia.basescan.org/address/0xFD76a5d420704F34d84b0767961835c43D7b30a8"
968
- };