/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { constructionConstructionCombine } from "../../funcs/constructionConstructionCombine.js";
import * as models from "../../models/index.js";
import { formatResult, ToolDefinition } from "../tools.js";
const args = {
request: models.ConstructionCombineRequest$inboundSchema,
};
export const tool$constructionConstructionCombine: ToolDefinition<typeof args> =
{
name: "construction-construction-combine",
description: `Create Network Transaction from Signatures
Combine creates a network-specific transaction from an unsigned transaction and an array of provided signatures. The signed transaction returned from this method will be sent to the \`/construction/submit\` endpoint by the caller.`,
args,
tool: async (client, args, ctx) => {
const [result, apiCall] = await constructionConstructionCombine(
client,
args.request,
{ fetchOptions: { signal: ctx.signal } },
).$inspect();
if (!result.ok) {
return {
content: [{ type: "text", text: result.error.message }],
isError: true,
};
}
const value = result.value;
return formatResult(value, apiCall);
},
};