dposlib.ark.tx
serialize
def serialize(tx, **options)
Serialize transaction.
Arguments:
tx
dict or Transaction - transaction object.
Returns:
bytes
- transaction serial representation.
Transaction Objects
class Transaction(dict)
A python dict
that implements all the necessities to manually generate
valid transactions.
feeIncluded
If True
then amount
+ fee
= total arktoshi flow
useDynamicFee
@staticmethod
def useDynamicFee(value="minFee")
Activate and configure dynamic fees parameters. Value can be either an
integer defining the fee multiplier constant or a string defining the
fee level to use acccording to the 30-days-average. possible values are
avgFee
minFee
(default) and maxFee
.
Arguments:
value
str or int - constant or fee multiplier.
link
def link(secret=None, secondSecret=None)
Save public and private keys derived from secrets. This is equivalent to wallet login. it limits number of secret keyboard entries.
Arguments:
secret
str - passphrase.secondSecret
str - second passphrase.
sign
def sign()
Generate the signature
field. Private key have to be set first.
signSign
def signSign()
Generate the signSignature
field. Transaction have to be signed and
second private key have to be set first.
signWithSecret
def signWithSecret(secret)
Generate the signature
field using passphrase. The associated
public and private keys are stored till dposlib.ark.unlink
is called.
Arguments:
secret
str
- passphrase.
signSignWithSecondSecret
def signSignWithSecondSecret(secondSecret)
Generate the signSignature
field using second passphrase. The
associated second public and private keys are stored till
dposlib.ark.unlink
is called.
Arguments:
secondSecret
str
- second passphrase.
multiSignWithSecret
def multiSignWithSecret(secret)
Add a signature in signatures
field.
Arguments:
index
int - signature index.secret
str - passphrase.
signWithKeys
def signWithKeys(publicKey, privateKey)
Generate the signature
field using public and private keys. They
are stored till dposlib.ark.unlink
is called.
Arguments:
publicKey
str - public key as hex string.privateKey
str - private key as hex string.
signSignWithKey
def signSignWithKey(secondPrivateKey)
Generate the signSignature
field using second private key. It is
stored till dposlib.ark.unlink
is called.
Arguments:
secondPrivateKey
str
- second private key as hex string.
multiSignWithKey
def multiSignWithKey(privateKey)
Add a signature in signatures
field according to given index and
privateKey.
Arguments:
privateKey
str - private key as hex string.
appendMultiSignature
def appendMultiSignature(publicKey, signature)
Manage the place of signature in signatures list for multisignature wallet transaction or registration.
identify
def identify()
Generate the id
field. Transaction have to be signed.
finalize
def finalize(secret=None, secondSecret=None, fee=None, fee_included=False)
Finalize a transaction by setting fee
, signatures and id
.
Arguments:
secret
str - passphrase.secondSecret
str - second passphrase.fee
int - manually set fee value inarktoshi
.fee_included
bool - seedposlib.ark.tx.Transaction.feeIncluded
.