I am following the soldev tutorial. In the tutorial about Cross Program Instruction is this piece of code:
invoke_signed(
&system_instruction::create_account(
initializer.key, //if this is the account whothat pays for the transaction
token_mint.key, //then where is his key-pair given
rent_lamports,
82,
token_program.key,),
&[initializer.clone(),token_mint.clone(),system_program.clone(),],
&[&[b"token_mint", &[mint_bump]]],)?;
msg!("Created token mint account");
My question is, the initializer is the one who pays the transaction, but where is it'sits private key? I initially thought in the accounts array, in their metadata is given it'sits private key for signing but the accountmeta struct doesn't have it.
The full code can be found here: https://soldev.app/course/cpi Section: Demo