I am new to solana and exploring the things. I came across these terms
SystemProgram.createAccount
Token.createInitAccountInstruction
Token.createTransferInstruction
What is the difference between these three?
I am new to solana and exploring the things. I came across these terms
SystemProgram.createAccount
Token.createInitAccountInstruction
Token.createTransferInstruction
What is the difference between these three?
SystemProgram.createAccount: allocates a certain number of bytes, assigns the account to a program, and transfers the given lamports into the account. More information about accounts at https://docs.solana.com/terminology#account
Token.createInitAccountInstruction: after an account has been created, then you can use this instruction to initialize data in the account, specifying what mint it belongs to, who owns it, etc
Token.createTransferInstruction: after two accounts has been created and initialized, and at least one of them has tokens, you can use this instruction to move tokens from one account to another