transfer_to_vesting

Api.transfer_to_vesting(to: str, amount: Union[decimal.Decimal, float, int, str], from_account: str, wif: str, **kwargs)[source]

Power up a given amount of DEFAULT_ASSET (default: GOLOS) from from_account into to.

Basic Usage (Convert 1000 GOLOS from someguy123 into GESTS to someguy123)

>>> g = Api()
>>> tf = g.transfer_to_vesting(
...   to='someguy123', from_account='someguy123', wif='5Jq19TeeVmGrBFnu32oxfxQMiipnSCKmwW7fZGUVLAoqsKJ9JwP'
...   amount='1000'
... )
>>> print('TXID:', tf['id'], 'Block:', tf['block_num'])
TXID: c901c52daf57b60242d9d7be67f790e023cf2780 Block: 30895436
Parameters
  • to (str) – The username of the account you want to send coins to

  • amount (Decimal) – The amount of coins to send, as either a Decimal, str, int or float

  • from_account (str) – The username of the account to send from

  • wif (str) – The active/owner private key for the from_account, as a string in WIF format

Return dict transfer

A dictionary containing info about the completed TX, inc. id (full ret below)

Return data:

dict(
    ref_block_num: int, ref_block_prefix:int,
    expiration:str, operations:list, extensions:list,
    signatures:List[str], block_num:int, id:str
)