MetaplexTokenMetaDataProgram.createEscrowAccount constructor

MetaplexTokenMetaDataProgram.createEscrowAccount({
  1. required SolAddress escrow,
  2. required SolAddress metadata,
  3. required SolAddress mint,
  4. required SolAddress tokenAccount,
  5. required SolAddress edition,
  6. required SolAddress payer,
  7. SolAddress? authority,
  8. SolAddress systemProgram = SystemProgramConst.programId,
  9. SolAddress sysvarInstructions = SystemProgramConst.sysvarInstructionsPubkey,
})

Implementation

factory MetaplexTokenMetaDataProgram.createEscrowAccount({
  required SolAddress escrow,
  required SolAddress metadata,
  required SolAddress mint,
  required SolAddress tokenAccount,
  required SolAddress edition,
  required SolAddress payer,
  SolAddress? authority,
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress sysvarInstructions = SystemProgramConst.sysvarInstructionsPubkey,
}) {
  return MetaplexTokenMetaDataProgram(
      keys: [
        escrow.toWritable(),
        metadata.toWritable(),
        mint.toReadOnly(),
        tokenAccount.toReadOnly(),
        edition.toReadOnly(),
        payer.toSignerAndWritable(),
        systemProgram.toReadOnly(),
        sysvarInstructions.toReadOnly(),
        if (authority != null) authority.toSigner()
      ],
      programId: MetaplexTokenMetaDataProgramConst.programId,
      layout: const MetaplexTokenMetaDataCreateEscrowAccountLayout());
}