neozipkit 0.2.1 → 0.3.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/LICENSE +22 -0
- package/README.md +410 -186
- package/contracts/ABI.txt +889 -0
- package/contracts/Bytecode.txt +1 -0
- package/contracts/COMPILATION_NOTES.md +59 -0
- package/contracts/QUICK_DEPLOY.md +286 -0
- package/contracts/README.md +235 -131
- package/contracts/VERIFICATION.md +308 -0
- package/contracts/deploy-interactive.js +448 -0
- package/contracts/deployment-arbitrum-sepolia.json +12 -0
- package/contracts/deployment-arbitrum.json +12 -0
- package/contracts/deployment-eth-sepolia.json +12 -0
- package/contracts/hardhat.config.js +114 -0
- package/contracts/package.json +20 -0
- package/contracts/scripts/compile-and-extract.js +119 -0
- package/contracts/scripts/verify-contract.js +223 -0
- package/contracts/src/{NZIP-NFT-Private.sol → NZIP-NFT-v2.0.sol} +66 -151
- package/contracts/src/NZIP-NFT.sol +9 -15
- package/dist/blockchain/browser/TokenVerifierBrowser.d.ts +67 -0
- package/dist/blockchain/browser/TokenVerifierBrowser.d.ts.map +1 -0
- package/dist/blockchain/browser/TokenVerifierBrowser.js +313 -0
- package/dist/blockchain/browser/TokenVerifierBrowser.js.map +1 -0
- package/dist/blockchain/browser/WalletManagerBrowser.d.ts +98 -0
- package/dist/blockchain/browser/WalletManagerBrowser.d.ts.map +1 -0
- package/dist/blockchain/browser/WalletManagerBrowser.js +434 -0
- package/dist/blockchain/browser/WalletManagerBrowser.js.map +1 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.d.ts +58 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.d.ts.map +1 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.js +317 -0
- package/dist/blockchain/browser/ZipkitMinterBrowser.js.map +1 -0
- package/dist/blockchain/browser/index.d.ts +11 -0
- package/dist/blockchain/browser/index.d.ts.map +1 -0
- package/dist/blockchain/browser/index.js +16 -0
- package/dist/blockchain/browser/index.js.map +1 -0
- package/dist/blockchain/core/WalletManager.d.ts +124 -0
- package/dist/blockchain/core/WalletManager.d.ts.map +1 -0
- package/dist/blockchain/{ZipKitWallet.js → core/WalletManager.js} +157 -177
- package/dist/blockchain/core/WalletManager.js.map +1 -0
- package/dist/blockchain/{ZipKitMinter.d.ts → core/ZipkitMinter.d.ts} +46 -11
- package/dist/blockchain/core/ZipkitMinter.d.ts.map +1 -0
- package/dist/blockchain/core/ZipkitMinter.js +548 -0
- package/dist/blockchain/core/ZipkitMinter.js.map +1 -0
- package/dist/blockchain/{ZipKitOTS.d.ts → core/ZipkitOTS.d.ts} +6 -15
- package/dist/blockchain/core/ZipkitOTS.d.ts.map +1 -0
- package/dist/blockchain/{ZipKitOTS.js → core/ZipkitOTS.js} +26 -84
- package/dist/blockchain/core/ZipkitOTS.js.map +1 -0
- package/dist/blockchain/core/ZipkitVerifier.d.ts +177 -0
- package/dist/blockchain/core/ZipkitVerifier.d.ts.map +1 -0
- package/dist/blockchain/core/ZipkitVerifier.js +632 -0
- package/dist/blockchain/core/ZipkitVerifier.js.map +1 -0
- package/dist/blockchain/core/contracts.d.ts +83 -0
- package/dist/blockchain/core/contracts.d.ts.map +1 -0
- package/dist/blockchain/core/contracts.js +341 -0
- package/dist/blockchain/core/contracts.js.map +1 -0
- package/dist/blockchain/core/index.d.ts +12 -0
- package/dist/blockchain/core/index.d.ts.map +1 -0
- package/dist/blockchain/core/index.js +59 -0
- package/dist/blockchain/core/index.js.map +1 -0
- package/dist/blockchain/index.d.ts +11 -7
- package/dist/blockchain/index.d.ts.map +1 -0
- package/dist/blockchain/index.js +18 -34
- package/dist/blockchain/index.js.map +1 -0
- package/dist/blockchain/node/WalletManagerNode.d.ts +47 -0
- package/dist/blockchain/node/WalletManagerNode.d.ts.map +1 -0
- package/dist/blockchain/node/WalletManagerNode.js +203 -0
- package/dist/blockchain/node/WalletManagerNode.js.map +1 -0
- package/dist/blockchain/node/index.d.ts +12 -0
- package/dist/blockchain/node/index.d.ts.map +1 -0
- package/dist/blockchain/node/index.js +24 -0
- package/dist/blockchain/node/index.js.map +1 -0
- package/dist/browser/ZipkitBrowser.d.ts +27 -0
- package/dist/browser/ZipkitBrowser.d.ts.map +1 -0
- package/dist/browser/{ZipKitBrowser.js → ZipkitBrowser.js} +96 -43
- package/dist/browser/ZipkitBrowser.js.map +1 -0
- package/dist/browser/index.d.ts +12 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +42 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser-esm/index.d.ts +12 -0
- package/dist/browser-esm/index.js +59559 -0
- package/dist/browser-esm/index.js.map +7 -0
- package/dist/browser-umd/index.d.ts +12 -0
- package/dist/browser-umd/index.js +59576 -0
- package/dist/browser-umd/index.js.map +7 -0
- package/dist/browser-umd/index.min.js +63 -0
- package/dist/browser.d.ts +8 -14
- package/dist/browser.js +13 -28
- package/dist/core/ZipCompress.d.ts +99 -0
- package/dist/core/ZipCompress.d.ts.map +1 -0
- package/dist/core/ZipCompress.js +309 -0
- package/dist/core/ZipCompress.js.map +1 -0
- package/dist/core/ZipDecompress.d.ts +58 -0
- package/dist/core/ZipDecompress.d.ts.map +1 -0
- package/dist/core/ZipDecompress.js +172 -0
- package/dist/core/ZipDecompress.js.map +1 -0
- package/dist/{shared → core}/ZipEntry.d.ts +8 -1
- package/dist/core/ZipEntry.d.ts.map +1 -0
- package/dist/{shared → core}/ZipEntry.js +225 -82
- package/dist/core/ZipEntry.js.map +1 -0
- package/dist/core/Zipkit.d.ts +315 -0
- package/dist/core/Zipkit.d.ts.map +1 -0
- package/dist/core/Zipkit.js +647 -0
- package/dist/core/Zipkit.js.map +1 -0
- package/dist/core/components/HashCalculator.d.ts +138 -0
- package/dist/core/components/HashCalculator.d.ts.map +1 -0
- package/dist/core/components/HashCalculator.js +360 -0
- package/dist/core/components/HashCalculator.js.map +1 -0
- package/dist/core/components/Logger.d.ts +73 -0
- package/dist/core/components/Logger.d.ts.map +1 -0
- package/dist/core/components/Logger.js +156 -0
- package/dist/core/components/Logger.js.map +1 -0
- package/dist/core/components/ProgressTracker.d.ts +43 -0
- package/dist/core/components/ProgressTracker.d.ts.map +1 -0
- package/dist/core/components/ProgressTracker.js +112 -0
- package/dist/core/components/ProgressTracker.js.map +1 -0
- package/dist/{shared → core}/components/Support.d.ts +1 -0
- package/dist/core/components/Support.d.ts.map +1 -0
- package/dist/{shared → core}/components/Support.js +1 -0
- package/dist/core/components/Support.js.map +1 -0
- package/dist/{shared → core}/components/Util.d.ts +7 -2
- package/dist/core/components/Util.d.ts.map +1 -0
- package/dist/{shared → core}/components/Util.js +14 -34
- package/dist/core/components/Util.js.map +1 -0
- package/dist/{shared → core}/constants/Errors.d.ts +1 -2
- package/dist/core/constants/Errors.d.ts.map +1 -0
- package/dist/{shared → core}/constants/Errors.js +1 -3
- package/dist/core/constants/Errors.js.map +1 -0
- package/dist/{shared → core}/constants/Headers.d.ts +3 -0
- package/dist/core/constants/Headers.d.ts.map +1 -0
- package/dist/{shared → core}/constants/Headers.js +20 -17
- package/dist/core/constants/Headers.js.map +1 -0
- package/dist/core/encryption/Manager.d.ts +58 -0
- package/dist/core/encryption/Manager.d.ts.map +1 -0
- package/dist/core/encryption/Manager.js +121 -0
- package/dist/core/encryption/Manager.js.map +1 -0
- package/dist/core/encryption/ZipCrypto.d.ts +172 -0
- package/dist/core/encryption/ZipCrypto.d.ts.map +1 -0
- package/dist/core/encryption/ZipCrypto.js +554 -0
- package/dist/core/encryption/ZipCrypto.js.map +1 -0
- package/dist/core/encryption/index.d.ts +9 -0
- package/dist/core/encryption/index.d.ts.map +1 -0
- package/dist/core/encryption/index.js +17 -0
- package/dist/core/encryption/index.js.map +1 -0
- package/dist/core/encryption/types.d.ts +29 -0
- package/dist/core/encryption/types.d.ts.map +1 -0
- package/dist/core/encryption/types.js +12 -0
- package/dist/core/encryption/types.js.map +1 -0
- package/dist/core/index.d.ts +24 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +57 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/version.d.ts +5 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +31 -0
- package/dist/core/version.js.map +1 -0
- package/dist/index.d.ts +8 -18
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -35
- package/dist/index.js.map +1 -0
- package/dist/node/ZipCompressNode.d.ts +123 -0
- package/dist/node/ZipCompressNode.d.ts.map +1 -0
- package/dist/node/ZipCompressNode.js +576 -0
- package/dist/node/ZipCompressNode.js.map +1 -0
- package/dist/node/ZipDecompressNode.d.ts +120 -0
- package/dist/node/ZipDecompressNode.d.ts.map +1 -0
- package/dist/node/ZipDecompressNode.js +461 -0
- package/dist/node/ZipDecompressNode.js.map +1 -0
- package/dist/node/ZipkitNode.d.ts +406 -0
- package/dist/node/ZipkitNode.d.ts.map +1 -0
- package/dist/node/ZipkitNode.js +1305 -0
- package/dist/node/ZipkitNode.js.map +1 -0
- package/dist/node/index.d.ts +26 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +65 -0
- package/dist/node/index.js.map +1 -0
- package/dist/types/index.d.ts +59 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +36 -1
- package/dist/types/index.js.map +1 -0
- package/examples/README.md +269 -0
- package/examples/blockchain-tokenize.ts +354 -0
- package/examples/create-zip.ts +172 -0
- package/examples/extract-zip.ts +158 -0
- package/examples/list-zip.ts +161 -0
- package/examples/test-files/data.json +116 -0
- package/examples/test-files/document.md +80 -0
- package/examples/test-files/document.txt +2 -0
- package/examples/test-files/file1.txt +48 -0
- package/examples/test-files/file2.txt +80 -0
- package/examples/tsconfig.json +44 -0
- package/examples/unzip-token.ts +491 -0
- package/examples/verify-tokenized-zip.ts +305 -0
- package/examples/zip-token.ts +604 -0
- package/package.json +108 -24
- package/src/blockchain/README.md +59 -66
- package/src/{browser/TokenVerifierBrowser.ts-remove → blockchain/browser/TokenVerifierBrowser.ts} +125 -79
- package/src/blockchain/browser/WalletManagerBrowser.ts +486 -0
- package/src/blockchain/browser/ZipkitMinterBrowser.ts +400 -0
- package/src/blockchain/browser/index.ts +13 -0
- package/src/blockchain/{ZipKitWallet.ts → core/WalletManager.ts} +241 -143
- package/src/blockchain/core/ZipkitMinter.ts +716 -0
- package/src/blockchain/{ZipKitOTS.ts → core/ZipkitOTS.ts} +28 -62
- package/src/blockchain/core/ZipkitVerifier.ts +853 -0
- package/src/blockchain/core/contracts.ts +370 -0
- package/src/blockchain/core/index.ts +71 -0
- package/src/blockchain/index.ts +21 -55
- package/src/blockchain/node/WalletManagerNode.ts +171 -0
- package/src/blockchain/node/index.ts +40 -0
- package/src/browser/{ZipKitBrowser.ts → ZipkitBrowser.ts} +104 -41
- package/src/browser/index.esm.ts +37 -0
- package/src/browser/index.ts +25 -0
- package/src/core/ZipCompress.ts +398 -0
- package/src/core/ZipDecompress.ts +212 -0
- package/src/{shared → core}/ZipEntry.ts +240 -90
- package/src/core/Zipkit.ts +794 -0
- package/src/core/components/HashCalculator.ts +384 -0
- package/src/core/components/Logger.ts +180 -0
- package/src/core/components/ProgressTracker.ts +134 -0
- package/src/{shared → core}/components/Util.ts +12 -34
- package/src/{shared → core}/constants/Errors.ts +0 -4
- package/src/{shared → core}/constants/Headers.ts +19 -17
- package/src/core/encryption/Manager.ts +137 -0
- package/src/core/encryption/ZipCrypto.ts +650 -0
- package/src/core/encryption/index.ts +15 -0
- package/src/core/encryption/types.ts +33 -0
- package/src/core/index.ts +34 -0
- package/src/core/version.ts +33 -0
- package/src/index.ts +54 -25
- package/src/node/ZipCompressNode.ts +632 -0
- package/src/node/ZipDecompressNode.ts +508 -0
- package/src/node/ZipkitNode.ts +1559 -0
- package/src/node/index.ts +69 -0
- package/src/types/index.ts +131 -1
- package/src/types/modules.d.ts +1 -11
- package/src/types/opentimestamps.d.ts +1 -23
- package/contracts/INTEGRATION.md +0 -338
- package/contracts/NETWORKS.md +0 -156
- package/contracts/NZIP-NFT-bytecode.txt +0 -1
- package/contracts/constants.ts +0 -952
- package/contracts/deploy-bytecode.mjs +0 -94
- package/dist/blockchain/CertificateToken.d.ts +0 -48
- package/dist/blockchain/CertificateToken.js +0 -386
- package/dist/blockchain/ZipKitMinter.js +0 -347
- package/dist/blockchain/ZipKitNFT.d.ts +0 -3
- package/dist/blockchain/ZipKitNFT.js +0 -7
- package/dist/blockchain/ZipKitVerifier.d.ts +0 -69
- package/dist/blockchain/ZipKitVerifier.js +0 -289
- package/dist/blockchain/ZipKitWallet.d.ts +0 -69
- package/dist/blockchain/contracts.d.ts +0 -14
- package/dist/blockchain/contracts.js +0 -77
- package/dist/blockchain/types.d.ts +0 -47
- package/dist/blockchain/types.js +0 -30
- package/dist/browser/ZipKitBrowser.d.ts +0 -18
- package/dist/browser/ZipKitStampBrowser.d.ts +0 -2
- package/dist/browser/ZipKitStampBrowser.js +0 -12
- package/dist/browser-index.d.ts +0 -18
- package/dist/browser-index.js +0 -57
- package/dist/server/ZipKitServer.d.ts +0 -74
- package/dist/server/ZipKitServer.js +0 -310
- package/dist/shared/ZipKit.d.ts +0 -243
- package/dist/shared/ZipKit.js +0 -772
- package/dist/shared/components/CertificateOTS.d.ts +0 -15
- package/dist/shared/components/CertificateOTS.js +0 -116
- package/dist/shared/components/FileSys.d.ts +0 -2
- package/dist/shared/components/FileSys.js +0 -113
- package/dist/shared/components/HashAccumulator.d.ts +0 -55
- package/dist/shared/components/HashAccumulator.js +0 -100
- package/dist/shared/components/ZipCrypto.d.ts +0 -3
- package/dist/shared/components/ZipCrypto.js +0 -78
- package/dist/shared/components/merkleTree.d.ts +0 -66
- package/dist/shared/components/merkleTree.js +0 -136
- package/dist/shared/types/index.d.ts +0 -21
- package/dist/shared/types/index.js +0 -3
- package/dist/shared/types.d.ts +0 -33
- package/dist/shared/types.js +0 -8
- package/dist/shared/version.d.ts +0 -2
- package/dist/shared/version.js +0 -6
- package/src/blockchain/CertificateToken.ts +0 -444
- package/src/blockchain/ZipKitMinter.ts +0 -470
- package/src/blockchain/ZipKitNFT.ts +0 -12
- package/src/blockchain/ZipKitVerifier.ts +0 -382
- package/src/blockchain/contracts.ts +0 -88
- package/src/blockchain/types.ts +0 -91
- package/src/browser/CertificateGeneratorBrowser.ts-remove +0 -498
- package/src/browser/ZipKitStampBrowser.ts +0 -9
- package/src/browser-index.ts +0 -36
- package/src/server/README.md +0 -25
- package/src/server/ZipKitServer.ts +0 -305
- package/src/shared/ZipKit.ts +0 -881
- package/src/shared/components/CertificateOTS.ts +0 -132
- package/src/shared/components/FileSys.ts +0 -87
- package/src/shared/components/HashAccumulator.ts +0 -113
- package/src/shared/components/ZipCrypto.ts +0 -91
- package/src/shared/components/merkleTree.ts +0 -162
- package/src/shared/types/index.ts +0 -25
- package/src/shared/types/modules.d.ts +0 -22
- package/src/shared/types/opentimestamps.d.ts +0 -23
- package/src/shared/types.d.ts +0 -8
- package/src/shared/types.ts +0 -43
- package/src/shared/version.ts +0 -3
- /package/src/{shared → core}/components/Support.ts +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export interface ContractConfig {
|
|
2
|
+
address: string;
|
|
3
|
+
network: string;
|
|
4
|
+
chainId: number;
|
|
5
|
+
explorerUrl: string;
|
|
6
|
+
rpcUrls: string[];
|
|
7
|
+
nameAliases?: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const CONTRACT_CONFIGS: Record<number, ContractConfig>;
|
|
10
|
+
export declare const NZIP_CONTRACT_ABI: string[];
|
|
11
|
+
export declare const NZIP_CONTRACT_ABI_WEB3: ({
|
|
12
|
+
inputs: {
|
|
13
|
+
name: string;
|
|
14
|
+
type: string;
|
|
15
|
+
}[];
|
|
16
|
+
name: string;
|
|
17
|
+
outputs: {
|
|
18
|
+
name: string;
|
|
19
|
+
type: string;
|
|
20
|
+
}[];
|
|
21
|
+
stateMutability: string;
|
|
22
|
+
type: string;
|
|
23
|
+
anonymous?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
inputs: {
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
}[];
|
|
29
|
+
name: string;
|
|
30
|
+
outputs: {
|
|
31
|
+
components: {
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
}[];
|
|
35
|
+
name: string;
|
|
36
|
+
type: string;
|
|
37
|
+
}[];
|
|
38
|
+
stateMutability: string;
|
|
39
|
+
type: string;
|
|
40
|
+
anonymous?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
anonymous: boolean;
|
|
43
|
+
inputs: {
|
|
44
|
+
indexed: boolean;
|
|
45
|
+
name: string;
|
|
46
|
+
type: string;
|
|
47
|
+
}[];
|
|
48
|
+
name: string;
|
|
49
|
+
type: string;
|
|
50
|
+
outputs?: undefined;
|
|
51
|
+
stateMutability?: undefined;
|
|
52
|
+
})[];
|
|
53
|
+
export declare const DEFAULT_NETWORK = 84532;
|
|
54
|
+
export declare const CURRENT_DEPLOYMENT: ContractConfig;
|
|
55
|
+
export declare const getContractConfig: (chainId: number) => ContractConfig;
|
|
56
|
+
export declare const getSupportedNetworks: () => number[];
|
|
57
|
+
export declare const isNetworkSupported: (chainId: number) => boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Normalize network name for matching (lowercase, trim, replace spaces with hyphens)
|
|
60
|
+
*/
|
|
61
|
+
export declare function normalizeNetworkName(networkName: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* Get chain ID by network name (supports aliases)
|
|
64
|
+
* Returns chain ID if found, null otherwise
|
|
65
|
+
*/
|
|
66
|
+
export declare function getChainIdByName(networkName: string): number | null;
|
|
67
|
+
/**
|
|
68
|
+
* Get network configuration by network name (supports aliases)
|
|
69
|
+
* Returns ContractConfig if found, null otherwise
|
|
70
|
+
*/
|
|
71
|
+
export declare function getNetworkByName(networkName: string): ContractConfig | null;
|
|
72
|
+
/**
|
|
73
|
+
* Get all supported network name aliases
|
|
74
|
+
* Returns array of all supported network names (primary + aliases)
|
|
75
|
+
*/
|
|
76
|
+
export declare function getSupportedNetworkNames(): string[];
|
|
77
|
+
/**
|
|
78
|
+
* Fuzzy match network name (for backward compatibility)
|
|
79
|
+
* Handles partial matches like "sepolia" matching "Base Sepolia" or "Arbitrum Sepolia"
|
|
80
|
+
* Returns best match or null
|
|
81
|
+
*/
|
|
82
|
+
export declare function fuzzyMatchNetworkName(networkName: string): ContractConfig | null;
|
|
83
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/blockchain/core/contracts.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB;AAGD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA0F3D,CAAA;AAGD,eAAO,MAAM,iBAAiB,UAa7B,CAAA;AAGD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmHlC,CAAA;AAGD,eAAO,MAAM,eAAe,QAAQ,CAAA;AACpC,eAAO,MAAM,kBAAkB,gBAAoC,CAAA;AAGnE,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,cAEnD,CAAA;AAED,eAAO,MAAM,oBAAoB,QAAO,MAAM,EAE7C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,KAAG,OAEpD,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuBnE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAM3E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAcnD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAyChF"}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Contract addresses and configurations for different networks
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isNetworkSupported = exports.getSupportedNetworks = exports.getContractConfig = exports.CURRENT_DEPLOYMENT = exports.DEFAULT_NETWORK = exports.NZIP_CONTRACT_ABI_WEB3 = exports.NZIP_CONTRACT_ABI = exports.CONTRACT_CONFIGS = void 0;
|
|
5
|
+
exports.normalizeNetworkName = normalizeNetworkName;
|
|
6
|
+
exports.getChainIdByName = getChainIdByName;
|
|
7
|
+
exports.getNetworkByName = getNetworkByName;
|
|
8
|
+
exports.getSupportedNetworkNames = getSupportedNetworkNames;
|
|
9
|
+
exports.fuzzyMatchNetworkName = fuzzyMatchNetworkName;
|
|
10
|
+
// NZIP NFT Contract configurations by network
|
|
11
|
+
exports.CONTRACT_CONFIGS = {
|
|
12
|
+
// Base Sepolia (Primary testnet)
|
|
13
|
+
84532: {
|
|
14
|
+
// address: '0xFD76a5d420704F34d84b0767961835c43D7b30a8', // Production contract v2.0
|
|
15
|
+
address: '0xdAe9D83d7AC62197fAE7704abc66b13DA28D3143', // Production contract v2.10
|
|
16
|
+
network: 'Base Sepolia',
|
|
17
|
+
chainId: 84532,
|
|
18
|
+
explorerUrl: 'https://sepolia.basescan.org',
|
|
19
|
+
rpcUrls: [
|
|
20
|
+
'https://sepolia.base.org',
|
|
21
|
+
'https://base-sepolia-rpc.publicnode.com',
|
|
22
|
+
'https://base-sepolia.gateway.tenderly.co'
|
|
23
|
+
],
|
|
24
|
+
nameAliases: ['base-sepolia', 'base sepolia', 'basesepolia', 'base-sepolia-testnet']
|
|
25
|
+
},
|
|
26
|
+
// Base Mainnet (Production)
|
|
27
|
+
8453: {
|
|
28
|
+
// address: '0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60', // Production contract v2.0
|
|
29
|
+
address: '0xd871Fba59F85108aF29299786DD8243B38dD9686', // Production contract v2.10
|
|
30
|
+
network: 'Base Mainnet',
|
|
31
|
+
chainId: 8453,
|
|
32
|
+
explorerUrl: 'https://basescan.org',
|
|
33
|
+
rpcUrls: [
|
|
34
|
+
'https://mainnet.base.org',
|
|
35
|
+
'https://base.drpc.org',
|
|
36
|
+
'https://base.gateway.tenderly.co'
|
|
37
|
+
],
|
|
38
|
+
nameAliases: ['base-mainnet', 'base mainnet', 'basemainnet', 'base']
|
|
39
|
+
},
|
|
40
|
+
// Ethereum Sepolia (Testnet)
|
|
41
|
+
// WARNING: Sepolia testnet has been experiencing instability since the Pectra upgrade (March 2025)
|
|
42
|
+
// Network issues include transaction processing failures and RPC timeouts
|
|
43
|
+
// Consider using Base Sepolia (84532) for more reliable testing
|
|
44
|
+
11155111: {
|
|
45
|
+
address: '0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60', // Production contract v2.10
|
|
46
|
+
network: 'Sepolia Testnet',
|
|
47
|
+
chainId: 11155111,
|
|
48
|
+
explorerUrl: 'https://sepolia.etherscan.io',
|
|
49
|
+
rpcUrls: [
|
|
50
|
+
// Official Sepolia RPC endpoints (most reliable)
|
|
51
|
+
'https://rpc.sepolia.ethpandaops.io',
|
|
52
|
+
// Popular public RPC providers
|
|
53
|
+
'https://eth-sepolia.public.blastapi.io',
|
|
54
|
+
'https://ethereum-sepolia-rpc.publicnode.com',
|
|
55
|
+
'https://sepolia.drpc.org',
|
|
56
|
+
'https://1rpc.io/sepolia',
|
|
57
|
+
],
|
|
58
|
+
nameAliases: ['sepolia-testnet', 'sepolia testnet', 'sepoliatestnet', 'sepolia', 'ethereum-sepolia', 'ethereum sepolia']
|
|
59
|
+
},
|
|
60
|
+
// Arbitrum Sepolia (Testnet)
|
|
61
|
+
421614: {
|
|
62
|
+
address: '0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60', // Production contract v2.10
|
|
63
|
+
network: 'Arbitrum Sepolia',
|
|
64
|
+
chainId: 421614,
|
|
65
|
+
explorerUrl: 'https://sepolia.arbiscan.io',
|
|
66
|
+
rpcUrls: [
|
|
67
|
+
'https://sepolia-rollup.arbitrum.io/rpc',
|
|
68
|
+
'https://arbitrum-sepolia-rpc.publicnode.com'
|
|
69
|
+
],
|
|
70
|
+
nameAliases: ['arbitrum-sepolia', 'arbitrum sepolia', 'arbitrumsepolia', 'arbitrum-sepolia-testnet']
|
|
71
|
+
},
|
|
72
|
+
// Arbitrum One (Production)
|
|
73
|
+
// Note: Same contract address as Arbitrum Sepolia due to deterministic deployment
|
|
74
|
+
// (same deployer address + same nonce = same contract address on both networks)
|
|
75
|
+
42161: {
|
|
76
|
+
address: '0x2716c4609fD97DaEdF429BC4B4Ec2faa81e2cC60', // Production contract v2.10
|
|
77
|
+
network: 'Arbitrum One',
|
|
78
|
+
chainId: 42161,
|
|
79
|
+
explorerUrl: 'https://arbiscan.io',
|
|
80
|
+
rpcUrls: [
|
|
81
|
+
'https://arb1.arbitrum.io/rpc',
|
|
82
|
+
'https://arbitrum.llamarpc.com',
|
|
83
|
+
'https://arbitrum.publicnode.com'
|
|
84
|
+
],
|
|
85
|
+
nameAliases: ['arbitrum-one', 'arbitrum one', 'arbitrumone', 'arbitrum', 'arbitrum-mainnet', 'arbitrum mainnet']
|
|
86
|
+
},
|
|
87
|
+
// Ethereum Mainnet (Production) - disabled until NZIP is deployed
|
|
88
|
+
// 1: {
|
|
89
|
+
// address: '0x0000000000000000000000000000000000000000',
|
|
90
|
+
// network: 'Ethereum Mainnet',
|
|
91
|
+
// chainId: 1,
|
|
92
|
+
// explorerUrl: 'https://etherscan.io',
|
|
93
|
+
// rpcUrls: []
|
|
94
|
+
// }
|
|
95
|
+
};
|
|
96
|
+
// Contract ABI (ethers.js human-readable format)
|
|
97
|
+
exports.NZIP_CONTRACT_ABI = [
|
|
98
|
+
"function publicMintZipFile(string memory merkleRootHash, uint256 creationTimestamp, string memory ipfsHash, string memory metadataURI) public returns (uint256)",
|
|
99
|
+
"function totalSupply() external view returns (uint256)",
|
|
100
|
+
"function getTokensByMerkleRoot(string memory merkleRoot) external view returns (uint256[])",
|
|
101
|
+
"function getTokensByOwner(address owner) external view returns (uint256[])",
|
|
102
|
+
"function getZipFileInfo(uint256 tokenId) external view returns (tuple(string merkleRootHash, string ipfsHash, address creator, uint256 creationTimestamp, uint256 tokenizationTime, uint256 blockNumber))",
|
|
103
|
+
"function ownerOf(uint256 tokenId) external view returns (address)",
|
|
104
|
+
"function balanceOf(address owner) external view returns (uint256)",
|
|
105
|
+
"function isZipFileTokenized(string memory merkleRootHash, uint256 creationTimestamp) external view returns (bool exists, uint256 tokenId)",
|
|
106
|
+
"function verifyZipFile(uint256 tokenId, string memory providedMerkleRoot) external view returns (bool isValid)",
|
|
107
|
+
"function getVersion() external pure returns (string memory)",
|
|
108
|
+
"event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)",
|
|
109
|
+
"event ZipFileTokenized(uint256 indexed tokenId, address indexed creator, string merkleRootHash, uint256 creationTimestamp, string ipfsHash, uint256 tokenizationTime, uint256 blockNumber)"
|
|
110
|
+
];
|
|
111
|
+
// Contract ABI (Web3.js JSON format)
|
|
112
|
+
exports.NZIP_CONTRACT_ABI_WEB3 = [
|
|
113
|
+
{
|
|
114
|
+
inputs: [
|
|
115
|
+
{ name: "merkleRootHash", type: "string" },
|
|
116
|
+
{ name: "creationTimestamp", type: "uint256" },
|
|
117
|
+
{ name: "ipfsHash", type: "string" },
|
|
118
|
+
{ name: "metadataURI", type: "string" }
|
|
119
|
+
],
|
|
120
|
+
name: "publicMintZipFile",
|
|
121
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
122
|
+
stateMutability: "nonpayable",
|
|
123
|
+
type: "function"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
inputs: [],
|
|
127
|
+
name: "totalSupply",
|
|
128
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
129
|
+
stateMutability: "view",
|
|
130
|
+
type: "function"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
inputs: [{ name: "merkleRoot", type: "string" }],
|
|
134
|
+
name: "getTokensByMerkleRoot",
|
|
135
|
+
outputs: [{ name: "", type: "uint256[]" }],
|
|
136
|
+
stateMutability: "view",
|
|
137
|
+
type: "function"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
inputs: [{ name: "tokenId", type: "uint256" }],
|
|
141
|
+
name: "getZipFileInfo",
|
|
142
|
+
outputs: [
|
|
143
|
+
{
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "merkleRootHash", type: "string" },
|
|
146
|
+
{ name: "ipfsHash", type: "string" },
|
|
147
|
+
{ name: "creator", type: "address" },
|
|
148
|
+
{ name: "creationTimestamp", type: "uint256" },
|
|
149
|
+
{ name: "tokenizationTime", type: "uint256" },
|
|
150
|
+
{ name: "blockNumber", type: "uint256" }
|
|
151
|
+
],
|
|
152
|
+
name: "",
|
|
153
|
+
type: "tuple"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
stateMutability: "view",
|
|
157
|
+
type: "function"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
inputs: [{ name: "tokenId", type: "uint256" }],
|
|
161
|
+
name: "ownerOf",
|
|
162
|
+
outputs: [{ name: "", type: "address" }],
|
|
163
|
+
stateMutability: "view",
|
|
164
|
+
type: "function"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
inputs: [{ name: "owner", type: "address" }],
|
|
168
|
+
name: "balanceOf",
|
|
169
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
170
|
+
stateMutability: "view",
|
|
171
|
+
type: "function"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
inputs: [
|
|
175
|
+
{ name: "merkleRootHash", type: "string" },
|
|
176
|
+
{ name: "creationTimestamp", type: "uint256" }
|
|
177
|
+
],
|
|
178
|
+
name: "isZipFileTokenized",
|
|
179
|
+
outputs: [
|
|
180
|
+
{ name: "exists", type: "bool" },
|
|
181
|
+
{ name: "tokenId", type: "uint256" }
|
|
182
|
+
],
|
|
183
|
+
stateMutability: "view",
|
|
184
|
+
type: "function"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
inputs: [
|
|
188
|
+
{ name: "tokenId", type: "uint256" },
|
|
189
|
+
{ name: "providedMerkleRoot", type: "string" }
|
|
190
|
+
],
|
|
191
|
+
name: "verifyZipFile",
|
|
192
|
+
outputs: [{ name: "isValid", type: "bool" }],
|
|
193
|
+
stateMutability: "view",
|
|
194
|
+
type: "function"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
inputs: [],
|
|
198
|
+
name: "getVersion",
|
|
199
|
+
outputs: [{ name: "", type: "string" }],
|
|
200
|
+
stateMutability: "pure",
|
|
201
|
+
type: "function"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
anonymous: false,
|
|
205
|
+
inputs: [
|
|
206
|
+
{ indexed: true, name: "from", type: "address" },
|
|
207
|
+
{ indexed: true, name: "to", type: "address" },
|
|
208
|
+
{ indexed: true, name: "tokenId", type: "uint256" }
|
|
209
|
+
],
|
|
210
|
+
name: "Transfer",
|
|
211
|
+
type: "event"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
anonymous: false,
|
|
215
|
+
inputs: [
|
|
216
|
+
{ indexed: true, name: "tokenId", type: "uint256" },
|
|
217
|
+
{ indexed: true, name: "creator", type: "address" },
|
|
218
|
+
{ indexed: false, name: "merkleRootHash", type: "string" },
|
|
219
|
+
{ indexed: false, name: "creationTimestamp", type: "uint256" },
|
|
220
|
+
{ indexed: false, name: "ipfsHash", type: "string" },
|
|
221
|
+
{ indexed: false, name: "tokenizationTime", type: "uint256" },
|
|
222
|
+
{ indexed: false, name: "blockNumber", type: "uint256" }
|
|
223
|
+
],
|
|
224
|
+
name: "ZipFileTokenized",
|
|
225
|
+
type: "event"
|
|
226
|
+
}
|
|
227
|
+
];
|
|
228
|
+
// Default configuration (Base Sepolia for development)
|
|
229
|
+
exports.DEFAULT_NETWORK = 84532;
|
|
230
|
+
exports.CURRENT_DEPLOYMENT = exports.CONTRACT_CONFIGS[exports.DEFAULT_NETWORK];
|
|
231
|
+
// Helper functions
|
|
232
|
+
const getContractConfig = (chainId) => {
|
|
233
|
+
return exports.CONTRACT_CONFIGS[chainId] || exports.CURRENT_DEPLOYMENT;
|
|
234
|
+
};
|
|
235
|
+
exports.getContractConfig = getContractConfig;
|
|
236
|
+
const getSupportedNetworks = () => {
|
|
237
|
+
return Object.keys(exports.CONTRACT_CONFIGS).map(Number);
|
|
238
|
+
};
|
|
239
|
+
exports.getSupportedNetworks = getSupportedNetworks;
|
|
240
|
+
const isNetworkSupported = (chainId) => {
|
|
241
|
+
return chainId in exports.CONTRACT_CONFIGS;
|
|
242
|
+
};
|
|
243
|
+
exports.isNetworkSupported = isNetworkSupported;
|
|
244
|
+
/**
|
|
245
|
+
* Normalize network name for matching (lowercase, trim, replace spaces with hyphens)
|
|
246
|
+
*/
|
|
247
|
+
function normalizeNetworkName(networkName) {
|
|
248
|
+
return networkName.toLowerCase().trim().replace(/\s+/g, '-').replace(/_/g, '-');
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Get chain ID by network name (supports aliases)
|
|
252
|
+
* Returns chain ID if found, null otherwise
|
|
253
|
+
*/
|
|
254
|
+
function getChainIdByName(networkName) {
|
|
255
|
+
const normalized = normalizeNetworkName(networkName);
|
|
256
|
+
// Search through all configs
|
|
257
|
+
for (const [chainIdStr, config] of Object.entries(exports.CONTRACT_CONFIGS)) {
|
|
258
|
+
const chainId = Number(chainIdStr);
|
|
259
|
+
// Check primary network name
|
|
260
|
+
if (normalizeNetworkName(config.network) === normalized) {
|
|
261
|
+
return chainId;
|
|
262
|
+
}
|
|
263
|
+
// Check name aliases
|
|
264
|
+
if (config.nameAliases) {
|
|
265
|
+
for (const alias of config.nameAliases) {
|
|
266
|
+
if (normalizeNetworkName(alias) === normalized) {
|
|
267
|
+
return chainId;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Get network configuration by network name (supports aliases)
|
|
276
|
+
* Returns ContractConfig if found, null otherwise
|
|
277
|
+
*/
|
|
278
|
+
function getNetworkByName(networkName) {
|
|
279
|
+
const chainId = getChainIdByName(networkName);
|
|
280
|
+
if (chainId === null) {
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
return (0, exports.getContractConfig)(chainId);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Get all supported network name aliases
|
|
287
|
+
* Returns array of all supported network names (primary + aliases)
|
|
288
|
+
*/
|
|
289
|
+
function getSupportedNetworkNames() {
|
|
290
|
+
const names = [];
|
|
291
|
+
for (const config of Object.values(exports.CONTRACT_CONFIGS)) {
|
|
292
|
+
// Add primary network name
|
|
293
|
+
names.push(config.network);
|
|
294
|
+
// Add aliases
|
|
295
|
+
if (config.nameAliases) {
|
|
296
|
+
names.push(...config.nameAliases);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return names;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Fuzzy match network name (for backward compatibility)
|
|
303
|
+
* Handles partial matches like "sepolia" matching "Base Sepolia" or "Arbitrum Sepolia"
|
|
304
|
+
* Returns best match or null
|
|
305
|
+
*/
|
|
306
|
+
function fuzzyMatchNetworkName(networkName) {
|
|
307
|
+
const normalized = normalizeNetworkName(networkName);
|
|
308
|
+
// First try exact match
|
|
309
|
+
const exactMatch = getNetworkByName(networkName);
|
|
310
|
+
if (exactMatch) {
|
|
311
|
+
return exactMatch;
|
|
312
|
+
}
|
|
313
|
+
// Try partial matching
|
|
314
|
+
const matches = [];
|
|
315
|
+
for (const config of Object.values(exports.CONTRACT_CONFIGS)) {
|
|
316
|
+
const configNormalized = normalizeNetworkName(config.network);
|
|
317
|
+
let score = 0;
|
|
318
|
+
// Check if normalized input is contained in config name or vice versa
|
|
319
|
+
if (configNormalized.includes(normalized) || normalized.includes(configNormalized)) {
|
|
320
|
+
score = Math.max(configNormalized.length, normalized.length) / Math.min(configNormalized.length, normalized.length);
|
|
321
|
+
matches.push({ config, score });
|
|
322
|
+
}
|
|
323
|
+
// Check aliases
|
|
324
|
+
if (config.nameAliases) {
|
|
325
|
+
for (const alias of config.nameAliases) {
|
|
326
|
+
const aliasNormalized = normalizeNetworkName(alias);
|
|
327
|
+
if (aliasNormalized.includes(normalized) || normalized.includes(aliasNormalized)) {
|
|
328
|
+
score = Math.max(aliasNormalized.length, normalized.length) / Math.min(aliasNormalized.length, normalized.length);
|
|
329
|
+
matches.push({ config, score });
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
// Return best match (highest score)
|
|
335
|
+
if (matches.length > 0) {
|
|
336
|
+
matches.sort((a, b) => b.score - a.score);
|
|
337
|
+
return matches[0].config;
|
|
338
|
+
}
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/blockchain/core/contracts.ts"],"names":[],"mappings":";AAAA,+DAA+D;;;AAkQ/D,oDAEC;AAMD,4CAuBC;AAMD,4CAMC;AAMD,4DAcC;AAOD,sDAyCC;AAtWD,8CAA8C;AACjC,QAAA,gBAAgB,GAAmC;IAC9D,iCAAiC;IACjC,KAAK,EAAE;QACL,qFAAqF;QACrF,OAAO,EAAE,4CAA4C,EAAE,4BAA4B;QACnF,OAAO,EAAE,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C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Blockchain Module Exports
|
|
3
|
+
* Platform-agnostic blockchain functionality for ZIP file tokenization
|
|
4
|
+
*/
|
|
5
|
+
export * from '../../types';
|
|
6
|
+
export { ZipkitMinter, MintingOptions, MintingResult, DuplicateCheckResult, WalletInfo, validatePrivateKey } from './ZipkitMinter';
|
|
7
|
+
export { ZipkitVerifier, VerificationOptions, VerificationResult } from './ZipkitVerifier';
|
|
8
|
+
export { TokenMetadata } from '../../types';
|
|
9
|
+
export { CoreWalletManager, WalletAnalyzer, CommonTokenConfig, TokenInfo, WalletBasicInfo, TokenScanResult, NZipTokenDetails } from './WalletManager';
|
|
10
|
+
export { NZIP_CONTRACT_ABI, NZIP_CONTRACT_ABI_WEB3, CONTRACT_CONFIGS, CURRENT_DEPLOYMENT, DEFAULT_NETWORK, getContractConfig, getSupportedNetworks, isNetworkSupported, getChainIdByName, getSupportedNetworkNames, getNetworkByName, normalizeNetworkName, ContractConfig } from './contracts';
|
|
11
|
+
export { createTimestamp, deserializeOts, parseVerifyResult, upgradeOTS, createOtsMetadataEntry, bufferToArrayBuffer, getOtsEntry, getOtsBuffer, getMerkleRootSafe, verifyOts, verifyOtsZip, TimestampResult, TimestampInfo, DeserializeOtsResult, OtsVerifyResult } from './ZipkitOTS';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/blockchain/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,aAAa,CAAC;AAE5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACf,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,YAAY,EAEZ,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,eAAe,EAChB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Core Blockchain Module Exports
|
|
4
|
+
* Platform-agnostic blockchain functionality for ZIP file tokenization
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.verifyOtsZip = exports.verifyOts = exports.getMerkleRootSafe = exports.getOtsBuffer = exports.getOtsEntry = exports.bufferToArrayBuffer = exports.createOtsMetadataEntry = exports.upgradeOTS = exports.parseVerifyResult = exports.deserializeOts = exports.createTimestamp = exports.normalizeNetworkName = exports.getNetworkByName = exports.getSupportedNetworkNames = exports.getChainIdByName = exports.isNetworkSupported = exports.getSupportedNetworks = exports.getContractConfig = exports.DEFAULT_NETWORK = exports.CURRENT_DEPLOYMENT = exports.CONTRACT_CONFIGS = exports.NZIP_CONTRACT_ABI_WEB3 = exports.NZIP_CONTRACT_ABI = exports.WalletAnalyzer = exports.CoreWalletManager = exports.ZipkitVerifier = exports.validatePrivateKey = exports.ZipkitMinter = void 0;
|
|
22
|
+
// Export all types from consolidated types location
|
|
23
|
+
__exportStar(require("../../types"), exports);
|
|
24
|
+
var ZipkitMinter_1 = require("./ZipkitMinter");
|
|
25
|
+
Object.defineProperty(exports, "ZipkitMinter", { enumerable: true, get: function () { return ZipkitMinter_1.ZipkitMinter; } });
|
|
26
|
+
Object.defineProperty(exports, "validatePrivateKey", { enumerable: true, get: function () { return ZipkitMinter_1.validatePrivateKey; } });
|
|
27
|
+
var ZipkitVerifier_1 = require("./ZipkitVerifier");
|
|
28
|
+
Object.defineProperty(exports, "ZipkitVerifier", { enumerable: true, get: function () { return ZipkitVerifier_1.ZipkitVerifier; } });
|
|
29
|
+
// Export core wallet functionality
|
|
30
|
+
var WalletManager_1 = require("./WalletManager");
|
|
31
|
+
Object.defineProperty(exports, "CoreWalletManager", { enumerable: true, get: function () { return WalletManager_1.CoreWalletManager; } });
|
|
32
|
+
Object.defineProperty(exports, "WalletAnalyzer", { enumerable: true, get: function () { return WalletManager_1.WalletAnalyzer; } });
|
|
33
|
+
var contracts_1 = require("./contracts");
|
|
34
|
+
Object.defineProperty(exports, "NZIP_CONTRACT_ABI", { enumerable: true, get: function () { return contracts_1.NZIP_CONTRACT_ABI; } });
|
|
35
|
+
Object.defineProperty(exports, "NZIP_CONTRACT_ABI_WEB3", { enumerable: true, get: function () { return contracts_1.NZIP_CONTRACT_ABI_WEB3; } });
|
|
36
|
+
Object.defineProperty(exports, "CONTRACT_CONFIGS", { enumerable: true, get: function () { return contracts_1.CONTRACT_CONFIGS; } });
|
|
37
|
+
Object.defineProperty(exports, "CURRENT_DEPLOYMENT", { enumerable: true, get: function () { return contracts_1.CURRENT_DEPLOYMENT; } });
|
|
38
|
+
Object.defineProperty(exports, "DEFAULT_NETWORK", { enumerable: true, get: function () { return contracts_1.DEFAULT_NETWORK; } });
|
|
39
|
+
Object.defineProperty(exports, "getContractConfig", { enumerable: true, get: function () { return contracts_1.getContractConfig; } });
|
|
40
|
+
Object.defineProperty(exports, "getSupportedNetworks", { enumerable: true, get: function () { return contracts_1.getSupportedNetworks; } });
|
|
41
|
+
Object.defineProperty(exports, "isNetworkSupported", { enumerable: true, get: function () { return contracts_1.isNetworkSupported; } });
|
|
42
|
+
Object.defineProperty(exports, "getChainIdByName", { enumerable: true, get: function () { return contracts_1.getChainIdByName; } });
|
|
43
|
+
Object.defineProperty(exports, "getSupportedNetworkNames", { enumerable: true, get: function () { return contracts_1.getSupportedNetworkNames; } });
|
|
44
|
+
Object.defineProperty(exports, "getNetworkByName", { enumerable: true, get: function () { return contracts_1.getNetworkByName; } });
|
|
45
|
+
Object.defineProperty(exports, "normalizeNetworkName", { enumerable: true, get: function () { return contracts_1.normalizeNetworkName; } });
|
|
46
|
+
// Export OpenTimestamps utilities
|
|
47
|
+
var ZipkitOTS_1 = require("./ZipkitOTS");
|
|
48
|
+
Object.defineProperty(exports, "createTimestamp", { enumerable: true, get: function () { return ZipkitOTS_1.createTimestamp; } });
|
|
49
|
+
Object.defineProperty(exports, "deserializeOts", { enumerable: true, get: function () { return ZipkitOTS_1.deserializeOts; } });
|
|
50
|
+
Object.defineProperty(exports, "parseVerifyResult", { enumerable: true, get: function () { return ZipkitOTS_1.parseVerifyResult; } });
|
|
51
|
+
Object.defineProperty(exports, "upgradeOTS", { enumerable: true, get: function () { return ZipkitOTS_1.upgradeOTS; } });
|
|
52
|
+
Object.defineProperty(exports, "createOtsMetadataEntry", { enumerable: true, get: function () { return ZipkitOTS_1.createOtsMetadataEntry; } });
|
|
53
|
+
Object.defineProperty(exports, "bufferToArrayBuffer", { enumerable: true, get: function () { return ZipkitOTS_1.bufferToArrayBuffer; } });
|
|
54
|
+
Object.defineProperty(exports, "getOtsEntry", { enumerable: true, get: function () { return ZipkitOTS_1.getOtsEntry; } });
|
|
55
|
+
Object.defineProperty(exports, "getOtsBuffer", { enumerable: true, get: function () { return ZipkitOTS_1.getOtsBuffer; } });
|
|
56
|
+
Object.defineProperty(exports, "getMerkleRootSafe", { enumerable: true, get: function () { return ZipkitOTS_1.getMerkleRootSafe; } });
|
|
57
|
+
Object.defineProperty(exports, "verifyOts", { enumerable: true, get: function () { return ZipkitOTS_1.verifyOts; } });
|
|
58
|
+
Object.defineProperty(exports, "verifyOtsZip", { enumerable: true, get: function () { return ZipkitOTS_1.verifyOtsZip; } });
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/blockchain/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAEH,oDAAoD;AACpD,8CAA4B;AAE5B,+CAOwB;AANtB,4GAAA,YAAY,OAAA;AAKZ,kHAAA,kBAAkB,OAAA;AAGpB,mDAI0B;AAHxB,gHAAA,cAAc,OAAA;AAOhB,mCAAmC;AACnC,iDAQyB;AAPvB,kHAAA,iBAAiB,OAAA;AACjB,+GAAA,cAAc,OAAA;AAQhB,yCAcqB;AAbnB,8GAAA,iBAAiB,OAAA;AACjB,mHAAA,sBAAsB,OAAA;AACtB,6GAAA,gBAAgB,OAAA;AAChB,+GAAA,kBAAkB,OAAA;AAClB,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,iHAAA,oBAAoB,OAAA;AACpB,+GAAA,kBAAkB,OAAA;AAClB,6GAAA,gBAAgB,OAAA;AAChB,qHAAA,wBAAwB,OAAA;AACxB,6GAAA,gBAAgB,OAAA;AAChB,iHAAA,oBAAoB,OAAA;AAItB,kCAAkC;AAClC,yCAiBqB;AAhBnB,4GAAA,eAAe,OAAA;AACf,2GAAA,cAAc,OAAA;AACd,8GAAA,iBAAiB,OAAA;AACjB,uGAAA,UAAU,OAAA;AACV,mHAAA,sBAAsB,OAAA;AACtB,gHAAA,mBAAmB,OAAA;AACnB,wGAAA,WAAW,OAAA;AACX,yGAAA,YAAY,OAAA;AACZ,8GAAA,iBAAiB,OAAA;AACjB,sGAAA,SAAS,OAAA;AACT,yGAAA,YAAY,OAAA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export {
|
|
1
|
+
/**
|
|
2
|
+
* Blockchain Module Exports
|
|
3
|
+
* Unified blockchain functionality for ZIP file tokenization
|
|
4
|
+
*/
|
|
5
|
+
export * from './core';
|
|
6
|
+
export * from './browser';
|
|
7
|
+
export { WalletManagerNode, ZipkitWallet } from './node';
|
|
8
|
+
export type { EnhancedVerificationResult, BatchVerificationResult, VerificationJob } from './core/ZipkitVerifier';
|
|
9
|
+
export { Logger, configureLoggerFromEnvironment } from '../core';
|
|
10
|
+
export type { LogLevel, LoggerConfig } from '../core';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blockchain/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,QAAQ,CAAC;AAGvB,cAAc,WAAW,CAAC;AAG1B,OAAO,EACL,iBAAiB,EACjB,YAAY,EACb,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,MAAM,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACjE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/blockchain/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Blockchain Module Exports
|
|
4
|
+
* Unified blockchain functionality for ZIP file tokenization
|
|
5
|
+
*/
|
|
2
6
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
7
|
if (k2 === undefined) k2 = k;
|
|
4
8
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -14,37 +18,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
19
|
};
|
|
16
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
// Export
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Object.defineProperty(exports, "
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
|
|
31
|
-
Object.defineProperty(exports, "getSupportedNetworks", { enumerable: true, get: function () { return contracts_1.getSupportedNetworks; } });
|
|
32
|
-
Object.defineProperty(exports, "isNetworkSupported", { enumerable: true, get: function () { return contracts_1.isNetworkSupported; } });
|
|
33
|
-
// Export wallet management and analysis (combined under ZipKitWallet)
|
|
34
|
-
var ZipKitWallet_1 = require("./ZipKitWallet");
|
|
35
|
-
Object.defineProperty(exports, "ZipKitWallet", { enumerable: true, get: function () { return ZipKitWallet_1.ZipKitWallet; } });
|
|
36
|
-
Object.defineProperty(exports, "WalletAnalyzer", { enumerable: true, get: function () { return ZipKitWallet_1.WalletAnalyzer; } });
|
|
37
|
-
// Export OpenTimestamps utilities
|
|
38
|
-
var ZipKitOTS_1 = require("./ZipKitOTS");
|
|
39
|
-
Object.defineProperty(exports, "createTimestamp", { enumerable: true, get: function () { return ZipKitOTS_1.createTimestamp; } });
|
|
40
|
-
Object.defineProperty(exports, "deserializeOts", { enumerable: true, get: function () { return ZipKitOTS_1.deserializeOts; } });
|
|
41
|
-
Object.defineProperty(exports, "parseVerifyResult", { enumerable: true, get: function () { return ZipKitOTS_1.parseVerifyResult; } });
|
|
42
|
-
Object.defineProperty(exports, "createCertificateOts", { enumerable: true, get: function () { return ZipKitOTS_1.createCertificateOts; } });
|
|
43
|
-
Object.defineProperty(exports, "upgradeOTS", { enumerable: true, get: function () { return ZipKitOTS_1.upgradeOTS; } });
|
|
44
|
-
Object.defineProperty(exports, "createOtsMetadataEntry", { enumerable: true, get: function () { return ZipKitOTS_1.createOtsMetadataEntry; } });
|
|
45
|
-
Object.defineProperty(exports, "bufferToArrayBuffer", { enumerable: true, get: function () { return ZipKitOTS_1.bufferToArrayBuffer; } });
|
|
46
|
-
Object.defineProperty(exports, "getOtsEntry", { enumerable: true, get: function () { return ZipKitOTS_1.getOtsEntry; } });
|
|
47
|
-
Object.defineProperty(exports, "getOtsBuffer", { enumerable: true, get: function () { return ZipKitOTS_1.getOtsBuffer; } });
|
|
48
|
-
Object.defineProperty(exports, "getMerkleRootSafe", { enumerable: true, get: function () { return ZipKitOTS_1.getMerkleRootSafe; } });
|
|
49
|
-
Object.defineProperty(exports, "verifyOts", { enumerable: true, get: function () { return ZipKitOTS_1.verifyOts; } });
|
|
50
|
-
Object.defineProperty(exports, "verifyOtsZip", { enumerable: true, get: function () { return ZipKitOTS_1.verifyOtsZip; } });
|
|
21
|
+
exports.configureLoggerFromEnvironment = exports.Logger = exports.ZipkitWallet = exports.WalletManagerNode = void 0;
|
|
22
|
+
// Export core blockchain functionality (platform-agnostic)
|
|
23
|
+
__exportStar(require("./core"), exports);
|
|
24
|
+
// Export browser-specific blockchain functionality
|
|
25
|
+
__exportStar(require("./browser"), exports);
|
|
26
|
+
// Export Node.js-specific blockchain functionality (only WalletManagerNode is Node-specific)
|
|
27
|
+
var node_1 = require("./node");
|
|
28
|
+
Object.defineProperty(exports, "WalletManagerNode", { enumerable: true, get: function () { return node_1.WalletManagerNode; } });
|
|
29
|
+
Object.defineProperty(exports, "ZipkitWallet", { enumerable: true, get: function () { return node_1.ZipkitWallet; } });
|
|
30
|
+
// Export Logger utility for console control (from core module)
|
|
31
|
+
var core_1 = require("../core");
|
|
32
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return core_1.Logger; } });
|
|
33
|
+
Object.defineProperty(exports, "configureLoggerFromEnvironment", { enumerable: true, get: function () { return core_1.configureLoggerFromEnvironment; } });
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blockchain/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAEH,2DAA2D;AAC3D,yCAAuB;AAEvB,mDAAmD;AACnD,4CAA0B;AAE1B,6FAA6F;AAC7F,+BAGgB;AAFd,yGAAA,iBAAiB,OAAA;AACjB,oGAAA,YAAY,OAAA;AAUd,+DAA+D;AAC/D,gCAAiE;AAAxD,8FAAA,MAAM,OAAA;AAAE,sHAAA,8BAA8B,OAAA"}
|