Class UpdateFileParams
Input parameters describing how to update a network file.
Inherited Members
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 SourceCancellationToken
Optional cancellation token to interrupt the transaction submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
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>? |
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[] |
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? |
File
The address of the network file to update.
Declaration
public EntityId File { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Memo
If not null, a new description of the file.
Declaration
public string? Memo { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
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.