tusdt-cli 0.2.4__tar.gz → 0.2.5__tar.gz

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.
Files changed (26) hide show
  1. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/PKG-INFO +1 -1
  2. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/pyproject.toml +1 -1
  3. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/__init__.py +1 -1
  4. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/governance.py +20 -11
  5. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/.gitignore +0 -0
  6. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/LICENSE +0 -0
  7. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/README.md +0 -0
  8. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/requirements.txt +0 -0
  9. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/abi/tusdt_auction.json +0 -0
  10. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/abi/tusdt_erc20.json +0 -0
  11. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/abi/tusdt_governance.json +0 -0
  12. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/abi/tusdt_oracle.json +0 -0
  13. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/abi/tusdt_treasury.json +0 -0
  14. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/abi/tusdt_vault.json +0 -0
  15. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/cli.py +0 -0
  16. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/client.py +0 -0
  17. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/__init__.py +0 -0
  18. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/auction.py +0 -0
  19. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/oracle.py +0 -0
  20. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/token.py +0 -0
  21. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/treasury.py +0 -0
  22. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/commands/vault.py +0 -0
  23. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/config.py +0 -0
  24. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/utils.py +0 -0
  25. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/src/tusdt_cli/wallet.py +0 -0
  26. {tusdt_cli-0.2.4 → tusdt_cli-0.2.5}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tusdt-cli
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: CLI for interacting with the TUSDT ink! smart contract system on subtensor(bittensor)
5
5
  Project-URL: Homepage, https://github.com/tensorusd/tusdt-cli
6
6
  Project-URL: Repository, https://github.com/tensorusd/tusdt-cli
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tusdt-cli"
7
- version = "0.2.4"
7
+ version = "0.2.5"
8
8
  description = "CLI for interacting with the TUSDT ink! smart contract system on subtensor(bittensor)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,3 +1,3 @@
1
1
  """TUSDT CLI - Command-line interface for the TUSDT ink! smart contract system."""
2
2
 
3
- __version__ = "0.2.4"
3
+ __version__ = "0.2.5"
@@ -1257,10 +1257,11 @@ def submit_proposal_cmd(
1257
1257
  )
1258
1258
  @click.option(
1259
1259
  "--proof",
1260
- type=str,
1260
+ "proofs",
1261
+ multiple=True,
1261
1262
  required=True,
1262
1263
  metavar="<hex-string>",
1263
- help="Merkle proof as hex-encoded bytes (e.g. 0x...)",
1264
+ help="Merkle proof hash as hex-encoded 32 bytes (repeatable, e.g. --proof 0xabc... --proof 0xdef...)",
1264
1265
  )
1265
1266
  @_wallet_option
1266
1267
  @_network_option
@@ -1272,7 +1273,7 @@ def vote_cmd(
1272
1273
  support: bool,
1273
1274
  balance: str,
1274
1275
  multiplier_bps: int,
1275
- proof: str,
1276
+ proofs: tuple[str, ...],
1276
1277
  wallet_name: str | None,
1277
1278
  network: str | None,
1278
1279
  ) -> None:
@@ -1280,9 +1281,10 @@ def vote_cmd(
1280
1281
 
1281
1282
  \b
1282
1283
  PROPOSAL_ID is the numeric proposal ID (integer).
1284
+ Each --proof is a hex-encoded 32-byte Merkle proof hash; repeat for multiple proof nodes.
1283
1285
  Examples:
1284
- tusdt governance vote 0 --hotkey 5GrwvaEF... --support --balance 1000 --multiplier-bps 10000 --proof 0xabcdef --wallet-name MyWallet
1285
- tusdt governance vote 0 --hotkey 5GrwvaEF... --oppose --balance 500 --multiplier-bps 10000 --proof 0xabcdef --wallet-name MyWallet
1286
+ tusdt governance vote 0 --hotkey 5GrwvaEF... --support --balance 1000 --multiplier-bps 10000 --proof 0x5637... --wallet-name MyWallet
1287
+ tusdt governance vote 0 --hotkey 5GrwvaEF... --oppose --balance 500 --multiplier-bps 10000 --proof 0x5637... --proof 0x8087... --wallet-name MyWallet
1286
1288
  """
1287
1289
  config = load_config(network=network)
1288
1290
  if wallet_name:
@@ -1290,12 +1292,19 @@ def vote_cmd(
1290
1292
  decimals = config.get("decimals", 9)
1291
1293
  raw_balance = parse_balance(balance, decimals)
1292
1294
 
1293
- # Convert hex proof to list of ints
1294
- proof_hex = proof.strip()
1295
- if proof_hex.startswith("0x"):
1296
- proof_hex = proof_hex[2:]
1297
- proof_bytes = bytes.fromhex(proof_hex)
1298
- proof_list = list(proof_bytes)
1295
+ # Convert each hex proof hash to a list of 32 bytes (MerkleHash = [u8; 32])
1296
+ proof_list = []
1297
+ for proof_hex in proofs:
1298
+ ph = proof_hex.strip()
1299
+ if ph.startswith("0x"):
1300
+ ph = ph[2:]
1301
+ proof_bytes = bytes.fromhex(ph)
1302
+ if len(proof_bytes) != 32:
1303
+ print_error(
1304
+ f"Each --proof must be exactly 32 bytes (64 hex chars), got {len(proof_bytes)} bytes"
1305
+ )
1306
+ return
1307
+ proof_list.append(list(proof_bytes))
1299
1308
 
1300
1309
  try:
1301
1310
  keypair = get_signer_keypair(config)
File without changes
File without changes
File without changes
File without changes
File without changes