Show / Hide Table of Contents

Class UpdateFileParams

Input parameters describing how to update a network file.

Inheritance
object
TransactionParams
TransactionParams<TransactionReceipt>
UpdateFileParams
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class UpdateFileParams : TransactionParams<TransactionReceipt>
Examples

Update mutable file properties (memo, expiration). Any null property is left unchanged:

// Update mutable file properties (memo, expiration, key list). Only
// non-null properties are changed — leaving a field null preserves
// it. To replace contents entirely, use UpdateFileParams.Contents or
// create a new file.
var receipt = await client.UpdateFileAsync(new UpdateFileParams
{
    File = file,
    Memo = "Updated memo",
    Expiration = new ConsensusTimeStamp(DateTime.UtcNow.AddDays(90))
});
Console.WriteLine($"Update status: {receipt.Status}");

Properties

| Edit this page View Source

CancellationToken

Optional cancellation token to interrupt the transaction submission process.

Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
Type Description
CancellationToken?
| Edit this page View Source

Contents

Replace the contents of the file with these new contents. Set to

null

to leave the existing content unchanged.

Declaration
public ReadOnlyMemory<byte>? Contents { get; set; }
Property Value
Type Description
ReadOnlyMemory<byte>?
| Edit this page View Source

Endorsements

A descriptor of the keys required to sign transactions editing and otherwise manipulating the contents of this file. Set to

null

to leave unchanged.

Declaration
public Endorsement[]? Endorsements { get; set; }
Property Value
Type Description
Endorsement[]
| Edit this page View Source

Expiration

The new expiration date for this file, it will be ignored if it is equal to or before the current expiration date value for this file.

Declaration
public ConsensusTimeStamp? Expiration { get; set; }
Property Value
Type Description
ConsensusTimeStamp?
| Edit this page View Source

File

The address of the network file to update.

Declaration
public EntityId File { get; set; }
Property Value
Type Description
EntityId
| Edit this page View Source

Memo

If not null, a new description of the file.

Declaration
public string? Memo { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Signatory

Additional private key, keys or signing callback method required to replace the contents of this file. Typically matches all the Endorsements in the Endorsement array associated with this file.

Declaration
public Signatory? Signatory { get; set; }
Property Value
Type Description
Signatory
Remarks

Keys or callbacks added here will be combined with those already identified in the client object's context when signing this transaction to update this file.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph