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.
- package/README.md +52 -105
- package/contracts/INTEGRATION.md +338 -0
- package/contracts/NETWORKS.md +156 -0
- package/contracts/README.md +152 -0
- package/{src/server/blockchain → contracts}/constants.ts +5 -22
- package/contracts/deploy-bytecode.mjs +94 -0
- package/dist/blockchain/ZipKitMinter.d.ts +106 -0
- package/dist/blockchain/ZipKitMinter.js +347 -0
- package/dist/blockchain/ZipKitNFT.d.ts +3 -0
- package/dist/blockchain/ZipKitNFT.js +7 -0
- package/dist/blockchain/ZipKitOTS.d.ts +135 -0
- package/dist/blockchain/ZipKitOTS.js +564 -0
- package/dist/blockchain/ZipKitVerifier.d.ts +69 -0
- package/dist/blockchain/ZipKitVerifier.js +289 -0
- package/dist/{server/blockchain/WalletAnalyzer.d.ts → blockchain/ZipKitWallet.d.ts} +31 -43
- package/dist/{server/blockchain/WalletAnalyzer.js → blockchain/ZipKitWallet.js} +193 -161
- package/dist/blockchain/contracts.d.ts +14 -0
- package/dist/blockchain/contracts.js +77 -0
- package/dist/blockchain/index.d.ts +7 -0
- package/dist/blockchain/index.js +50 -0
- package/dist/{server/blockchain → blockchain}/types.d.ts +12 -34
- package/dist/{server/blockchain → blockchain}/types.js +1 -22
- package/dist/browser-index.d.ts +0 -3
- package/dist/browser-index.js +4 -5
- package/dist/browser.d.ts +0 -3
- package/dist/browser.js +4 -5
- package/dist/index.d.ts +8 -15
- package/dist/index.js +12 -24
- package/dist/server/{platform/server/ZipKitServer.d.ts → ZipKitServer.d.ts} +4 -35
- package/dist/server/{platform/server/ZipKitServer.js → ZipKitServer.js} +55 -182
- package/dist/shared/ZipEntry.js +1 -1
- package/dist/shared/ZipKit.d.ts +0 -6
- package/dist/shared/ZipKit.js +1 -18
- package/dist/shared/types.js +2 -2
- package/dist/shared/version.d.ts +2 -4
- package/dist/shared/version.js +4 -5
- package/package.json +13 -3
- package/src/blockchain/README.md +229 -0
- package/src/blockchain/ZipKitMinter.ts +470 -0
- package/src/blockchain/ZipKitNFT.ts +12 -0
- package/src/blockchain/ZipKitOTS.ts +622 -0
- package/src/blockchain/ZipKitVerifier.ts +382 -0
- package/src/blockchain/ZipKitWallet.ts +338 -0
- package/src/blockchain/contracts.ts +88 -0
- package/src/blockchain/index.ts +61 -0
- package/src/blockchain/types.ts +91 -0
- package/src/browser/{TokenVerifierBrowser.ts → TokenVerifierBrowser.ts-remove} +1 -1
- package/src/browser-index.ts +3 -3
- package/src/index.ts +10 -17
- package/src/server/README.md +25 -0
- package/src/server/ZipKitServer.ts +305 -0
- package/src/shared/ZipEntry.ts +1 -1
- package/src/shared/ZipKit.ts +1 -19
- package/src/shared/types.ts +3 -3
- package/src/shared/version.ts +3 -4
- package/src/types/modules.d.ts +11 -1
- package/contracts/Lock.sol +0 -34
- package/contracts/compile-contract.js +0 -168
- package/contracts/deploy/deploy-both-contracts.js +0 -286
- package/contracts/deploy/deploy-enhanced-contract.js +0 -197
- package/contracts/deploy/deploy-private-contract.js +0 -190
- package/contracts/deploy/deploy-public-clean.js +0 -1063
- package/contracts/deploy/deploy-public-contract.js +0 -1107
- package/contracts/deployment.config.example.js +0 -25
- package/contracts/remix-compile.js +0 -222
- package/contracts/setup-deployment.js +0 -51
- package/contracts/src/ZipFileNFT-DEPRECATED-6field.sol +0 -260
- package/contracts/src/ZipFileNFT-DEPRECATED-Enhanced.sol +0 -289
- package/dist/browser/CertificateGeneratorBrowser.d.ts +0 -75
- package/dist/browser/CertificateGeneratorBrowser.js +0 -433
- package/dist/browser/TokenVerifierBrowser.d.ts +0 -76
- package/dist/browser/TokenVerifierBrowser.js +0 -299
- package/dist/server/blockchain/NFTMinter.d.ts +0 -41
- package/dist/server/blockchain/NFTMinter.js +0 -323
- package/dist/server/blockchain/TokenQuerier.d.ts +0 -31
- package/dist/server/blockchain/TokenQuerier.js +0 -259
- package/dist/server/blockchain/TokenVerifier.d.ts +0 -20
- package/dist/server/blockchain/TokenVerifier.js +0 -395
- package/dist/server/blockchain/WalletFormatter.d.ts +0 -39
- package/dist/server/blockchain/WalletFormatter.js +0 -196
- package/dist/server/blockchain/WalletManager.d.ts +0 -46
- package/dist/server/blockchain/WalletManager.js +0 -294
- package/dist/server/blockchain/ZipMetadata.d.ts +0 -27
- package/dist/server/blockchain/ZipMetadata.js +0 -131
- package/dist/server/blockchain/ZipTokenProcessor.d.ts +0 -44
- package/dist/server/blockchain/ZipTokenProcessor.js +0 -204
- package/dist/server/blockchain/constants.d.ts +0 -102
- package/dist/server/blockchain/constants.js +0 -968
- package/dist/server/blockchain/index.d.ts +0 -9
- package/dist/server/blockchain/index.js +0 -44
- package/dist/server/blockchain/test-certificate.d.ts +0 -8
- package/dist/server/blockchain/test-certificate.js +0 -100
- package/dist/server/platform/servercomponents/ZipKitOTS.d.ts +0 -91
- package/dist/server/platform/servercomponents/ZipKitOTS.js +0 -271
- package/examples/unzip-token.ts +0 -488
- package/examples/zip-token.ts +0 -604
- package/src/server/blockchain/NFTMinter.ts +0 -357
- package/src/server/blockchain/TokenQuerier.ts +0 -287
- package/src/server/blockchain/TokenVerifier.ts +0 -453
- package/src/server/blockchain/WalletAnalyzer.ts +0 -397
- package/src/server/blockchain/WalletFormatter.ts +0 -206
- package/src/server/blockchain/WalletManager.ts +0 -294
- package/src/server/blockchain/ZipMetadata.ts +0 -117
- package/src/server/blockchain/ZipTokenProcessor.ts +0 -234
- package/src/server/blockchain/index.ts +0 -42
- package/src/server/blockchain/test-certificate.ts +0 -137
- package/src/server/blockchain/types.ts +0 -134
- package/src/server/platform/server/ZipKitServer.ts +0 -459
- package/src/server/platform/servercomponents/ZipKitOTS.ts +0 -313
- package/src/server/platform/servercomponents/opentimestamps.d.ts +0 -23
- /package/contracts/{bytecode.txt → NZIP-NFT-bytecode.txt} +0 -0
- /package/dist/{server/blockchain → blockchain}/CertificateToken.d.ts +0 -0
- /package/dist/{server/blockchain → blockchain}/CertificateToken.js +0 -0
- /package/src/{server/blockchain → blockchain}/CertificateToken.ts +0 -0
- /package/src/browser/{CertificateGeneratorBrowser.ts → CertificateGeneratorBrowser.ts-remove} +0 -0
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface NFTAttribute {
|
|
3
|
-
trait_type: string;
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
export interface NFTMetadata {
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
image: string;
|
|
10
|
-
attributes: NFTAttribute[];
|
|
11
|
-
}
|
|
1
|
+
import type { Wallet, JsonRpcProvider } from 'ethers';
|
|
12
2
|
export interface WalletInfo {
|
|
13
3
|
address: string;
|
|
14
4
|
privateKey: string;
|
|
@@ -21,18 +11,11 @@ export interface NetworkConfig {
|
|
|
21
11
|
explorerUrl: string;
|
|
22
12
|
}
|
|
23
13
|
export interface WalletSetupResult {
|
|
24
|
-
wallet:
|
|
25
|
-
provider:
|
|
14
|
+
wallet: Wallet | null;
|
|
15
|
+
provider: JsonRpcProvider | null;
|
|
26
16
|
success: boolean;
|
|
27
17
|
message?: string;
|
|
28
18
|
}
|
|
29
|
-
export interface ContractInfo {
|
|
30
|
-
address: string;
|
|
31
|
-
abi: any[];
|
|
32
|
-
network: string;
|
|
33
|
-
deployer: string;
|
|
34
|
-
deploymentTime: string;
|
|
35
|
-
}
|
|
36
19
|
export interface MintingResult {
|
|
37
20
|
success: boolean;
|
|
38
21
|
message: string;
|
|
@@ -40,30 +23,25 @@ export interface MintingResult {
|
|
|
40
23
|
txHash?: string;
|
|
41
24
|
creationTimestamp?: number;
|
|
42
25
|
}
|
|
43
|
-
export interface ZipTokenData {
|
|
44
|
-
zipFile: string;
|
|
45
|
-
merkleRoot: string;
|
|
46
|
-
fileName: string;
|
|
47
|
-
timestamp: string;
|
|
48
|
-
}
|
|
49
26
|
export interface MintingOptions {
|
|
50
27
|
wallet?: string;
|
|
51
28
|
network: string;
|
|
52
29
|
mintToken: boolean;
|
|
53
30
|
}
|
|
54
|
-
export interface
|
|
55
|
-
version: string;
|
|
31
|
+
export interface TokenMetadata {
|
|
56
32
|
tokenId: string;
|
|
57
33
|
contractAddress: string;
|
|
58
34
|
network: string;
|
|
59
|
-
networkChainId: number;
|
|
60
|
-
transactionHash: string;
|
|
61
35
|
merkleRoot: string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
creationTimestamp?: number;
|
|
36
|
+
networkChainId?: number;
|
|
37
|
+
transactionHash?: string;
|
|
65
38
|
blockNumber?: number;
|
|
39
|
+
fileName?: string;
|
|
40
|
+
archiveName?: string;
|
|
41
|
+
mintedAt?: string;
|
|
42
|
+
mintDate?: string;
|
|
43
|
+
creationTimestamp?: number;
|
|
66
44
|
ipfsHash?: string;
|
|
45
|
+
version?: string;
|
|
67
46
|
}
|
|
68
47
|
export declare const NETWORKS: Record<string, NetworkConfig>;
|
|
69
|
-
export declare const NFT_METADATA_TEMPLATE: NFTMetadata;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NETWORKS = void 0;
|
|
4
4
|
// Network configuration
|
|
5
5
|
exports.NETWORKS = {
|
|
6
6
|
'base': {
|
|
@@ -28,24 +28,3 @@ exports.NETWORKS = {
|
|
|
28
28
|
explorerUrl: 'http://localhost:8545'
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
// Token metadata constants - use TOKENIZED_METADATA from constants/Headers
|
|
32
|
-
// NFT Metadata template
|
|
33
|
-
exports.NFT_METADATA_TEMPLATE = {
|
|
34
|
-
name: "NeoZip Archive Token",
|
|
35
|
-
description: "This NFT represents ownership of a timestamped and verified ZIP archive on Base",
|
|
36
|
-
image: "", // Will be set to IPFS hash of thumbnail
|
|
37
|
-
attributes: [
|
|
38
|
-
{
|
|
39
|
-
trait_type: "Archive Hash",
|
|
40
|
-
value: "" // Will be set to the Merkle root hash of the archive
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
trait_type: "Creation Date",
|
|
44
|
-
value: "" // Will be set to timestamp
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
trait_type: "Blockchain",
|
|
48
|
-
value: "Base" // Specify Base as the blockchain
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
};
|
package/dist/browser-index.d.ts
CHANGED
|
@@ -5,9 +5,6 @@ export * from './shared/ZipKit';
|
|
|
5
5
|
export * from './shared/ZipEntry';
|
|
6
6
|
export default ZipKit;
|
|
7
7
|
export { default as ZipKitBrowser } from './browser/ZipKitBrowser';
|
|
8
|
-
export { CertificateGeneratorBrowser } from './browser/CertificateGeneratorBrowser';
|
|
9
|
-
export { TokenVerificationResult, checkForTokenization as checkForTokenizationBrowser, NZipTokenInfo } from './browser/TokenVerifierBrowser';
|
|
10
|
-
export type { TokenVerificationOptions } from './browser/TokenVerifierBrowser';
|
|
11
8
|
export { default as HashAccumulator } from './shared/components/HashAccumulator';
|
|
12
9
|
export * from './shared/components/Util';
|
|
13
10
|
export * from './shared/components/Support';
|
package/dist/browser-index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.PlatformUtils = exports.HashAccumulator = exports.
|
|
23
|
+
exports.PlatformUtils = exports.HashAccumulator = exports.ZipKitBrowser = exports.TIMESTAMP_SUBMITTED = exports.TIMESTAMP_METADATA = exports.CMP_METHOD = exports.Errors = exports.ZipEntry = void 0;
|
|
24
24
|
// Core shared exports
|
|
25
25
|
const ZipKit_1 = __importDefault(require("./shared/ZipKit"));
|
|
26
26
|
var ZipKit_2 = require("./shared/ZipKit");
|
|
@@ -35,10 +35,9 @@ exports.default = ZipKit_1.default;
|
|
|
35
35
|
// Browser-only exports
|
|
36
36
|
var ZipKitBrowser_1 = require("./browser/ZipKitBrowser");
|
|
37
37
|
Object.defineProperty(exports, "ZipKitBrowser", { enumerable: true, get: function () { return __importDefault(ZipKitBrowser_1).default; } });
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Object.defineProperty(exports, "checkForTokenizationBrowser", { enumerable: true, get: function () { return TokenVerifierBrowser_1.checkForTokenization; } });
|
|
38
|
+
// export { CertificateGeneratorBrowser } from './browser/CertificateGeneratorBrowser';
|
|
39
|
+
// export { TokenVerificationResult, checkForTokenization as checkForTokenizationBrowser, NZipTokenInfo } from './browser/TokenVerifierBrowser';
|
|
40
|
+
// export type { TokenVerificationOptions } from './browser/TokenVerifierBrowser';
|
|
42
41
|
// Shared component exports
|
|
43
42
|
var HashAccumulator_1 = require("./shared/components/HashAccumulator");
|
|
44
43
|
Object.defineProperty(exports, "HashAccumulator", { enumerable: true, get: function () { return __importDefault(HashAccumulator_1).default; } });
|
package/dist/browser.d.ts
CHANGED
|
@@ -5,9 +5,6 @@ export * from './shared/ZipKit';
|
|
|
5
5
|
export * from './shared/ZipEntry';
|
|
6
6
|
export default ZipKit;
|
|
7
7
|
export { default as ZipKitBrowser } from './browser/ZipKitBrowser';
|
|
8
|
-
export { CertificateGeneratorBrowser } from './browser/CertificateGeneratorBrowser';
|
|
9
|
-
export { TokenVerificationResult, checkForTokenization as checkForTokenizationBrowser, NZipTokenInfo } from './browser/TokenVerifierBrowser';
|
|
10
|
-
export type { TokenVerificationOptions } from './browser/TokenVerifierBrowser';
|
|
11
8
|
export { default as HashAccumulator } from './shared/components/HashAccumulator';
|
|
12
9
|
export * from './shared/components/Util';
|
|
13
10
|
export * from './shared/components/Support';
|
package/dist/browser.js
CHANGED
|
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.PlatformUtils = exports.HashAccumulator = exports.
|
|
23
|
+
exports.PlatformUtils = exports.HashAccumulator = exports.ZipKitBrowser = exports.TIMESTAMP_SUBMITTED = exports.TIMESTAMP_METADATA = exports.CMP_METHOD = exports.Errors = exports.ZipEntry = void 0;
|
|
24
24
|
// Core shared exports
|
|
25
25
|
const ZipKit_1 = __importDefault(require("./shared/ZipKit"));
|
|
26
26
|
var ZipKit_2 = require("./shared/ZipKit");
|
|
@@ -35,10 +35,9 @@ exports.default = ZipKit_1.default;
|
|
|
35
35
|
// Browser-only exports
|
|
36
36
|
var ZipKitBrowser_1 = require("./browser/ZipKitBrowser");
|
|
37
37
|
Object.defineProperty(exports, "ZipKitBrowser", { enumerable: true, get: function () { return __importDefault(ZipKitBrowser_1).default; } });
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Object.defineProperty(exports, "checkForTokenizationBrowser", { enumerable: true, get: function () { return TokenVerifierBrowser_1.checkForTokenization; } });
|
|
38
|
+
// export { CertificateGeneratorBrowser } from './browser/CertificateGeneratorBrowser';
|
|
39
|
+
// export { TokenVerificationResult, checkForTokenization as checkForTokenizationBrowser, NZipTokenInfo } from './browser/TokenVerifierBrowser';
|
|
40
|
+
// export type { TokenVerificationOptions } from './browser/TokenVerifierBrowser';
|
|
42
41
|
// Shared component exports
|
|
43
42
|
var HashAccumulator_1 = require("./shared/components/HashAccumulator");
|
|
44
43
|
Object.defineProperty(exports, "HashAccumulator", { enumerable: true, get: function () { return __importDefault(HashAccumulator_1).default; } });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export * from './shared/types';
|
|
2
|
+
export * from './shared/constants/Headers';
|
|
3
|
+
export * from './shared/constants/Errors';
|
|
4
|
+
export * from './shared/version';
|
|
5
|
+
export { NEOZIPKIT_VERSION, NEOZIPKIT_RELEASE_DATE } from './shared/version';
|
|
1
6
|
import ZipKit from './shared/ZipKit';
|
|
2
7
|
export { ZipEntry, Errors, CMP_METHOD, TIMESTAMP_METADATA, TIMESTAMP_SUBMITTED } from './shared/ZipKit';
|
|
3
8
|
export type { CompressOptions } from './shared/ZipKit';
|
|
@@ -5,24 +10,12 @@ export * from './shared/ZipKit';
|
|
|
5
10
|
export * from './shared/ZipEntry';
|
|
6
11
|
export default ZipKit;
|
|
7
12
|
export { default as ZipKitBrowser } from './browser/ZipKitBrowser';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export
|
|
11
|
-
export { default as ZipKitServer } from './server/platform/server/ZipKitServer';
|
|
12
|
-
export { verifyTimestamp, createTimestamp } from './server/platform/servercomponents/ZipKitOTS';
|
|
13
|
-
export * from './server/blockchain';
|
|
14
|
-
export { checkForTokenization as checkForTokenizationServer } from './server/blockchain/TokenVerifier';
|
|
15
|
-
export { NFTMinter } from './server/blockchain/NFTMinter';
|
|
16
|
-
export { WalletAnalyzer } from './server/blockchain/WalletAnalyzer';
|
|
17
|
-
export { WalletManager } from './server/blockchain/WalletManager';
|
|
18
|
-
export { ZipTokenProcessor } from './server/blockchain/ZipTokenProcessor';
|
|
13
|
+
export { default as ZipKitServer } from './server/ZipKitServer';
|
|
14
|
+
export { createTimestamp } from './blockchain/ZipKitOTS';
|
|
15
|
+
export * from './blockchain';
|
|
19
16
|
export { default as HashAccumulator } from './shared/components/HashAccumulator';
|
|
20
17
|
export * from './shared/components/Util';
|
|
21
18
|
export * from './shared/components/Support';
|
|
22
|
-
export * from './shared/types';
|
|
23
|
-
export * from './shared/constants/Headers';
|
|
24
|
-
export * from './shared/constants/Errors';
|
|
25
|
-
export * from './shared/version';
|
|
26
19
|
export declare const PlatformUtils: {
|
|
27
20
|
isBrowser: boolean;
|
|
28
21
|
isNode: string | false;
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.PlatformUtils = exports.HashAccumulator = exports.
|
|
23
|
+
exports.PlatformUtils = exports.HashAccumulator = exports.createTimestamp = exports.ZipKitServer = exports.ZipKitBrowser = exports.TIMESTAMP_SUBMITTED = exports.TIMESTAMP_METADATA = exports.CMP_METHOD = exports.Errors = exports.ZipEntry = exports.NEOZIPKIT_RELEASE_DATE = exports.NEOZIPKIT_VERSION = void 0;
|
|
24
|
+
// Type and constant exports
|
|
25
|
+
__exportStar(require("./shared/types"), exports);
|
|
26
|
+
__exportStar(require("./shared/constants/Headers"), exports);
|
|
27
|
+
__exportStar(require("./shared/constants/Errors"), exports);
|
|
28
|
+
__exportStar(require("./shared/version"), exports);
|
|
29
|
+
var version_1 = require("./shared/version");
|
|
30
|
+
Object.defineProperty(exports, "NEOZIPKIT_VERSION", { enumerable: true, get: function () { return version_1.NEOZIPKIT_VERSION; } });
|
|
31
|
+
Object.defineProperty(exports, "NEOZIPKIT_RELEASE_DATE", { enumerable: true, get: function () { return version_1.NEOZIPKIT_RELEASE_DATE; } });
|
|
24
32
|
// Core shared exports
|
|
25
33
|
const ZipKit_1 = __importDefault(require("./shared/ZipKit"));
|
|
26
34
|
var ZipKit_2 = require("./shared/ZipKit");
|
|
@@ -35,38 +43,18 @@ exports.default = ZipKit_1.default;
|
|
|
35
43
|
// Browser-only exports
|
|
36
44
|
var ZipKitBrowser_1 = require("./browser/ZipKitBrowser");
|
|
37
45
|
Object.defineProperty(exports, "ZipKitBrowser", { enumerable: true, get: function () { return __importDefault(ZipKitBrowser_1).default; } });
|
|
38
|
-
var CertificateGeneratorBrowser_1 = require("./browser/CertificateGeneratorBrowser");
|
|
39
|
-
Object.defineProperty(exports, "CertificateGeneratorBrowser", { enumerable: true, get: function () { return CertificateGeneratorBrowser_1.CertificateGeneratorBrowser; } });
|
|
40
|
-
var TokenVerifierBrowser_1 = require("./browser/TokenVerifierBrowser");
|
|
41
|
-
Object.defineProperty(exports, "checkForTokenizationBrowser", { enumerable: true, get: function () { return TokenVerifierBrowser_1.checkForTokenization; } });
|
|
42
46
|
// Server-only exports (now included in main build)
|
|
43
|
-
var ZipKitServer_1 = require("./server/
|
|
47
|
+
var ZipKitServer_1 = require("./server/ZipKitServer");
|
|
44
48
|
Object.defineProperty(exports, "ZipKitServer", { enumerable: true, get: function () { return __importDefault(ZipKitServer_1).default; } });
|
|
45
|
-
var ZipKitOTS_1 = require("./
|
|
46
|
-
Object.defineProperty(exports, "verifyTimestamp", { enumerable: true, get: function () { return ZipKitOTS_1.verifyTimestamp; } });
|
|
49
|
+
var ZipKitOTS_1 = require("./blockchain/ZipKitOTS");
|
|
47
50
|
Object.defineProperty(exports, "createTimestamp", { enumerable: true, get: function () { return ZipKitOTS_1.createTimestamp; } });
|
|
48
51
|
// Blockchain exports
|
|
49
|
-
__exportStar(require("./
|
|
50
|
-
var TokenVerifier_1 = require("./server/blockchain/TokenVerifier");
|
|
51
|
-
Object.defineProperty(exports, "checkForTokenizationServer", { enumerable: true, get: function () { return TokenVerifier_1.checkForTokenization; } });
|
|
52
|
-
var NFTMinter_1 = require("./server/blockchain/NFTMinter");
|
|
53
|
-
Object.defineProperty(exports, "NFTMinter", { enumerable: true, get: function () { return NFTMinter_1.NFTMinter; } });
|
|
54
|
-
var WalletAnalyzer_1 = require("./server/blockchain/WalletAnalyzer");
|
|
55
|
-
Object.defineProperty(exports, "WalletAnalyzer", { enumerable: true, get: function () { return WalletAnalyzer_1.WalletAnalyzer; } });
|
|
56
|
-
var WalletManager_1 = require("./server/blockchain/WalletManager");
|
|
57
|
-
Object.defineProperty(exports, "WalletManager", { enumerable: true, get: function () { return WalletManager_1.WalletManager; } });
|
|
58
|
-
var ZipTokenProcessor_1 = require("./server/blockchain/ZipTokenProcessor");
|
|
59
|
-
Object.defineProperty(exports, "ZipTokenProcessor", { enumerable: true, get: function () { return ZipTokenProcessor_1.ZipTokenProcessor; } });
|
|
52
|
+
__exportStar(require("./blockchain"), exports);
|
|
60
53
|
// Shared component exports
|
|
61
54
|
var HashAccumulator_1 = require("./shared/components/HashAccumulator");
|
|
62
55
|
Object.defineProperty(exports, "HashAccumulator", { enumerable: true, get: function () { return __importDefault(HashAccumulator_1).default; } });
|
|
63
56
|
__exportStar(require("./shared/components/Util"), exports);
|
|
64
57
|
__exportStar(require("./shared/components/Support"), exports);
|
|
65
|
-
// Type and constant exports
|
|
66
|
-
__exportStar(require("./shared/types"), exports);
|
|
67
|
-
__exportStar(require("./shared/constants/Headers"), exports);
|
|
68
|
-
__exportStar(require("./shared/constants/Errors"), exports);
|
|
69
|
-
__exportStar(require("./shared/version"), exports);
|
|
70
58
|
// Platform-specific conditional exports
|
|
71
59
|
exports.PlatformUtils = {
|
|
72
60
|
// Browser detection
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
* directly to the parent ZipKit class. This class provides a consistent interface
|
|
7
7
|
* for server environments and ensures all ZipKit functionality is available.
|
|
8
8
|
*/
|
|
9
|
-
import ZipKit, { CompressOptions
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
export * from '../../../shared/ZipKit';
|
|
9
|
+
import ZipKit, { CompressOptions } from '../shared/ZipKit';
|
|
10
|
+
import * as Headers from '../shared/constants/Headers';
|
|
11
|
+
export * from '../shared/ZipKit';
|
|
13
12
|
export { Headers };
|
|
14
13
|
/**
|
|
15
14
|
* This implementation is optimized for server environments and handles all
|
|
@@ -61,45 +60,15 @@ export default class ZipKitServer extends ZipKit {
|
|
|
61
60
|
*/
|
|
62
61
|
addFiles(files: string[], freshen?: boolean, update?: boolean): number;
|
|
63
62
|
/**
|
|
64
|
-
* Creates a ZIP file
|
|
65
|
-
*
|
|
66
|
-
* This method creates a ZIP file with optional OpenTimestamps (OTS) metadata,
|
|
67
|
-
* which includes a timestamp of the ZIP file's contents on the Bitcoin blockchain.
|
|
68
|
-
*
|
|
69
|
-
* @param zipFile - The path to the ZIP file to create
|
|
70
|
-
* @param compressOptions - The compression options for the ZIP file
|
|
71
|
-
* @returns void - The method triggers a download of the ZIP file
|
|
63
|
+
* Creates a ZIP file
|
|
72
64
|
*/
|
|
73
65
|
createZip(zipFile: string, compressOptions: CompressOptions): Promise<void>;
|
|
74
66
|
/**
|
|
75
67
|
* Creates a ZIP file with OpenTimestamps (OTS) metadata
|
|
76
|
-
*
|
|
77
|
-
* This method creates a ZIP file with OpenTimestamps (OTS) metadata, which
|
|
78
|
-
* includes a timestamp of the ZIP file's contents on the Bitcoin blockchain.
|
|
79
|
-
*
|
|
80
|
-
* @param zipFile - The path to the ZIP file to create
|
|
81
|
-
* @param compressOptions - The compression options for the ZIP file
|
|
82
|
-
* @returns void - The method triggers a download of the ZIP file
|
|
83
68
|
*/
|
|
84
|
-
createZipOTS(zipFile: string, compressOptions: CompressOptions): Promise<void>;
|
|
85
69
|
/**
|
|
86
70
|
* Removes specified files from the ZIP archive
|
|
87
71
|
* Deletes matching ZipEntry objects and rebuilds the archive if any files were removed
|
|
88
72
|
*/
|
|
89
73
|
deleteFiles(delFiles: string[]): number;
|
|
90
|
-
/**
|
|
91
|
-
* Upgrades a timestamp in an existing ZIP file
|
|
92
|
-
*
|
|
93
|
-
* This method takes an existing ZIP file and upgrades its timestamp by:
|
|
94
|
-
* 1. Loading the original ZIP file
|
|
95
|
-
* 2. Removing any existing timestamp metadata entries
|
|
96
|
-
* 3. Adding a new timestamp metadata entry with the upgraded OTS proof
|
|
97
|
-
* 4. Creating a new ZIP file with the updated timestamp
|
|
98
|
-
*
|
|
99
|
-
* @param zipFile - The original ZIP file to upgrade
|
|
100
|
-
* @param upgradedOts - The upgraded OpenTimestamps proof as an ArrayBuffer
|
|
101
|
-
* @returns void - The method triggers a download of the upgraded ZIP file
|
|
102
|
-
*/
|
|
103
|
-
upgradeOTS(fileName: string, upgradedOts: Buffer): Promise<void>;
|
|
104
|
-
createCertificateOTS(fileName: string, zipEntries: ZipEntry[], timestampResult: TimestampResult): Promise<string>;
|
|
105
74
|
}
|