SPLTokenMetaDataProgram.initialize constructor
SPLTokenMetaDataProgram.initialize({
- required SPLTokenMetaDataInitializeLayout layout,
- required SolAddress metadata,
- required SolAddress updateAuthority,
- required SolAddress mint,
- required SolAddress mintAuthority,
- 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);
}