SPLTokenMetaDataProgram.update constructor

SPLTokenMetaDataProgram.update({
  1. required SPLTokenMetaDataUpdateLayout layout,
  2. required SolAddress programId,
  3. required SolAddress metadata,
  4. required SolAddress updateAuthority,
})

Updates a field in a token-metadata account.

Implementation

factory SPLTokenMetaDataProgram.update({
  required SPLTokenMetaDataUpdateLayout layout,
  required SolAddress programId,

  /// Metadata account
  required SolAddress metadata,

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