UNPKG

wttp-core

Version:

Core contracts, interfaces, and TypeScript types for the Web3 Transfer Protocol (WTTP).

85 lines (70 loc) 3.3 kB
# WTTP Core - Publication Timestamp **Original Publication Date**: June 2025 **Copyright**: TechnicallyWeb3 **License**: AGPL-3.0 ## Code Fingerprint This file serves as proof of original publication for the WTTP Core codebase. ### Core Components Published: - **IWTTPSite.sol**: Complete WTTP Site interface specification - **IWTTPGateway.sol**: Gateway routing and caching interface - **IWTTPStorage.sol**: Decentralized storage abstraction layer - **IWTTPPermissions.sol**: Access control and authorization framework - **WTTPTypes.sol**: Complete protocol type definitions and structures - **TypeScript Integration**: Full TypeChain type generation and export system ### Innovation Claims: 1. **WTTP Protocol Architecture**: First standardized Web3 Transfer Protocol with complete HTTP-compatible request/response cycle 2. **Multi-Storage Abstraction**: Universal interface supporting IPFS, Arweave, and custom storage backends through unified API 3. **Smart Contract Web Hosting**: First production-ready smart contract system for decentralized website hosting with caching 4. **ESP Integration Framework**: Seamless integration with External Service Providers for enhanced functionality ### Hash of Core Algorithm (WTTP Request Processing): ```solidity function handleRequest( HEADRequest memory request, bytes32 storageRoot, PermissionLevel requiredLevel ) external view returns (HEADResponse memory) { // Validate request structure and permissions require(_hasPermission(msg.sender, requiredLevel), "Insufficient permissions"); // Process path resolution and storage lookup StoragePointer memory pointer = _resolveStoragePath(request.requestLine.path, storageRoot); // Generate response with caching headers return HEADResponse({ statusCode: 200, contentLength: pointer.size, contentType: pointer.mimeType, lastModified: pointer.lastModified, etag: pointer.contentHash, storagePointer: pointer }); } ``` **Algorithm Hash**: `keccak256("wttp_request_processing_v3_core_TW3")` ### WTTP Type System Innovation: ```solidity struct RequestLine { string protocol; // "WTTP/3.0" string path; // "/index.html" Method method; // GET, HEAD, POST, etc. } struct StoragePointer { address storageContract; bytes32 contentHash; uint256 size; string mimeType; uint256 lastModified; } ``` **Type System Hash**: `keccak256("wttp_types_v3_protocol_TW3")` ## Anti-Plagiarism Notice This codebase contains proprietary innovations developed by TechnicallyWeb3. Any derivative works claiming these innovations as original developments will be pursued for copyright infringement under the AGPL-3.0 license terms. **Key Innovations Protected:** - WTTP protocol specification and implementation - Multi-storage backend abstraction architecture - Smart contract web hosting methodology - ESP integration framework design - TypeChain integration patterns for web3 protocols **Legal Contacts**: contact@technicallyweb3.com **Repository**: https://github.com/TechnicallyWeb3/wttp-core **NPM Package**: wttp-core, @tw3/wttp-core --- *This timestamp file is part of the official WTTP Core publication and serves as legal proof of original authorship.*