hfc.fabric.transaction.tx_context¶
Module Contents¶
Classes¶
|
A class represent Transaction context. |
Functions¶
|
Validate transaction context |
|
Create transaction context |
-
class
hfc.fabric.transaction.tx_context.TXContext(user, crypto, tx_prop_req, prop_wait_time=-1)¶ Bases:
objectA class represent Transaction context.
-
get_attrs(self)¶
-
__str__(self)¶ Return str(self).
-
property
tx_id(self)¶ Get transaction id.
-
property
epoch(self)¶ Get epoch.
-
property
nonce(self)¶ Get nonce
-
property
identity(self)¶ Get identity
-
sign(self, plain_text)¶ Sign the text
- Parameters
plain_text – plain text
- Returns
the signed text
-
property
prop_wait_time(self)¶ Get proposal wait time
-
property
tx_prop_req(self)¶ Get transaction proposal request
-
property
user(self)¶ Get request user
-
property
crypto(self)¶ Get
-
-
hfc.fabric.transaction.tx_context.validate(tx_context)¶ Validate transaction context
- Parameters
tx_context – transaction context
- Returns
transaction context if no error
- Raises
ValueError – Invalid transaction context
-
hfc.fabric.transaction.tx_context.create_tx_context(user, crypto, tx_prop_req, prop_wait_time=-1)¶ Create transaction context
- Parameters
tx_prop_req – transaction proposal request
user – user
crypto – crypto
prop_wait_time – proposal wait time
- Returns
a transaction context instance (Default value = -1)