Skip to content

Commit 39de744

Browse files
committed
feat: add IPackageRegistry
1 parent 06b8436 commit 39de744

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.0;
3+
4+
/// @title IPackageRegistry
5+
/// @notice Interface for EthPM v3 Package Registry based on EIP-2678
6+
/// @dev Defines functions for publishing and retrieving packages
7+
interface IPackageRegistry {
8+
/// @notice Publish a package to the registry
9+
/// @param name Package name (lowercase, numbers, hyphens only)
10+
/// @param version Package version
11+
/// @param manifestURI Content-addressable URI (e.g., ipfs://)
12+
function publish(string calldata name, string calldata version, string calldata manifestURI) external;
13+
14+
/// @notice Get package manifest URI
15+
/// @param name Package name
16+
/// @param version Package version
17+
/// @return manifestURI The content-addressable URI of the package manifest
18+
function getPackageURI(string calldata name, string calldata version) external view returns (string memory);
19+
20+
/// @notice Check if package version exists
21+
/// @param name Package name
22+
/// @param version Package version
23+
/// @return exists True if package exists
24+
function packageExists(string calldata name, string calldata version) external view returns (bool);
25+
}
26+

0 commit comments

Comments
 (0)