hive-nectar 0.0.2__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.
- hive_nectar-0.0.2.dist-info/METADATA +182 -0
- hive_nectar-0.0.2.dist-info/RECORD +86 -0
- hive_nectar-0.0.2.dist-info/WHEEL +4 -0
- hive_nectar-0.0.2.dist-info/entry_points.txt +2 -0
- hive_nectar-0.0.2.dist-info/licenses/LICENSE.txt +23 -0
- nectar/__init__.py +32 -0
- nectar/account.py +4371 -0
- nectar/amount.py +475 -0
- nectar/asciichart.py +270 -0
- nectar/asset.py +82 -0
- nectar/block.py +446 -0
- nectar/blockchain.py +1178 -0
- nectar/blockchaininstance.py +2284 -0
- nectar/blockchainobject.py +221 -0
- nectar/blurt.py +563 -0
- nectar/cli.py +6285 -0
- nectar/comment.py +1217 -0
- nectar/community.py +513 -0
- nectar/constants.py +111 -0
- nectar/conveyor.py +309 -0
- nectar/discussions.py +1709 -0
- nectar/exceptions.py +149 -0
- nectar/hive.py +546 -0
- nectar/hivesigner.py +420 -0
- nectar/imageuploader.py +72 -0
- nectar/instance.py +129 -0
- nectar/market.py +1013 -0
- nectar/memo.py +449 -0
- nectar/message.py +357 -0
- nectar/nodelist.py +444 -0
- nectar/price.py +557 -0
- nectar/profile.py +65 -0
- nectar/rc.py +308 -0
- nectar/snapshot.py +726 -0
- nectar/steem.py +582 -0
- nectar/storage.py +53 -0
- nectar/transactionbuilder.py +622 -0
- nectar/utils.py +545 -0
- nectar/version.py +2 -0
- nectar/vote.py +557 -0
- nectar/wallet.py +472 -0
- nectar/witness.py +617 -0
- nectarapi/__init__.py +11 -0
- nectarapi/exceptions.py +123 -0
- nectarapi/graphenerpc.py +589 -0
- nectarapi/node.py +178 -0
- nectarapi/noderpc.py +229 -0
- nectarapi/rpcutils.py +97 -0
- nectarapi/version.py +2 -0
- nectarbase/__init__.py +14 -0
- nectarbase/ledgertransactions.py +75 -0
- nectarbase/memo.py +243 -0
- nectarbase/objects.py +429 -0
- nectarbase/objecttypes.py +22 -0
- nectarbase/operationids.py +102 -0
- nectarbase/operations.py +1297 -0
- nectarbase/signedtransactions.py +48 -0
- nectarbase/transactions.py +11 -0
- nectarbase/version.py +2 -0
- nectargrapheneapi/__init__.py +6 -0
- nectargraphenebase/__init__.py +27 -0
- nectargraphenebase/account.py +846 -0
- nectargraphenebase/aes.py +52 -0
- nectargraphenebase/base58.py +192 -0
- nectargraphenebase/bip32.py +494 -0
- nectargraphenebase/bip38.py +134 -0
- nectargraphenebase/chains.py +149 -0
- nectargraphenebase/dictionary.py +3 -0
- nectargraphenebase/ecdsasig.py +326 -0
- nectargraphenebase/objects.py +123 -0
- nectargraphenebase/objecttypes.py +6 -0
- nectargraphenebase/operationids.py +3 -0
- nectargraphenebase/operations.py +23 -0
- nectargraphenebase/prefix.py +11 -0
- nectargraphenebase/py23.py +38 -0
- nectargraphenebase/signedtransactions.py +201 -0
- nectargraphenebase/types.py +419 -0
- nectargraphenebase/unsignedtransactions.py +283 -0
- nectargraphenebase/version.py +2 -0
- nectarstorage/__init__.py +38 -0
- nectarstorage/base.py +306 -0
- nectarstorage/exceptions.py +16 -0
- nectarstorage/interfaces.py +237 -0
- nectarstorage/masterpassword.py +239 -0
- nectarstorage/ram.py +30 -0
- nectarstorage/sqlite.py +334 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
from nectargraphenebase.chains import known_chains
|
|
5
|
+
from nectargraphenebase.signedtransactions import Signed_Transaction as GrapheneSigned_Transaction
|
|
6
|
+
|
|
7
|
+
from .operations import Operation
|
|
8
|
+
|
|
9
|
+
log = logging.getLogger(__name__)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Signed_Transaction(GrapheneSigned_Transaction):
|
|
13
|
+
"""Create a signed transaction and offer method to create the
|
|
14
|
+
signature
|
|
15
|
+
|
|
16
|
+
:param num refNum: parameter ref_block_num (see :func:`nectarbase.transactions.getBlockParams`)
|
|
17
|
+
:param num refPrefix: parameter ref_block_prefix (see :func:`nectarbase.transactions.getBlockParams`)
|
|
18
|
+
:param str expiration: expiration date
|
|
19
|
+
:param array operations: array of operations
|
|
20
|
+
:param dict custom_chains: custom chain which should be added to the known chains
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def __init__(self, *args, **kwargs):
|
|
24
|
+
self.known_chains = known_chains
|
|
25
|
+
custom_chain = kwargs.get("custom_chains", {})
|
|
26
|
+
if len(custom_chain) > 0:
|
|
27
|
+
for c in custom_chain:
|
|
28
|
+
if c not in self.known_chains:
|
|
29
|
+
self.known_chains[c] = custom_chain[c]
|
|
30
|
+
super(Signed_Transaction, self).__init__(*args, **kwargs)
|
|
31
|
+
|
|
32
|
+
def add_custom_chains(self, custom_chain):
|
|
33
|
+
if len(custom_chain) > 0:
|
|
34
|
+
for c in custom_chain:
|
|
35
|
+
if c not in self.known_chains:
|
|
36
|
+
self.known_chains[c] = custom_chain[c]
|
|
37
|
+
|
|
38
|
+
def sign(self, wifkeys, chain="STEEM"):
|
|
39
|
+
return super(Signed_Transaction, self).sign(wifkeys, chain)
|
|
40
|
+
|
|
41
|
+
def verify(self, pubkeys=[], chain="STEEM", recover_parameter=False):
|
|
42
|
+
return super(Signed_Transaction, self).verify(pubkeys, chain, recover_parameter)
|
|
43
|
+
|
|
44
|
+
def getOperationKlass(self):
|
|
45
|
+
return Operation
|
|
46
|
+
|
|
47
|
+
def getKnownChains(self):
|
|
48
|
+
return self.known_chains
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def getBlockParams(ws):
|
|
5
|
+
"""Auxiliary method to obtain ``ref_block_num`` and
|
|
6
|
+
``ref_block_prefix``. Requires a websocket connection to a
|
|
7
|
+
witness node!
|
|
8
|
+
"""
|
|
9
|
+
raise DeprecationWarning(
|
|
10
|
+
"This method shouldn't be called anymore. It is part of transactionbuilder now"
|
|
11
|
+
)
|
nectarbase/version.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""nectargraphenebase."""
|
|
2
|
+
|
|
3
|
+
from .version import version as __version__
|
|
4
|
+
|
|
5
|
+
# from . import account as Account
|
|
6
|
+
# from .account import PrivateKey, PublicKey, Address, BrainKey
|
|
7
|
+
# from . import base58 as Base58
|
|
8
|
+
# from . import bip38 as Bip38
|
|
9
|
+
# from . import transactions as Transactions
|
|
10
|
+
# from . import dictionary as BrainKeyDictionary
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"account",
|
|
14
|
+
"aes",
|
|
15
|
+
"base58",
|
|
16
|
+
"bip32",
|
|
17
|
+
"bip38",
|
|
18
|
+
"types",
|
|
19
|
+
"ecdasig",
|
|
20
|
+
"chains",
|
|
21
|
+
"objects",
|
|
22
|
+
"operations",
|
|
23
|
+
"signedtransactions",
|
|
24
|
+
"unsignedtransactions",
|
|
25
|
+
"objecttypes",
|
|
26
|
+
"py23",
|
|
27
|
+
]
|