def transfer_asset(asset_id: nil,
                       amount: nil,
                       script: nil, address: nil,
                       provider: nil, unspent_outputs: nil, change_address: nil)
      raise ArgumentError, "AssetID must be provided" if !asset_id
      raise ArgumentError, "Either `script` or `address` must be specified" if !script && !address
      raise ArgumentError, "Both `script` and `address` cannot be specified" if script && address
      raise ArgumentError, "Amount must be greater than zero" if !amount || amount <= 0

      provider = Provider.new{|atxbuilder| unspent_outputs } if unspent_outputs
      change_address = AssetAddress.parse(change_address) if change_address

      asset_id = AssetID.parse(asset_id)
      script ||= AssetAddress.parse(address).script

      self.transferred_assets << {asset_id: asset_id, amount: amount, script: script, provider: provider, change_address: change_address}
    end
def transfer_asset(asset_id: nil,
                       amount: nil,
                       script: nil, address: nil,
                       provider: nil, unspent_outputs: nil, change_address: nil)
      raise ArgumentError, "AssetID must be provided" if !asset_id
      raise ArgumentError, "Either `script` or `address` must be specified" if !script && !address
      raise ArgumentError, "Both `script` and `address` cannot be specified" if script && address
      raise ArgumentError, "Amount must be greater than zero" if !amount || amount <= 0

      provider = Provider.new{|atxbuilder| unspent_outputs } if unspent_outputs
      change_address = AssetAddress.parse(change_address) if change_address

      asset_id = AssetID.parse(asset_id)
      script ||= AssetAddress.parse(address).script

      self.transferred_assets << {asset_id: asset_id, amount: amount, script: script, provider: provider, change_address: change_address}
    end
Adds a transfer output.
 May override per-builder unspents/provider/change address to allow multi-user swaps.