base/lib/stellar/operation.rb
# Path Payment Strict Receive operation builder.
#
# @param source_account [KeyPair, nil] the source account for the operation
# @param destination [Stellar::KeyPair] the receiver of the payment
# @param amount [Array] the destination asset and the amount to pay
# @param with [Array] the source asset and maximum allowed source amount to pay with
# @param path [Array<Stellar::Asset>] the payment path to use
#
# @return [Stellar::Operation] the built operation
Path Payment Strict Receive operation builder.
Path Payment Strict Receive operation builder .
def path_payment_strict_receive(destination:, amount:, with:, path: [], source_account: nil)
        raise ArgumentError unless destination.is_a?(KeyPair)
        dest_asset, dest_amount = get_asset_amount(amount)
        send_asset, send_max = get_asset_amount(with)
        op = PathPaymentStrictReceiveOp.new(
          destination: destination.muxed_account,
          dest_asset: dest_asset,
          dest_amount: dest_amount,
          send_asset: send_asset,
          send_max: send_max,
          path: path.map { |p| Asset(p) }
        )
        make(source_account: source_account, body: [:path_payment_strict_receive, op])
      end
def path_payment_strict_receive ( destination : , amount : , with : , path : [ ] , source_account : nil ) raise ArgumentError unless destination . is_a? ( KeyPair ) dest_asset , dest_amount = get_asset_amount ( amount ) send_asset , send_max = get_asset_amount ( with ) op = PathPaymentStrictReceiveOp . new ( destination : destination . muxed_account , dest_asset : dest_asset , dest_amount : dest_amount , send_asset : send_asset , send_max : send_max , path : path . map { | p | Asset ( p ) } ) make ( source_account : source_account , body : [ :path_payment_strict_receive , op ] ) end
Path Payment Strict Receive operation builder.
Path Payment Strict Receive operation builder .
the built operation
the built operation
Stellar::Operation
destination
the receiver of the payment
the receiver of the payment
amount
the destination asset and the amount to pay
the destination asset and the amount to pay
with
the source asset and maximum allowed source amount to pay with
the source asset and maximum allowed source amount to pay with
path
the payment path to use
the payment path to use
source_account
the source account for the operation
the source account for the operation