deleteSignature
Remove signatures from IPFS content identifiers to manage access permissions and control file visibility on public or private networks.
Instructions
Remove a signature from a CID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Whether the file is on public or private IPFS | public |
| cid | Yes | The CID to remove the signature from |
Implementation Reference
- src/index.ts:1430-1468 (handler)The complete implementation of the deleteSignature tool that removes a cryptographic signature from a CID on Pinata IPFS. It accepts network (public/private) and cid parameters, makes a DELETE request to the Pinata API, and returns a success or error response.
server.tool( "deleteSignature", "Remove a signature from a CID", { network: z .enum(["public", "private"]) .default("public") .describe("Whether the file is on public or private IPFS"), cid: z.string().describe("The CID to remove the signature from"), }, async ({ network, cid }) => { try { const url = `https://api.pinata.cloud/v3/files/${network}/signature/${cid}`; const response = await fetch(url, { method: "DELETE", headers: getHeaders(), }); if (!response.ok) { throw new Error( `Failed to delete signature: ${response.status} ${response.statusText}` ); } const data = await response.json(); return { content: [ { type: "text", text: `✅ Signature deleted successfully\n\n${JSON.stringify(data, null, 2)}`, }, ], }; } catch (error) { return errorResponse(error); } } );