Opcode: Added toBuffer and fromBuffer methods