hashgraph / hashgraph/hedera-sdk-reference
Add doc reference for HIP-657
- Dominant language
- HTML
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### 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_
```[tasklist]
### SDKs
- [ ] https://github.com/hashgraph/hedera-sdk-java/issues/1496
- [ ] https://github.com/hashgraph/hedera-sdk-js/issues/1733
- [ ] https://github.com/hashgraph/hedera-sdk-go/issues/774
- [ ] https://github.com/hashgraph/hedera-sdk-rust/issues/612
- [ ] https://github.com/hashgraph/hedera-sdk-swift/issues/166
- [ ] https://github.com/hashgraph/hedera-sdk-cpp/issues/443
```
Contributor guide
Assessment
This issue has not been assessed yet.