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

Add doc reference for HIP-657 #131

Open
6 tasks done
SimiHunjan opened this issue Jul 27, 2023 · 0 comments
Open
6 tasks done

Add doc reference for HIP-657 #131

SimiHunjan opened this issue Jul 27, 2023 · 0 comments
Labels
enhancement New feature or request P1

Comments

@SimiHunjan
Copy link
Collaborator

SimiHunjan commented Jul 27, 2023

Problem

HIP-657 introduces new HAPI APis. The new APIs need to be supported in the SDKs.

HIP:https://hips.hedera.com/hip/hip-657

Protobufs

New Transaction:

message NftMetadataUpdateTransactionBody {
    /**
     * The Token to be updated
     */
    TokenID token = 1;

    /**
     * The metadata key of the Token. If Token is immutable, transaction will resolve to
     * TOKEN_IS_IMMUTABlE.
     */
     
     Key metadataKey = 2;

    /**
     * Represents the unique metadata of the NFT
     */
    bytes metadata = 3;
}

Update Existing Transaction:

message TokenCreateTransactionBody {
...
    /**
     * The key which can change the supply of a token. The key is used to sign Token NFT Metadata Update
     * operations
     */
    Key metadataKey = 11;
}

message TokenUpdateTransactionBody {
...
    /**
     * The key which can change the metadata of an NFT. The key is used to sign Token NFT Metadata Update
     * operations
     */
    Key metadataKey = 11;
}

Solution

Document the API design for each SDK to add this feature.

Java + JavaScript

new NftMetadataUpdateTransaction()
      .setTokenId(tokenId)
      .setMetadataKey(key)
      .setMetadata(bytes) 
new TokenCreateTransaction()
     .setMetadataKey(key)
new TokenUpdateTransaction()
     .setMetadataKey(key)

Go

hedera.NewNftMetadataUpdateTransaction()
      .SetTokenId(tokenId)
      .SetMetadataKey(key)
      .SetMetadata(bytes) 
hedera.NewTokenCreateTransaction()
     .SetMetadataKey(key)
hedera.NewTokenUpdateTransaction()
     .SetMetadataKey(key)

C++

Rust

Swift

Alternatives

No response

SDKs

  1. Epic enhancement good first issue protobuf services
    thenswan
  2. dependencies enhancement good first issue p1 protobuf services
    svetoslav-nikol0v
  3. enhancement p1
    0xivanov
  4. P1 enhancement
  5. P1 enhancement
  6. Feature Enhancement
    gsstoykov
@SimiHunjan SimiHunjan added the enhancement New feature or request label Jul 27, 2023
@SimiHunjan SimiHunjan added the P1 label Jan 17, 2024
@SimiHunjan SimiHunjan changed the title Add design document for HIP-657 Add doc reference for HIP-657 Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1
Projects
None yet
Development

No branches or pull requests

1 participant