Method: Stellar::Operation.path_payment_strict_send
- Defined in:
- lib/stellar/operation.rb
.path_payment_strict_send(destination:, amount:, with:, path: [], source_account: nil) ⇒ Stellar::Operation
Path Payment Strict Receive operation builder.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/stellar/operation.rb', line 299 def path_payment_strict_send(destination:, amount:, with:, path: [], source_account: nil) raise ArgumentError unless destination.is_a?(KeyPair) dest_asset, dest_min = get_asset_amount(amount) send_asset, send_amount = get_asset_amount(with) op = PathPaymentStrictSendOp.new( destination: destination.muxed_account, send_asset: send_asset, send_amount: send_amount, dest_asset: dest_asset, dest_min: dest_min, path: path.map { |p| Asset(p) } ) make(source_account: source_account, body: [:path_payment_strict_send, op]) end |