var transaction = new web3.Transaction({
feePayer: new web3.PublicKey(
'2joML3MhVLPmASMDBYuaMzsFiCtdm3aityWu1pJZ1wg8',
),
}).add(
splToken.Token.createTransferInstruction(
programId,
user1TokenAccount.address,
user2TokenAccount.address,
user1Wallet.publicKey,
[],
1,
),
); let blockhashObj = await connection.getRecentBlockhash();
transaction.recentBlockhash = await blockhashObj.blockhash;
let endocdeTransction = transaction.serialize({
requireAllSignatures: false,
verifySignatures: false,
});
let newconnectionTransction = web3.Transaction.from(newEncodedBuffer);
i want to get amount from newconnectionTransction
i was getting amount in buffer data: <Buffer 03 01 00 00 00 00 00 00 00> which i was unable to decode