hive-nectar 0.0.10__py3-none-any.whl → 0.1.0__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 hive-nectar might be problematic. Click here for more details.

Files changed (56) hide show
  1. {hive_nectar-0.0.10.dist-info → hive_nectar-0.1.0.dist-info}/METADATA +10 -11
  2. hive_nectar-0.1.0.dist-info/RECORD +88 -0
  3. nectar/__init__.py +1 -4
  4. nectar/account.py +791 -685
  5. nectar/amount.py +82 -21
  6. nectar/asset.py +1 -2
  7. nectar/block.py +34 -22
  8. nectar/blockchain.py +111 -143
  9. nectar/blockchaininstance.py +396 -247
  10. nectar/blockchainobject.py +33 -5
  11. nectar/cli.py +1058 -1349
  12. nectar/comment.py +317 -182
  13. nectar/community.py +39 -43
  14. nectar/constants.py +1 -14
  15. nectar/discussions.py +793 -139
  16. nectar/hive.py +137 -77
  17. nectar/hivesigner.py +106 -68
  18. nectar/imageuploader.py +33 -23
  19. nectar/instance.py +31 -79
  20. nectar/market.py +128 -264
  21. nectar/memo.py +40 -13
  22. nectar/message.py +23 -10
  23. nectar/nodelist.py +118 -82
  24. nectar/price.py +80 -61
  25. nectar/profile.py +6 -3
  26. nectar/rc.py +45 -25
  27. nectar/snapshot.py +285 -163
  28. nectar/storage.py +16 -5
  29. nectar/transactionbuilder.py +132 -41
  30. nectar/utils.py +37 -17
  31. nectar/version.py +1 -1
  32. nectar/vote.py +171 -30
  33. nectar/wallet.py +26 -19
  34. nectar/witness.py +153 -54
  35. nectarapi/graphenerpc.py +147 -133
  36. nectarapi/noderpc.py +12 -6
  37. nectarapi/rpcutils.py +12 -6
  38. nectarapi/version.py +1 -1
  39. nectarbase/ledgertransactions.py +24 -1
  40. nectarbase/objects.py +17 -6
  41. nectarbase/operations.py +160 -90
  42. nectarbase/signedtransactions.py +38 -2
  43. nectarbase/version.py +1 -1
  44. nectargraphenebase/account.py +295 -17
  45. nectargraphenebase/chains.py +0 -135
  46. nectargraphenebase/ecdsasig.py +152 -176
  47. nectargraphenebase/types.py +18 -4
  48. nectargraphenebase/unsignedtransactions.py +1 -1
  49. nectargraphenebase/version.py +1 -1
  50. hive_nectar-0.0.10.dist-info/RECORD +0 -91
  51. nectar/blurt.py +0 -562
  52. nectar/conveyor.py +0 -308
  53. nectar/steem.py +0 -581
  54. {hive_nectar-0.0.10.dist-info → hive_nectar-0.1.0.dist-info}/WHEEL +0 -0
  55. {hive_nectar-0.0.10.dist-info → hive_nectar-0.1.0.dist-info}/entry_points.txt +0 -0
  56. {hive_nectar-0.0.10.dist-info → hive_nectar-0.1.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -101,11 +101,39 @@ class BlockchainObject(dict):
101
101
  *args,
102
102
  **kwargs,
103
103
  ):
104
- if blockchain_instance is None:
105
- if kwargs.get("steem_instance"):
106
- blockchain_instance = kwargs["steem_instance"]
107
- elif kwargs.get("hive_instance"):
108
- blockchain_instance = kwargs["hive_instance"]
104
+ """
105
+ Initialize a BlockchainObject, setting its identifier and optionally loading or caching its data.
106
+
107
+ This constructor accepts a variety of `data` forms:
108
+ - dict or instance of `klass`: uses the mapping directly as the object's data.
109
+ - int: treated as a block number (identifier) and stored under `id_item`.
110
+ - str: treated as an object identifier string and stored under `id_item`.
111
+ - other scalar identifiers: validated with test_valid_objectid and may trigger a lookup.
112
+
113
+ Behavioral notes:
114
+ - If `lazy` is False the constructor may call refresh() to populate the object from the blockchain.
115
+ - If `use_cache` is True and not lazy, the object will be stored in the class-level cache and marked as cached.
116
+ - Raises ValueError if `data` is a list, set, or tuple (these collection types are not supported).
117
+
118
+ Parameters:
119
+ data: dict, instance, int, str, or identifier
120
+ The source for the object's data or its identifier.
121
+ klass (optional): type
122
+ If provided and `data` is an instance of this type, the instance's mapping is used directly.
123
+ space_id (int, optional):
124
+ Numeric namespace for the object type (defaults to 1).
125
+ object_id (optional):
126
+ Explicit object id value — kept for callers that supply it but not otherwise interpreted by the constructor.
127
+ lazy (bool, optional):
128
+ If True, defer loading object contents (do not call refresh()).
129
+ use_cache (bool, optional):
130
+ If True and not lazy, store the constructed object in the class cache.
131
+ id_item (str, optional):
132
+ Key name used to read/write the object's identifier in the underlying mapping (defaults to "id").
133
+
134
+ Raises:
135
+ ValueError: if `data` is a list, set, or tuple.
136
+ """
109
137
  self.blockchain = blockchain_instance or shared_blockchain_instance()
110
138
  self.cached = False
111
139
  self.identifier = None