My questions here are:
- what the seed is?
- Why need seed?
- Is the seed input randomly or specific?
For examples:
- The first parameter is seeds for function
findProgramAddress
const [_pda, _nonce] = await PublicKey.findProgramAddress(
[Buffer.from(anchor.utils.bytes.utf8.encode("escrow"))],
program.programId
)
- The second parameter is a seed for function createWithSeed?
const GREETING_SEED = 'hello';
const greetedPubkey = await PublicKey.createWithSeed(
payer.publicKey,
GREETING_SEED,
programId,
);