Class CreateFileParams
File creation parameters.
Inherited Members
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 SourceCancellationToken
Optional cancellation token to interrupt the file creation.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Contents
The initial contents of the file.
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. Only one key is required to sign the transaction to delete the file.
Declaration
public Endorsement[] Endorsements { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement[] |
Expiration
Original expiration date for the file, fees will be charged as appropriate.
Declaration
public ConsensusTimeStamp Expiration { get; set; }
Property Value
| Type | Description |
|---|---|
| ConsensusTimeStamp |
Memo
A short 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 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.