privex.steemengine.SteemEngineToken.SteemEngineToken.issue_token¶
- SteemEngineToken.issue_token(symbol: str, to: str, amount: Decimal, find_tx=True) dict [source]¶
Issues a specified amount
amount
ofsymbol
to the Steem accountto
.Automatically queries Steem Engine API to find issuer of the token, and broadcast using Beem.
You must have the active key of the token issuer account in your Beem wallet.
Example: Issue
1.234 SGTK
toprivex
(automatically looks up the issuer and uses that account)>>> SteemEngineToken().issue_token('SGTK', 'privex', Decimal('1.234'))
- Parameters
symbol – The symbol of the token to issue, e.g. ENG
to – The Steem username to issue the tokens to
amount – The amount of tokens to issue, will be casted to a Decimal
find_tx – If you don’t care about info such as the TXID, and what block it’s in, set to False.
- Raises
ArithmeticError – When the amount is lower than the lowest amount allowed by the token’s precision
TokenNotFound – When a token does not exist
AccountNotFound – When the
to
account doesn’t exist on Steembeem.exceptions.MissingKeyError – No active key found for the issuer in beem wallet
- Return dict
If TX was found on chain, more in-depth data including TXID, see below
{ transaction_id, ref_block_num, ref_block_prefix, expiration, operations, extensions, signatures, block_num, transaction_num }
- Return dict
If TX not found on chain, returns broadcast info:
{ expiration, ref_block_num, ref_block_prefix, operations, extensions, signatures }