pygeek_stellar/stellar_requests.py
def send_payment(source_account_address, source_account_seed, destination_account_address,
                 token_code, amount, token_issuer=None, transaction_memo=''):
    """
    This method is used to send a transaction of the specified token to a given address.
    :param str source_account_address: Address of the account from which the funds will be sent.
    :param str source_account_seed: Seed of the account from which the funds will be sent.
    :param str destination_account_address: Destination address.
    :param str amount: Amount to be sent.
    :param str token_code: Code of the token to be sent.
    :param str token_issuer: Issuer of the token to be sent. It can be None when dealing with native asset (XLM).
    :param str transaction_memo: Text memo to be included in Stellar transaction. Maximum size of 28 bytes.
    """
    if not is_seed_matching_address(source_account_seed, source_account_address):
        print("The payment could not be finalized. Either the given source account address or source"
              "account seed are invalid or they do not match.")
        return

    if not is_address_valid(destination_account_address):
        print('The given destination address is invalid')
        return
    if destination_account_address == source_account_address:
        print('Sending payment to own address. This is not allowed')
        return
    if token_issuer is not None and not is_address_valid(token_issuer):
        print('The given token issuer address is invalid')
        return
    if not is_transaction_text_memo_valid(transaction_memo):
        print('The maximum size of the text memo is {} bytes'.format(STELLAR_MEMO_TEXT_MAX_BYTES))
        return

    if yes_or_no_input('A payment of {} {} will be done to the following address {}. Are you sure you want to proceed?'
                       .format(amount, token_code, destination_account_address)) == USER_INPUT_NO:
        return

    operations = [create_payment_op(destination=destination_account_address,
                                    amount=amount,
                                    asset_code=token_code,
                                    asset_issuer=token_issuer,
                                    source=source_account_address)]
    response = submit_operations(source_account_seed, operations, transaction_memo)
    process_server_payment_response(response)

    This method is used to send a transaction of the specified token to a given address.
    :param str source_account_address: Address of the account from which the funds will be sent.
    :param str source_account_seed: Seed of the account from which the funds will be sent.
    :param str destination_account_address: Destination address.
    :param str amount: Amount to be sent.
    :param str token_code: Code of the token to be sent.
    :param str token_issuer: Issuer of the token to be sent. It can be None when dealing with native asset (XLM).
    :param str transaction_memo: Text memo to be included in Stellar transaction. Maximum size of 28 bytes.
    
This method is used to send a transaction of the specified token to a given address.
This method is used to send a transaction of the specified token to a given address .
def send_payment(source_account_address, source_account_seed, destination_account_address,
                 token_code, amount, token_issuer=None, transaction_memo=''):
    if not is_seed_matching_address(source_account_seed, source_account_address):
        print("The payment could not be finalized. Either the given source account address or source"
              "account seed are invalid or they do not match.")
        return
    if not is_address_valid(destination_account_address):
        print('The given destination address is invalid')
        return
    if destination_account_address == source_account_address:
        print('Sending payment to own address. This is not allowed')
        return
    if token_issuer is not None and not is_address_valid(token_issuer):
        print('The given token issuer address is invalid')
        return
    if not is_transaction_text_memo_valid(transaction_memo):
        print('The maximum size of the text memo is {} bytes'.format(STELLAR_MEMO_TEXT_MAX_BYTES))
        return
    if yes_or_no_input('A payment of {} {} will be done to the following address {}. Are you sure you want to proceed?'
                       .format(amount, token_code, destination_account_address)) == USER_INPUT_NO:
        return
    operations = [create_payment_op(destination=destination_account_address,
                                    amount=amount,
                                    asset_code=token_code,
                                    asset_issuer=token_issuer,
                                    source=source_account_address)]
    response = submit_operations(source_account_seed, operations, transaction_memo)
    process_server_payment_response(response)
def send_payment ( source_account_address , source_account_seed , destination_account_address , token_code , amount , token_issuer = None , transaction_memo = '' ) : if not is_seed_matching_address ( source_account_seed , source_account_address ) : print ( "The payment could not be finalized. Either the given source account address or source" "account seed are invalid or they do not match." ) return if not is_address_valid ( destination_account_address ) : print ( 'The given destination address is invalid' ) return if destination_account_address == source_account_address : print ( 'Sending payment to own address. This is not allowed' ) return if token_issuer is not None and not is_address_valid ( token_issuer ) : print ( 'The given token issuer address is invalid' ) return if not is_transaction_text_memo_valid ( transaction_memo ) : print ( 'The maximum size of the text memo is {} bytes' . format ( STELLAR_MEMO_TEXT_MAX_BYTES ) ) return if yes_or_no_input ( 'A payment of {} {} will be done to the following address {}. Are you sure you want to proceed?' . format ( amount , token_code , destination_account_address ) ) == USER_INPUT_NO : return operations = [ create_payment_op ( destination = destination_account_address , amount = amount , asset_code = token_code , asset_issuer = token_issuer , source = source_account_address ) ] response = submit_operations ( source_account_seed , operations , transaction_memo ) process_server_payment_response ( response )
This method is used to send a transaction of the specified token to a given address.
This method is used to send a transaction of the specified token to a given address .
"""
    This method is used to send a transaction of the specified token to a given address.
    :param str source_account_address: Address of the account from which the funds will be sent.
    :param str source_account_seed: Seed of the account from which the funds will be sent.
    :param str destination_account_address: Destination address.
    :param str amount: Amount to be sent.
    :param str token_code: Code of the token to be sent.
    :param str token_issuer: Issuer of the token to be sent. It can be None when dealing with native asset (XLM).
    :param str transaction_memo: Text memo to be included in Stellar transaction. Maximum size of 28 bytes.
    """
source_account_address
Address of the account from which the funds will be sent.
Address of the account from which the funds will be sent .
source_account_seed
Seed of the account from which the funds will be sent.
Seed of the account from which the funds will be sent .
destination_account_address
None
token_code
Code of the token to be sent.
Code of the token to be sent .
amount
Amount to be sent.
Amount to be sent .
token_issuer
Issuer of the token to be sent. It can be None when dealing with native asset (XLM).
Issuer of the token to be sent . It can be None when dealing with native asset ( XLM ) .
transaction_memo
Text memo to be included in Stellar transaction. Maximum size of 28 bytes.
Text memo to be included in Stellar transaction . Maximum size of 28 bytes .