signedshot 0.1.0__cp312-cp312-macosx_10_12_x86_64.whl

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.
signedshot/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ # Re-export from the native module
2
+ from signedshot.signedshot import (
3
+ ValidationResult,
4
+ validate,
5
+ validate_files,
6
+ )
7
+
8
+ __all__ = ["ValidationResult", "validate", "validate_files"]
9
+ __version__ = "0.1.0"
@@ -0,0 +1,103 @@
1
+ """Type stubs for signedshot."""
2
+
3
+ from typing import Optional, Dict, Any
4
+
5
+ class ValidationResult:
6
+ """Result of validating a SignedShot sidecar."""
7
+
8
+ valid: bool
9
+ """Whether the validation passed all checks."""
10
+
11
+ version: str
12
+ """The sidecar version."""
13
+
14
+ error: Optional[str]
15
+ """Error message if validation failed, None if valid."""
16
+
17
+ @property
18
+ def capture_trust(self) -> Dict[str, Any]:
19
+ """Get capture trust (JWT) information.
20
+
21
+ Returns:
22
+ Dict with keys:
23
+ - signature_valid: bool
24
+ - issuer: str
25
+ - publisher_id: str
26
+ - device_id: str
27
+ - capture_id: str
28
+ - method: str (sandbox, app_check, or app_attest)
29
+ - issued_at: int (Unix timestamp)
30
+ - key_id: Optional[str]
31
+ """
32
+ ...
33
+
34
+ @property
35
+ def media_integrity(self) -> Dict[str, Any]:
36
+ """Get media integrity information.
37
+
38
+ Returns:
39
+ Dict with keys:
40
+ - content_hash_valid: bool
41
+ - signature_valid: bool
42
+ - capture_id_match: bool
43
+ - content_hash: str
44
+ - capture_id: str
45
+ - captured_at: str (ISO8601)
46
+ """
47
+ ...
48
+
49
+ def to_dict(self) -> Dict[str, Any]:
50
+ """Convert to a dictionary."""
51
+ ...
52
+
53
+ def to_json(self) -> str:
54
+ """Convert to JSON string."""
55
+ ...
56
+
57
+ def to_json_pretty(self) -> str:
58
+ """Convert to pretty-printed JSON string."""
59
+ ...
60
+
61
+ def validate(sidecar_json: str, media_bytes: bytes) -> ValidationResult:
62
+ """Validate a SignedShot sidecar against media content.
63
+
64
+ Args:
65
+ sidecar_json: The sidecar JSON as a string
66
+ media_bytes: The media file content as bytes
67
+
68
+ Returns:
69
+ ValidationResult with detailed information about the validation
70
+
71
+ Raises:
72
+ ValueError: If the sidecar cannot be parsed
73
+
74
+ Example:
75
+ >>> with open("photo.sidecar.json") as f:
76
+ ... sidecar_json = f.read()
77
+ >>> with open("photo.jpg", "rb") as f:
78
+ ... media_bytes = f.read()
79
+ >>> result = validate(sidecar_json, media_bytes)
80
+ >>> if result.valid:
81
+ ... print(f"Publisher: {result.capture_trust['publisher_id']}")
82
+ """
83
+ ...
84
+
85
+ def validate_files(sidecar_path: str, media_path: str) -> ValidationResult:
86
+ """Validate a SignedShot sidecar from file paths.
87
+
88
+ Args:
89
+ sidecar_path: Path to the sidecar JSON file
90
+ media_path: Path to the media file
91
+
92
+ Returns:
93
+ ValidationResult with detailed information about the validation
94
+
95
+ Raises:
96
+ ValueError: If the files cannot be read or parsed
97
+ FileNotFoundError: If the files do not exist
98
+
99
+ Example:
100
+ >>> result = validate_files("photo.sidecar.json", "photo.jpg")
101
+ >>> print(result)
102
+ """
103
+ ...
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.4
2
+ Name: signedshot
3
+ Version: 0.1.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.8
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Rust
14
+ Classifier: Topic :: Security :: Cryptography
15
+ Summary: Validator for SignedShot media authenticity proofs
16
+ Keywords: signedshot,media,authenticity,validation,cryptography
17
+ License: MIT
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
+ Project-URL: Homepage, https://signedshot.io
21
+ Project-URL: Repository, https://github.com/SignedShot/signedshot-validator
22
+
23
+ # SignedShot Validator
24
+
25
+ Validator for SignedShot media authenticity proofs.
26
+
27
+ ## Overview
28
+
29
+ SignedShot is a media authenticity verification system. This validator checks cryptographic proofs (sidecars) that verify media was captured on a legitimate device.
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ cargo install signedshot-validator
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ```bash
40
+ signedshot validate photo.sidecar.json
41
+ ```
42
+
43
+ ## Development
44
+
45
+ Run these checks locally before pushing (same as CI):
46
+
47
+ ```bash
48
+ cargo fmt --check # Check formatting
49
+ cargo clippy -- -D warnings # Lint
50
+ cargo test # Run tests
51
+ cargo build --release # Build
52
+ ```
53
+
54
+ To fix formatting automatically:
55
+
56
+ ```bash
57
+ cargo fmt
58
+ ```
59
+
60
+ ## License
61
+
62
+ MIT
63
+
@@ -0,0 +1,6 @@
1
+ signedshot/__init__.py,sha256=030GPpAyyNdYkKer8KUSxAhY-fuPfUD2OPMkkzlpU8o,213
2
+ signedshot/__init__.pyi,sha256=jgh88yztNJsTK9ue5UeBNzZEsJxOY40obrgFzFIrIn0,2901
3
+ signedshot/signedshot.cpython-312-darwin.so,sha256=spi6lu6w1on1kqwT6FIXEGT9SOj-QbMCFwxTRfc1jVo,4558868
4
+ signedshot-0.1.0.dist-info/METADATA,sha256=TguOEV1sVVYyl5CvSoVF8GOiTdfE6YamnJBYHlRtF90,1604
5
+ signedshot-0.1.0.dist-info/WHEEL,sha256=5PbULt6DKUkIiubOjwQPyn-vzBuHJr28QRlczaBjcdg,107
6
+ signedshot-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.11.5)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-macosx_10_12_x86_64