hippius 0.2.32__py3-none-any.whl → 0.2.33__py3-none-any.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hippius
3
- Version: 0.2.32
3
+ Version: 0.2.33
4
4
  Summary: Python SDK and CLI for Hippius blockchain storage
5
5
  Home-page: https://github.com/thenervelab/hippius-sdk
6
6
  Author: Dubs
@@ -1,24 +1,24 @@
1
- hippius_sdk/__init__.py,sha256=8FFxrpAn61D-ViCK1aikqZ6-5TLbGt1T4kTHygQ1nfA,1474
1
+ hippius_sdk/__init__.py,sha256=CvasBbIH70_O5Hdlb4pyWtTwY4FLMxo_W3QZbaHdApo,1474
2
2
  hippius_sdk/cli.py,sha256=aqKOYSBSWt7UhcpFt7wf9yIPJ3bznpsJ6ehOnuZ4usI,18235
3
- hippius_sdk/cli_assets.py,sha256=V3MX63QTiex6mCp0VDXQJ7cagm5v1s4xtsu8c1O4G_k,371
4
- hippius_sdk/cli_handlers.py,sha256=TQNE9os87gRzRKLEO-SIwhFnBtEFMiaSESv-Bu7omfo,128909
3
+ hippius_sdk/cli_assets.py,sha256=rjH3Z5A1CQr2d5CIAAAb0WMCjoZZlMWcdo0f93KqluE,635
4
+ hippius_sdk/cli_handlers.py,sha256=2V9fKTCnYrGVAMEPF6wZ2-NCF612SZUH13hApptx_gw,129125
5
5
  hippius_sdk/cli_parser.py,sha256=z7UvgWvvy04ey-R56qZiCqYc_9RaNq1rVDkQyXoK3JU,21100
6
6
  hippius_sdk/cli_rich.py,sha256=_jTBYMdHi2--fIVwoeNi-EtkdOb6Zy_O2TUiGvU3O7s,7324
7
- hippius_sdk/client.py,sha256=4Y2OdoXay2tBOsZVvXyxXccDkmtQ3R8YTUtlAMZBKfU,22545
7
+ hippius_sdk/client.py,sha256=JIoKwq3YskuJO4YoRU8hJxVrCnk-t2oP6VDjEwZLIco,22666
8
8
  hippius_sdk/config.py,sha256=Hf_aUYzG9ylzqauA_ABUSSB5mBTYbp-VtB36VQt2XDw,21981
9
9
  hippius_sdk/db/README.md,sha256=okDeI1qgkaZqXSlJ8L0xIE4UpuxO-qEGPIbXUvSHQjU,2030
10
10
  hippius_sdk/db/env.db.template,sha256=_6hEC3IvkzCDOAzG1_yJUKRUfCTMciNaJUicZpMCat4,217
11
11
  hippius_sdk/db/migrations/20241201000001_create_key_storage_tables.sql,sha256=mi4-6OofgsmJq3PTG4ew8VNucoeb7iejyqd-bado7Mc,1613
12
12
  hippius_sdk/db/migrations/20241202000001_switch_to_subaccount_encryption.sql,sha256=jBBeo2UYlEQIsyyQRPf0YsAykWpGfafN2E6dlDwAA_E,1399
13
- hippius_sdk/db/setup_database.sh,sha256=bDeIiTnMuX0AYCdefAfEI1CyXho6A6kLzufsDZFSXpE,3118
13
+ hippius_sdk/db/setup_database.sh,sha256=STp03qxkp2RmIVr6YZIcvQQm-_LLUOb6Jobh-52HWmg,3115
14
14
  hippius_sdk/db_utils.py,sha256=-x0rbN0as7Tn3PJPZBYCgreZe52FLH40ppA1TLxsg90,1851
15
15
  hippius_sdk/errors.py,sha256=LScJJmawVAx7aRzqqQguYSkf9iazSjEQEBNlD_GXZ6Y,1589
16
- hippius_sdk/ipfs.py,sha256=1kjWAMeGMAn8vpIrrpjAxTHvnCwruhFtWjQ18iGXSU8,95383
16
+ hippius_sdk/ipfs.py,sha256=22xHOrOer2KHvSMepaUNRMYAK04L-AKyv8sEPSAYg7g,95429
17
17
  hippius_sdk/ipfs_core.py,sha256=eOOgLoyP9mvwndnCjldnTc7z94ImYCXY3nm7JU3e_Mo,12676
18
18
  hippius_sdk/key_storage.py,sha256=SXFd6aGQw9MDLGX2vSBuAY7rdX-k5EvFm63z7_n-8yQ,8148
19
19
  hippius_sdk/substrate.py,sha256=MFQcJARFw-Ej1WDSPGF8ryejXLmda5DdqcwPYS-KI10,49668
20
20
  hippius_sdk/utils.py,sha256=rJ611yvwKSyiBpYU3w-SuyQxoghMGU-ePuslrPv5H5g,7388
21
- hippius-0.2.32.dist-info/METADATA,sha256=8nDrlRkci7_eTNeKFQKsn2VDsQVSuAnT6esx9NVYyg8,30088
22
- hippius-0.2.32.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
23
- hippius-0.2.32.dist-info/entry_points.txt,sha256=bFAZjW3vndretf9-8s587jA2ebMVI7puhn_lVs8jPc8,149
24
- hippius-0.2.32.dist-info/RECORD,,
21
+ hippius-0.2.33.dist-info/METADATA,sha256=5dJwfcoCSSv53prz-quMpGu99WQhNDWJhF6uT81iUYE,30088
22
+ hippius-0.2.33.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
23
+ hippius-0.2.33.dist-info/entry_points.txt,sha256=bFAZjW3vndretf9-8s587jA2ebMVI7puhn_lVs8jPc8,149
24
+ hippius-0.2.33.dist-info/RECORD,,
hippius_sdk/__init__.py CHANGED
@@ -26,7 +26,7 @@ from hippius_sdk.config import (
26
26
  from hippius_sdk.ipfs import IPFSClient, S3PublishResult, S3DownloadResult
27
27
  from hippius_sdk.utils import format_cid, format_size, hex_to_ipfs_cid
28
28
 
29
- __version__ = "0.2.32"
29
+ __version__ = "0.2.33"
30
30
  __all__ = [
31
31
  "HippiusClient",
32
32
  "IPFSClient",
hippius_sdk/cli_assets.py CHANGED
@@ -1,7 +1,10 @@
1
1
  HERO_TITLE = """
2
- ┬┬┌─┐┌─┐┬┬ ┬┌─┐
3
- ├─┤│├─┘├─┘││ │└─┐
4
- ┴┴┴ ┴└─┘└─┘
2
+ ▄ █ ▄█ █ ▄▄ █ ▄▄ ▄█ ▄ ▄▄▄▄▄
3
+ █ █ ██ █ █ █ █ ██ █ █ ▀▄
4
+ ██▀▀█ ██ █▀▀▀ █▀▀▀ ██ █ █ ▄ ▀▀▀▀▄
5
+ █ █ ▐█ █ █ ▐█ █ █ ▀▄▄▄▄▀
6
+ █ ▐ █ █ ▐ █▄ ▄█
7
+ ▀ ▀ ▀ ▀▀▀
5
8
  """
6
9
  LOGIN_ASSET = """
7
10
  ┬ ┬┬┌─┐┌─┐┬┬ ┬┌─┐
@@ -129,6 +129,11 @@ def create_client(args: Any) -> HippiusClient:
129
129
  hasattr(args, "no_publish") and args.no_publish
130
130
  ):
131
131
  needs_password = True
132
+ # Special case for pin - only needs password if we're publishing
133
+ elif command == "pin" and not (
134
+ hasattr(args, "no_publish") and args.no_publish
135
+ ):
136
+ needs_password = True
132
137
 
133
138
  # If this command doesn't need password access, set to empty string to skip prompting
134
139
  if not needs_password:
@@ -2933,9 +2938,9 @@ def handle_account_login() -> int:
2933
2938
  """Handle the account login command - prompts for account details and creates an account"""
2934
2939
  try:
2935
2940
  # Display the login banner
2936
- from hippius_sdk.cli_assets import LOGIN_ASSET
2941
+ from hippius_sdk.cli_assets import HERO_TITLE
2937
2942
 
2938
- console.print(LOGIN_ASSET, style="bold cyan")
2943
+ console.print(HERO_TITLE, style="bold cyan")
2939
2944
  console.print(
2940
2945
  "\n[bold blue]Welcome to Hippius![/bold blue] Let's set up your account.\n"
2941
2946
  )
hippius_sdk/client.py CHANGED
@@ -463,6 +463,7 @@ class HippiusClient:
463
463
  cid: str,
464
464
  cancel_from_blockchain: bool = True,
465
465
  seed_phrase: Optional[str] = None,
466
+ unpin: bool = True,
466
467
  ) -> Dict[str, Any]:
467
468
  """
468
469
  Delete a file from IPFS and optionally cancel its storage on the blockchain.
@@ -471,7 +472,7 @@ class HippiusClient:
471
472
  cid: Content Identifier (CID) of the file to delete
472
473
  cancel_from_blockchain: Whether to also cancel the storage request from the blockchain
473
474
  seed_phrase: Optional seed phrase to use for blockchain interactions (uses config if None)
474
-
475
+ unpin: whether to unpin or not.
475
476
  Returns:
476
477
  Dict containing the result of the operation
477
478
 
@@ -479,7 +480,10 @@ class HippiusClient:
479
480
  RuntimeError: If deletion fails completely
480
481
  """
481
482
  return await self.ipfs_client.delete_file(
482
- cid, cancel_from_blockchain, seed_phrase=seed_phrase
483
+ cid,
484
+ cancel_from_blockchain,
485
+ seed_phrase=seed_phrase,
486
+ unpin=unpin,
483
487
  )
484
488
 
485
489
  async def delete_ec_file(
@@ -39,6 +39,7 @@ echo " SSL Mode: $DB_SSLMODE"
39
39
 
40
40
  # Construct DATABASE_URL for dbmate
41
41
  export DATABASE_URL="postgresql://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME?sslmode=$DB_SSLMODE"
42
+ echo $DATABASE_URL
42
43
 
43
44
  # Create database if it doesn't exist
44
45
  echo "📝 Creating database $DB_NAME..."
@@ -48,8 +49,8 @@ PGPASSWORD=$DB_PASSWORD createdb -h $DB_HOST -p $DB_PORT -U $DB_USER $DB_NAME 2>
48
49
  echo "🚀 Running database migrations..."
49
50
  if command -v dbmate &> /dev/null; then
50
51
  # Use explicit --migrations-dir flag to override any config
51
- echo "📁 Using migrations from: $(pwd)/hippius_s3/sql/sdk_migrations"
52
- dbmate --migrations-dir="hippius_s3/sql/sdk_migrations" up
52
+ echo "📁 Using migrations from: $(pwd)/hippius_sdk/db/migrations"
53
+ dbmate --migrations-dir="hippius_sdk/db/migrations" up
53
54
  echo "✅ Database migrations completed successfully!"
54
55
  else
55
56
  echo "❌ dbmate not found. Please install it first:"
@@ -80,7 +81,7 @@ echo "🎉 Setup complete! Key storage is ready to use."
80
81
  echo ""
81
82
  echo "📋 What was set up:"
82
83
  echo " - Database: hippius_keys"
83
- echo " - Tables: seed_phrases, encryption_keys"
84
+ echo " - Tables: encryption_keys"
84
85
  echo " - SDK config: key_storage enabled"
85
86
  echo ""
86
87
  echo "🧪 Test with: python test_key_storage.py"
hippius_sdk/ipfs.py CHANGED
@@ -1759,7 +1759,9 @@ class IPFSClient:
1759
1759
  print(
1760
1760
  f"Note: IPFS server reported content may already be unpinned: {cid}"
1761
1761
  )
1762
- result["unpin_result"] = {"Pins": [cid]} # Simulate successful unpin
1762
+ result["unpin_result"] = {
1763
+ "Pins": [cid]
1764
+ } # Simulate successful unpin
1763
1765
  result["success"] = True
1764
1766
  else:
1765
1767
  print(