dposlib.ark.tx
serialize
def serialize(tx, **options)
Serialize transaction.
Arguments:
txdict 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:
valuestr 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:
secretstr - passphrase.secondSecretstr - 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:
secretstr- 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:
secondSecretstr- second passphrase.
multiSignWithSecret
def multiSignWithSecret(secret)
Add a signature in signatures field.
Arguments:
indexint - signature index.secretstr - 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:
publicKeystr - public key as hex string.privateKeystr - 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:
secondPrivateKeystr- second private key as hex string.
multiSignWithKey
def multiSignWithKey(privateKey)
Add a signature in signatures field according to given index and
privateKey.
Arguments:
privateKeystr - 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:
secretstr - passphrase.secondSecretstr - second passphrase.feeint - manually set fee value inarktoshi.fee_includedbool - seedposlib.ark.tx.Transaction.feeIncluded.