for (auto i = 0; i < unspent->size(); ++i)
{
const auto& [previous_output, key] = unspent->at(i);
const auto address = convert_key_to_address(key);
bcs::chain::script prevout_script =
bcs::chain::script::to_pay_key_hash_pattern(address.hash());
bcs::endorsement endorsement;
auto rc = bcs::chain::script::create_endorsement(endorsement,
key, prevout_script, tx, i, bcs::machine::sighash_algorithm::all);
}