Class UpdateNftsParams
Transaction Parameters for updating the metadata of one or more NFT instances.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class UpdateNftsParams : TransactionParams<TransactionReceipt>
Examples
Apply shared metadata to several serials from the same collection:
// Apply the *same* metadata blob to multiple serials at once. Use
// the params form when rotating a shared metadata reference across a
// set of NFTs in one collection. Method names: singular-one is
// `UpdateNftMetadataAsync`, plural-batch is `UpdateNftsMetadataAsync`.
var receipt = await client.UpdateNftsMetadataAsync(new UpdateNftsParams
{
Token = collection,
SerialNumbers = new long[] { 1, 2, 3 },
Metadata = Encoding.UTF8.GetBytes("{\"cid\":\"bafy...\"}")
});
Console.WriteLine($"Update status: {receipt.Status}");
Properties
| Edit this page View SourceCancellationToken
Optional cancellation token to interrupt the submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Metadata
The new metadata value to assign to the specified NFT instances. Must not exceed 100 bytes.
Declaration
public ReadOnlyMemory<byte> Metadata { get; set; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |
SerialNumbers
The serial numbers of the NFT instances to update. Must contain between 1 and 10 entries.
Declaration
public IReadOnlyList<long> SerialNumbers { get; set; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<long> |
Signatory
Additional private key, keys or signing callback method required to authorize the update. Must match the token's metadata key.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |
Remarks
Keys/callbacks added here will be combined with those already identified in the client object's context when signing this transaction.
Token
The Token ID of the NFT collection containing the instances to update.
Declaration
public EntityId Token { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |