astreum 0.2.36__py3-none-any.whl → 0.2.38__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.

Potentially problematic release.


This version of astreum might be problematic. Click here for more details.

astreum/models/block.py CHANGED
@@ -53,10 +53,10 @@ class Block:
53
53
  self.transactions_count = transactions_count
54
54
  self.delay_difficulty = delay_difficulty
55
55
  self.delay_output = delay_output
56
- self.delay_proof = delay_proof
57
- self.validator_pk = validator_pk
58
- self.body_tree = body_tree
59
- self.signature = signature
56
+ self.delay_proof = delay_proof
57
+ self.validator_pk = validator_pk
58
+ self.body_tree = body_tree
59
+ self.signature = signature
60
60
 
61
61
  @property
62
62
  def hash(self) -> bytes:
@@ -68,11 +68,20 @@ class Block:
68
68
  raise ValueError("Body tree not available for this block instance.")
69
69
  return self._body_tree.root_hash
70
70
 
71
- def get_signature(self) -> bytes:
72
- """Return the block's signature leaf."""
73
- if self._signature is None:
74
- raise ValueError("Signature not available for this block instance.")
75
- return self._signature
71
+ def get_signature(self) -> bytes:
72
+ """Return the block's signature leaf."""
73
+ if self._signature is None:
74
+ raise ValueError("Signature not available for this block instance.")
75
+ return self._signature
76
+
77
+ # Backwards/forwards alias for clarity with external specs
78
+ @property
79
+ def validator_public_key(self) -> Optional[bytes]:
80
+ return self.validator_pk
81
+
82
+ @validator_public_key.setter
83
+ def validator_public_key(self, value: Optional[bytes]) -> None:
84
+ self.validator_pk = value
76
85
 
77
86
  def get_field(self, name: str) -> Union[int, bytes]:
78
87
  """Query a single body field by name, returning an int or bytes."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: astreum
3
- Version: 0.2.36
3
+ Version: 0.2.38
4
4
  Summary: Python library to interact with the Astreum blockchain and its Lispeum virtual machine.
5
5
  Author-email: "Roy R. O. Okello" <roy@stelar.xyz>
6
6
  Project-URL: Homepage, https://github.com/astreum/lib
@@ -79,7 +79,7 @@ The Lispeum virtual machine (VM) is embedded inside `astreum.Node`. You feed it
79
79
  # Define a named function int.add (stack body) and call it with bytes 1 and 2
80
80
 
81
81
  import uuid
82
- from astreum._node import Node, Env, Expr
82
+ from astreum import Node, Env, Expr
83
83
 
84
84
  # 1) Spin‑up a stand‑alone VM
85
85
  node = Node()
@@ -139,6 +139,8 @@ except ParseError as e:
139
139
  ## Testing
140
140
 
141
141
  ```bash
142
+ python3 -m venv venv
142
143
  source venv/bin/activate
144
+ pip install -e .
143
145
  python3 -m unittest discover -s tests
144
146
  ```
@@ -1,15 +1,27 @@
1
- astreum/__init__.py,sha256=oIrOJ0DZZByGtiIaupDBLhIOLL2nm0FOI7uWhDcaIsk,51
2
- astreum/_node.py,sha256=YWz7RASGM9qCHJEQoldehzcnWBhS3jLbRfT6_VlWZcM,5391
1
+ astreum/__init__.py,sha256=9tzA27B_eG5wRF1SAWJIV7xTmCcR1QFc123b_cvFOa4,345
2
+ astreum/_node.py,sha256=RCGi99yliygs9aduNItlhfGREn7emLxFr7aAWQ1uafc,2220
3
3
  astreum/format.py,sha256=X4tG5GGPweNCE54bHYkLFiuLTbmpy5upO_s1Cef-MGA,2711
4
4
  astreum/node.py,sha256=SuVm1b0QWl1FpDUaLRH1fiFYnXCrPs6qYeUQlPDae8w,38358
5
- astreum/_lispeum/__init__.py,sha256=HzJp03YmP0b8IS2NtM893katuUooro_C701H08uf4i4,274
6
- astreum/_lispeum/environment.py,sha256=5SAEUgEzRlDGqtrmr-g6Za-fuuhX55GXGnZKVKxfkCQ,230
7
- astreum/_lispeum/expression.py,sha256=PS8RAahwduhnJy7-6jYaILAc0uFu1XLhbnHUJhvVwo8,1024
8
- astreum/_lispeum/high_evaluation.py,sha256=s6DJSEWLc_-05Tpk8TOaSJm0TKrC3H_YEym5pnXfPWw,8041
9
- astreum/_lispeum/low_evaluation.py,sha256=mbeA0KMeWQruAPctYJAP-L6QmU1btU0l5ScJWFF_nxA,4322
5
+ astreum/_communication/__init__.py,sha256=I6TVFC1KXtwwdCjKUkGjOhsLWfC7cECubjzqmm-SwRs,161
6
+ astreum/_communication/peer.py,sha256=DT2vJOzeLyyOj7vTDQ1u1lF5Vc7Epj0Hhie-YfDrzfA,425
7
+ astreum/_communication/route.py,sha256=enWT_1260LJq-L-zK-jtacQ8LbZGquNO9yj-9IglSXE,1232
8
+ astreum/_communication/setup.py,sha256=6KH144iaHNec9g4cvC8fcLIBY0dvx5OCjV5WVYKNcZo,3865
9
+ astreum/_lispeum/__init__.py,sha256=LAy2Z-gBBQlByBHRGUKaaQrOB7QzFEEyGRtInmwTpfU,304
10
+ astreum/_lispeum/environment.py,sha256=pJ0rjp9GoQxHhDiPIVei0jP7dZ_Pznso2O_tpp94-Ik,328
11
+ astreum/_lispeum/expression.py,sha256=io8tbCer_1TJee77yRbcNI5q-DPFGa8xZiC80tGvRRQ,1063
12
+ astreum/_lispeum/high_evaluation.py,sha256=7MwIeVZMPumYvKXn6Lkn-GrZhRNB6MjnUUWdiYT7Ei0,7952
13
+ astreum/_lispeum/low_evaluation.py,sha256=HgyCSAmL5K5SKq3Xw_BtbTZZUJbMg4-bVZW-A12glQ0,4373
10
14
  astreum/_lispeum/meter.py,sha256=5q2PFW7_jmgKVM1-vwE4RRjMfPEthUA4iu1CwR-Axws,505
11
- astreum/_lispeum/parser.py,sha256=_J-KeIZlK-PP0Wc9mAl82hyQsPG2wsgshqAc3fCNVk8,1562
15
+ astreum/_lispeum/parser.py,sha256=WOW3sSZWkIzPEy3fYTyl0lrtkMxHL9zRrNSYztPDemQ,2271
12
16
  astreum/_lispeum/tokenizer.py,sha256=P68uIj4aPKzjuCJ85jfzRi67QztpuXIOC1vvLQueBI4,552
17
+ astreum/_storage/__init__.py,sha256=EmKZNAZmo3UVE3ekOOuckwFnBVjpa0Sy8Oxg72Lgdxc,53
18
+ astreum/_storage/atom.py,sha256=w0O_jw74nGhO0hgxFHk0RmkCIgHXHweBEOVULi7_dhQ,3652
19
+ astreum/_validation/__init__.py,sha256=E2-CITedO5bIHsYG2zMr3vwmV9asF3aRWh2V3bwJShY,189
20
+ astreum/_validation/block.py,sha256=4ImViawnG0bhN-TiCk3F0byTlPm9U0l6PdSL53u3bsc,11171
21
+ astreum/_validation/chain.py,sha256=lOFbz5z0AOeMLchQ2YPRSbIZIdQlnHqDyMJvgdwJ-Iw,2532
22
+ astreum/_validation/fork.py,sha256=ZGTOVEhSiYJvvLvlC6FV8Zqe62uLTM-cSS3yKrKrLvA,3602
23
+ astreum/_validation/genesis.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ astreum/_validation/setup.py,sha256=FLutAEpW1Hh0WpGz1_k18tspc4z2RXA6hOHVaF-BmhY,8442
13
25
  astreum/crypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
26
  astreum/crypto/ed25519.py,sha256=FRnvlN0kZlxn4j-sJKl-C9tqiz_0z4LZyXLj3KIj1TQ,1760
15
27
  astreum/crypto/quadratic_form.py,sha256=pJgbORey2NTWbQNhdyvrjy_6yjORudQ67jBz2ScHptg,4037
@@ -23,7 +35,7 @@ astreum/lispeum/tokenizer.py,sha256=J-I7MEd0r2ZoVqxvRPlu-Afe2ZdM0tKXXhf1R4SxYTo,
23
35
  astreum/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
36
  astreum/models/account.py,sha256=sHujGSwtV13rvOGJ5LZXuMrJ4F9XUdvyuWKz-zJ9lkE,2986
25
37
  astreum/models/accounts.py,sha256=aFSEWlq6zRf65-KGAdNGqEJyNVY3fpKhx8y1vU6sgSc,1164
26
- astreum/models/block.py,sha256=-5j7uO0woVtNi0h52__e7AxpDQSVhzKUhr6Qc-2xZsE,17870
38
+ astreum/models/block.py,sha256=Zke4yxZ-OvmjBdGnZsnU6qDQAVFJ2B1Op8ayaz1JPSo,18163
27
39
  astreum/models/merkle.py,sha256=lvWJa9nmrBL0n_2h_uNqpB_9a5s5Hn1FceRLx0IZIVQ,6778
28
40
  astreum/models/message.py,sha256=vv8yx-ndVYjCmPM4gXRVMToCTlKY_mflPu0uKsb9iiE,2117
29
41
  astreum/models/patricia.py,sha256=ohmXrcaz7Ae561tyC4u4iPOkQPkKr8N0IWJek4upFIg,13392
@@ -35,8 +47,8 @@ astreum/relay/setup.py,sha256=ynvGaJdlDtw_f5LLiow2Wo7IRzUjvgk8eSr1Sv4_zTg,2090
35
47
  astreum/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
48
  astreum/storage/object.py,sha256=knFlvw_tpcC4twSu1DGNpHX31wlANN8E5dgEqIfU--Q,2041
37
49
  astreum/storage/setup.py,sha256=1-9ztEFI_BvRDvAA0lAn4mFya8iq65THTArlj--M3Hg,626
38
- astreum-0.2.36.dist-info/licenses/LICENSE,sha256=gYBvRDP-cPLmTyJhvZ346QkrYW_eleke4Z2Yyyu43eQ,1089
39
- astreum-0.2.36.dist-info/METADATA,sha256=P3P6HjaFqg6F1e9EVnr9OtMapOJMvtaVB0hqw486D6I,6149
40
- astreum-0.2.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
- astreum-0.2.36.dist-info/top_level.txt,sha256=1EG1GmkOk3NPmUA98FZNdKouhRyget-KiFiMk0i2Uz0,8
42
- astreum-0.2.36.dist-info/RECORD,,
50
+ astreum-0.2.38.dist-info/licenses/LICENSE,sha256=gYBvRDP-cPLmTyJhvZ346QkrYW_eleke4Z2Yyyu43eQ,1089
51
+ astreum-0.2.38.dist-info/METADATA,sha256=c-g2CirbWXU3Le0Fi6f1LJY_cJvTllbyEuTTM3PkeWE,6181
52
+ astreum-0.2.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
53
+ astreum-0.2.38.dist-info/top_level.txt,sha256=1EG1GmkOk3NPmUA98FZNdKouhRyget-KiFiMk0i2Uz0,8
54
+ astreum-0.2.38.dist-info/RECORD,,