MetaplexTokenMetaDataProgram.setAndVerifyCollection constructor

MetaplexTokenMetaDataProgram.setAndVerifyCollection({
  1. required SolAddress metadata,
  2. required SolAddress collectionAuthority,
  3. required SolAddress payer,
  4. required SolAddress updateAuthority,
  5. required SolAddress collectionMint,
  6. required SolAddress collection,
  7. required SolAddress collectionMasterEditionAccount,
  8. SolAddress? collectionAuthorityRecord,
})

Implementation

factory MetaplexTokenMetaDataProgram.setAndVerifyCollection({
  required SolAddress metadata,
  required SolAddress collectionAuthority,
  required SolAddress payer,
  required SolAddress updateAuthority,
  required SolAddress collectionMint,
  required SolAddress collection,
  required SolAddress collectionMasterEditionAccount,
  SolAddress? collectionAuthorityRecord,
}) {
  return MetaplexTokenMetaDataProgram(
      keys: [
        metadata.toWritable(),
        collectionAuthority.toSignerAndWritable(),
        payer.toSignerAndWritable(),
        updateAuthority.toReadOnly(),
        collectionMint.toReadOnly(),
        collection.toReadOnly(),
        collectionMasterEditionAccount.toReadOnly(),
        if (collectionAuthorityRecord != null)
          collectionAuthorityRecord.toReadOnly()
      ],
      programId: MetaplexTokenMetaDataProgramConst.programId,
      layout: const MetaplexTokenMetaDataSetAndVerifyCollectionLayout());
}