Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing Topic Metadata Accessibility in the Hedera REST API #883

Merged
merged 26 commits into from
Mar 6, 2024
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
87926bd
gemlock revert (#882)
mgarbs Feb 7, 2024
fb97569
Update hip-857.md to Council Review (#881)
mgarbs Feb 7, 2024
e7a9dc9
Update TokenLockTransactionBody and TokenUnlockTransactionBody (#880)
netopyr Feb 7, 2024
9b4239b
Create HIP: Add Cancun Opcodes (TSTORE, TLOAD, MCOPY) (#865)
shemnon Feb 14, 2024
7bd2e62
Create HIP: Add Cancun KZG precompile (#867)
shemnon Feb 14, 2024
7fa443c
chore: create hip-874
kantorcodes Feb 14, 2024
a97d0ef
chore: fix formatting
kantorcodes Feb 14, 2024
d4df0b6
chore: fix formatting
kantorcodes Feb 14, 2024
8bc2084
chore: fix formatting
kantorcodes Feb 14, 2024
6638590
chore: fix formatting
kantorcodes Feb 14, 2024
e3dd114
chore: update backwards compat section
kantorcodes Feb 16, 2024
1d431ba
Update HIP/hip-874.md
kantorcodes Feb 16, 2024
841e564
Update HIP/hip-874.md
kantorcodes Feb 16, 2024
905ec5a
Update HIP/hip-874.md
kantorcodes Feb 16, 2024
2a3e73e
Update HIP/hip-874.md
kantorcodes Feb 16, 2024
a29f738
Update HIP/hip-874.md
kantorcodes Feb 16, 2024
d6f8e90
Update HIP/hip-874.md
kantorcodes Feb 22, 2024
9075229
Merge branch 'main' of https://github.com/kantorcodes/hedera-improvem…
kantorcodes Feb 22, 2024
392056e
Merge branch 'main' into hip-874-topic-memo
kantorcodes Feb 22, 2024
b8b2da7
review comments
kantorcodes Feb 22, 2024
656ae53
Merge branch 'hip-874-topic-memo' of https://github.com/kantorcodes/h…
kantorcodes Feb 22, 2024
57b2fe1
Update HIP/hip-874.md
kantorcodes Feb 22, 2024
4c08ef2
Update HIP/hip-874.md
kantorcodes Feb 22, 2024
a76fa50
Update hip-874.md
kantorcodes Feb 22, 2024
dc2179f
Update hip-874.md
kantorcodes Feb 22, 2024
a91e0ea
Update hip-874.md
kantorcodes Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
64 changes: 64 additions & 0 deletions HIP/hip-874.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
hip: 874
title: Enhancing Topic Metadata Accessibility in the Hedera REST API
author: Michael Kantor (@kantorcodes), Ty Smith (@ty-swirldslabs)
type: Standards Track
category: Mirror
status: Draft
created: 2024-02-14
requested-by: TierBot
discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/pull/883
kantorcodes marked this conversation as resolved.
Show resolved Hide resolved
needs-council-approval: Yes
---

## Abstract:
This HIP proposes an enhancement to the Hedera REST API to enable access to topic ID metadata, including the memo field and other relevant entity information. Currently, there is limited direct access to topic metadata through the REST API, which can hinder the development of applications that rely on this data for functionality or auditing purposes. This proposal aims to streamline access to topic metadata, reducing the need for workarounds and enhancing the capabilities of applications built on Hedera.

## Motivation:
The ability to access topic ID metadata, including the memo field, submit key, and deleted field directly through the REST API is crucial for a wide range of applications, including messaging, event tracking, and audit-ability functions. Currently, developers may need to employ indirect methods or multiple API calls to retrieve this information, leading to inefficiencies and potential inaccuracies. By providing direct access to this metadata, the proposal seeks to enhance developer experience, reduce computational load, and foster the development of more feature-rich applications on the Hedera platform.

## Specification:
The proposed enhancement involves extending the REST API to include a new endpoint to return topic ID metadata, including the memo field and other relevant entity information.

### Route:
/api/v1/topics/{topic id}

Current Response Structure returns:
```json
{"_status":{"messages":[{"message":"Not found"}]}}
```

Proposed Response Structure:
```json
{
"topic_id": "0.0.123456",
"memo": "[Topic Memo]",
"admin_key": {
"_type": "ED25519",
"key": "bfc9d4a344389324119eed485eb3a875b1e5a54bd189d2fd5ad88ce1d3473dee"
},
"deleted": false,
"submit_key": {
"_type": "ED25519",
"key": "bfc9d4a344389324119eed485eb3a875b1e5a54bd189d2fd5ad88ce1d3473dee"
},
"auto_renew_period": 7890000,
"auto_renew_account": "0.0.654321",
"timestamp" : {
"from: "1707953087.386834512",
"to": null
}
"created_timestamp": "1707953087.386834512"
}
```

The addition of these fields will provide comprehensive metadata about topics directly through the API.

### Rationale:
Providing direct access to topic ID metadata, including the memo and other relevant information, addresses a critical need for developers building on the Hedera network. This enhancement will facilitate a range of applications, from simple messaging systems to complex, multi-layered applications requiring detailed audit trails. The proposal supports the principles of transparency, efficiency, and developer friendliness that are essential to the Hedera ecosystem.

### Backwards Compatibility:
This change is backwards compatible as it would entail the creation of a new API Endpoint. This ensures that existing applications will continue to operate without modification, while new and updated applications can take advantage of the enhanced metadata accessibility.

### Security Implications:
The proposal does not introduce significant changes to the security posture of the Hedera API. Access controls and authentication mechanisms remain unchanged, ensuring that the introduction of additional metadata fields does not compromise the integrity or confidentiality of data within the Hedera network.