MetaplexFixedPriceSaleProgram.claimResource constructor

MetaplexFixedPriceSaleProgram.claimResource({
  1. required SolAddress market,
  2. required SolAddress treasuryHolder,
  3. required SolAddress sellingResource,
  4. required SolAddress sellingResourceOwner,
  5. required SolAddress vault,
  6. required SolAddress metadata,
  7. required SolAddress owner,
  8. required SolAddress destination,
  9. required SolAddress clock,
  10. required SolAddress tokenMetadataProgram,
  11. required MetaplexFixedPriceSaleClaimResourceLayout layout,
  12. List<AccountMeta> anchorRemainingAccounts = const [],
  13. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  14. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexFixedPriceSaleProgram.claimResource({
  required SolAddress market,
  required SolAddress treasuryHolder,
  required SolAddress sellingResource,
  required SolAddress sellingResourceOwner,
  required SolAddress vault,
  required SolAddress metadata,
  required SolAddress owner,
  required SolAddress destination,
  required SolAddress clock,
  required SolAddress tokenMetadataProgram,
  required MetaplexFixedPriceSaleClaimResourceLayout layout,
  List<AccountMeta> anchorRemainingAccounts = const [],
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexFixedPriceSaleProgram(keys: [
    market.toReadOnly(),
    treasuryHolder.toReadOnly(),
    sellingResource.toReadOnly(),
    sellingResourceOwner.toSigner(),
    vault.toWritable(),
    metadata.toWritable(),
    owner.toReadOnly(),
    destination.toWritable(),
    clock.toReadOnly(),
    tokenProgram.toReadOnly(),
    tokenMetadataProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ...anchorRemainingAccounts
  ], programId: MetaplexFixedPriceSaleProgramConst.programId, layout: layout);
}