SPLTokenMetaDataProgram.initialize constructor

SPLTokenMetaDataProgram.initialize({
  1. required SPLTokenMetaDataInitializeLayout layout,
  2. required SolAddress metadata,
  3. required SolAddress updateAuthority,
  4. required SolAddress mint,
  5. required SolAddress mintAuthority,
  6. required SolAddress programId,
})

Initializes a TLV.

Implementation

factory SPLTokenMetaDataProgram.initialize({
  required SPLTokenMetaDataInitializeLayout layout,

  /// Metadata
  required SolAddress metadata,

  /// Update authority
  required SolAddress updateAuthority,

  /// Mint
  required SolAddress mint,

  /// Mint authority
  required SolAddress mintAuthority,
  required SolAddress programId,
}) {
  return SPLTokenMetaDataProgram(
      layout: layout,
      keys: [
        metadata.toWritable(),
        updateAuthority.toReadOnly(),
        mint.toReadOnly(),
        mintAuthority.toSigner()
      ],
      programId: programId);
}