-
Notifications
You must be signed in to change notification settings - Fork 70
[Intermediate]: Implement deleteFile TCK endpoint #1215
Description
🔧 Intermediate
This issue is suited for contributors who are comfortable with C++ and Git and are ready to work across multiple files, follow established patterns, and test against an external system.
Intermediate Issues typically involve reading existing code, understanding how components interact, and replicating patterns in a new context. They may also require setting up additional tooling or infrastructure beyond the SDK itself.
Important
🔧 About Intermediate Issues
Intermediate Issues are a good fit for contributors who are comfortable with
the basic project workflow and want to take on more involved tasks.
These issues often involve:
- Working across multiple files and components
- Following established patterns to implement new functionality
- Setting up and testing against external tools or environments
You'll usually see Intermediate Issues focused on things like:
- Adding new endpoints, services, or transaction types
- Wiring up existing SDK classes to new subsystems (e.g. TCK server)
- Changes that require local environment setup beyond just building the SDK
Other types of contributions — such as small doc fixes, larger features,
or deeper architectural work — are just as valuable and may use different labels.
👾 Description of the Issue
The TCK (Test Compatibility Kit) server in this repository exposes JSON-RPC endpoints that the hiero-sdk-tck test suite calls to verify SDK behavior across all Hiero SDKs.
The FileService currently implements two endpoints:
createFile— creates a file on the Hiero networkupdateFile— updates an existing file
The TCK test suite also expects a deleteFile endpoint, but it is not yet implemented in this C++ SDK. The test file test-file-delete-transaction.ts in the TCK repo calls the deleteFile JSON-RPC method with the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId |
string | optional | The ID of the file to delete |
commonTransactionParams |
object | optional | Common transaction parameters (signers, memo, fee, etc.) |
The SDK already has a fully implemented FileDeleteTransaction class in:
src/sdk/main/include/FileDeleteTransaction.h
This issue is about wiring up the existing FileDeleteTransaction class to the TCK server, following the same pattern used by deleteToken in the TokenService.
💡 Proposed Solution
Add a deleteFile JSON-RPC endpoint to the TCK server by:
- Creating a new
DeleteFileParamsstruct (parameter deserialization) - Declaring and implementing a
deleteFilefunction inFileService - Registering the new method in
TckServer
The implementation should:
- Follow the exact same pattern as
deleteTokenin theTokenService - Use the existing
FileDeleteTransactionSDK class - Accept
fileIdandcommonTransactionParamsas optional parameters - Return a JSON object with a
statusstring from the transaction receipt
👩💻 Implementation Guidance
The deleteToken endpoint in TokenService is the closest reference — deleteFile is structurally identical, just for files instead of tokens. Study how deleteToken is wired up end-to-end and replicate that pattern.
At a high level, you'll need to:
- Create a
DeleteFileParamsstruct for JSON deserialization - Declare and implement a
deleteFilefunction inFileService - Register the new
deleteFilemethod inTckServer
Reference files:
| File | What to look at |
|---|---|
src/tck/include/token/params/DeleteTokenParams.h |
Params struct pattern (closest match) |
src/tck/include/token/TokenService.h |
Service header pattern |
src/tck/src/token/TokenService.cc |
deleteToken implementation (closest match) |
src/tck/src/TckServer.cc |
How endpoints are registered (includes, method registration, template instantiation) |
src/sdk/main/include/FileDeleteTransaction.h |
The SDK class being wired up |
✅ Acceptance Criteria
To help get this change merged smoothly:
- Scope: Changes are limited to adding the
deleteFileTCK endpoint - Pattern: Implementation follows the same structure as existing endpoints (e.g.
deleteToken) - Params:
DeleteFileParamscorrectly deserializesfileIdandcommonTransactionParamsfrom JSON - Registration: The
deleteFilemethod is registered inTckServerand responds to JSON-RPC calls - Behavior: No other SDK behavior or API changes
- Build: Project compiles successfully
- Tests: Existing CI checks pass
- Review: All code review feedback addressed
📋 Step-by-Step Contribution Guide
To help keep contributions consistent and easy to review, we recommend following these steps:
- Comment
/assignto request the issue - Wait for assignment
- Fork the repository and create a branch
- Set up the project using the instructions in
README.md - Make the requested changes
- Sign each commit using
-s -S - Push your branch and open a pull request
Read Workflow Guide for step-by-step workflow guidance.
Read README.md for setup instructions.
❗ Pull requests cannot be merged without S and s signed commits.
See the Signing Guide.
🤔 Additional Information
If you have questions while working on this issue, feel free to ask!
You can reach the community and maintainers here:
Hiero-SDK-C++ Discord
Whether you need help finding the right file, understanding existing code,
or confirming your approach — we're happy to help.