Class MintNftParams
Transaction Parameters for Minting (Creating) a new NFT for a given class of NFTs.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class MintNftParams : TransactionParams<NftMintReceipt>
Examples
Mint three NFTs with different JSON metadata in one transaction. The
receipt's SerialNumbers lists the newly issued serials in order:
var mintReceipt = await client.MintNftsAsync(new MintNftParams
{
Token = createReceipt.Token,
Metadata = new[]
{
(ReadOnlyMemory<byte>)Encoding.UTF8.GetBytes("{\"name\":\"NFT #1\"}"),
(ReadOnlyMemory<byte>)Encoding.UTF8.GetBytes("{\"name\":\"NFT #2\"}"),
(ReadOnlyMemory<byte>)Encoding.UTF8.GetBytes("{\"name\":\"NFT #3\"}")
}
});
Console.WriteLine($"Minted serial numbers: {string.Join(", ", mintReceipt.SerialNumbers)}");
Properties
| Edit this page View SourceCancellationToken
Optional Cancellation token that interrupts the NFT minting process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Metadata
An array of Metadata, to be associated with the newly created NFTs. Each metadata entry will correspond to a newly created NFT. The metadata value may be empty.
Declaration
public IEnumerable<ReadOnlyMemory<byte>> Metadata { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ReadOnlyMemory<byte>> |
Signatory
Additional private key, keys or signing callback method required to authorize the creation. Typically matches the Endorsement assigned to NFT's supply 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 to create the NFT.
Token
The Token ID of the NFT class to create.
Declaration
public EntityId Token { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |