Show / Hide Table of Contents

Class CreateFileParams

File creation parameters.

Inheritance
object
TransactionParams
TransactionParams<FileReceipt>
CreateFileParams
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 CreateFileParams : TransactionParams<FileReceipt>
Examples

Create a file with a single-key endorsement and a small payload. The same endorsement is required to update, append to, or delete the file:

var createReceipt = await client.CreateFileAsync(new CreateFileParams
{
    Contents = Encoding.UTF8.GetBytes("Hello from Hiero SDK!"),
    Endorsements = new[] { payerEndorsement },
    Memo = "Sample file"
});
Console.WriteLine($"File created: {createReceipt.File}");

Properties

| Edit this page View Source

CancellationToken

Optional cancellation token to interrupt the file creation.

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

Contents

The initial contents of the file.

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. Only one key is required to sign the transaction to delete the file.

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

Expiration

Original expiration date for the file, fees will be charged as appropriate.

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

Memo

A short 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 create this file. Typically matches the Endorsements 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 create this file.

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